atlas

Research map / Architectures and efficiency / Attention and transformers

KV Shifting Attention Enhances Language Modeling

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 0 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.

Proposes KV shifting attention, which mixes each token's key and value with its neighbor's via learnable shifts, so a single attention layer can implement induction heads, and reports gains in toy and pretraining (2.9B/19B) experiments.

Problem

Induction heads normally require at least two attention layers and sufficient width, which may limit in-context learning and language modeling efficiency in decoder-only transformers.

Approach

Decouple keys and values by shifting them with the previous token using four learnable per-head coefficients (alpha1, alpha2, beta1, beta2), so a one-layer attention can represent induction heads; the extra cost is O(ND) and only 4 parameters per head.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use KV shifting attention instead of vanilla attention2.9B language model · Benchmarks at 500B tokensaverage score: 36.45 -> 38.57Helped
Use KV shifting attention instead of vanilla attention19B language model · Benchmarks at 200B tokensaverage score: 38.06 -> 38.83Helped
Use KV shifting attention instead of vanilla attention19B language model · Winogrande, 200B tokensaccuracy: 49.01 -> 48.38Hurt
Use KV shifting attention instead of vanilla attention19B language model · CMMLU, 200B tokensaccuracy: 42.92 -> 42.40Hurt
Use KV shifting attention instead of vanilla attentionlanguage model · iGSM Tr12-Te15accuracy: 0.8154 -> 0.8909Helped
Use KV shifting attention instead of vanilla attentionlanguage model · iGSM Tr21-Te24accuracy: 0.8711 -> 0.9062Helped
Shift keys and values rather than use vanilla attentiontoy induction task · Induction accuracyaccuracyHelped
Use KV shifting rather than vanilla attentiontoy 3-gram task · 3-gram learningaccuracyNo clear effect
Remove key shifting (ablation)KV shifting attention · Language modelingtraining lossHurt
Remove value shifting (ablation)KV shifting attention · Language modelingtraining lossHurt
Extend the shift window from [i-1,i] to [i-2,i] or [i-3,i] (ablation)KV shifting attention · Language modelingtraining lossNo clear effect
Constrain the KV shifting parameters with a gate or to the range 0 to 1 (ablation)KV shifting attention · 1.5B model, 10B tokenstraining lossHurt

Surprising findings

Limitations

Experimental setup

Datasets: private pretraining corpus similar to FineWeb-edu WebText (validation) iGSM synthetic induction data

Benchmarks: lambada winogrande hellaswag ARC-E ARC-C CMMLU MMLU MATH iGSM

Metrics: accuracy training loss validation loss error rate on hop tasks

Baselines: Vanilla transformer (2-layer / standard attention)

Builds on: induction heads virtual attention heads Alibi Llama grouped query attention

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