Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Quantifying Attention Flow in Transformers

About

In the Transformer model, "self-attention" combines information from attended embeddings into the representation of the focal embedding in the next layer. Thus, across layers of the Transformer, information originating from different tokens gets increasingly mixed. This makes attention weights unreliable as explanations probes. In this paper, we consider the problem of quantifying this flow of information through self-attention. We propose two methods for approximating the attention to input tokens given attention weights, attention rollout and attention flow, as post hoc methods when we use attention weights as the relative relevance of the input tokens. We show that these methods give complementary views on the flow of information, and compared to raw attention, both yield higher correlations with importance scores of input tokens obtained using an ablation method and input gradients.

Samira Abnar, Willem Zuidema• 2020

Related benchmarks

TaskDatasetResultRank
Image-to-Text RetrievalMS-COCO (test)
R@117.53
117
Text-to-Image RetrievalMS-COCO (test)
R@112.94
72
LocalizationImageNet
AUPR@141.4
70
Faithfulness EvaluationWikiBio
AUC π-Soft-NS0.61
67
Faithfulness EvaluationTellMeWhy
AUC π-Soft-NS0.01
67
Feature Attribution PlausibilityMDACE (test)
P1.7
65
Across-modality synthesis (T2-weighted MRI to CT)Pelvic MRI-CT dataset (test)
PSNR26.8
42
Attribution FaithfulnessImageNet-1K ILSVRC2012 (val)
Deletion Score67.69
40
Token Attribution FaithfulnessKnown 1000
Distance15.25
40
Attribution FaithfulnessLongRA
Soft-NC Score0.41
40
Showing 10 of 83 rows
...

Other info

Follow for update