Layer-wise Positional Bias in Short-Context Language Modeling
Maryam Rahimi, Mahdi Nouri, Yadollah Yaghoobzadeh
TL;DR
The paper investigates how positional bias is distributed across transformer layers during short-context next-token prediction. It introduces an attribution-based framework based on layer conductance and a sliding-window scheme to produce layer-wise positional importance profiles that are architecture-intrinsic and text-invariant. Key findings show a pronounced recency bias that grows with depth, a weaker primacy bias that diminishes in deeper layers, and an early-layer emphasis on content words with later layers losing word-type sensitivity. The results highlight the intrinsic structural role of position in autoregressive transformers and offer a principled method for analyzing layer-specific positional effects with implications for model interpretability and architecture design.
Abstract
Language models often show a preference for using information from specific positions in the input regardless of semantic relevance. While positional bias has been studied in various contexts, from attention sinks to task performance degradation in long-context settings, prior work has not established how these biases evolve across individual layers and input positions, or how they vary independent of task complexity. We introduce an attribution-based framework to analyze positional effects in short-context language modeling. Using layer conductance with a sliding-window approach, we quantify how each layer distributes importance across input positions, yielding layer-wise positional importance profiles. We find that these profiles are architecture-specific, stable across inputs, and invariant to lexical scrambling. Characterizing these profiles, we find prominent recency bias that increases with depth and subtle primacy bias that diminishes through model depth. Beyond positional structure, we also show that early layers preferentially weight content words over function words across all positions, while later layers lose this word-type differentiation.
