미분 변압기
Differential Transformer
October 7, 2024
저자: Tianzhu Ye, Li Dong, Yuqing Xia, Yutao Sun, Yi Zhu, Gao Huang, Furu Wei
cs.AI
초록
Transformer는 관련 없는 맥락에 지나치게 많은 주의를 기울이는 경향이 있습니다. 본 연구에서는 관련 있는 맥락에 주의를 집중하고 노이즈를 제거하는 Diff Transformer를 소개합니다. 구체적으로, 차별적 주의 메커니즘은 두 개의 별도의 소프트맥스 주의 맵 간의 차이로 주의 점수를 계산합니다. 뺄셈은 노이즈를 제거하고 희소한 주의 패턴의 발생을 촉진합니다. 언어 모델링에 대한 실험 결과는 Diff Transformer가 모델 크기 확장 및 훈련 토큰 설정의 다양한 상황에서 Transformer를 능가한다는 것을 보여줍니다. 더 흥미로운 점은 Diff Transformer가 긴 맥락 모델링, 주요 정보 검색, 환각 완화, 맥락 내 학습 및 활성화 이상값 감소와 같은 실용적 응용 분야에서 주목할만한 장점을 제공한다는 것입니다. 관련 없는 맥락에 쉽게 산만해지지 않아 질문 응답 및 텍스트 요약에서 환각을 완화할 수 있습니다. 맥락 내 학습의 경우, Diff Transformer는 정확도를 향상시키는데 그치지 않고, 순서 순열에 대해 더 견고하며 만성적인 견고성 문제로 여겨졌던 것입니다. 이러한 결과들은 Diff Transformer를 대규모 언어 모델을 발전시키는 데 매우 효과적이고 유망한 아키텍처로 위치시킵니다.
English
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.Summary
AI-Generated Summary