Attention Rollout is a method that approximates how much the output of a Transformer attends to each input token by multiplying the attention weights of all layers together, from the input up to the top layer. Abnar and Zuidema proposed it in 2020, together with a second method, Attention Flow.
The self-attention of a Transformer mixes in information from other tokens with every layer. As a result, the attention weights of higher layers are attention over "already mixed embeddings" rather than over "input tokens", and they are unreliable as an explanation of which input words mattered. In fact, in the model studied in the paper, the raw attention weights above layer 3 were nearly uniform.
Attention Rollout treats the attention weights of each layer as "the fraction of information carried up from the layer below", adds the residual connections, and multiplies the per-layer matrices together. This estimates, from the attention weights alone, how much information the top-layer embeddings received from each input token. The computation consists only of matrix multiplications and requires no backpropagation. The ViT paper also uses it to draw maps of attention from the output token to the input image.
Think of a game of telephone. Raw attention only tells how much each person heard from their neighbors. Attention Rollout traces this back to the first person and multiplies the fractions together, estimating "how much of the last person's story comes from each of the first people".

