Revisiting LRP: Positional Attribution as the Missing Ingredient for Transformer Explainability

Yarden Bakish, Itamar Zimerman, Hila Chefer, Lior Wolf · DOI

Abstract

Transformers rely heavily on positional encodings (PE) to interpret sequence order, yet standard explainability tools like Layer-wise Relevance Propagation (LRP) systematically ignore these components. This omission violates the fundamental conservation property of LRP, leading to unfaithful and fragmented explanations. We introduce Positional-Aware LRP (PA-LRP), a framework that reformulates the input space to include positional information. By deriving propagation rules for various PE types, PA-LRP recovers lost relevance signals, resulting in explanations that capture the structural "big picture" of model decisions across both NLP and Computer Vision tasks.

Introduction

As deep learning models become increasingly complex, the need for robust Explainable AI (XAI) grows. Layer-wise Relevance Propagation (LRP) is a popular technique that redistributes a model's output relevance backward through the network to identify critical input features. However, current LRP implementations for Transformers possess a significant blind spot: they ignore Positional Encodings (PE).

In a Transformer, every token is augmented with a positional signal. By ignoring this signal during the backward pass, existing methods lose between 10% and 20% of the model's reasoning signal. This failure to maintain the "conservation property"—where total relevance remains constant across layers—results in noisy heatmaps that often miss the broader context of the input. PA-LRP addresses this by treating positions as first-class citizens in the attribution process.

Methods: Integrating Positional Awareness

PA-LRP introduces two primary innovations to the standard LRP pipeline:

  1. Input Space Reformulation: The input is redefined from a simple set of tokens to a set of position-token pairs. This creates a dedicated "sink" to absorb and track relevance scores associated with the positional features at each layer.
  2. Propagation Rules for PE: The framework provides mathematically grounded rules for various positional encoding schemes, including Learnable/Sinusoidal PE, Rotary PE (RoPE) used in modern LLMs like LLaMA, and ALiBi biases.
The PA-LRP framework for propagating positional-associated relevance through Transformer layers, including support for Rotary Attention.

By "linearizing" these components, the authors ensure that relevance flows through the positional logic rather than being discarded, maintaining the integrity of the attribution signal from the output back to the input.

Experimental Setup

The researchers evaluated PA-LRP across diverse architectures and modalities:

  • Natural Language Processing: Evaluations were conducted on LLaMA-2 (7B), LLaMA-3 (8B), and Tiny-LLaMA using the IMDB sentiment dataset and Multiple-Choice Question Answering (MCQA) benchmarks.
  • Computer Vision: The team utilized the DeiT (Data-efficient image Transformers) family on the ImageNet dataset for classification and segmentation tasks.

Key Insights and Results

The Structural Signal

A core finding of this research is that positional relevance is qualitatively different from semantic relevance. While semantic signals (tokens) often highlight specific, high-contrast details like a bird's beak, positional signals capture the entire structure or silhouette of an object. This suggests that the model's "sense of place" is a critical, yet previously invisible, component of its decision-making process.

Quantitative Performance

  • NLP: PA-LRP significantly reduced explanation error (AU-MSE). On LLaMA-2 7B, it improved performance by 14.5% over the previous state-of-the-art (AttnLRP), and by 51.4% for Tiny-LLaMA.
  • Vision: In negative perturbation tests, PA-LRP outperformed baselines by an average of 3.97 points, indicating that it more accurately identifies the least important pixels to maintain model stability.

Qualitative Clarity

Visually, PA-LRP produces much more intuitive heatmaps. In vision tasks, rather than showing scattered, fragmented patches, the heatmaps highlight the holistic object of interest.

Qualitative comparison of heatmaps across different methods. Column (b) shows the fragmented results of standard AttnLRP, while (c) and (d) demonstrate how PA-LRP captures the structural silhouette of objects.

Discussion and Limitations

While PA-LRP excels at capturing the "big picture," the authors noted a slight trade-off in positive perturbation tests, where it occasionally lagged behind baselines in identifying the single most critical "needle in the haystack" token. This suggests that while positional awareness improves structural fidelity, semantic-only methods may still be highly sensitive to individual high-impact features.

Future work will explore a more fundamental redesign of LRP rules for the attention mechanism itself. Currently, PA-LRP is an efficient addition to existing frameworks, requiring only a minor reformulation of the forward path to track positional sinks correctly.

Summary updated

BibTeX
@inproceedings{bakish2025revisiting,
  author = {Yarden Bakish and Itamar Zimerman and Hila Chefer and Lior Wolf},
  title = {{Revisiting LRP: Positional Attribution as the Missing Ingredient for Transformer Explainability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=bZ0MXXoldX},
}
Figure