atlas

Research map / Architectures and efficiency / Attention and transformers

Differential Transformer

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Linear attention approximations · 13 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 Diff Transformer, which computes attention as the difference of two softmax attention maps to cancel attention noise, and shows gains in scaling, long-context retrieval, hallucination, in-context learning, and activation outliers.

Problem

Transformers overallocate attention to irrelevant context ("attention noise"), which hurts retrieval of key information, contextual hallucination, in-context learning robustness, and produces large activation outliers.

Approach

Differential attention takes the difference between two softmax attention maps (with a learnable, reparameterized scalar lambda), analogous to differential amplifiers and noise-canceling headphones, so common-mode attention noise cancels and sparse attention patterns emerge; it can reuse FlashAttention.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace softmax attention with differential attention3B Transformer · LM Eval Harness, 1T tokensaverage accuracy: 57.5 -> 60.6Helped
Replace softmax attention with differential attention3B Transformer · Multi-needle retrieval, 4K context, N=6, R=2accuracy: 0.55 -> 0.85Helped
Replace softmax attention with differential attention3B Transformer · Contextual hallucination, MultiNewsaccuracy free of hallucinations: 0.42 -> 0.61Helped
Use 6.8B Diff Transformer instead of 11B Transformerlanguage modeling scaling · Validation lossvalidation loss: 62.2% of parametersHelped
Use 160B training tokens with Diff Transformer instead of 251B with Transformer3B language model · Language modeling scalinglanguage modeling loss: 63.7% of the training tokensHelped
Replace softmax attention with differential attention3B Transformer · Contextual hallucination, summarization and question answeringaccuracy free of hallucinationsHelped
Add GroupNorm to differential attention (ablation)Diff Transformer · 1.4B language model validation setvalidation loss: 3.122 -> 3.062Helped
Add GroupNorm to Transformer (ablation)Transformer, 8 heads and d=256 · 1.4B language model validation setvalidation loss: 3.088 -> 3.086No clear effect
Use 8 heads instead of 16 heads (ablation)Transformer · 1.4B language model validation setvalidation loss: 3.087 -> 3.088No clear effect
Set lambda initialization to 0.8 instead of the layer-dependent default (ablation)Diff Transformer · 1.4B language model validation setvalidation loss: 3.062 -> 3.065No clear effect
Set lambda initialization to 0.5 instead of the layer-dependent default (ablation)Diff Transformer · 1.4B language model validation setvalidation loss: 3.062 -> 3.066No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: StableLM-3B-4E1T training corpus book data OpenThoughts-114K-Math synthetic math data LongBench XSum CNN/DM MultiNews Qasper HotpotQA 2WikiMultihopQA TREC

Benchmarks: LM Eval Harness (ARC-C, ARC-E, BoolQ, HellaSwag, OBQA, PIQA, WinoGrande) Needle-In-A-Haystack multi-needle TREC TREC-fine Banking-77 Clinic-150 XSum CNN/DM MultiNews Qasper HotpotQA 2WikiMultihopQA

Metrics: accuracy validation loss negative log-likelihood attention score activation magnitude throughput (tokens/s) variance across demonstration orderings

Baselines: Transformer OpenLLaMA-v2-3B StableLM-base-alpha-3B-v2 StableLM-3B-4E1T

Builds on: Transformer LLaMA FlashAttention RMSNorm SwiGLU

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