Optimal Control for Transformer Architectures: Enhancing Generalization, Robustness and Efficiency
Not on the map. Why?
Abstract (arXiv)
We study Transformers through the perspective of optimal control theory, using tools from continuous-time formulations to derive actionable insights into training and architecture design. This framework improves the performance of existing Transformer models while providing desirable theoretical guarantees, including generalization and robustness. Our framework is designed to be plug-and-play, enabling seamless integration with established Transformer models and requiring only slight changes to the implementation. We conduct seven extensive experiments on tasks motivated by text generation, sentiment analysis, image classification, and point cloud classification. Experimental results show that the framework improves the test performance of the baselines, while being more parameter-efficient. On character-level text generation with nanoGPT, our framework achieves a 46% reduction in final test loss while using 42% fewer parameters. On GPT-2, our framework achieves a 9.3% reduction in final test loss, demonstrating scalability to larger models. To the best of our knowledge, this is the first work that applies optimal control theory to both the training and architecture of Transformers. It offers a new foundation for systematic, theory-driven improvements and moves beyond costly trial-and-error approaches.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 62 of its 94 references that are in the map. First posted on arXiv 16 May 2025.
Builds on
62 of 94 references.
References · 62
- 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
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023GPT-4 Technical Reportcited by 18,396
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2017PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Spacecited by 4,401
- 2020wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representationscited by 3,905
- 2018Neural Ordinary Differential Equationscited by 3,779
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
38 more
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2018Dynamic Graph CNN for Learning on Point Cloudscited by 2,223
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,220
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2021GLaM: Efficient Scaling of Language Models with Mixture-of-Expertscited by 897
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2019Revisiting Point Cloud Classification: A New Benchmark Dataset and Classification Model on Real-World Datacited by 532
- 2023Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyondcited by 411
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2017Stable Architectures for Deep Neural Networkscited by 341
- 2015Data-driven Distributionally Robust Optimization Using the Wasserstein Metric: Performance Guarantees and Tractable Reformulationscited by 291
- 2022Transformer for Partial Differential Equations' Operator Learningcited by 283
- 2021The GEM Benchmark: Natural Language Generation, its Evaluation and Metricscited by 239
- 2020How to train your neural ODE: the world of Jacobian and kinetic regularizationcited by 228
- 2018Deep Neural Networks Motivated by Partial Differential Equationscited by 187
- 2023A mathematical perspective on Transformerscited by 164
- 2022What Language Model Architecture and Pretraining Objective Work Best for Zero-Shot Generalization?cited by 150
- 2020OT-Flow: Fast and Accurate Continuous Normalizing Flows via Optimal Transportcited by 143
- 2017On the Properties of the Softmax Function with Application in Game Theory and Reinforcement Learningcited by 142
- 2023The emergence of clusters in self-attention dynamicscited by 140
- 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 138
- 2019Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of Viewcited by 113
- 2023Scaling transformer neural networks for skillful and reliable medium-range weather forecastingcited by 110
- 2023In-Context Operator Learning with Data Prompts for Differential Equation Problemscited by 101
- 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 83
- 2019Distributionally Robust Optimization and Generalization in Kernel Methodscited by 73
- 2024ViT-CoMer: Vision Transformer with Convolutional Multi-scale Feature Interaction for Dense Predictionscited by 66
- 2023Decoder-Only or Encoder-Decoder? Interpreting Language Model as a Regularized Encoder-Decodercited by 44
- 2024Emergence of meta-stable clustering in mean-field transformer modelscited by 39
- 2020Discretize-Optimize vs. Optimize-Discretize for Time-Series Regression and Continuous Normalizing Flowscited by 37
- 2024Clustering in Causal Attention Maskingcited by 32
- 2019Potential Flow Generator with L2 Optimal Transport Regularity for Generative Modelscited by 31
- 2024Measure-to-measure interpolation using Transformerscited by 29
- 2023A mean-field games laboratory for generative modelingcited by 28
50 most cited of 62 All 62 (JSON)
Built on by
Citing papers per year: 2025: 4; 2026: 4.
8 papers.
- 2025Stability of Transformers under Layer Normalizationcited by 5
- 2025Zero-Shot Transferable Solution Method for Parametric Optimal Control Problemscited by 2
- 2025Sparse Transformer Architectures via Regularized Wasserstein Proximal Operator with L1 Priorcited by 1
- 2025Dynamical Implicit Neural Representationscited by 0
- 2026State-space models through the lens of ensemble controlcited by 0
- 2026Transformer-like Inference from Optimal Controlcited by 0
- 2026End-to-End Learning of Safe Optimal Feedback Control in High Dimensions with Control Barrier Function Layerscited by 0
- 2026Generalization Bounds on Optimal Control for Transformer Training and Wasserstein Distributional Robustnesscited by 0
- 2026Generalization Bounds on Optimal Control for Transformer Training and Wasserstein Distributional Robustness30 Jul 2026
- 2026End-to-End Learning of Safe Optimal Feedback Control in High Dimensions with Control Barrier Function Layers22 Jul 2026
- 2026Transformer-like Inference from Optimal Control15 May 2026
- 2026State-space models through the lens of ensemble control13 Mar 2026
- 2025Dynamical Implicit Neural Representations26 Nov 2025
- 2025Sparse Transformer Architectures via Regularized Wasserstein Proximal Operator with L1 Prior18 Oct 2025
- 2025Stability of Transformers under Layer Normalization10 Oct 2025
- 2025Zero-Shot Transferable Solution Method for Parametric Optimal Control Problems22 Sep 2025