# Beexai Eval

> Evaluates post-hoc explainable AI (XAI) attribution methods on tabular data across binary classification, multi-class classification, and regression tasks. It measures how well feature importance scores align with core XAI desiderata—faithfulness, plausibility, robustness, and complexity—using ground-truth-aligned quantitative metrics. Use when the user wants to benchmark on inria-soda/tabular-benchmark, OpenML-CC18 Curated Classification, or asks about evaluating this task. Reports Infidelity.

- Skill: `qhjqhj00/beexai-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/beexai-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/beexai-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/beexai-eval

---


# beexai-eval

> BEExAI: Benchmark to Evaluate Explainable AI — Sithakoul et al. (2024) (arXiv:2407.19897, 2024)

## What this evaluates

Evaluates post-hoc explainable AI (XAI) attribution methods on tabular data across binary classification, multi-class classification, and regression tasks. It measures how well feature importance scores align with core XAI desiderata—faithfulness, plausibility, robustness, and complexity—using ground-truth-aligned quantitative metrics.

## Datasets

- **inria-soda/tabular-benchmark** — total ?; splits: train (-1), test (-1)
- **OpenML-CC18 Curated Classification** — total ?; splits: train (-1), test (-1)

## Metrics

- `Infidelity` **(primary)** — range: [0, 1]
  - Measures the discrepancy between a model's output changes and the attribution scores when inputs are perturbed. Lower values indicate higher faithfulness to the model's decision process.
- `Accuracy` — range: [0, 1]
  - Standard classification metric: ratio of correctly predicted instances to total instances.
- `F1 score` — range: [0, 1]
  - Harmonic mean of precision and recall for classification tasks.
- `MSE` — range: other
  - Mean Squared Error: average of squared differences between predicted and actual regression values.
- `RMSE` — range: other
  - Root Mean Squared Error: square root of MSE, providing error magnitude in the same units as the target.
- `R2 score` — range: [0, 1]
  - Coefficient of determination: proportion of variance in the dependent variable predictable from the independent variables.

## Input / output format

**Input**: Tabular feature vectors (numerical and/or categorical) for binary classification, multi-class classification, or regression tasks. Features are pre-scaled using QuantileTransformer for classification or MinMaxScaler for regression targets.

**Output**: Feature attribution scores generated by XAI methods (e.g., LIME, SHAP, Integrated Gradients) and model predictions (class probabilities or continuous regression values).

## Scoring recipe

```python
def evaluate_xai(test_data, xai_method, metric_fn, n_seeds=5, sample_size=1000):
    scores = []
    for seed in range(n_seeds):
        sampled_inputs = stratified_sample(test_data, n=sample_size, seed=seed)
        attributions = xai_method.generate(sampled_inputs)
        preds = model.predict(sampled_inputs)
        score = metric_fn(attributions, preds, sampled_inputs)
        scores.append(score)
    return mean(scores), std(scores)
```

## Common pitfalls

- Failing to apply task-specific feature/target scaling (QuantileTransformer for classification, MinMaxScaler for regression targets), which drastically skews metrics like Infidelity due to outlier sensitivity.
- Evaluating on the full test set without stratified sampling, leading to high computational overhead and noise from unrepresentative samples.
- Interpreting XAI metric scores without comparing them against the random attribution sanity check baseline provided in the benchmark.

## Evidence (verbatim from paper)

> To reduce the influence of outliers on metrics like Infidelity, which can introduce noise in the calculations, we used QuantileTransformer scaling on the input features. Additionally, we chose to use MinMaxScaler for regression datasets' target values, restricting outputs to a 0 to 1 range. This prevents unbounded values from affecting the evaluation metrics used to assess explainability.

## Citation

```bibtex
@misc{sithakoul2024beexai,
  title={BEExAI: Benchmark to Evaluate Explainable AI},
  author={Sithakoul et al. (2024)},
  year={2024},
  note={arXiv:2407.19897}
}
```

- arXiv: 2407.19897

