LibraGrad: Balancing Gradient Flow for Universally Better Vision Transformer Attributions
Mehri, Faridoun, Baghshah, Mahdieh Soleymani, Pilehvar, Mohammad Taher
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Nov-24-2024
- Country:
- North America
- Dominican Republic (0.04)
- United States
- Washington > King County
- Seattle (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Washington > King County
- Canada > Ontario
- Toronto (0.04)
- Europe
- Switzerland (0.04)
- Italy
- Tuscany > Florence (0.04)
- Marche > Ancona Province
- Ancona (0.04)
- Asia > Middle East
- Jordan (0.04)
- Iran (0.04)
- UAE > Abu Dhabi Emirate
- Abu Dhabi (0.04)
- Republic of Türkiye > Batman Province
- Batman (0.04)
- North America
- Genre:
- Research Report (0.81)
- Industry:
- Leisure & Entertainment (0.67)
- Health & Medicine (0.45)
- Technology:
- Information Technology > Artificial Intelligence
- Vision (1.00)
- Natural Language (1.00)
- Machine Learning
- Statistical Learning (0.87)
- Neural Networks > Deep Learning (0.45)
- Information Technology > Artificial Intelligence