Quite a breakthrough Paper for transformer architecture from @Microsoft. π
"DIFFERENTIAL TRANSFORMER" β¨
Differential attention maps now subtract two distinct softmax outputs. This subtraction removes attention noise and pushes the model toward sparse attention.
π https://arxiv.org/pdf/2410.05258
Net effect:
β’ Sharper retrieval and lower hallucination rates. π
β’ Outperforms standard Transformers while using 35-40% fewer parameters or training tokens
β’ 10-20% accuracy gain in many-shot in-context learning across datasets
β’ 7-11% reduction in hallucination for summarization and question answering
β’ Maintains performance with 6-bit quantization, while Transformer degrades significantly
Original Problem π:
Transformer tends to overallocate attention to irrelevant context, leading to challenges in accurately retrieving key information.
-----
Solution in this Paper π‘:
β’ Introduces DIFF Transformer with differential attention mechanism
β’ Calculates attention scores as difference between two separate softmax attention maps
β’ Subtraction cancels noise, promoting emergence of sparse attention patterns
β’ Amplifies attention to relevant context while reducing attention to irrelevant parts
β’ Uses GroupNorm to normalize each attention head independently
-----
Key Insights from this Paper π‘:
β’ DIFF Transformer outperforms Transformer in scaling model size and training tokens
β’ Requires only ~65% of model size or training tokens to match Transformer performance
β’ Excels in long-context modeling, key information retrieval, and in-context learning
β’ Mitigates hallucination in question answering and text summarization
β’ Reduces outliers in model activations, enabling better quantization










