0

Quantifying Attention Flow in Transformers

The paper proposes methods to better quantify information flow through self-attention in transformers, showing improved correlation with importance scores compared to raw attention weights.

Year
2020
Venue
quantifying-attention-flow-in-transformers-1
Authors
2
Hosting
Abstract onlyARXIV-DEFAULT

Cite

Notes

Only stored in your browser.

Attribution

Abstract & full text
arxiv.org/abs/2005.00928v2ARXIV-DEFAULT
TL;DR
Semantic Scholar
Attribution policy →

Abstract

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.

Authors

2