Transformers as Intrinsic Optimizers: Forward Inference through the Energy Principle
Not on the map. Why?
Abstract (arXiv)
Attention-based Transformers have demonstrated strong adaptability across a wide range of tasks and have become the backbone of modern Large Language Models (LLMs). However, their underlying mechanisms remain open for further exploration. The energy-based perspective has long provided a valuable principle for understanding neural computation. In this paper, we revisit the principle of energy as a lens to understand attention-based Transformer models. We present a unified energy-based framework which is composed of three key components: the local energy Ei, the global energy F, and the employed optimization algorithms. We show that different attention forms including unnormalized linear attention, gated linear attention and standard softmax attention can be induced by choosing their corresponding recipes within this framework. Building on this framework, we propose energy-based modifications of attention structures. Inspired by classical gradient descent (GD) algorithms, we extend the original attention formulation based on standard GD to the momentum-based GD, Nesterov Accelerated Gradient (NAG), and Newton's method, each inducing a corresponding new attention structure. Our experiments provide preliminary support for the potential of the energy-based framework for designing attention mechanisms.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 68 of its 83 references that are in the map. First posted on arXiv 2 Nov 2025.
Builds on
68 of 83 references.
References · 68
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2016Densely Connected Convolutional Networkscited by 6,720
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2016Gaussian Error Linear Units (GELUs)cited by 3,502
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
- 2020Rethinking Attention with Performerscited by 1,601
38 more
- 2025s1: Simple test-time scalingcited by 1,341
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2020Efficient Transformers: A Surveycited by 790
- 2023Scaling Vision Transformers to 22 Billion Parameterscited by 694
- 2019Deep Equilibrium Modelscited by 615
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2020Hopfield Networks is All You Needcited by 475
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 415
- 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2016From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classificationcited by 341
- 2024Titans: Learning to Memorize at Test Timecited by 328
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2022The Forward-Forward Algorithm: Some Preliminary Investigationscited by 266
- 2016Dense Associative Memory for Pattern Recognitioncited by 236
- 2025A Survey on Test-Time Scaling in Large Language Models: What, How, Where, and How Well?cited by 223
- 2023Small-scale proxies for large-scale Transformer training instabilitiescited by 183
- 2019Sparse Sequence-to-Sequence Modelscited by 170
- 2025Scaling Latent Reasoning via Looped Language Modelscited by 165
- 2019Adaptively Sparse Transformerscited by 155
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2022Understanding The Robustness in Vision Transformerscited by 144
- 2024HGRN2: Gated Linear RNNs with State Expansioncited by 127
- 2019Learning with Fenchel-Young Lossescited by 119
- 2020Large Associative Memory Problem in Neurobiology and Machine Learningcited by 112
- 2024Demystify Mamba in Vision: A Linear Attention Perspectivecited by 102
- 2024Looped Transformers for Length Generalizationcited by 99
- 2022The Devil in Linear Transformercited by 98
- 2021ReduNet: A White-box Deep Network from the Principle of Maximizing Rate Reductioncited by 84
- 2023White-Box Transformers via Sparse Rate Reductioncited by 80
- 2023The MiniPile Challenge for Data-Efficient Language Modelscited by 75
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 74
- 2023Energy Transformercited by 71
- 2025It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimizationcited by 64
- 2025MesaNet: Sequence Modeling by Locally Optimal Test-Time Trainingcited by 47
50 most cited of 68 All 68 (JSON)
Built on by
Citing papers per year: 2026: 3.
3 papers.