Attention is not Explanation
Sarthak JainByron C. Wallace
Demonstrates that attention weights in neural language models fail to provide reliable explanations for predictions, proving through empirical tests that attention rarely correlates with gradient-based feature importance and that distinct attention distributions can yield identical outputs.
Modern language models widely incorporate attention mechanisms, which assign dynamic numerical weights to different words in a text to improve task accuracy. Because these weights highlight specific words, researchers and practitioners routinely display them as visual heatmaps and treat them as faithful explanations of why a model reached a particular conclusion. This practice creates a serious operational risk: decision-makers may assume an artificial intelligence system is transparent and accountable when its internal reasoning is actually unverified.
The article set out to rigorously test whether attention weights provide meaningful, faithful explanations for neural network predictions. Specifically, the authors evaluated whether attention weights agree with established measures of word importance and whether changing these weights produces predictable shifts in final predictions.
To test this, the authors conducted comprehensive experiments across standard text classification, question answering, and natural language inference tasks spanning several domains, including movie reviews, news articles, and medical records. They analyzed models that use recurrent neural networks to build contextual representations, comparing them against simpler non-recurrent baselines. The methodology focused on two central tests: calculating statistical rank correlation between attention weights and direct feature importance metrics (such as word-erasure and gradient-based impact), and systematically generating counterfactual or "adversarial" attention distributions to see if very different word weightings would change the final output.
The investigation produced three critical findings. First, for standard recurrent models, attention weights show only weak and inconsistent correlation with established feature importance metrics, with average correlation coefficients generally hovering at or below 0.50. Second, randomly shuffling attention weights across words frequently causes little to no change in the model's final prediction, often resulting in median output shifts of less than 0.01. Third, the authors successfully constructed adversarial attention distributions that attended to entirely different words while keeping the output essentially identical to the original prediction. High agreement between attention and feature importance only appeared in non-recurrent, simple projection models, where correlation was roughly 0.375 points higher on average than in recurrent models.
These findings mean that highlighting words based on standard attention weights does not provide a reliable explanation of model behavior, especially when using complex, contextual text encoders. Relying on attention heatmaps to justify decisions introduces compliance, safety, and operational risks in high-stakes settings like clinical record analysis or legal document processing. Contrary to common belief, presenting a compelling visual heatmap creates an illusion of transparency that can easily mislead stakeholders.
Organizations should immediately stop treating raw attention weights as standalone explanations for high-stakes decision-making. Instead, technical teams needing explainability should adopt dedicated interpretability techniques, such as gradient-based attribution, leave-one-out feature testing, or specialized models that enforce hard, sparse selections of text. Further research and validation should focus on developing principled, structured attention mechanisms designed explicitly for interpretability.
These conclusions are supported with high confidence across text classification, question answering, and inference benchmarks. However, the evaluation focused on recurrent, convolutional, and feed-forward architectures on unstructured prediction tasks; it did not evaluate modern sequence-to-sequence translation architectures or bidirectional cross-attention mechanisms. While alternative feature importance metrics are not perfect ground truth, the consistent inability of attention weights to track model behavior confirms that practitioners must exercise caution when interpreting attention distributions.
- Paper: Sanity Checks for Saliency Maps, Julius Adebayo et al. (2018). This work establishes the foundational methodology of sanity-checking post-hoc saliency maps against model parameters and random baselines, which directly motivates and parallels the empirical debunking of attention weights as faithful explanations.
- Paper: The Mythos of Model Interpretability, Zachary C. Lipton (2016). It provides the conceptual foundation and vocabulary separating mechanistic transparency from post-hoc explanation, clarifying the theoretical distinction tested empirically in the target paper.
- Paper: Axiomatic Attribution for Deep Networks, Mukund Sundararajan et al. (2017). It introduces Integrated Gradients and the axiomatic foundation of gradient-based feature attribution, providing the core benchmark against which attention weights are compared for feature importance.
- Paper: “Why Should I Trust You?”: Explaining the Predictions of Any Classifier, Marco Tulio Ribeiro et al. (2016). It defines local surrogate explanations and faithfulness criteria for neural predictions, setting the standard for interpretable explanations that attention is evaluated against.
- Paper: Effective Approaches to Attention-based Neural Machine Translation, Minh-Thang Luong et al. (2015). It formalizes the standard global and local attention mechanisms for sequence modeling whose explanatory validity is scrutinized.
- Paper: A Structured Self-attentive Sentence Embedding, Zhouhan Lin et al. (2017). It establishes structured self-attentive sentence embeddings widely used in NLP classification tasks evaluated in the study.
- Paper: Hierarchical Attention Networks for Document Classification, Zichao Yang et al. (2016). It introduces hierarchical attention networks for text classification, representing a primary architecture often assumed to offer intuitive interpretability across words and sentences.
- Paper: A Unified Approach to Interpreting Model Predictions, Scott M. Lundberg et al. (2017). It establishes the unified SHAP framework for game-theoretic feature attribution, representing a primary gold-standard attribution baseline compared with attention weights.
- Paper: Synthesizer: Rethinking Self-Attention for Transformer Models, Yi Tay et al. (2021). Building on evidence that attention weights do not represent meaningful token-to-token explanatory relationships, this work develops Transformer models using synthetic and random attention weights that match standard performance.
- Paper: The Dead Salmons of AI Interpretability, Maxime Méloux et al. (2025). It formalizes the theoretical reasons behind interpretability failures—such as those observed with attention weights—framing non-identifiability and underspecification as statistical and causal inference problems.
- Paper: GNNExplainer: Generating Explanations for Graph Neural Networks, Rex Ying et al. (2019). It develops dedicated post-hoc optimization techniques for graph networks, demonstrating how purpose-built explainers overcome the limitations of raw attention and gradient weights.
- Paper: Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AI, Alejandro Barredo Arrieta et al. (2020). It incorporates the findings on the limits of attention transparency into a comprehensive taxonomy of deep learning explainability and responsible AI.
