Differential Transformer
Summary
arXiv 2410.05258 (v2): Diff Transformer computes attention as the difference of two softmax attention maps, canceling noise and encouraging sparse attention. Claims better language-modeling performance than Transformers, stronger long-context retrieval, fewer hallucinations, and better robustness under lower-bit quantization; Discord note highlighted ~40% fewer parameters for matched performance. Microsoft/academic author list (Ye, Dong, Xia, Sun, Zhu, Huang, Wei).
- Venue
- arXiv 2410.05258
- Publisher
- arXiv 2410.05258
- Source
- arxiv
- Access
- open arXiv PDF/abs
- Language
- en
- Purpose
- Propose Diff Transformer / differential attention to amplify relevant context and cancel attention noise
- Domain
- attention mechanisms; transformer architecture; noise-canceling differential attention
- Used for
- architecture experiments; long-context / retrieval attention research
- Time period
- published 2024-10-07 on arXiv; Discord mid 1295746155870949406 (random-papers)
- Author type
- academic / industry research
- Added
- Sep 14, 2026
- Verified
- Sep 14, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Published
- Oct 7, 2024
- Last revised
- Apr 7, 2025
- arXiv categories
- cs.CL, cs.LG
- Author comment
- Accepted as an Oral Presentation at ICLR 2025
- Citations
- 1
- References
- 58
- Published in
- International Conference on Learning Representations
Abstract (from arXiv)
Transformer tends to overallocate attention to irrelevant context. In this work, we introduce Diff Transformer, which amplifies attention to the relevant context while canceling noise. Specifically, the differential attention mechanism calculates attention scores as the difference between two separate softmax attention maps. The subtraction cancels noise, promoting the emergence of sparse attention patterns. Experimental results on language modeling show that Diff Transformer outperforms Transformer in various settings of scaling up model size and training tokens. More intriguingly, it offers notable advantages in practical applications, such as long-context modeling, key information retrieval, hallucination mitigation, in-context learning, and reduction of activation outliers. By being less distracted by irrelevant context, Diff Transformer can mitigate hallucination in question answering and text summarization. For in-context learning, Diff Transformer not only enhances accuracy but is also more robust to order permutation, which was considered as a chronic robustness issue. The results position Diff Transformer as a highly effective and promising architecture to advance large language models.
Tags
Topics
attention mechanisms; transformer architecture; noise-canceling differential attention
Research notes
- Mapped from Discord descriptive post (no arXiv URL in message) via unambiguous Differential attention / Diff Transformer identity. Primary: export.arxiv.org API.
Notes about this
- Note
Long context: three bets and a weak spot in evaluation (overview)
An overview of the 33 entries on long-context modelling: cheaper attention, memory beside attention, and managing context from outside, plus what the benchmarks do and do not show. Written by Claude Opus 5.5.
Cites, within this collection
Similar entries
- Paper Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention
- Paper MoBA: Mixture of Block Attention for Long-Context LLMs
- Paper Block Sparse Attention with Log-Linear Complexity
- Paper HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing
- Paper Dynamic Linear Attention
- Paper Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling