There is More to Attention: Statistical Filtering Enhances Explanations in Vision Transformers
Meghna P Ayyar, Jenny Benois-Pineau, Akka Zemmari
TL;DR
This work tackles the gap in explainability for Vision Transformers by reframing attention as a signal rather than a nuisance. It introduces RFEM, a three-stage statistical filtering pipeline that preserves per-head attention signals across layers, applies adaptive filtering, and fuses them into faithful explanations; RFEM-Class further incorporates target-class gradients to produce discriminative, class-specific maps. Across MexCulture, SALICON, and ImageNet1K perturbations, RFEM and RFEM-Class achieve strong plausibility and competitive faithfulness, often outperforming state-of-the-art baselines while maintaining efficiency. The findings suggest that properly filtered attention can serve as a fast, human-aligned explanation modality with potential applicability to other data domains and modalities.
Abstract
Explainable AI (XAI) has become increasingly important with the rise of large transformer models, yet many explanation methods designed for CNNs transfer poorly to Vision Transformers (ViTs). Existing ViT explanations often rely on attention weights, which tend to yield noisy maps as they capture token-to-token interactions within each layer.While attribution methods incorporating MLP blocks have been proposed, we argue that attention remains a valuable and interpretable signal when properly filtered. We propose a method that combines attention maps with a statistical filtering, initially proposed for CNNs, to remove noisy or uninformative patterns and produce more faithful explanations. We further extend our approach with a class-specific variant that yields discriminative explanations. Evaluation against popular state-of-the-art methods demonstrates that our approach produces sharper and more interpretable maps. In addition to perturbation-based faithfulness metrics, we incorporate human gaze data to assess alignment with human perception, arguing that human interpretability remains essential for XAI. Across multiple datasets, our approach consistently outperforms or is comparable to the SOTA methods while remaining efficient and human plausible.
