TL;DR
Test-time scaling boosts large language model (LLM) reasoning performance by sampling multiple answers, but it comes with massive computational and latency costs. This paper introduces a lightweight, CPU-runnable reinforcement learning (RL) controller that dynamically decides when to stop sampling or how many samples to acquire next in parallel. This approach slashes inference costs and latency by up to 35% and 4x respectively, without requiring access to the LLM's internal states.
What Problem Does This Paper Address?
Techniques like self-consistency (sampling multiple reasoning paths and taking a majority vote) significantly improve LLM performance on complex tasks. However, generating dozens of responses for every single query is incredibly expensive and slow.
Existing "adaptive sampling" methods try to mitigate this by stopping early when a consensus is reached. However, they typically rely on rigid, human-designed heuristics or strict distributional assumptions. Furthermore, many of these methods are highly invasive—requiring internal model signals like token confidence or hidden states—making them incompatible with closed-source APIs or standard, non-invasive inference pipelines.
Methods
The authors frame adaptive sampling as a finite-horizon Markov Decision Process (MDP) and train a tiny, four-layer Multi-Layer Perceptron (MLP) controller using Proximal Policy Optimization (PPO).
Unlike previous invasive methods, this controller operates strictly on black-box final answer statistics:
- State ($s_t$): The sorted counts of the top-$K$ most frequent answers generated so far, the total number of samples collected, and the entropy of the answer distribution.
- Action ($a_t$): At each step, the controller can choose to stop sampling and return the current majority vote, or sample $k$ more responses in parallel (e.g., 1, 2, or 4 more).
- Reward ($r_t$): A step-wise penalty for latency and computation cost, combined with a terminal reward based on whether the final prediction matches a pseudo-label (the majority vote if sampling had continued to the maximum budget).
The authors also provide a theoretical justification, proving that this RL formulation is mathematically equivalent to the Lagrangian relaxation of a budget-constrained optimization problem.
Datasets
The framework was evaluated on three difficult mathematical reasoning benchmarks:
- AIME24
- AIME25 (MAA)
- HMMT 2025
To train the controller, the authors used a small, 200-question subset from the DAPO training set. Evaluation was conducted across diverse LLM samplers, including open-source models (Qwen-3-0.6B/1.7B/4B-Thinking) and a closed-source model (GPT-4.1-nano).
Key Insights and Ideas
- Cross-Model Generalizability: Because the controller relies purely on abstract answer statistics rather than text or internal model features, it learns universal signals of distribution convergence. A controller trained on cheap samples from a tiny 0.6B model can be directly applied to guide a massive closed-source model like GPT-4.1-nano with virtually no performance loss.
- The Paradox of True Labels: Counterintuitively, training the controller using the ground-truth answer as a reward signal performs significantly worse than using the maximum-budget majority vote ("Running Majority"). Because the state space lacks semantic context, true labels introduce optimization noise, whereas the running majority provides a clean signal of whether the sampling distribution has stabilized.
- Intuitive Resource Allocation: Without any hardcoded rules, the RL controller naturally learns to allocate more samples to difficult queries that exhibit high answer entropy (highly diverse answers) and fewer samples to easier queries where a consensus forms quickly.
Key Results
RL-Guided Sampling consistently outperforms strong adaptive sampling baselines like Adaptive Self-Consistency (ASC) and Early Stopping Consistency (ESC):
- Compared to ASC: It alleviates the sequential latency bottleneck, reducing average sampling rounds by 3x to 4x while simultaneously cutting total sample counts by roughly 30%.
- Compared to ESC: It avoids overly aggressive early stopping, reducing total sample requirements by 33% to 35% while delivering higher final accuracy.
- Operational Efficiency: Because the controller is a tiny MLP, it can be trained and deployed efficiently on standard CPUs, adding negligible overhead to the inference pipeline.
Limitations and Future Work
While highly effective, the authors note a few areas for improvement:
- Simplistic State Space: The current model only looks at answer counts and entropy. Incorporating richer, non-invasive signals—such as average answer length or token-level generation confidence—could improve decision-making.
- Abstract Cost Modeling: The reward function relies on hyperparameter weights ($\lambda_{lat}, \lambda_{comp}$) to penalize costs. Future work could directly integrate real-world metrics like wall-clock time or monetary API costs.
- Direct Budget Optimization: The authors suggest exploring constrained RL methods to optimize policies under strict, explicitly prescribed user budgets rather than relying on fixed penalty tuning.
Summary updated