LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributions
Not on the map. Why?
Abstract (arXiv)
Why do gradient-based explanations struggle with Transformers, and how can we improve them? We identify gradient flow imbalances in Transformers that violate FullGrad-completeness, a critical property for attribution faithfulness that CNNs naturally possess. To address this issue, we introduce LibraGrad -- a theoretically grounded post-hoc approach that corrects gradient imbalances through pruning and scaling of backward paths, without changing the forward pass or adding computational overhead. We evaluate LibraGrad using three metric families: Faithfulness, which quantifies prediction changes under perturbations of the most and least relevant features; Completeness Error, which measures attribution conservation relative to model outputs; and Segmentation AP, which assesses alignment with human perception. Extensive experiments across 8 architectures, 4 model sizes, and 4 datasets show that LibraGrad universally enhances gradient-based methods, outperforming existing white-box methods -- including Transformer-specific approaches -- across all metrics. We demonstrate superior qualitative results through two complementary evaluations: precise text-prompted region highlighting on CLIP models and accurate class discrimination between co-occurring animals on ImageNet-finetuned models -- two settings on which existing methods often struggle. LibraGrad is effective even on the attention-free MLP-Mixer architecture, indicating potential for extension to other modern architectures. Our code is freely available at https://github.com/NightMachinery/LibraGrad.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 77 of its 101 references that are in the map. First posted on arXiv 24 Nov 2024.
Builds on
77 of 101 references.
References · 77
- 2017Attention Is All You Needcited by 59,932
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,690
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2017Axiomatic Attribution for Deep Networkscited by 3,350
- 2023Sigmoid Loss for Language Image Pre-Trainingcited by 3,048
- 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,857
- 2021BEiT: BERT Pre-Training of Image Transformerscited by 2,360
38 more
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2020The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalizationcited by 1,842
- 2020GLU Variants Improve Transformercited by 1,724
- 2019Do ImageNet Classifiers Generalize to ImageNet?cited by 1,507
- 2017Learning Important Features Through Propagating Activation Differencescited by 1,454
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,441
- 2019Natural Adversarial Examplescited by 1,401
- 2019Learning Robust Global Representations by Penalizing Local Predictive Powercited by 1,010
- 2014Striving for Simplicity: The All Convolutional Netcited by 983
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2016Training Deep Nets with Sublinear Memory Costcited by 825
- 2018RISE: Randomized Input Sampling for Explanation of Black-box Modelscited by 825
- 2023EVA-CLIP: Improved Training Techniques for CLIP at Scalecited by 786
- 2020Quantifying Attention Flow in Transformerscited by 759
- 2023Attend-and-Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Modelscited by 696
- 2022EVA: Exploring the Limits of Masked Visual Representation Learning at Scalecited by 685
- 2020Transformer Interpretability Beyond Attention Visualizationcited by 620
- 2019Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networkscited by 575
- 2022DeiT III: Revenge of the ViTcited by 417
- 2023EVA-02: A Visual Representation for Neon Genesiscited by 377
- 2020Are we done with ImageNet?cited by 329
- 2016Top-down Neural Attention by Excitation Backpropcited by 318
- 2021Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformerscited by 316
- 2022BEiT v2: Masked Image Modeling with Vector-Quantized Visual Tokenizerscited by 298
- 2016Not Just a Black Box: Learning Important Features Through Propagating Activation Differencescited by 295
- 2015Explaining NonLinear Classification Decisions with Deep Taylor Decompositioncited by 248
- 2019Full-Gradient Representation for Neural Network Visualizationcited by 189
- 2021Adaptive Token Sampling For Efficient Vision Transformerscited by 181
- 2022CRAFT: Concept Recursive Activation FacTorization for Explainabilitycited by 177
- 2023Dense Text-to-Image Generation with Attention Modulationcited by 162
- 2021Post-hoc Interpretability for Neural NLP: A Surveycited by 155
- 2020Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNscited by 151
- 2022FlexiViT: One Model for All Patch Sizescited by 151
- 2024MambaOut: Do We Really Need Mamba for Vision?cited by 142
- 2022Towards Faithful Model Explanation in NLP: A Surveycited by 129
- 2019Taking a HINT: Leveraging Explanations to Make Vision and Language Models More Groundedcited by 127
- 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformerscited by 116
- 2019On Identifiability in Transformerscited by 115
50 most cited of 77 All 77 (JSON)
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2025Attention (as Discrete-Time Markov) Chainscited by 11
- 2026Causal Attribution via Activation Patchingcited by 2
- 2026Gradient-Skipping Relevance Propagation for Efficient Explainability of Vision Transformerscited by 0
- 2026ProtoLIP: From Sentence-Level to Object-Level Evidence Disentanglementcited by 0
- 2026ResLRP: The Role of Residual Cancellation in Attribution Instability in Vision Transformerscited by 0
- 2026ResLRP: The Role of Residual Cancellation in Attribution Instability in Vision Transformers15 Sep 2026
- 2026ProtoLIP: From Sentence-Level to Object-Level Evidence Disentanglement14 Sep 2026
- 2026Gradient-Skipping Relevance Propagation for Efficient Explainability of Vision Transformers11 Jul 2026
- 2026Causal Attribution via Activation Patching13 Mar 2026
- 2025Attention (as Discrete-Time Markov) Chains23 Jul 2025