Paper · 2022-02-03 · cs.LG, cs.AI
The Disagreement Problem in Explainable Machine Learning: A Practitioner's Perspective
Defines disagreement between post hoc feature-attribution explanations and proposes six metrics: feature, rank, sign and signed-rank agreement on top-k features, plus rank correlation and pairwise rank agreement on chosen features. Six methods disagree often on tabular, text and image models. In an online study, practitioners mostly resolved conflicts with ad hoc heuristics. Author-reported.
Explanation evaluation (judging whether an XAI explanation is good)Feature attributionExplainable AIexplainabilityevaluation
arXivPDFCodeMarkdown9 min read
AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Tools like LIME, SHAP and gradient-based saliency explain one prediction of a model by scoring each input feature. Different tools often give different answers for the same prediction. This paper asks how often that happens and what people do about it.
The authors first asked data scientists what counts as two explanations disagreeing. Those answers became six numbers that compare two explanations: do they name the same top features, in the same order, with the same sign. Running these numbers on several models and datasets shows that the tools often disagree. A second study showed people pairs of conflicting explanations. Many people then picked a tool by personal preference, by how well it fit their intuition, or by rules of thumb, rather than by a principled test.
TL;DR
- Post hoc explanation methods often disagree on the same prediction, especially on text and on pixel-level image attributions.
- Six metrics compare two explanations: four on the top-k features, two on a set of features chosen by the user.
- The metrics come from interviews with practitioners, not from a theory of correctness, and the results are author-reported.
- Use the metrics to measure disagreement before you pick or trust one explanation method.
Problem
Post hoc explanations are used in high-stakes settings, and prior work checked their faithfulness against ground truth or by retraining, which is often not possible in real applications §1. The paper notes there is little to no research on whether explanations from different methods agree, or on how practitioners handle the cases where they do not §1.
Method
The paper has four parts. It does not propose a new explanation method.
- Interviews. Semi-structured interviews with 25 data scientists identified four ways that explanations were judged to disagree: different top features, different order of the top features, different sign of a top feature, and different relative order of features the user cares about §3.1.
- Metrics. Six metrics formalise these notions. For each pair of explanations on the same prediction, lower values mean stronger disagreement §3.2 app. A. Feature, rank, sign and signed-rank agreement use the top-k features by absolute attribution. Rank correlation and pairwise rank agreement use a feature set chosen by the user §3.2.
- Empirical analysis. The six metrics are computed for six explanation methods on four datasets and several models §4.1 §4.2. Details are in app. B.
- User study. An online study with 25 data scientists showed pairs of conflicting explanations for one prediction and asked which they would rely on and why §5.1.
The metrics are the reusable part. Pseudocode for the top-k metrics and the two feature-set metrics follows. The formulas are unnumbered in the source, so they are cited by appendix section.
# Top-k agreement between explanations a and b [app. A.1]
# Inputs: attribution vectors attr_a, attr_b over features; k
# Output: feature, rank, sign and signed-rank agreement, each in [0, 1]
def topk_agreement(attr_a, attr_b, k):
# Top-k features by absolute attribution, the set TF [app. A.1]
top_a = top_k_by_magnitude(attr_a, k)
top_b = top_k_by_magnitude(attr_b, k)
common = set(top_a) & set(top_b)
# Position R(E, f) and sign S(E, f) of each feature [app. A.1]
rank_a = position_by_magnitude(attr_a)
rank_b = position_by_magnitude(attr_b)
sign_a = sign(attr_a)
sign_b = sign(attr_b)
# Count shared top-k features that also match on the property [app. A.1]
feature = len(common) / k
rank = count(f in common if rank_a[f] == rank_b[f]) / k
sign_agree = count(f in common if sign_a[f] == sign_b[f]) / k
signed_rank = count(
f in common
if rank_a[f] == rank_b[f] and sign_a[f] == sign_b[f]
) / k
return feature, rank, sign_agree, signed_rank# Metrics over a user-chosen feature set F [app. A.2]
# Inputs: attribution vectors attr_a, attr_b; feature indices feats
# Output: rank correlation in [-1, 1]; pairwise agreement in [0, 1]
def rank_correlation(attr_a, attr_b, feats):
# Spearman correlation of the ranks each explanation gives F [app. A.2]
ranks_a = rank_within(attr_a, feats)
ranks_b = rank_within(attr_b, feats)
return spearman(ranks_a, ranks_b)
def pairwise_rank_agreement(attr_a, attr_b, feats):
# Share of feature pairs ordered the same way by both [app. A.2]
agree = 0
for feat_i, feat_j in combinations(feats, 2):
# Is feat_i more important than feat_j in each explanation?
a_order = abs(attr_a[feat_i]) > abs(attr_a[feat_j])
b_order = abs(attr_b[feat_i]) > abs(attr_b[feat_j])
if a_order == b_order:
agree += 1
return agree / comb(len(feats), 2)The paper's weighted rank agreement and top-k variants are optional extensions that the authors did not use in the main results app. D.2.
Hyperparameters
Model training and explanation settings, from the paper unless marked.
| Name | Value | Where | Notes |
|---|---|---|---|
| Tabular split | 80% train, 20% test | app. B.1 | Test accuracy reported per model in app. B.1 |
| Tabular test points explained | COMPAS 1,198; German Credit 200 | app. B.2 | |
| Logistic regression | no regularisation | b-train-models.py | Paper does not state it |
| Gradient-boosted trees | 50 estimators | app. B.1 | Code uses XGBoost, seed 12345 b-train-models.py |
| Random forest | 50 estimators | app. B.1 | Code seed 12345 b-train-models.py |
| Feed-forward net (tabular) | hidden layers 50, 100, 50; ReLU; sigmoid output | app. B.1 | Code: models_torch.py |
| Feed-forward net training | Adam, lr 0.001, BCE loss, 20 epochs, batch 64 | not stated in paper | Code only: b-train-models.py |
| Text LSTM | embedding 300; LSTM hidden 256; 4-way output | app. B.1 | Training settings not stated |
| Text data | 120,000 train, 7,600 test sentences | app. B.1 | |
| Image model | pretrained ResNet-18 | app. B.1 | Top-1 69.758%, top-5 89.078% |
| Tabular sample size (LIME, KernelSHAP, IG, SmoothGrad) | 2,000 | app. B.2 | Chosen by a convergence check |
| Text perturbations (LIME, KernelSHAP) | 500 | app. B.2 | Chosen by a convergence check |
| Text IG steps | 500 | app. B.2 | Recommended value is lower app. B.2 |
| Text SmoothGrad samples | 500 | app. B.2 | Recommended value is 50 app. B.2 |
| Image perturbations (LIME, KernelSHAP) | 100 | app. B.2 | Over PASCAL VOC 2012 superpixels |
| Image IG steps | 400 | app. B.2 | Recommended value is 300 app. B.2 |
| Image SmoothGrad samples | 200 | app. B.2 | Recommended value is 50 app. B.2 |
| Image test set | 1,449 PASCAL VOC 2012 images | app. B.2 | |
| Top-k, COMPAS | k = 5 of 7 features | §4.3.1 | Figs. 1 and 2 |
| Top-k, text | k = 11 | §4.3.2 | About 25% of mean sentence length §4.3.2 |
| Convergence rule | smallest sample size after which more samples do not change the explanations | app. B.2 | Measured with L2 distance and the metrics |
| Rank correlation features | all features, tabular and text | §4.2 | Definition allows a user-chosen set §3.2 |
Results
Author-reported. Setup: four datasets (COMPAS, German Credit, AG News, ImageNet images with PASCAL VOC superpixels), six explanation methods, one model per data type unless stated §4.1 §4.2.
| Setting | Metric | Value | Source |
|---|---|---|---|
| Interviews, 25 data scientists | Use several methods for one prediction | 22 of 25 (88%) | §3.1 |
| Interviews | Have met disagreements between methods | 21 of 25 (84%) | §3.1 |
| Interviews | Say feature-importance values from different methods are not directly comparable | 24 of 25 (96%) | §3.1 |
| COMPAS, neural net, top-5 features | Heatmaps for six metrics over method pairs | Stronger disagreement shown by lower, lighter cells | fig. 1 |
| COMPAS, neural net | Rank agreement and signed-rank agreement fall as k grows | Shown per k | fig. 2 |
| COMPAS, neural net, all features | Rank correlation across method pairs | 14 of 15 pairs negative when many points are averaged | §4.3.1 fig. 3 |
| AG News, LSTM, k = 11 | Rank agreement and signed-rank agreement, most pairs | Under 0.1 | §4.3.2 fig. 4 |
| AG News, LSTM, k = 11 | Feature agreement, Gradient×Input vs Vanilla Gradient | 0.61 | §4.3.2 fig. 4 |
| AG News, LSTM | Mean rank correlation of LIME with other methods | 0.273 | §4.3.2 |
| AG News, LSTM | Mean rank correlation of KernelSHAP with other methods | 0.113 | §4.3.2 |
| ImageNet, LIME vs KernelSHAP on superpixels | Rank correlation / pairwise / feature / rank / sign / signed-rank | 0.8977 / 0.9302 / 0.9535 / 0.8478 / 0.9218 / 0.8193 | tab. 2 |
| ImageNet, gradient methods, pixel level | Rank correlation, Integrated Gradients vs SmoothGrad | 0.001 | §4.3.3 |
| User study, 25 participants | Answers to "agree or disagree" | 4% completely agree, 28% mostly agree, 50% mostly disagree, 18% completely disagree | §5.2.1 |
| User study | Share of disagreements resolved by choosing KernelSHAP | 66.7% | §5.2.2 fig. 6 |
| User study | Share of disagreements resolved by choosing Gradient×Input | 7.0% | §5.2.2 fig. 6 |
| User study, practice (14 who see disagreement) | Resolution: ad hoc heuristics / no clear answer / other metrics | 50% / 36% / 14% | §5.2.4 |
The tabular and text figures in §4.3 are heatmaps and box plots with standard errors up to 0.01 (tabular) and 0.0025 (text) fig. 1 fig. 4. The paper reports no confidence intervals on the user-study percentages.
Paper vs code
Official code: https://github.com/AI4LIFE-GROUP/disagreement-problem, MIT
licence, cloned at commit 002c081f8f0519ce8da172934a86a750362a12e0. The owner
is the AI4LIFE group, the lab of the last author. Paths are relative to the
repository root. The paper does not link the code, but its appendix says the
full figures are in "the code repository accompanying this paper" app. C.1.
- Training data. The paper does not mention resampling. The code upsamples the minority class in the training split to balance the two classes a-process-data.py. The models are trained on that balanced split b-train-models.py.
- Model count. The abstract and app. B.1 list four tabular models plus the text and image models, which makes six. The code also trains a second logistic model wrapped as a network, and three more feed-forward networks (A, B, C) b-train-models.py. The repository README says eight models. The paper does not use the extra models, and the explanation script uses only logistic, random forest, gradient-boosted and the main network c-generate-explanations.py.
- Pairwise rank agreement is defined twice.
metrics.pydefinespairwise_rank_agreementat line 53 (top-k version) and again at line 145 (all-feature version). Python keeps the later one, so only the line-145 version runs metrics.py metrics.py. - Ties. The code ranks features with dense ranks, so tied attributions share a rank metrics.py metrics.py. The paper's R(E, f) is a position in the order app. A.1. The two agree when there are no ties.
- Rank correlation. The code computes Pearson correlation of the dense ranks, not
scipy.stats.spearmanrmetrics.py. Without ties this is Spearman's coefficient. With ties it can differ from the paper's stated Spearman. - Importance order. The paper says "more important" without defining it app. A.2. The code orders pairs by absolute attribution metrics.py. The pseudocode above follows the code.
- Feature set. The paper's rank correlation and pairwise agreement take a user-chosen feature set §3.2. For tabular and text the experiments use all features §4.2. The code's rank correlation and pairwise functions take all features in the matrix metrics.py.
- LIME settings. The code sets
discretize_continuous=False,sample_around_instance=True, a fixed seed of 12345, and names the categorical columns c-generate-explanations.py. The paper states none of these. - KernelSHAP background. The code uses the training split as the background set c-generate-explanations.py c-generate-explanations.py. The paper does not state the background set.
- Sample sizes. The code runs every sample size from 25 to 2,000 c-generate-explanations.py and the comparison script loads 2,000 by default e-compare-explanations.py. This matches the paper's tabular choice app. B.2.
- Gradient×Input. The code uses Captum's
InputXGradientc-generate-explanations.py. The paper's name for the method matches. - Image and text pipelines. Not reviewed in detail. The repository folder for images is named
cifar, while the paper uses ImageNet images with PASCAL VOC superpixels app. B.2. Check the image pipeline before reusing it.
Pitfalls
- Metric direction. Each metric is an agreement score: higher means more agreement, so lower means more disagreement §3.2.
- Feature agreement is trivially 1 when k is the number of features app. C.1, so it says nothing at that k.
- Top-k uses magnitude. Top-k sets are chosen by absolute value, but sign agreement and signed-rank agreement then compare signs of those features §3.2 app. A.1.
- Ties. The code gives tied features a shared dense rank metrics.py. The paper does not say how ties should be ranked.
- Sample size drives the cost. Tabular explanations used 2,000 perturbations or steps per point, text used 500, and images used 100 to 400 app. B.2. The paper reports no compute time.
- Convergence check is informal. The stopping rule is "does more samples change the explanations", measured by L2 distance and the metrics app. B.2. No threshold is stated.
- Recommended values are exceeded on purpose. The paper uses 500 IG steps for text (recommended lower) and 200 SmoothGrad samples for images (recommended 50) app. B.2. A reimplementation that uses the recommended values may get different disagreement numbers.
- Feature count for Forest Cover is inconsistent. The appendix text gives 54 features app. D.3 and, in the same section, 45. The figure caption gives 54 app. D.3. Treat the count as unresolved.
- Small human study. The user study used one network on the seven-feature COMPAS data, five prompts, and 25 participants §5.1. Percentages are over small counts, and no interval is reported.
- One model per data type in the heatmaps. The heatmaps show a neural network on COMPAS, an LSTM on AG News and ResNet-18 on ImageNet fig. 1 fig. 4 §4.3. Do not generalise these pairs to other models without checking the tabular results for the other three models app. C.1.
Lineage
- Builds on: the explanation methods it compares, LIME, KernelSHAP, Vanilla Gradient, Gradient×Input, Integrated Gradients and SmoothGrad §1 §4.2. Prior faithfulness and fairwashing work is cited in the introduction §1.
- Compared against: L2X in an additional experiment, with the same conclusion of poor agreement app. D.1.
- Superseded by: not stated.
Source and license
Adapted from “The Disagreement Problem in Explainable Machine Learning: A Practitioner's Perspective” by Satyapriya Krishna, Tessa Han, Alex Gu, Steven Wu, Shahin Jabbari, Himabindu Lakkaraju (arXiv:2202.01602), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/AI4LIFE-GROUP/disagreement-problem at commit 002c081f8f05 (MIT). Any quoted code is shown under that license.