# Differential Transformer

- **ID:** 906
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2410.05258
- **Authors:** Tianzhu Ye, Li Dong, Yuqing Xia, Yutao Sun, Yi Zhu, Gao Huang, Furu Wei
- **Venue:** arXiv 2410.05258
- **Publisher:** arXiv 2410.05258
- **Published:** 2024
- **Source:** arxiv
- **Language:** en
- **Access:** open arXiv PDF/abs
- **Tags:** differential-transformer, differential-attention, long-context, microsoft, arxiv:2410.05258
- **Topics:** attention mechanisms; transformer architecture; noise-canceling differential attention
- **Added:** 2026-09-14
- **Verified:** 2026-09-14
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/906

## 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).

## Attributes

- **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

## From the source (fetched 2026-10-03)

- **Published:** Oct 7, 2024 (arXiv)
- **Last revised:** Apr 7, 2025 (arXiv)
- **arXiv categories:** cs.CL, cs.LG (arXiv)
- **Author comment:** Accepted as an Oral Presentation at ICLR 2025 (arXiv)
- **Citations:** 1 (Semantic Scholar)
- **References:** 58 (Semantic Scholar)
- **Published in:** International Conference on Learning Representations (Semantic Scholar)

## Abstract

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.

## Research notes

- Mapped from Discord descriptive post (no arXiv URL in message) via unambiguous Differential attention / Diff Transformer identity. Primary: export.arxiv.org API.

## Cites, within this collection

- [FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision](https://papers.projxon.ai/entries/575) (paper 2024, #575)

## Related entries

- Discussed in: [Long context: three bets and a weak spot in evaluation (overview)](https://papers.projxon.ai/entries/1208) (note, #1208)

## Similar entries

- [Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention](https://papers.projxon.ai/entries/564) (paper, #564)
- [MoBA: Mixture of Block Attention for Long-Context LLMs](https://papers.projxon.ai/entries/707) (paper, #707)
- [Block Sparse Attention with Log-Linear Complexity](https://papers.projxon.ai/entries/1086) (paper, #1086)
- [HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing](https://papers.projxon.ai/entries/1031) (paper, #1031)
- [Dynamic Linear Attention](https://papers.projxon.ai/entries/489) (paper, #489)
- [Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling](https://papers.projxon.ai/entries/1244) (paper, #1244)
