eess.SYMar 16, 2026

Generalizable Optimal Control with Transformers: One Policy Across Diverse Systems

Authors: Turki Bin Mohaya, Maitham F. AL-Sunni, John M. Dolan, Peter Seiler

Organizations: Robotics Institute, Carnegie Mellon University, Pittsburgh, PA, USA

Abstract

Classical optimal control designs a separate controller for each plant. Even for the Linear Quadratic Regulator (LQR), every new model must be identified and its Riccati equation re-solved. We ask whether a single learned policy can instead serve an entire family of systems, and we show that one transformer can. We train the policy to imitate optimal LQR state feedback across a collection of heterogeneous Multiple-Input, Multiple-Output (MIMO) Linear Time-Invariant (LTI) systems that differ in their state and input dimensions and in their cost objectives. A shared representation lets the same parameters control every member of the family. It combines system-wise standardization, zero-padding and masking across dimensions, and an explicit encoding of the cost matrices. At run time, the policy maps a short window of recent states and the specified cost to a control action. It uses no plant matrices and identifies the dynamics implicitly from the state history. We evaluate on 2828 simulated systems over 9,6759{,}675 closed-loop rollouts, and no unstable rollout was observed in any of them. On the systems seen during training, it attains a median relative sub-optimality of 0.022%0.022\%, even under parameter perturbations of up to ±10%\pm10\%. It transfers to unseen systems with lightweight fine-tuning, reaching a median sub-optimality of 0.19%0.19\%. These results support transformers as generalizable near-optimal controllers for structured families of linear systems.

Figures & tables

Explore similar work

CardsList
  1. An Optimal Control Approach To Transformer Training

    Mar 10, 2026Kağan Akman, Naci Saldi, Serdar YükselTransformerTransformer Training Dynamics

  2. Transformer-like Inference from Optimal Control

    May 15, 2026Aditya Kudre, Heng-Sheng Chang, Prashant G. MehtaTransformer InferenceDecoder-Only Language Models

  3. From Policy Evaluation to Off-Policy Control: Provable Emergence of In-Context Q-Learning

    Oct 13, 2026Yingjun Mo, Yajie Zhao, Fang KongIn-Context RLTransformer-Based RL