NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Where does Absolute Position come from in decoder-only Transformers?

Valeria Ruscio, Umberto Nanni, Fabrizio SilvestriarXiv 2026

TL;DR

Modern decoder-only Transformers trained with Rotary Position Embeddings (RoPE) are mathematically designed to only understand relative token distances, yet they stubbornly exhibit awareness of absolute positions. This paper reveals that this absolute position "leakage" stems from two architectural sources: the causal attention mask's softmax normalization and a deterministic, high-magnitude "fingerprint" generated by the very first token in the residual stream.

What Problem Does This Paper Address?

Rotary Position Embeddings (RoPE) have become the default choice for state-of-the-art language models like Llama, Qwen, and Mistral. RoPE operates by applying a position-dependent rotation to queries and keys, ensuring that their inner product depends strictly on the relative distance ($i - j$) between tokens. Theoretically, a RoPE-trained model shouldn't be able to tell if a token sits at absolute position 50 or 100, except through its relationships with neighboring tokens.

In practice, however, these models readily distinguish absolute positions. This paper investigates the root cause of this behavior: Where does this absolute position information leak from, and how does it enter the attention computation?

Methods

The authors isolate and quantify absolute position leakage using a metric called $\Delta R^2$. This metric measures how much variance in attention logits can be explained by absolute positions ($i$ and $j$) after controlling for a highly flexible, saturated baseline that captures all relative-offset ($i - j$) information.

To pinpoint the exact mechanisms, the authors employ several clever ablation techniques:

  • Bidirectional Ablation: They remove the causal mask at inference time. Since a bidirectional mask sums over a constant number of tokens ($T$) for every query, it completely eliminates any position dependency caused by the mask itself, leaving behind only the leakage originating from the residual stream.
  • Mechanism Ablations (Identity-RoPE & Scrambled-RoPE): They disable or randomize RoPE rotations across layers to see how raw residual stream activations interact with queries and keys.
  • Position-0 Interventions: They swap or modify the first token's embedding (typically the BOS token) to test its impact on downstream attention patterns.

Datasets

The experiments were conducted using a corpus of 64 Wikipedia chunks balanced across four distinct topics, tokenized to a sequence length of $T = 256$ (and up to 768 tokens for length-scaling analyses).

The authors evaluated these methods across several prominent open-source model families:

  • Llama-3.2 (1B, 3B) and Llama-3.1 (8B) (Standard RoPE, auto-prepended BOS)
  • Qwen-2.5-3B (NTK-scaled RoPE, no auto-prepended BOS)
  • Mistral-7B-v0.3 (Sliding-window attention)

Key Insights and Ideas

  • The Causal Mask Acts as an Implicit Counter: In causal attention, the softmax denominator for query $i$ sums over exactly $i + 1$ terms. This means the normalization step inherently injects absolute position information into the attention weights, completely independent of what the actual logits encode.
  • Position 0 is a Closed Dynamical System: Under causal attention, the token at position 0 can only ever attend to itself. Consequently, its activation trajectory across layers is a purely deterministic function of its initial embedding. It develops an anomalously high magnitude (up to 14x larger than mid-sequence tokens), acting as a fixed geometric anchor.
  • Attention Sinks are Anchors, Not Aggregators: Conventional wisdom suggested that attention sinks (the massive attention spikes on the first token) act as semantic aggregators. The authors prove otherwise: the positions with the highest attention sinks have topic-decodability at literal chance levels. Instead, sinks act as content-free stabilizers passing forward the deterministic "fingerprint" of position 0.
  • Architectural Choices Shift the Leakage Balance: Different RoPE variants alter how this leakage manifests. For instance, NTK scaling (used in Qwen) spreads out rotation frequencies, suppressing the residual stream leakage and leaving the causal mask as the dominant source. Conversely, Mistral's sliding-window attention allows residual stream leakage to compound with depth.

Key Results

  • Leakage is Heavily Concentrated at the Start: Absolute position leakage ($\Delta R^2$) is overwhelmingly concentrated in the first few tokens of a sequence and decays rapidly as the sequence lengthens.
Figure 1: Mean ∆R2 by query position bin under causal (baseline) and bidirectional attention, for the three architectures. Query position bin midpoints are plotted on a log scale.
  • Quantifying the Mask vs. Residual Stream: By comparing causal and bidirectional attention, the authors found that the causal mask accounts for the majority of early-sequence leakage: 80% in Qwen, 62% in Llama, and 49% in Mistral within the first 5 tokens.
  • The Power of the First Token: Replacing the BOS embedding before the forward pass eliminates 40% of the residual-stream leakage component at early queries in Llama-3.2-3B, confirming that the position-0 trajectory is a major contributor.
  • Scale Preserves Leakage Magnitude: In the Llama family, moving from 1B to 3B and 8B parameters doesn't change the total amount of position leakage, but it shifts the composition: the residual stream's share doubles from 18% (at 1B) to ~36% (at 3B and 8B), where it stabilizes.

Limitations and Future Work

  • Downstream Impact: While the paper thoroughly maps out where the leakage occurs in the attention logits, it does not directly connect the magnitude of this leakage to downstream task performance or specific behavioral quirks in LLMs.
  • The Missing 60%: The position-0 embedding replacement accounts for 40% of the residual stream leakage. The remaining 60% is attributed to unisolated sources, such as layer-norm interactions with mid-sequence position-correlated activations and accumulated rotated writes, which remain open for future characterization.
  • Inference vs. Training: The bidirectional ablation removes the causal mask at inference time on models explicitly trained with a causal mask. Exploring how these components decouple in models trained bidirectionally from scratch is left to future work.

Summary updated

BibTeX
@misc{ruscio2026where,
  author = {Valeria Ruscio and Umberto Nanni and Fabrizio Silvestri},
  title = {{Where does Absolute Position come from in decoder-only Transformers?}},
  year = {2026},
  eprint = {2606.06160},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.06160},
}
Figure