Sahaj.blogs
8 Oct 2024 · Paper summary

Paper summary: Differential Transformer

Differential attention computes attention as the difference between two softmax maps, cancelling common-mode noise; Diff Transformer is reported to beat Transformers on scaling, long context, retrieval and hallucination.

Problem

According to the authors, Transformers tend to over-allocate attention to irrelevant context. Some attention “noise” spreads over tokens that don’t matter, which can drown the relevant signal.

Method

Differential attention computes two separate softmax attention maps and uses their difference as the attention scores. The paper compares it to noise-cancelling headphones: attention that both maps give to the same irrelevant tokens cancels out, and sparse attention patterns emerge. Diff Transformer replaces standard attention with this mechanism.

Key results

From the abstract:

  • outperforms the Transformer across settings that scale model size and training tokens
  • advantages in long-context modelling, key information retrieval, hallucination mitigation (question answering and summarisation) and in-context learning
  • fewer activation outliers

Limitations

There’s no dedicated limitations section in the extracted text. Each layer computes two attention maps, so the mechanism changes the attention computation and its cost compared with standard attention.

#llm#attention#architectures

Sources

  1. Differential Transformer (arXiv:2410.05258) — arXiv
  2. Hugging Face Daily Papers, 2024-10-08 — Hugging Face
  3. Differential Transformer (arXiv HTML full text) — arXiv

This is a summary written from the linked public sources. Figures and numbers are as reported there.