Lune

ICLR2025Top-tier venue

Differential Transformer

Tianzhu Ye, Li Dong, Yuqing Xia, Yutao Sun, Yi Zhu, Gao Huang, Furu Wei

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

41 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Rope to Nope and Back Again: A New Hybrid Attention Strategy cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy cites FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision
  • Data Engineering for Scaling Language Models to 128K Context cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Neural Attention Search cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Neural Attention Search cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers41

  1. Neural Attention SearchDifan Deng, Marius LindauerNeurIPS 2025 · 431 citations
  2. Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-FreeZihan Qiu, Zekun Wang, Bo Zheng, Zeyu Huang et al.NeurIPS 2025 · 336 citations
  3. Rope to Nope and Back Again: A New Hybrid Attention StrategyBowen Yang, Bharat Venkitesh, Dwaraknath Gnaneshwar, Hangyu Lin et al.NeurIPS 2025 · 51 citations
  4. Doc-to-LoRA: Learning to Instantly Internalize ContextsRujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, Robert LangeICML 2026 · 27 citations
  5. scDFM: Distributional Flow Matching Model for Robust Single-Cell Perturbation PredictionChenglei Yu, Chuanrui Wang, Bangyan Liao, Tailin WuICLR 2026 · 15 citations

Builds on16

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  3. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
  4. FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisionJay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar et al.NeurIPS 2024 · 727 citations
  5. Data Engineering for Scaling Language Models to 128K ContextYao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue et al.ICML 2024 · 204 citations

Related papers

  1. DINT TransformerYueyang Cang, Yuhang Liu, Xiaoteng Zhang, Erlu Zhao et al.EMNLP 2025 · 1 citation
  2. Understanding Differential Transformer Unchains Pretrained Self-AttentionsChaerin Kong, Jiho Jang, Nojun KwakNeurIPS 2025
  3. Threshold Differential Attention for Sink-Free, Ultra-Sparse, and Non-Dispersive Language ModelingXingyue Huang, Xueying Ding, Mingxuan Ju, Yozen Liu et al.ACL 2026 · 3 citations
  4. Efficient OpAmp Adaptation for Zoom Attention to Golden ContextsHaoyuan Wu, Rui Ming, Haisheng Zheng, Zhuolun He et al.ACL 2025 · 1 citation
  5. Integral Transformer: Denoising Attention, Not Too Much Not Too LittleIvan Kobyzev, Abbas Ghaddar, Dingtao Hu, Boxing ChenEMNLP 2025
Dusk over the sea between two cliffs drawn in fine vertical lines