atlas

Research map / Architectures and efficiency / Attention and transformers

AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformers

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 9 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Extends Layer-wise Relevance Propagation with new attention-aware rules for softmax, matrix multiplication and normalization to attribute both inputs and latent neurons in transformers efficiently.

Problem

Faithful, efficient attribution of the full black-box transformer, including latent representations, is unsolved; existing LRP variants mishandle softmax, bilinear matrix multiplication and normalization, causing instability or low faithfulness.

Approach

Derives LRP propagation rules within the Deep Taylor Decomposition framework for non-linear attention: a Taylor rule with bias for softmax, an epsilon plus uniform rule for query-key/attention-value matrix multiplication, and identity rule for normalization; also uses the gamma-rule for ViT linear layers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use AttnLRP instead of KernelSHAPViT-B-16 · ImageNetfaithfulness: 4.71 -> 6.19Helped
Use AttnLRP instead of CP-LRP (ε-rule)LLaMa 2-7b · IMDBfaithfulness: 1.72 -> 2.50Helped
Use AttnLRP instead of Grad×AttnRollLLaMa 2-7b · Wikipediafaithfulness: 9.79 -> 10.93Helped
Use AttnLRP instead of Grad×AttnRollMixtral 8x7b · SQuAD v2faithfulness: 0.91 -> 0.96Helped
Use AttnLRP instead of AtManMixtral 8x7b · SQuAD v2top-1 accuracy: 0.86 -> 0.96Helped
Use AttnLRP instead of AtManMixtral 8x7b · SQuAD v2IoU: 0.83 -> 0.72Hurt
Use AttnLRP instead of Grad×AttnRollFlan-T5-XL · SQuAD v2faithfulness: 0.94 -> 0.94No clear effect
Use AttnLRP instead of CP-LRP (ε-rule)Flan-T5-XL · SQuAD v2IoU: 0.83 -> 0.84Helped
Replace the ε-rule with the γ-rule in ViT linear layers (ablation)CP-LRP on ViT-B-16 · ImageNetfaithfulness: 2.53 -> 6.06Helped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet IMDB Wikipedia SQuAD v2

Benchmarks: ImageNet IMDB Wikipedia SQuAD v2

Metrics: faithfulness (area between perturbation curves) top-1 accuracy IoU

Baselines: Input x Gradient Integrated Gradients SmoothGrad GradCAM Attention Rollout Grad x AttnRoll AtMan KernelSHAP CP-LRP

Builds on: Layer-wise Relevance Propagation Deep Taylor Decomposition Conservative Propagation LRP Attention Rollout AtMan

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy