Beyond Linear Attention: Softmax Transformers Implement In-Context Reinforcement Learning
On the map: Deep reinforcement learning methods → Deep RL algorithms and representations
Abstract (arXiv)
In-context reinforcement learning (ICRL) studies agents that, after pretraining, adapt to new tasks by conditioning on additional context without parameter updates. Existing theoretical analyses of ICRL largely rely on linear attention, which replaces the softmax function in the standard attention with an identity mapping. This paper provides the first theoretical understanding of ICRL without making the unrealistic linear attention simplification. In particular, we consider the standard softmax attention used in practice. We show that, with certain parameters, the layerwise forward pass of a Transformer with such softmax attention is equivalent to iterative updates of a weighted softmax temporal difference (TD) learning algorithm. Here, weighted softmax TD is a new RL algorithm that performs policy evaluation in kernel space and adopts both linear TD and tabular TD as special cases. We also prove that under a certain contraction condition, the policy evaluation error decays as the number of layers grows, with the identified parameters above. Finally, we prove that those parameters are a global minimizer of a pretraining loss, explaining their emergence in our numerical experiments.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Deep RL algorithms and representations, one of 15 directions in Deep reinforcement learning methods. Builds on 1 of its 61 references that are in the map. First posted on arXiv 8 May 2026.
Builds on
1 of 61 references.
References · 1
- 2016Learning to reinforcement learncited by 377
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Robust Data-Collection Policy Learning for Low-Variance Online Policy Evaluationcited by 2
- 2026OR-Transformer: Scaling Real-Time Decision-Making to 1,000 Itemscited by 1
- 2026PolicyAttention: Softmax Attention Implements Policy Mirror Descent for Closed-Loop Controlcited by 0
- 2026Pessimistic Minimax Learning for Public-Private Information Games under Unilateral Coveragecited by 0
- 2026Provable Transformer Context Compression for In-Context Reinforcement Learningcited by 0
- 2026Provable Transformer Context Compression for In-Context Reinforcement Learning14 Oct 2026
- 2026Pessimistic Minimax Learning for Public-Private Information Games under Unilateral Coverage4 Oct 2026
- 2026PolicyAttention: Softmax Attention Implements Policy Mirror Descent for Closed-Loop Control24 Sep 2026
- 2026OR-Transformer: Scaling Real-Time Decision-Making to 1,000 Items1 Sep 2026
- 2026Robust Data-Collection Policy Learning for Low-Variance Online Policy Evaluation25 Aug 2026
Similar, not cited
Close in wording, no citation either way
- 2026Transformers Provably Implement In-Context Reinforcement Learning with Policy Improvement
- 2024Transformers Can Learn Temporal Difference Methods for In-Context Reinforcement Learning
- 2025Learning to Focus: Prioritizing Informative Histories with Structured Attention Mechanisms in Partially Observable Reinforcement Learning
- 2026Learning in Context, Guided by Choice: A Reward-Free Paradigm for Reinforcement Learning with Transformers
- 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretraining
- 2023The In-Sample Softmax for Offline Reinforcement Learning
- 2025Towards Provable Emergence of In-Context Reinforcement Learning
- 2025Filtering Learning Histories Enhances In-Context Reinforcement Learning