Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Differential Transformer

About

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.

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

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningHellaSwag
Accuracy41.29
1460
Commonsense ReasoningWinoGrande
Accuracy56.12
776
Question AnsweringARC Challenge
Accuracy27.82
749
Question AnsweringARC Easy
Accuracy60.69
386
Physical Commonsense ReasoningPIQA
Accuracy71.76
329
Question AnsweringOBQA
Accuracy22.2
276
Long-context Question AnsweringLongBench (test)
HotpotQA8.1
59
Single-Doc Question AnsweringLongBench
MultifieldQA Score0.139
36
Synthetic in-context reasoningMAD synthetic (test)
Compression Score42.9
24
Commonsense Reasoning and Knowledge Question AnsweringGeneral Ability Suite (ARC, HellaSwag, PIQA, BoolQ, WinoGrande, COPA, OBQA, SciQ) various (test)
ARC-C Accuracy28.9
19
Showing 10 of 14 rows

Other info

Follow for update