Differential Transformer
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.
6704b2ac5c2dc85588281674
Tianzhu Ye
claimed_verified
2024-10-08T08:17:20.876Z
64ac0605091ff88865352b44
/avatars/fac6c81110646251cfa694425927e74f.svg
ytz
user
ytz20
6704b2ac5c2dc85588281675
Li Dong
claimed_verified
2024-10-08T15:17:21.573Z
5df85abada6d0311fd3d5408
/avatars/2331cf703c1b5d3a62e2050b1a6eb108.svg
Li Dong
user
unilm
6704b2ac5c2dc85588281676
Yuqing Xia
admin_assigned
2024-10-08T09:05:55.411Z
6369e01864aad59d4d4501ac
/avatars/bcbd3f9d0d194eeccd061c4fa6a6e283.svg
Yuqing Xia
user
yuqxia
6704b2ac5c2dc85588281677
Yutao Sun
admin_assigned
2024-10-08T09:06:13.378Z
6300ef4779c5ddbc6cf83e1a
https://cdn-avatars.huggingface.co/v1/production/uploads/1661005591657-noauth.jpeg
Yutao Sun
user
sunyt32
6704b2ac5c2dc85588281678
Yi Zhu
6704b2ac5c2dc85588281679
Gao Huang
6704b2ac5c2dc8558828167a
Furu Wei
admin_assigned
2024-10-08T09:07:03.147Z
6368c512fbfe97c16a40baba
/avatars/1c23bc7c0b6d9225699ce27647623d7a.svg
Furu Wei
user
thegenerality
Differential Transformer
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.
Diff Transformer improves large language models by selectively focusing attention on relevant context and reducing noise, leading to better performance in scaling, long-context modeling, key information retrieval, and in-context learning.
Transformer Diff Transformer differential attention softmax attention sparse attention patterns long-context modeling key information retrieval hallucination mitigation in-context learning order permutation large language models