Transformers from an Optimization Perspective
Yongyi Yang, Zengfeng Huang, David P. Wipf
摘要
Deep learning models such as the Transformer are often constructed by heuristics and experience. To provide a complementary foundation, in this work we study the following problem: Is it possible to find an energy function underlying the Transformer model, such that descent steps along this energy correspond with the Transformer forward pass? By finding such a function, we can view Transformers as the unfolding of an interpretable optimization process across iterations. This unfolding perspective has been frequently adopted in the past to elucidate more straightforward deep models such as MLPs and CNNs; however, it has thus far remained elusive obtaining a similar equivalence for more complex models with self-attention mechanisms like the Transformer. To this end, we first outline several major obstacles before providing companion techniques to at least partially address them, demonstrating for the first time a close association between energy function minimization and deep layers with self-attention. This interpretation contributes to our intuition and understanding of Transformers, while potentially laying the ground-work for new model designs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- cosFormer: Rethinking Softmax In Attention 引用了 Reformer: The Efficient Transformer
- On Sparse Modern Hopfield Model 引用了 Hopfield Networks is All You Need
- ContraNorm: A Contrastive Learning Perspective on Oversmoothing and Beyond 引用了 Simple and Deep Graph Convolutional Networks
引用它的顶会 Paper11
- On Sparse Modern Hopfield ModelJerry Yao-Chieh Hu, Donglin Yang, Dennis Wu, Chenwei Xu 等NeurIPS 2023 · 52 次引用
- On the Convergence of Encoder-only Shallow TransformersYongtao Wu, Fanghui Liu, Grigorios Chrysos, Volkan CevherNeurIPS 2023 · 17 次引用
- Attention as Implicit Structural InferenceRyan Singh, Christopher L. BuckleyNeurIPS 2023 · 12 次引用
- ContraNorm: A Contrastive Learning Perspective on Oversmoothing and BeyondXiaojun Guo, Yifei Wang, Tianqi Du, Yisen WangICLR 2023 · 10 次引用
- Optimization-Derived Learning with Essential Convergence Analysis of Training and Hyper-trainingRisheng Liu, Xuan Liu, Shangzhi Zeng, Jin Zhang 等ICML 2022 · 8 次引用
它引用的 Paper14
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
- Simple and Deep Graph Convolutional NetworksMing Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding 等ICML 2020 · 1,910 次引用
- Pay Attention to MLPsHanxiao Liu, Zihang Dai, David R. So, Quoc V. LeNeurIPS 2021 · 912 次引用
- Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl 等ICLR 2021 · 620 次引用
- cosFormer: Rethinking Softmax In AttentionZhen Qin, Weixuan Sun, Hui Deng, Dongxu Li 等ICLR 2022 · 303 次引用
相关 Paper
- TransforLearn: Interactive Visual Tutorial for the Transformer ModelLin Gao, Zekai Shao, Ziqin Luo, Haibo Hu 等IEEE VIS 2023 · 13 次引用
- Hyper-SET: Designing Transformers via Hyperspherical Energy MinimizationYunzhe Hu, Difan Zou, Dong XuICLR 2026 · 2 次引用
- Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 次引用
- In-Context Deep Learning via Transformer ModelsWeimin Wu, Maojiang Su, Jerry Yao-Chieh Hu, Zhao Song 等ICML 2025
- Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In ContextXiang Cheng, Yuxin Chen, Suvrit SraICML 2024 · 64 次引用
