Transformer-like Inference from Optimal Control
Not on the map. Why?
Abstract (arXiv)
Decoder-only transformers compute the conditional probability of the next token from a sequence of past observations. This paper derives, from first principles, inference architectures that solve the same prediction problem - and in doing so, recovers transformer-like layer operations as a consequence of optimal control theory. The framework is developed for two model classes: a nonlinear model of discrete-valued processes, directly motivated by the transformer, and a linear Gaussian model as a tractable baseline. For both model classes, the prediction objective is reformulated as an optimal control problem whose solution yields an explicit inference algorithm, the dual filter, with a layer structure that mirrors the layer structure of a decoder-only transformer. Numerical experiments provide a comparison of the optimal control to attention weights from a trained transformer. These experiments reveal that when the embedding dimension is insufficient, the transformer implicitly exploits non-Markovian structure.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 19 of its 28 references that are in the map. First posted on arXiv 15 May 2026.
Builds on
19 of 28 references.
References · 19
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2023A mathematical perspective on Transformerscited by 160
- 2022Formal Algorithms for Transformerscited by 70
- 2023Causal Interpretation of Self-Attention in Pre-Trained Transformerscited by 30
- 2025A Unified Perspective on the Dynamics of Deep Transformerscited by 30
- 2024Measure-to-measure interpolation using Transformerscited by 28
- 2023Can a Transformer Represent a Kalman Filter?cited by 20
- 2023Can Transformers Learn Optimal Filtering for Unknown Systems?cited by 15
- 2024The Asymptotic Behavior of Attention in Transformerscited by 12
- 2025Optimal Control for Transformer Architectures: Enhancing Generalization, Robustness and Efficiencycited by 8
7 more
- 2024Arrow of Time in Estimation and Control: Duality Theory Beyond the Linear Gaussian Modelcited by 3
- 2026An Optimal Control Approach To Transformer Trainingcited by 3
- 2019What is the Lagrangian for Nonlinear Filtering?cited by 2
- 2022Duality for Nonlinear Filtering II: Optimal Controlcited by 2
- 2025Localmax dynamics for attention in transformers and its asymptotic behaviorcited by 2
- 2026LLMs as High-Dimensional Nonlinear Autoregressive Models with Attention: Training, Alignment and Inferencecited by 2
- 2025Differentiable Filtering for Learning Hidden Markov Modelscited by 1
Built on by
Not cited yet.