Tool Verification for Test-Time Reinforcement Learning

Ruotong Liao, Nikolai Röhrich, Xiaohan Wang, Yuhui Zhang, Yasaman Samadzadeh, Volker Tresp, Serena Yeung-Levy

TL;DR

Test-Time Reinforcement Learning (TTRL) allows language models to self-improve on unlabeled test data by using majority voting as a reward signal, but it suffers when models confidently agree on the wrong answer. This paper introduces $T^3RL$ (Tool-Verification for Test-Time Reinforcement Learning), which uses external tools like code interpreters to verify reasoning steps and upweight verified rollouts during voting. This simple grounding mechanism eliminates "false-popular" errors, yielding substantial accuracy boosts on challenging math and logic tasks while remaining highly compute-efficient.

What Problem Does This Paper Address?

Large Language Models (LLMs) often possess latent reasoning capabilities that a single generation fails to surface. To extract these capabilities, recent techniques use Test-Time Reinforcement Learning (TTRL): given an unlabeled problem at test time, the model samples multiple reasoning paths (rollouts), takes a majority vote to determine the "correct" answer, and uses that consensus as a reward signal to update its own weights.

However, this self-consistency mechanism forms a closed loop that can mistake popularity for correctness. If a model has a systematic bias, it will frequently generate the same incorrect answer. Standard majority voting rewards this high-frequency error, causing the model to collapse into an incorrect mode—a failure the authors term false-popular mode collapse. As problems get harder, this issue worsens dramatically: the false-majority share jumps from ~25% on MATH-500 to over 73% on the difficult AIME 2024 benchmark.

The false-majority share increases sharply as benchmark difficulty escalates.

Methods

$T^3RL$ breaks the closed loop of self-consensus by introducing external, deterministic evidence into the voting process. The framework adds three core components to standard TTRL:

  1. The Verifier: An LLM that takes a sampled rollout, extracts the final answer, and translates the internal reasoning steps into executable code (e.g., Python).
  2. The Verification Tool: An external sandbox (like a Python code interpreter) that executes the verifier's code and returns the result. If the executed code's output matches the rollout's original answer, the rollout is flagged as verified ($v_i = 1$).
  3. The Verification Weight ($\omega$): Instead of standard majority voting where every rollout gets one vote, $T^3RL$ uses verification-weighted voting. Unverified rollouts get a default vote mass of 1, while verified rollouts are upweighted by a hyperparameter $\omega \ge 1$.

The resulting verification-aware consensus pseudo-label ($\tilde{y}^*$) is then used to calculate binary rewards, and the policy model is optimized using Group Relative Policy Optimization (GRPO).

Figure 2: T3RL: Tool Verification for Test-Time Reinforcement Learning. Verifier: an LLM verifier parses each sampled rollout yi into a candidate answer ai and, with tool feedback, produces a binary validity flag vi ∈{0, 1}. Tool verification: the verifier compiles the rollout’s claimed computations into lightweight Python and queries a code interpreter to obtain executable evidence. Verification-weighted majority voting: unverified rollouts receive unit vote mass, and verified rollouts receive ω vote mass. A verification-aware pseudo-label ˜y∗is formed by weighted voting.

Datasets

The authors evaluated $T^3RL$ across three demanding mathematical reasoning benchmarks:

  • MATH-500: A subset of the standard MATH dataset spanning 5 difficulty levels.
  • AMC (American Mathematics Competitions): High-school level math problems.
  • AIME 2024 (American Invitational Mathematics Examination): Highly challenging math olympiad-style problems.

To test domain generalization beyond mathematics and Python execution, they also evaluated the framework on a held-out dataset of Knights-and-Knaves logical puzzles, utilizing SMT-LIB2 code and the Z3 symbolic solver as the verification tool.

Key Insights and Ideas

  • Soft Weighting Beats Hard Filtering: One might assume we should simply discard all unverified rollouts ($\omega \to \infty$). However, because the LLM verifier can be noisy when translating reasoning to code, hard filtering hurts performance. Setting a moderate finite weight (like $\omega = 5$) acts as a robust "soft preference" signal that tolerates verifier mistakes.
  • Tools as Verifiers vs. Tools as Actors: Rather than giving the policy model direct access to tool-calling during generation (which often mixes up reasoning errors with syntax/coding errors), $T^3RL$ keeps the policy non-agentic and uses tools strictly for post-generation reward shaping. This separation significantly stabilizes reinforcement learning.
  • Amortizing Test-Time Compute: Traditional test-time scaling methods (like Best-of-N reranking) require running expensive verification pipelines for every single query at inference. $T^3RL$ amortizes this cost by baking the verifier's feedback directly into the policy's weights during a brief test-time training phase, achieving $O(1)$ inference efficiency.

Key Results

$T^3RL$ consistently outperformed standard TTRL across 15 different model-benchmark combinations, with the largest advantages appearing on the hardest tasks.

  • AIME 2024 Breakthrough: For the Qwen-2.5-Math-1.5B model, $T^3RL$ achieved a massive 31.6% relative accuracy gain over the baseline, successfully correcting false-popular consensus loops.
  • Difficulty Scaling: On MATH-500, the additional gain from $T^3RL$ scaled monotonically with problem difficulty, providing a +0.8% boost on Level 1 problems but a +9.0% boost on Level 5 problems.
  • Logic Generalization: On the non-math Knights-and-Knaves puzzles, $T^3RL$ improved accuracy by 26.38 percentage points over the base model, whereas standard TTRL actually degraded performance due to mode collapse.
Figure 3: Unverified consensus versus tool-verified consensus. (a) Spurious reward in the reinforced cycle of TTRL: the false-popular answer is rewarded and its vote share grows over rounds. (b) Tool verification can adjust the false-popular answer.

Limitations and Future Work

  • Verifier Capacity Threshold: $T^3RL$ relies on the verifier's ability to generate accurate code. When testing an undersized 0.5B parameter verifier, the system injected too much stochastic noise (due to syntax and formatting errors), which degraded final performance.
  • Diminishing Returns on Easy Tasks: On simple problems where the model's unverified majority consensus is already highly accurate, the overhead of tool verification provides minimal performance gains.

Future Directions: The authors propose extending $T^3RL$ to other verifiable environments, such as utilizing formal theorem checkers (e.g., Lean), web simulators, or interactive retrieval systems to ground test-time learning across broader non-mathematical domains.

Summary updated

BibTeX
@inproceedings{liao2026tool,
  author = {Ruotong Liao and Nikolai Röhrich and Xiaohan Wang and Yuhui Zhang and Yasaman Samadzadeh and Volker Tresp and Serena Yeung-Levy},
  title = {{Tool Verification for Test-Time Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Jd7P3rhNnN},
}
Figure