Good Reasoning Makes Good Demonstrations: Implicit Reasoning Quality Supervision via In-Context Reinforcement Learning

Tiehua Mei, Minxuan Lv, Leiyu Pan, Zhenpeng Su, Hongru Hou, Hengrui Chen, Ao Xu, Deqing YangarXiv 2026

TL;DR

This paper introduces "Evidence Gain," a novel metric that leverages a language model's own in-context learning ability to assess the quality of its reasoning. By integrating this metric into training via "In-Context RLVR," the authors show significant improvements in mathematical reasoning accuracy and quality without requiring costly external evaluators or step-level supervision.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly used for complex reasoning tasks, especially in mathematics. Reinforcement Learning with Verifiable Rewards (RLVR) has been a successful approach to improve LLM reasoning by providing outcome-level supervision. However, standard RLVR treats all correct answers equally, even if the underlying reasoning is flawed. This can lead to models reinforcing "lucky guesses" or superficial reasoning, ultimately degrading their performance. While Process Reward Models (PRMs) can address this by evaluating intermediate steps, they typically require extensive human annotation or auxiliary trained models, which are computationally expensive and difficult to scale. The authors aim to find a way to encourage high-quality reasoning within RLVR without these drawbacks.

Methods

The core innovation is Evidence Gain, a metric that quantifies the "teaching ability" of a generated reasoning trace. It's calculated by measuring how much prepending a candidate reasoning trace to a question improves the LLM's ability to generate high-quality reference solutions on a held-out validation set. This leverages the LLM's intrinsic in-context learning (ICL) capability.

To integrate Evidence Gain into training without computational overhead, the authors propose In-Context RLVR. Instead of explicitly computing Evidence Gain to reweight rewards, they prepend sampled demonstrations (question-reasoning pairs) to the training questions before generation. Theoretically, they prove that this simple input modification implicitly reweights the rewards, assigning higher weights to traces with higher Evidence Gain. This is achieved through a log-linear relationship between the implicit weight and Evidence Gain, effectively making the LLM its own quality evaluator.

Datasets

  • KlearReasoner-MathSub-30K: Used for training the policy optimization.
  • Demonstration Set (E): A subset of 1,082 question-reasoning pairs used for demonstration during In-Context RLVR training.
  • Held-out Set (E₀): A set of 100 question-reasoning pairs used for correlation analysis and evaluating Evidence Gain.
  • Evaluation Benchmarks: AIME24, AIME25, HMMT25, MATH500, AMC23, OlympiadBench, HumanEval, LCB, IFBench, IFEval, MMLU.

Key Insights and Ideas

  • High-quality reasoning is a better teacher: The core idea is that well-reasoned demonstrations provide more transferable problem-solving patterns than flawed ones, even if both lead to correct answers.
  • LLMs can self-evaluate reasoning quality: The LLM's own in-context learning ability can be harnessed to measure the quality of its reasoning traces, eliminating the need for external evaluators.
  • Implicit reweighting is sufficient: Explicitly computing Evidence Gain for reward reweighting is computationally prohibitive. In-Context RLVR achieves the same effect implicitly by prepending demonstrations, making the approach practical.
  • Input modification is a powerful axis: The success of In-Context RLVR suggests that modifying the input (prepending demonstrations) can be as effective as modifying the RL objective itself.

Key Results

  • Significant Accuracy Gains: IC-DAPO (their method combined with the DAPO baseline) outperforms standard DAPO by +2.5 average points across mathematical benchmarks at both 1.5B and 7B model scales. Gains are particularly pronounced on challenging competition benchmarks (+5.6 on AIME24, +5.8 on AIME25 for the 1.5B model).
  • Generalizability: The implicit reweighting mechanism transfers across different RL optimizers (e.g., IC-GRPO improves over GRPO).
  • Efficiency: In-Context RLVR incurs only a slight training overhead (<5%).
  • Focus on Hard Problems: The improvements are concentrated on harder problems, where reasoning quality is more critical and flawed traces are more detrimental.
  • Robustness: Evidence Gain remains a valid quality signal throughout training, and the method is robust to the quality of the demonstrations used.

Limitations and Future Work

  • Generalization to Other Domains: While the theoretical mechanism is domain-agnostic, the current work focuses on mathematical reasoning. Generalizing to other reasoning-intensive domains (like STEM problem-solving) is an open question, potentially limited by computational constraints.
  • Demonstration Set Construction: Constructing high-quality demonstration sets currently requires a strong reasoning model. Developing alternative strategies to reduce this dependency is a future direction.

Summary updated

BibTeX
@misc{mei2026good,
  author = {Tiehua Mei and Minxuan Lv and Leiyu Pan and Zhenpeng Su and Hongru Hou and Hengrui Chen and Ao Xu and Deqing Yang},
  title = {{Good Reasoning Makes Good Demonstrations: Implicit Reasoning Quality Supervision via In-Context Reinforcement Learning}},
  year = {2026},
  eprint = {2603.09803},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.09803},
}
Figure