From Policy Evaluation to Off-Policy Control: Provable Emergence of In-Context Q-Learning
On the map: Deep reinforcement learning methods → Deep RL algorithms and representations also fits: RL theory and sample complexity
Abstract (arXiv)
Transformers can implement reinforcement-learning algorithms in context, yet how off-policy control emerges within Transformers remains poorly understood. We study Q-learning, a foundational model-free control algorithm that combines off-policy bootstrapping with greedy policy improvement. We prove that a two-layer attention-only Transformer can implement a finite-temperature form of Q-learning, where the temperature τ>0 controls the approximation to greedy action selection, recovering window Q-learning as τ→0. We train the structured Transformer on randomly generated MDP tasks using output-only supervision. Experiments show that the theoretically predicted parameter structure emerges during training, including the internal greedy action-selection mechanism, and that the trained Transformer achieves performance comparable to Q-learning on unseen tasks. Our theoretical analysis further shows that the equivalent realizations form a solution manifold and that, under suitable task-diversity conditions, the training iterates converge locally to this manifold at an exponential rate. For the random-task model analyzed here, the local worst-case number of gradient steps needed to reduce the distance to the manifold by a factor ε is Thetaleft(τ-5log(1/varepsilon)right), quantifying the increasing optimization cost as the learned update approaches window Q-learning.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Deep RL algorithms and representations, one of 15 directions in Deep reinforcement learning methods. First posted on arXiv 13 Oct 2026.
Builds on
0 of 0 references.
No references here yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026From Weak Data to Strong Policy: Q-Targets Enable Provable In-Context Reinforcement Learning
- 2026Q-learning Penalized Transformer for Safe Offline Reinforcement Learning
- 2023Q-Transformer: Scalable Offline Reinforcement Learning via Autoregressive Q-Functions
- 2026Transformers Provably Implement In-Context Reinforcement Learning with Policy Improvement
- 2026Fast and Highly Expressive Policy Learning for Offline Reinforcement Learning via Bootstrapped Flow Q-Learning
- 2023Projected Off-Policy Q-Learning (POP-QL) for Stabilizing Offline Reinforcement Learning
- 2022Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
- 2024Mitigating Suboptimality of Deterministic Policy Gradients in Complex Q-functions