TL;DR
Training reasoning language models requires generating hundreds of thousands of tokens per step, burning massive amounts of compute on problems the model already knows—or on rambling, dead-end chains of thought. DUET solves this by coordinating how many attempts each prompt gets and when to cut each attempt short under a single shared token budget. Using just half the compute budget, DUET trains models $2.51\times$ faster than standard recipes while actually achieving higher reasoning accuracy.
What Problem Does This Paper Address?
Behind frontier reasoning models (like DeepSeek-R1 and Qwen3) is an engine called Reinforcement Learning with Verifiable Rewards (RLVR), typically powered by an algorithm named GRPO. The standard recipe is brute-force: take a prompt, generate several candidate solutions ("rollouts"), check if the final math or code answer is right, and update the model based on which attempts beat the group average.
Because checking a math answer is cheap, the bottleneck in RLVR is almost entirely token generation. Treating every prompt and every rollout equally wastes tremendous compute: easy prompts don't need eight tries, and confused, rambling rollouts shouldn't be allowed to run for thousands of tokens. Prior work tried to fix this along one axis at a time—either skipping uninformative prompts or pruning long rollouts—while slapping fixed length limits on generation (which accidentally kills the deep, long chains of thought needed for hard problems). The authors ask: what happens if we optimize both decisions simultaneously under one shared budget?
Methods
Drawing on classical stratified Monte-Carlo statistics, the authors introduce DUET (DUal-controlled tokEn allocaTion), a lightweight control layer over standard GRPO that adds less than 1% overhead and requires no auxiliary neural networks.
DUET turns a standard training step into three coordinated phases coupled by a single "budget-pressure" signal ($\lambda^\star$):
- Allocate (How many tries?): Using a cost-weighted Neyman allocation rule, DUET tracks how much a prompt's rollouts disagreed in previous epochs (gradient variance) divided by the square root of its average token length. Prompts with high disagreement and concise answers get up to 32 rollouts; solved or uninformative ones get as few as 1.
- Generate (When to stop?): Instead of a hard length cap, DUET watches for a machine-verifiable answer marker (like a
\boxed{}in math or a closing code fence). Once an answer appears, generation trims cleanly after a tiny grace window. If a rollout drags past an adaptive length threshold (e.g., the 80th percentile of recent lengths) without producing an answer, it is aborted as a dead end. - Update (Keep the math honest): Simply deleting aborted rollouts would silently blind the model to its hardest, slowest problems. To prevent bias, DUET randomly lets a tiny fraction ($\varepsilon_{\text{abort}}$, default 5%) of answer-less rollouts run to completion and scales up their weight during the gradient update (importance sampling).
Datasets
- Training: All models are fine-tuned on the Hendrycks MATH corpus (7,500 problems).
- Evaluation: Models are tested on MATH-500, GSM8K, and AIME-2024 (math reasoning); HumanEval (code generation); and GPQA-Diamond (out-of-distribution scientific Q&A). Robustness checks also include Minerva-Math and Olympiad-Bench. No new benchmarks are introduced.
Key Insights and Ideas
- Efficiency usually trades off quality; DUET widens its lead when starved: Most budget-saving tricks degrade as you turn down the compute knob. DUET's accuracy gap over baselines is actually largest at a 25% token budget because tight budget pressure forces the controller to strip away noise and focus strictly on high-signal prompts.
- Emergent curriculum learning without a teacher: Nobody tells DUET which math problems are hard. Yet at tight budgets, DUET naturally discovers a curriculum—starting with uniform rollouts, fanning out aggressively to concentrate compute on harder problems mid-training when accuracy climbs steepest, and relaxing once those problems are mastered.
- Crisper reasoning: Standard GRPO barely changes a model's verbosity (median length shifts from 505 to 511 tokens on Qwen3-1.7B). DUET collapses the median length to ~330 tokens by rewarding concise, well-discriminated prompts and cutting off rambling tails.
Key Results
DUET accuracy and wall-clock speedup on Qwen3-1.7B trained on MATH.
Tested primarily on Qwen3 (1.7B and 4B, scaling up to 14B in ablations) and Llama-3.2-3B-Instruct against GRPO and three budget-aware baselines (DAPO, ARRoL, VIP):
- Half budget beats full budget: On Qwen3-1.7B, DUET at 50% token budget hits 62.1% on MATH-500 and 84.0% on GSM8K—beating full-budget GRPO (56.8% / 78.0%) and all full-budget efficient baselines while running $2.51\times$ faster.
- Full-budget dominance: At 100% budget on Qwen3-1.7B, DUET scores 61.6% on MATH-500, 12.5% on AIME-24 ( nearly doubling GRPO's 6.7%), and 52.7% on HumanEval (+5.1% over GRPO) at a $1.62\times$ speedup.
- Cross-scale & cross-family: On Qwen3-4B, 50%-budget DUET runs $2.38\times$ faster than full GRPO while beating it on MATH-500 (76.7% vs. 74.5%) and HumanEval (77.0% vs. 73.6%). Gains also hold on Llama-3.2-3B-Instruct ($2.04\times$ speedup at half budget with within-1% parity or better).
Limitations and Future Work
- Reliance on verifiable formats: The marker-gated abort assumes answers have a clean, machine-parsable trigger (like a math box or code block). Extending DUET to open-ended, subjective tasks will require pairing the variance allocator with learned evaluators or alternative stopping signals.
- Multi-pass training regime: Because DUET estimates prompt informativeness from past epochs, it assumes a multi-pass training setup ($E \ge 2$ epochs over a prompt pool) rather than pure single-pass streaming.
- Synchronous execution & bounds: DUET is currently a synchronous RL method with fixed upper/lower per-prompt rollout caps (e.g., $n_{\max}=32$). Combining DUET's token control with asynchronous rollout engines to eliminate GPU idle time is a natural next step.
Summary updated