mlsanityData to 14 Oct 2026

Beyond Linear Attention: Softmax Transformers Implement In-Context Reinforcement Learning

arXiv 2605.07333 ↗First posted 8 May 2026cs.LGcited by 5

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

  1. 2016Learning to reinforcement learncited by 377

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Transformers Provably Implement In-Context Reinforcement Learning with Policy Improvement
  2. 2024Transformers Can Learn Temporal Difference Methods for In-Context Reinforcement Learning
  3. 2025Learning to Focus: Prioritizing Informative Histories with Structured Attention Mechanisms in Partially Observable Reinforcement Learning
  4. 2026Learning in Context, Guided by Choice: A Reward-Free Paradigm for Reinforcement Learning with Transformers
  5. 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretraining
  6. 2023The In-Sample Softmax for Offline Reinforcement Learning
  7. 2025Towards Provable Emergence of In-Context Reinforcement Learning
  8. 2025Filtering Learning Histories Enhances In-Context Reinforcement Learning