acceptodds
Published as a conference paper at NeurIPS 2026

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

Abstract

Existing in-context reinforcement learning methods mainly pretrain Transformers with supervised behavior-prediction objectives. While such objectives support task inference from context, they tie the learned policy to the quality of offline actions and can fail when trajectories are weak or suboptimal. We propose Q-Target Pretrained Transformers (QTPT), which preserves context-conditioned inference but replaces behavior cloning with a Bellman-style Q-target objective. QTPT learns to estimate action values from contextual rewards and transitions, rather than simply imitating the behavior policy. We analyze QTPT in stochastic linear bandits and finite-horizon MDPs, deriving suboptimality bounds that separate offline-data effects from Transformer approximation error. Empirically, QTPT is most beneficial under weak offline data across controlled RL benchmarks, and controlled ablations show that context conditioning is essential while Bellman/TD targets provide additional gains. We further include D4RL experiments as higher-dimensional stress tests under matched Transformer baselines.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 4%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 3.67 over 3 reviews, above 4% of the others.
Reviewer_Y189OpenReview ↗
Rating
3
Clarity
2
Confidence
2
Originality
4
Quality
3
Significance
2
Read review
Summary

This paper tackles offline RL through in-context learning (ICL) using a transformer state-action value model (i.e., as a Q-function). In the pretrain phase, the transformer is trained on Q-learning type updates where the Q-function has a Bayes-adaptive structure where the past trajectory (history of the current episode) acts as a proxy for the belief state. The setup is relatively standard to an offline meta-reinforcement learning setup, which is good because the authors use this to derive sample complexity bounds on the pre-trained model and the optimal policy. The result yields insight on the utility of ICL methods compared to traditional Bandit or reinforcement learning algorithms, on top of improving these bounds. The authors finally validate their theory on a simplified and large scale task, showing that the method aligns with their theory and is also able to be scaled up.

Strengths and weaknesses

Overall:

This is a very strong theoretical paper that tackles the difficult problem of understanding in-context learning properties of modern transformers for reinforcement learning. The gap that the authors fill is impactful, and non-trivial.

So, overall, I think this paper will have a good audience at NeurIPS. However, the paper is being held back by quite a number of pain points that I document below. Especially the clarity/presentation is something that can be remediated relatively easily, which would make the paper’s impact much more apparent.

Most importantly, the paper misses one substantial piece of prior work which makes it difficult for me to fairly position the significance of the results. I’m talking about the belief and Bayes-adaptive literature, which is a classical subfield within reinforcement learning and utilizes the exact same construction as the proposed architecture. If this is not addressed, I cannot recommend acceptance.

If these points are addressed, I’m willing to raise my score from 3. borderline reject → 5. accept and the ‘clarity’ and ‘significance’ both from 2. → 3. or 4. depending on the execution.

Note: I have not checked the proofs in great detail other than glancing over them to understand what the individual terms mean in the main text.


Strengths:

This is a paper with a very strong theoretical basis on an impactful gap of the overall field. It is non-trivial to study what a black-box transformer model does internally through in-context learning. To attempt to derive sample-complexity bounds on that is significant since the impact is that we can better understand why and when ICL methods outperform through generalization compared to our classical reinforcement learning methods.

Although I have a limited theory background on sample-complexity results. Trusting the authors, the reported bounds are strong improvements over the expert-distilled strategy (behavior cloning), on the bandit reducing a worst-case bound of O(T) to O(sqrt(T log T/n)).

Experimental results are to the point, and show that the method works for this special subfield of offline RL algorithms.


Weaknesses:

The clarity of the technical sections can be significantly improved to readers with a slightly less theoretical background. At the moment, this is the main item that is holding the paper back. The current communication hinders interpreting what the results mean, how they are obtained, and whether the assumptions are realistic as a result. These are some pain points I had while reading:

  • L191 - Proposition 3.2, I was briefly lost on what LL meant, I assume that is the inverse of Assumption 3.1 (c)? But it drops out of nowhere and deserves a brief mention/crossref on what the value means again. Also how does this value influence the result/bound that you derive.
  • In section 3.4. The definition of the non-informative context set GG is sketched in terms of a complexity bound on a value error. But what does this mean? Because it is never discussed. From the wording alone, my intuition of a non-informative context would be that G=∅G = \emptyset.

So, in the theory sections, it would help to briefly (1-2 sentences) sketch what you are going to do, how you are going to do it, and why. Then when you make an assumption or discuss a new quantity/object, briefly explain what this object is or means. This will help the reading flow over technical sections. With this said, the discussion in section 3.3, L228-246 is quite nice, and I found it insightful.

Related work:

The paper omits two important branches of highly related work:

  • RL or supervised finetuning of already pre-trained models. Despite the paper discussing pre-training, it is not clear why we shouldn’t start with an already existing model (see also my comment in limitations).
  • Belief-MDPs and Bayes-adaptive MDPs are entirely omitted despite the vast body of knowledge that is captured in this classical field. The architecture that was used in Algorithm 1, and Eq.2,3, is essentially the belief-Q value through the history proxy. The paper should report on known sample-complexity bounds from this body of work and contrast the assumptions with their results.

Experiments:

Figure 2-right is missing error-bars.

Table 1-2 puts the “best” result in bold-face, however none of these results seem statistically significant for the tested 5 seeds. I think this is a gap in the presentation.

Ablations are missing on different model architectures. Only the GPT-2 architecture was used, but it is quite standard in the field to average results out over multiple architectures. E.g., the Llama or Qwen architectures. E.g., how do we know that the random → expert data pattern in figure 2-right holds in general? Maybe it is just a quirk of the GPT-2 architecture’s generalization capabilities not dealing well with more imbalanced expert data. Also, maybe not, but it costs very little to improve our confidence of this result by ablating additional models.

There is not a clear visualization of how the theoretical results (in terms of the sample-complexity bounds) directly translate to improved sample efficiency in the actual experiments. Of course there is the ablation over expert-to-random data, and the bandit of figure 2. However, for the reported O(sqrt(T log T/n)) bound, I was expecting the QTPT results to look less linear.

Discussion:

The discussion of the method is quite buried. For instance in L302-306 the authors sketch an intuitive picture on why their method performs better with random data over expert data, except for the sparse reward setting. I feel that this insight deserves a highlight, perhaps a “takeaway” box?


Neutral:

L99-100: “As a non-adaptation method, the In-Context Learning (ICL) approach …”, what do you mean here? Is it implied that ICL is non-adaptive? That would be strange as that claim seems to conflict with the paper’s narrative and known results, please try to rephrase this to be more accurate with your message.

Typo on L107: pertaining → pretraining

It would help to move the model architecture L179-183 up to section 2.2 for a self-contained discussion of the algorithm. It is now hidden in the theory section.

Sentence L206-207 “Proposition 3.3 highlights that …, ” does what? What does it highlight? I think the sentence is broken, can you reformulate what you mean.

L278-282, the main text could use a short mention that the curve of QTPT does not look square-root like or logarithmic due to the finite-horizon setting. This also merits a mention in the caption in figure 2, because without reading the main text and glossing over the figures, then figure 2-left as a standalone looks like SPT will be better than QTPT if T were extended, but that’s likely only an artifact.

Questions
  • For the pretraining loop in Algorithm 1, lines 4-9: Is there any reason why we shouldn’t just put the whole dataset (or at least the whole batch) in the Q-function on line 6 (aside from data in the future >t to preserve causality)? Won’t that give a better learning target for line 7 since yty_t is constructed with more examples for the ICL to kick in from separate episodes?

  • Do propositions 3.3 and 3.4 on the complexity of model bias assume that the ICL of the QTPT model is consistent? I.e., it recovers the true parameter given infinite data?

    • Explanation: The complexity result seems to imply consistency since the numerator 1/n1/\sqrt{n} will dominate in Prop.3 and drive model bias to zero, but I don’t see this property explicitly being touched upon in the text. From prior work, I know that transformers and ICL can learn statistically consistent routines (Xie et al., 2021), but I haven’t yet seen work that guarantees it actually does. So, I believe this deserves proper discussion. Because I’m not convinced that the paper shows that ICL is statistically consistent, unless I’ve missed something. Note that I might also have misunderstood the model bias term.
  • Why does the δ\delta term disappear in the complexity bound in Propositions 3.3, 3.4, and 3.5? Not to be confused with the TD/value error that you use in the proofs, which makes it slightly ambiguous.

  • How does your work fit in to prior Bayes-adaptive or belief MDP bounds, are there known sample-complexity bounds, and what are their assumptions?

    • Explanation: The Q-Transformer is essentially predicting the Q-value of the Bayes-adaptive MDP. The construction is exactly the same aside from the fact that we are using a history as a proxy for the belief rather than the belief itself. This is classical work in the field and must be acknowledged and properly discussed.

Xie, et al., 2021. An Explanation of In-Context Learning as Implicit Bayesian Inference. https://arxiv.org/abs/2111.02080

Limitations

There is no discussion or analysis of starting the offline pre-training with an already existing pre-trained transformer. I.e., so that the RL-part can be added as an extra pre-training phase. Although the paper is on pre-training itself, there is no discussion on why we shouldn’t start out (Line 3 Alg.1) with some model on huggingface since these models already internalize a lot of knowledge and can amortize part of the RL-training finetuning phase.

Given the current popularity of RFT I think this is worth a mention. At the very least, in the related work.

Paper formatting concerns

NA.

Final justification

I choose to keep my score as per the initial review. The authors give a strong and lengthy rebuttal, but also to an extent that I wonder whether the paper needs a bit more polish and consequently review to be published at this point in time. The clarity of the paper still hinders the contributions in my opinion. But like I said in my reply to the rebuttal, I am not an expert in this particular subfield and may simply have misunderstood.

It is ok if the paper gets accepted or rejected in my eye, it is borderline where I lean towards rejection. I am ok if the other reviewers disagree and wish to champion.

Reviewer_9YpkOpenReview ↗
Rating
4
Clarity
4
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper proposes an approach to solve meta-RL with in-context learning. A direct evaluation would come from comparing this paper with RL^2 (evolving RNN's hidden states approximate TD learning) or PEARL (off-policy learning for meta-RL). The paper try to solve meta-RL by "meta" learning a Q function that take input the full interaction history (instead of just the state) and output an action. Here, the Q function is basically double-duty as the task identifier for traditional meta-RL as well. One benefit of in-context meta-RL approaches, in general, is that we can avoid doing any gradient updates at test time, but there are many challenges to handle, which I will mentioned later.

Unlike many previous works that just use Transformer-based network for RL, the authors proposed the history conditioned Q-function as the pre-train objective, which aim to address the noisy training data problem as this approach is off-policy learning. The key contribution of the paper is the theoretical analysis, showing the sub-optimality guarantee and the required assumptions. The empirical experiments are quite nice as well, demonstrating the claims that the authors made (QTPT has robust performance under noisy training data in comparison with other baselines.)

Strengths and weaknesses
  • The novelty is in the unique context conditioned Q-function used to solve meta-RL and the following theoretical analysis
  • The experiments demonstrating the authors' claims
Questions

In what context would this approach preferable compared to classical meta-RL approaches?

Limitations
  • It would be nice to have a clear comparison with other traditional meta-RL approaches (such as RL^2, PEARL, etc.) on both the theory and experiments.
  • One of the key problem is that a Q function which is context dependent would have very large effective input space, so the theoretical guarantees rely on strong coverage, realizability, and low-complexity approximation assumptions. Without additional structural assumptions on the task family, learning Q^(xt,a)\hat Q(x_t,a) may have poor sample complexity, potentially much worse than classical fitted Q-learning on Markov states.
  • Assumption 3.1 (c) (Lower-Bounded Occupancy) is very strong by assuming that the occupancy density is non-zero everywhere, for all possible input sequence. Even then, L would be come very large, which weaken your guarantee.

From AI:

  • The n^{-1/4} in your guarantee is not the very good
  • The contextual Q-function proposed is of incremental novelty
Paper formatting concerns

N/A

Final justification

The authors comprehensively answered all of my questions.

Reviewer_Yqx2OpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
4
Significance
3
Read review
Summary

Investigates in-context RL behavior under weak/suboptimal pretraining data. Proposes Q-Target Pretraining (QTPT), aligning sequence model outputs to Bellman-style target values to enable behavior stitching.

QTPT replaces behavior cloning (action prediction) with a contextual Bellman/TD value prediction objective during pretraining. Specifically, it minimizes contextual temporal difference error over sequence states, and executes greedy rollouts with respect to the learned action-values at test time.

The paper provides:

  1. Finite-time suboptimality bounds separating sample bias (dependent on dataset size nn) and model bias (transformer approximation error ϵtf\epsilon_{tf}) for linear bandits and finite-horizon MDPs.
  2. A technical comparison showing that QTPT can recover optimal/stitched trajectories in situations where SPT fails.
  3. Empirical results showing QTPT outperforms SPT on synthetic RL benchmarks (bandits, Darkroom, Dark Key-to-door, Miniworld), D4RL tasks (Kitchen, AntMaze), and LLM math reasoning (GSM8K).
Strengths and weaknesses

Strengths:

  • Solid conceptual premise: TD-pretraining targets enable out-of-trajectory value stitching during model inference.
  • Rigorous suboptimality bounds.

Weaknesses:

  • Analysis assumes deterministic dynamics; extension to stochastic environments lacks constructive verification.
  • Does not address computational limits of storing and updating large-scale Q-target networks during pretraining.
Questions
  1. The suboptimality bound for general MDPs scaled with T2log⁡Tn1/4T^2 \frac{\log T}{n^{1/4}}. Can the authors clarify whether the T2T^2 dependence can be tightened, or is it a fundamental bottleneck of using sequence histories?
  2. How does QTPT handle OOD action values during greedy rollouts? Since there is no explicit pessimism (unlike CQL/IQL), does it suffer from value overestimation at test time when executing actions not present in the pretraining dataset?
  3. In Appendix F.1 (Table 3), the authors showcase alternative ablation results. Could they explain why ReLU-Attn + Softmax-Attn results in a massive degradation (reaching ~197-203 regret compared to default 30-39)? What is the primary cause of this sensitivity?
Limitations

Yes, the authors adequately discussed limitations in Appendix A, highlighting coverage assumptions and performance gaps relative to state-of-the-art D4RL baselines.

Paper formatting concerns

None

Final justification

Rating: 4

Final Justification: The authors answered my questions on stochastic dynamics, compute cost, the rates, OOD actions, and attention sensitivity. I keep rating 4 and support accept. If a champion is needed against the clarity concerns, I am willing.

Comments on the paper

1 comment
Meta-review

The paper studies the behavior of in context reinforcement learning when demonstration data is suboptimal. The idea is that rather than pretrain with behavior cloning, they pretrain with a bellman/td-style objective, which allows for stitching suboptimal trajectories together.

The reviewers have mostly raised minor issues that would be great to address/discuss during the rebuttal. These include:

  1. Clarity issues that would substantially improve the presentation/readability of the paper
  2. Some issues with the experimental presentation, like labeling axes, etc
  3. A discussion on the error guarantee and the n^{1/4} dependence and on the strength of the assumption.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.