ICE: Intervention-Consistent Explanation Evaluation
Official implementation of "ICE: Intervention-Consistent Explanation Evaluation with Statistical Grounding for LLMs" (EMNLP 2026 Findings).
Key Finding
Faithfulness is operator-dependent: switching the intervention operator crosses the positive-evidence threshold in 18% of configurations (5/28), with gaps up to 44 percentage points. Nearly one-third of English deletion configurations are anti-faithful (18/56, worse than random), invisible without randomized baselines.
What ICE Does
ICE evaluates whether model explanations (attention, gradient) identify tokens that are genuinely more important than random tokens, under multiple intervention operators.
Input: "a gorgeous, witty, seductive movie" (positive sentiment)
Rationale: {gorgeous, seductive}
Deletion Retrieval Infill
NSR: 0.79 0.39
Win Rate: 92% 68%
Verdict: Faithful Weakly Faithful <-- operator changes conclusion
Installation
pip install ice-faithfulness
Quick Start
from ice import ICEEvaluator, ICEConfig
config = ICEConfig(
k_values=[0.2], # top 20% tokens as rationale
n_permutations=50, # random baselines
operators="lite", # "lite" (delete+retrieval) or "full"
)
evaluator = ICEEvaluator(model, tokenizer, config)
results = evaluator.evaluate_dataset(dataset, extractor="attention")
print(f"Win Rate: {results.win_rate:.1%}")
print(f"Effect Size (d_null): {results.effect_size:.2f}")
Causal LMs: restrict scoring to label tokens
For prompted classification with causal LMs (Llama, Mistral, Qwen, ...), restrict
prediction and scoring to the task's label tokens via candidate_token_ids.
Without this, argmax runs over the full vocabulary and most examples are
filtered out by the confidence threshold.
# For sentiment classification with causal LMs
pos_id = tokenizer.encode(" positive", add_special_tokens=False)[0]
neg_id = tokenizer.encode(" negative", add_special_tokens=False)[0]
config = ICEConfig(
k_values=[0.2],
operators="lite",
candidate_token_ids=[neg_id, pos_id], # restrict to task labels
)
Core Modules
| Module | Purpose |
|---|---|
ice.evaluation |
Main evaluator (ICEEvaluator, ICEConfig) |
ice.extractors |
Attention, gradient, IG, LIME extractors |
ice.operators |
Deletion, mask, retrieval infill operators |
ice.metrics |
NSR scoring, AUC-over-k |
ice.stats |
Randomization tests, bootstrap CI, BH correction |
ice.retrieval_operator |
Leave-one-out retrieval infill |
Evaluation Scripts
# English benchmarks (7 models x 4 tasks)
python scripts_for_repo/run_ice_llm.py --model meta-llama/Llama-3.2-3B-Instruct --dataset sst2
# Multilingual (6 languages)
python scripts_for_repo/run_ice_multilingual.py --model Qwen/Qwen2.5-7B-Instruct --languages french german turkish arabic
# Operator comparison
python scripts_for_repo/run_ice_llm_retrieval.py --model mistralai/Mistral-7B-Instruct-v0.3 --dataset esnli
Key Metrics
| Metric | Range | Meaning |
|---|---|---|
| Win Rate | 0-100% | % of random baselines beaten by the rationale |
| Effect Size | d_null | Standardized distance from null (>0.8 = large, <0 = anti-faithful) |
| Operator Agreement | bool | Both operators give same verdict |
Results Summary
Evaluated on 7 LLMs (1.5B-8B), 4 English tasks, 6 non-English languages, 2 attribution methods:
- Operator gaps reach 44 pp (e.g., Llama-3.2 e-SNLI: 86% deletion vs 43% retrieval)
- Anti-faithfulness in nearly 1/3 of English deletion configurations (18/56; gradient selects function words)
- No correlation between faithfulness and human plausibility (|r| < 0.04)
- Cross-lingual faithfulness spans 12%-83%, not predicted by tokenization alone
Citation
@inproceedings{basu2026ice,
title={ICE: Intervention-Consistent Explanation Evaluation with Statistical Grounding for LLMs},
author={Basu, Abhinaba and Chakraborty, Pavan},
booktitle={Findings of the Association for Computational Linguistics: EMNLP 2026},
year={2026}
}
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ice_faithfulness-1.0.1.tar.gz.
File metadata
- Download URL: ice_faithfulness-1.0.1.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e093b63cbcda8630aea11e95ae1979289b643e52255bdce039cf2ce5b42432f
|
|
| MD5 |
db91b2abc8d44fc65064cfac66c2250d
|
|
| BLAKE2b-256 |
cae72cd1b93b7e56291d9c2f3ef940324677da646ec1e8b59bd2c01ec3c58ec9
|
File details
Details for the file ice_faithfulness-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ice_faithfulness-1.0.1-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128904d53ad3ced419db20d2119d850425ba16611ec8ee98744b00556f3e98dd
|
|
| MD5 |
c93507559dcfb3444e71ab9f5d97ff9e
|
|
| BLAKE2b-256 |
d60d0c4db9842b17314cb41693ecd349b3458c56c65ae19dc185f887e54274b1
|