TL;DR
The authors introduce a generic explainability method designed specifically for Transformer models with heterogenous attention structures, such as cross-attention in multimodal networks. By linearly tracking distinct information sources and avoiding noisy, ungrounded interaction assumptions, their approach delivers cleaner, more accurate, and logically verifiable attention interpretation maps.
What Problem Does This Paper Address?
Most classic Transformer explainability methods (like attention rollout) are built for homogenous attention—standard self-attention where the Query (Q), Key (K), and Value (V) all originate from the same input stream.
However, modern architectures—especially multimodal models (e.g., vision-language models) and encoder-decoder networks—rely heavily on heterogenous attention. A prime example is co-attention (or cross-attention), where Q comes from one source (like text queries) while K and V come from another (like an image). Interpreting these models is challenging because information from different modalities becomes deeply intertwined. Prior state-of-the-art methods like Generic Attention-model Explainability (GAE) attempt to model complex interactions between these sources but introduce mathematically ungrounded steps that inject significant background noise into the resulting explanations.
Methods
The authors propose a clean, linear approach to isolate and track information flow without introducing artificial noise:
- Attention Classification: They categorize attention into three types: Type A (homogenous self-attention), Type B (co-attention/cross-attention where Q and K/V sources differ), and Type C (self-attention acting on already-fused sources).
- Gradient-Based Correction: They refine raw attention maps using their gradients to compute a layer-wise average attention map, offering three variations: positive gradient correction, complete gradient correction, and absolute gradient correction.
- Linear Source Separation: For heterogenous layers, instead of calculating complex cross-source interactions, they maintain strict independence between the sources. They linearly track how much information from each independent source contributes to the final features (Equations 6 and 7 in the paper).
- Holistic vs. Reductionist Paradigms: By utilizing complete gradient correction, their method can retain both positive and negative contributions across steps, allowing for a holistic view of model synergy rather than just focusing on positive highlights.
Datasets
The method was validated using two distinct models and tasks:
- MSCOCO validation set (5,000 samples): Used with the DETR (Detection Transformer) model to evaluate weakly supervised object segmentation performance.
- Visual Question Answering (VQA) dataset (10,000 samples subset): Used with the LXMERT model to perform positive and negative token perturbation tests.
Key Insights and Ideas
- Independence Over Interaction: The core philosophical departure from previous work is the belief that cross-source interactions are already inherently captured within the attention maps themselves. Forcing explicit, arbitrary interaction formulas actually degrades explanation quality by introducing background noise.
- The Quantitative Metric Trap: Standard evaluation pipelines often use Otsu binarization to turn attention maps into segmentation masks. The authors discovered a fascinating paradox: standard Otsu thresholds can actually favor noisier explanation maps in quantitative scores, contradicting visual reality. By adjusting the threshold to 0.3× Otsu to better reflect true visual fidelity, the superiority of their cleaner method became quantitatively clear.
- Logical Verification via Logit Differences: Thanks to the flexibility of complete gradient correction, researchers can perform a "logical inspection" of the model. By setting the loss function as the difference between two valid answers (e.g., $logit_{yes} - logit_{no}$), they can visualize exactly which image regions cause a model to lean toward one logical conclusion over another.
Key Results
Qualitative Evaluation
On the DETR model, the proposed absolute (Ours (abs)) and positive (Ours (pos)) gradient methods isolated target objects with remarkable clarity and minimal background bleed compared to GAE and ODAM. For example, when explaining the "cat" query, GAE faintly highlighted other cats in the background, whereas the proposed method cleanly isolated only the target subject.
Quantitative Evaluation
When evaluating weakly supervised segmentation on MSCOCO using the visually representative 0.3× Otsu threshold, the proposed method significantly outperformed the baselines:
- GAE: Achieved an Average Precision (AP) of 7.1 and an Average Recall (AR) of 11.3.
- Ours (abs): Achieved an AP of 9.1 and an AR of 14.5.
- Ours (pos): Achieved an AP of 8.9 and an AR of 13.6.
Limitations and Future Work
The authors note that their analysis was conducted on two specific, representative models (DETR and LXMERT). As Transformer architectures continue to evolve rapidly, further research is required to validate the approach on more massive and complex multimodal attention structures. Additionally, cleanly separating pure semantic focus from grammatical structure in textual attention maps remains an open challenge that the authors plan to target next.
Summary updated