DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted Averaging
Matteo Pagliardini, Amirkeivan Mohtashami, François Fleuret, Martin Jaggi
摘要
The transformer architecture by Vaswani et al. (2017) is now ubiquitous across application domains, from natural language processing to speech processing and image understanding. We propose DenseFormer, a simple modification to the standard architecture that improves the perplexity of the model without increasing its size -- adding a few thousand parameters for large-scale models in the 100B parameters range. Our approach relies on an additional averaging step after each transformer block, which computes a weighted average of current and past representations -- we refer to this operation as Depth-Weighted-Average (DWA). The learned DWA weights exhibit coherent patterns of information flow, revealing the strong and structured reuse of activations from distant layers. Experiments demonstrate that DenseFormer is more data efficient, reaching the same perplexity of much deeper transformer models, and that for the same perplexity, these new models outperform transformer baselines in terms of memory efficiency and inference time.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 Reformer: The Efficient Transformer
- Reconstructing KV Caches with Cross-Layer Fusion for Enhanced Transformers 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Reformer: The Efficient Transformer
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- Improving Model Representation and Reducing KV Cache via Skip Connections with First Value Heads 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Improving Model Representation and Reducing KV Cache via Skip Connections with First Value Heads 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Improving Model Representation and Reducing KV Cache via Skip Connections with First Value Heads 引用了 Language Models are Few-Shot Learners
- Improving Model Representation and Reducing KV Cache via Skip Connections with First Value Heads 引用了 Value Residual Learning
- Value Residual Learning 引用了 Language Models are Few-Shot Learners
- mHC: Manifold-Constrained Hyper-Connections 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- mHC: Manifold-Constrained Hyper-Connections 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper8
- mHC: Manifold-Constrained Hyper-ConnectionsZhenda Xie, Yixuan Wei, Huanqi Cao, Chenggang Zhao 等ICML 2026 · 72 次引用
- Transformer Layers as PaintersQi Sun, Marc Pickett, Aakash Kumar Nain, Llion JonesAAAI 2025 · 49 次引用
- Value Residual LearningZhanchao Zhou, Tianyi Wu, Zhiyun Jiang, Fares Obeid 等ACL 2025 · 8 次引用
- Reconstructing KV Caches with Cross-Layer Fusion for Enhanced TransformersHongzhan Lin, Zhiqi Bai, Xinmiao Zhang, Siran Yang 等ICLR 2026 · 5 次引用
- Improving Model Representation and Reducing KV Cache via Skip Connections with First Value HeadsZhoutong Wu, Yuan Zhang, Yiming Dong, Chenheng Zhang 等NeurIPS 2025 · 4 次引用
它引用的 Paper9
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
相关 Paper
- Brainformers: Trading Simplicity for EfficiencyYanqi Zhou, Nan Du, Yanping Huang, Daiyi Peng 等ICML 2023 · 38 次引用
- Fcaformer: Forward Cross Attention in Hybrid Vision TransformerHaokui Zhang, Wenze Hu, Xiaoyu WangICCV 2023 · 10 次引用
- Sparse is Enough in Scaling TransformersSebastian Jaszczur, Aakanksha Chowdhery, Afroz Mohiuddin, Lukasz Kaiser 等NeurIPS 2021 · 127 次引用
- Improving Transformers with Dynamically Composable Multi-Head AttentionDa Xiao, Qingye Meng, Shengping Li, Xingyuan YuanICML 2024 · 8 次引用
- DictFormer: Tiny Transformer with Shared DictionaryQian Lou, Ting Hua, Yen-Chang Hsu, Yilin Shen 等ICLR 2022 · 12 次引用
