atlas

Research map / Architectures and efficiency / Attention and transformers

On the Emergence of Position Bias in Transformers

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 1 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.

Graph-theoretic analysis of how causal, sliding-window and prefix masks, decay masks and RoPE shape position bias across multi-layer attention, with synthetic retrieval experiments.

Problem

How attention masks and positional encodings shape position bias (e.g., lost-in-the-middle, attention sinks) in multi-layer transformers, which lacks a comprehensive theoretical understanding.

Approach

Model attention masks as directed graphs and interpret multi-layer attention rollout probabilities as path-sum distributions; show causal masks make contextual mass converge exponentially to early (center) tokens, and that decay masks and RoPE induce per-layer distance decay which, across depth, trades off against cumulative early-token importance.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
increase attention depth without residual connectionssingle-head attention network · synthetic retrieval with position-unbiased training dataposition bias toward earlier tokensHelped
add a decay maskcausal attention · synthetic retrieval with position-unbiased training datafocus on recent tokensHelped
add RoPEcausal attention · synthetic retrieval with position-unbiased training datafocus on recent tokensHelped
use a decay mask instead of RoPEcausal attention · synthetic retrieval with position-unbiased training datafocus on recent tokensHelped
add standard residual connections after each attention layer (ablation)single-head attention network · synthetic retrieval with position-unbiased training dataposition bias by depthMixed
use a causal mask instead of no mask, without positional encodingattention network with residual connections · synthetic retrieval trained with bias toward the first and last positionsposition bias toward the first positionHelped
add sinusoidal positional encodingattention network with or without a causal mask · synthetic retrieval trained with bias toward the first and last positionscapture of positional biases at both endsHelped
add RoPEattention network with or without a causal mask · synthetic retrieval trained with bias toward the first and last positionscapture of positional biases at both endsHelped
train with positional bias toward both the beginning and the endattention network with positional encodings · synthetic retrievallost-in-the-middle patternHelped
use a causal mask without positional encoding instead of no mask without positional encodingattention network with residual connections · synthetic retrieval trained with positional bias at the beginning or endcapture of positional bias at the last positionHurt
use sinusoidal positional encoding or RoPE instead of no positional encodingattention network · synthetic retrieval trained with positional bias at the middle or last positioncapture of positional bias at the trained positionHelped
use a smaller sliding-window widthsliding-window attention · multi-layer attentionbias toward early tokensHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian mixture retrieval sequences

Benchmarks: synthetic retrieval test sets with positional gap [a,b]-[b,a]

Metrics: retrieval accuracy gap attention sink metric

Baselines: no mask no PE sinusoidal PE

Builds on: attention rollout ALiBi RoPE Birdie-style in-context learning data generation

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