# Context Value Informed In-Context Reinforcement Learning

*Wenhao Zhang, Shao Zhang, Xihuai Wang, Yang Li, Ying Wen*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149025) · [OpenReview](https://openreview.net/forum?id=tPPn7WBWDR) · [alphaXiv](https://www.alphaxiv.org/abs/2509.23209) · [Open on the map](../papers.html#p149025)

Category: [Reinforcement Learning & Games](../pcat/10.md) › [Spectral and Structural Reinforcement Learning](../pgroup/14.md) · Type: new method · Keywords: in-context reinforcement learning, policy gradient, value prediction, test-time adaptation, stable RL

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

## Summary
CV-ICRL introduces a context value token that provides lower-variance TD-style targets for in-context policy updates, improving stability and performance in test-time adaptation.

## Explained to a 5-year-old
Some computer programs can learn new tricks at test time without forgetting old ones. The current way to learn these tricks can be shaky and sometimes fails. The authors added a way to keep a score of how good each step might be. This score helps the program make smaller, safer updates while learning. As a result, the program learns new tasks more reliably and performs better.

## Explained to a 5-year-old, longer
In-context reinforcement learning lets a model adapt to new tasks without changing its core parameters. It works by trying actions in the environment and seeing how well they do. However, when the model only gets a few tries, the feedback can be noisy and cause unstable learning. The paper looks at why this happens and proposes a way to make the learning smoother. They introduce a “context value” that predicts how good a situation will be based on past experience. This value is stored in the model’s context so it can be used during learning. By using this predicted value as a target, the model can update its policy with less noise. The new method works like a teacher giving a better guide for how to improve. Experiments on simple maze tasks, grid worlds, and video-game-like environments show the improvement. The model becomes more stable, meaning it learns new tasks without breaking old knowledge. It also reaches higher scores, solving the tasks better than before. Overall, the approach makes in-context learning more reliable and useful for real applications.

## For a technical reader
The paper observes that in-context reinforcement learning, which adapts policies at test time without updating model weights, often suffers from high-variance updates due to noisy trajectory returns. By drawing an analogy to actor-critic methods, the authors add a value head that predicts the expected discounted return given the current state and the accumulated interaction context. This predicted value is written back into the context as a token, providing TD-style targets that reduce variance and stabilize policy gradients. Experiments on Dark Room, Minigrid, and Procgen benchmarks confirm that the approach yields more stable adaptation and higher final returns compared to prior ICRL methods. The contribution is a simple, plug-and-play mechanism that can be integrated into existing in-context RL pipelines to improve reliability without additional training data.

## Problem
Existing in-context reinforcement learning methods rely on trajectory-level return feedback, which can cause high-variance updates when test-time rollouts are short, leading to brittle and unstable adaptation.

## Method
The approach adds a value head to predict expected discounted returns conditioned on the current state and interaction context, writes this prediction back into the context as a value token, and uses TD-style targets to guide policy updates with lower variance.

## Results
The approach shows substantially improved stability and higher returns across the Dark Room, Minigrid, and Procgen tasks.

## Contributions
It provides a policy-gradient view linking ICRL to actor-critic principles, introduces a context value mechanism for low-variance updates, and demonstrates consistent gains on multiple RL 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/149025)
