# From Weak Data to Strong Policy: Q-Targets Enable Provable In-Context Reinforcement Learning

*yichen lin, Xuyuan Xiong, xue wang, Xiangfu Meng, Mike Wei, Tao Yao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152260) · [Open on the map](../papers.html#p152260)

Category: [Reinforcement Learning & Games](../pcat/10.md) › [Offline Reinforcement Learning and Adaptation](../pgroup/625.md) · Type: new method · Keywords: in-context reinforcement learning, offline RL, Q-target objective, Transformer pretraining, theoretical bounds, weak offline data

Areas: [RL for LLMs & Agents](../areas/llm-rl.md) › Language Model Reinforcement Learning › Policy Optimization and Offline Learning

## Summary
Q-Target Pretrained Transformers (QTPT) replace behavior cloning with a Bellman-style Q-target objective to learn robust in-context RL policies from weak offline data.

## Explained to a 5-year-old
We have a robot that learns to make decisions by watching other robots solve problems. Sometimes the robots it watches make mistakes, so the examples are not perfect. Instead of just copying the bad examples, we teach the robot to guess how good each action might be. This guessing uses a rule that looks at what happens after each action and how much reward is given. This helps the robot make better choices even when the examples are weak.

## Explained to a 5-year-old, longer
Imagine a robot that can learn to solve puzzles by watching other robots solve them. Sometimes the robots it watches make mistakes, so the examples are not perfect. The robot could just copy everything the watched robots do, but that might lead to the same mistakes. Instead, we teach the robot to think about how good each action might be, like guessing the reward. This guessing uses a rule that looks at what happens after each action and how much reward is given. The robot learns this rule while also remembering the context of the puzzle. This way, the robot can make better decisions even when the examples are weak. We also study the robot on simple puzzles that have known answers, like bandits. We also test it on more complex puzzles with many steps, like finite-horizon MDPs. The theory shows that the robot's error comes from two parts: the bad examples and the robot's own learning limit. Experiments show the robot works best when the examples are weak and the guessing rule is used. Overall, this method helps robots learn more reliably from imperfect data.

## For a technical reader
The paper introduces Q-Target Pretrained Transformers, which pretrain Transformers with a Bellman-style Q-target instead of simple behavior cloning. This allows the model to estimate action values from contextual rewards and transitions while still conditioning on task context. Theoretical analysis provides bounds that separate offline data quality from model approximation error. Empirically, the method excels on weak offline data across controlled RL benchmarks and D4RL, with ablations confirming the value of context conditioning and TD targets.

## Problem
Existing in-context reinforcement learning methods rely on supervised behavior-prediction objectives that tie the policy to the quality of offline actions, causing failure when the offline trajectories are weak or suboptimal.

## Method
The approach pretrains Transformers using a Bellman-style Q-target objective that estimates action values from contextual rewards and transitions, while preserving context-conditioned inference. It is analyzed theoretically on stochastic linear bandits and finite-horizon MDPs, providing bounds that separate offline-data effects from Transformer approximation error.

## Results
The approach shows the greatest improvement under weak offline data on controlled RL benchmarks, and ablations confirm the importance of context conditioning and Bellman/TD targets.

## Contributions
It introduces a Bellman-style Q-target pretraining objective for Transformers that decouples offline data quality from policy learning, provides theoretical bounds separating data and model errors, and demonstrates superior performance on weak offline data across benchmarks.

## Research questions this paper is counted under

- [How can reinforcement learning achieve stable and reliable policy updates when model predictions or offline data are imperfect?](../q/279.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152260)
