# Fine Grained Interpretability Eval

> Evaluates the interpretability and faithfulness of neural NLP models by measuring how well token-level saliency rationales align with human-annotated ground truth rationales and model predictions across sentiment analysis, semantic textual similarity, and machine reading comprehension tasks. Use when the user wants to benchmark on Fine-grained Interpretability Benchmark (SA/STS/MRC), or asks about evaluating this task. Reports Token-F1, MAP.

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

---


# fine-grained-interpretability-eval

> A Fine-grained Interpretability Evaluation Benchmark for Neural NLP — Wang et al. (2022) (arXiv:2205.11097, 2022)

## What this evaluates

Evaluates the interpretability and faithfulness of neural NLP models by measuring how well token-level saliency rationales align with human-annotated ground truth rationales and model predictions across sentiment analysis, semantic textual similarity, and machine reading comprehension tasks.

## Datasets

- **Fine-grained Interpretability Benchmark (SA/STS/MRC)** — total ?; splits: test (-1)

## Metrics

- `Token-F1` **(primary)** — range: [0, 1]
  - Token-level F1 score between the set of top-k salient tokens and the ground truth rationale tokens. Higher is better.
- `MAP` **(primary)** — range: [0, 1]
  - Mean Average Precision measuring the alignment between the ranked list of salient tokens and ground truth rationales. Applicable to both classification and non-classification tasks. Higher is better.
- `IOU-F1` — range: [0, 1]
  - F1 score based on Intersection-over-Union overlap between predicted and ground truth rationales. Considered too coarse for low rationale length ratios.
- `Sufficiency` — range: other
  - Measures prediction change when rationale tokens are removed. Lower is better. Only valid for classification tasks.
- `Comprehensiveness` — range: other
  - Measures prediction change when non-rationale tokens are removed. Higher is better. Only valid for classification tasks.

## Input / output format

**Input**: Natural language text (single sentence, sentence pair, or passage with question) fed into a pre-trained or fine-tuned neural model.

**Output**: Token-level importance scores or a ranked list of tokens; the top-k^d tokens are selected to form the rationale.

## Scoring recipe

```python
def compute_token_f1(pred_tokens, gold_tokens):
    pred_set = set(pred_tokens)
    gold_set = set(gold_tokens)
    tp = len(pred_set & gold_set)
    fp = len(pred_set - gold_set)
    fn = len(gold_set - pred_set)
    prec = tp / (tp + fp) if (tp + fp) > 0 else 0
    rec = tp / (tp + fn) if (tp + fn) > 0 else 0
    return 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0

def compute_map(ranked_tokens, gold_tokens):
    gold_set = set(gold_tokens)
    hits = 0
    ap = 0
    for i, token in enumerate(ranked_tokens):
        if token in gold_set:
            hits += 1
            ap += hits / (i + 1)
    return ap / len(gold_set) if len(gold_set) > 0 else 0
```

## Common pitfalls

- IOU-F1 is too coarse for tasks with low rationale length ratios, as most instance overlaps fall below the 0.5 threshold.
- Sufficiency and Comprehensiveness metrics are only valid for classification tasks (SA, STS) and should not be applied to MRC.
- LIME is model-agnostic but was not applied to MRC tasks in the reported experiments.
- ATT method's sufficiency/comprehensiveness calculations can be inconsistent compared to IG and LIME.

## Evidence (verbatim from paper)

> We report results of token-F1 and IOU-F1 scores for plausibility. The higher the scores, the more plausible the rationales. For faithfulness evaluation, we report results of MAP, sufficiency and comprehensiveness scores.

## Citation

```bibtex
@misc{wang2022finegrained,
  title={A Fine-grained Interpretability Evaluation Benchmark for Neural NLP},
  author={Wang et al. (2022)},
  year={2022},
  note={arXiv:2205.11097}
}
```

- arXiv: 2205.11097

