Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free
Zihan Qiu, Zekun Wang, Bo Zheng, Zeyu Huang, Kaiyue Wen, Songlin Yang, Rui Men, Le Yu, Fei Huang, Suozhi Huang, Dayiheng Liu, Jingren Zhou, Junyang Lin
摘要
Gating mechanisms have been widely utilized, from early models like LSTMs [1] and Highway Networks [2] to recent state space models [3], linear attention [4], and also softmax attention [5,6]. Yet, existing literature rarely examines the specific effects of gating. In this work, we conduct comprehensive experiments to systematically investigate gating-augmented softmax attention variants. Specifically, we perform a comprehensive comparison over 30 variants of 15B Mixture-of-Experts (MoE) models and 1.7B dense models trained on a 3.5 trillion token dataset. Our central finding is that a simple modification-applying an head-specific sigmoid gate after the Scaled Dot-Product Attention (SDPA)-consistently improves performance. This modification also enhances training stability, tolerates larger learning rates, and improves scaling properties. By comparing various gating positions and computational variants, we attribute this effectiveness to two key factors: (1) introducing non-linearity upon the low-rank mapping in the softmax attention, and (2) applying query-dependent sparse gating scores to modulate the SDPA output. Notably, we find this sparse gating mechanism mitigates 'massive activation' [7], 'attention sink' [8], and enhances long-context extrapolation performance, and we also release related codes and models to facilitate future research. Furthermore, the most effective SDPA output gating is used in the Qwen3-Next models.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 57 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Multi-Head Low-Rank Attention 引用了 Efficient Streaming Language Models with Attention Sinks
- Multi-Head Low-Rank Attention 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- GMSA: Enhancing Context Compression via Group Merging and Layer Semantic Alignment 引用了 Efficient Streaming Language Models with Attention Sinks
- ZipMap: Linear-Time Stateful 3D Reconstruction via Test-Time Training 引用了 TTT3R: 3D Reconstruction as Test-Time Training
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Efficient Streaming Language Models with Attention Sinks
- TTT3R: 3D Reconstruction as Test-Time Training 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
引用它的顶会 Paper57
- TTT3R: 3D Reconstruction as Test-Time TrainingXingyu Chen, Yue Chen, Yuliang Xiu, Andreas Geiger 等ICLR 2026 · 139 次引用
- TabICLv2: A Better, Faster, Scalable, and Open Tabular Foundation ModelJingang QU, David Holzmüller, Gael Varoquaux, Marine Le MorvanICML 2026 · 85 次引用
- GMSA: Enhancing Context Compression via Group Merging and Layer Semantic AlignmentJiwei Tang, Zhicheng Zhang, Shunlong Wu, Jingheng Ye 等ACL 2026 · 24 次引用
- ZipMap: Linear-Time Stateful 3D Reconstruction via Test-Time TrainingHaian Jin, Rundi Wu, Tianyuan Zhang, Ruiqi Gao 等CVPR 2026 · 23 次引用
- Multi-Head Low-Rank AttentionSongtao Liu, Hongwu Peng, Zhiwei Zhang, Zhengyu Chen 等ICLR 2026 · 18 次引用
它引用的 Paper32
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 次引用
- CogView: Mastering Text-to-Image Generation via TransformersMing Ding, Zhuoyi Yang, Wenyi Hong, Wendi Zheng 等NeurIPS 2021 · 1,026 次引用
- Attention on Attention for Image CaptioningLun Huang, Wenmin Wang, Jie Chen, Xiaoyong WeiICCV 2019 · 992 次引用
相关 Paper
- SeerAttention: Self-distilled Attention Gating for Efficient Long-context PrefillingYizhao Gao, Zhichen Zeng, Dayou Du, Shijie Cao 等NeurIPS 2025 · 12 次引用
- Attention Sink Forges Native MoE in Attention Layers: Sink-Aware Training to Address Head CollapseZizhuo Fu, Wenxuan Zeng, Runsheng Wang, Meng LiICML 2026 · 3 次引用
- Adaptive Gating in Mixture-of-Experts based Language ModelsJiamin Li, Qiang Su, Yitao Yang, Yimin Jiang 等EMNLP 2023 · 9 次引用
- Multi-Head Mixture-of-ExpertsXun Wu, Shaohan Huang, Wenhui Wang, Shuming Ma 等NeurIPS 2024 · 42 次引用
- Gating Dropout: Communication-efficient Regularization for Sparsely Activated TransformersRui Liu, Young Jin Kim, Alexandre Muzio, Hany HassanICML 2022 · 31 次引用
