TL;DR
When training reasoning models with Group Relative Policy Optimization (GRPO), roughly half of the compute is wasted on prompts the model either always gets right or always gets wrong—producing zero learning signal. This paper introduces the Thompson-Sampled Curriculum (TSC), a lightweight pre-generation filter that dynamically steers the model toward "Goldilocks" problems of intermediate difficulty as it learns. By predicting where the learning signal lives before generating text, TSC boosts training accuracy gains by ~32% on math and ~28% on coding tasks without wasting a single generated token.
What Problem Does This Paper Address?
Reinforcement Learning with Verifiable Rewards—most famously powered by the GRPO algorithm behind DeepSeek-R1—teaches language models to reason without needing a separate, memory-heavy critic network. Instead, for a given prompt, the model generates a group of $G$ candidate answers (rollouts). It scores them, computes the group's average, and reinforces answers that beat the average while discouraging those that fall short.
Here is the catch: what happens when a math problem is way too hard, and all eight generated answers score zero? Or way too easy, and all eight score a perfect one? Every answer equals the group mean. The variance is zero, the advantage is zero, and the gradient is zero. You just burned precious GPU cycles generating thousands of tokens to change precisely nothing in the network.
On standard math pools, over half of uniformly sampled prompts produce these zero-variance groups. Existing fixes force an awkward tradeoff:
- Static offline filtering drops too-easy or too-hard prompts beforehand, which is cheap, but frozen—it cannot adapt as the model gets smarter.
- Post-generation filtering (like DAPO) generates answers first, throws away zero-variance groups, and keeps sampling until the batch is full. It adapts to the model, sure, but you still pay the generation bill for everything you throw in the trash.
The author asks: can we predict which prompts will yield varied rewards before generating answers, and update that prediction on the fly?
Methods
The author proposes the Thompson-Sampled Curriculum (TSC), wrapping a classic multi-armed bandit algorithm around standard GRPO without discarding any rollouts.
- Upfront Sorting: Before training, the base model takes an 8-rollout quiz on every prompt in the dataset. Prompts are sorted into nine difficulty bins based on their solve count ($0, 1, \dots, 8$ correct).
- Tracking Reward Spread: Rather than tracking individual prompts (which are visited too rarely in short runs), TSC maintains a Gaussian belief over the reward spread (standard deviation of rewards) for each of the nine bins. The author proves mathematically that under binary rewards, a group's reward spread is directly proportional to the total magnitude of its GRPO advantages.
- Select, Train, Update: Before each step, TSC draws a sample from each bin's belief distribution (Thompson sampling) and pulls prompts from the winning bins. After standard GRPO training on all generated rollouts, a scalar Kalman filter nudges the served bins' beliefs toward the observed reward spread. Meanwhile, unserved bins slowly accumulate uncertainty ($\tau$), ensuring the curriculum periodically checks back on harder bins to see if the model is finally ready for them.
Crucially, what is new here isn't just the sampler—it's the evaluation rigor. Changing the prompt mix changes gradient magnitudes, so the author sweeps 10 batch configurations (trading off prompts-per-step $P$ vs. rollouts-per-prompt $G$) and tunes learning rates independently for every single setting.
Datasets
No new benchmarks are introduced; instead, the paper tests generalization across three distinct domains using existing datasets:
- Mathematics: Trained and evaluated on DeepScaleR (~38k competition math problems), with out-of-distribution transfer tested on MATH500 and AIME 2024 & 2025.
- Code Generation: Trained and evaluated on KodCode-Light-RL-10K (unit-test binary rewards), with transfer tested on HumanEval+ and MBPP+.
- Financial Research Agent: Trained on 352 financial research questions and evaluated on FrontierFinance, where a 30B-parameter MoE agent uses search tools and writes reports graded against expert rubrics (continuous, partial-credit rewards).
Key Insights and Ideas
- Uniform sampling and curricula want opposite batch shapes: Uniform sampling performs best with few prompts and many rollouts (e.g., $4\times16$), because rolling the dice 16 times is its only hope of getting a mixed-reward group. TSC already picks mixed-reward prompts, so it thrives with many prompts and few rollouts ($32\times4$). Comparing methods at a single arbitrary batch shape—as prior literature does—can accidentally rig the game for either side.
- Removing zero-variance groups isn't what predicts success—variety is: Surprisingly, the percentage of zero-variance groups eliminated has zero correlation ($r \approx 0.00$) with accuracy gains across configurations. Instead, the true predictor ($r = 0.88$) is the within-step bin entropy: TSC shines only when a training step has enough prompt slots to sample across a diverse mix of medium-difficulty bins simultaneously.
- RL sharpens reliability, not reach: TSC doesn't help the model solve brand-new problems (
pass@16stays flat). Instead, it boostspass^16(solving a problem 16 out of 16 times), turning shaky, hit-or-miss capabilities on medium problems into rock-solid reliability.
Key Results
TSC breaks past uniform sampling's accuracy plateau and dominates the high-accuracy efficiency frontier.
- Math (Qwen3-1.7B): Uniform sampling hits a hard ceiling at 41.6% accuracy (
avg@16), whereas TSC keeps climbing to 42.9% (expanding the training gain over the 37.5% base model by 31.7%) while eliminating 55–96% of zero-variance groups. Gains hold on Qwen3-0.6B (+2.9 points at $32\times4$) and transfer to MATH500 (~+1.0 point). - Half the cost of DAPO: At equal training steps, post-generation filtering (DAPO) matches TSC's accuracy (~42.5% vs. 42.3%), but burns 2.1x to 2.3x as many generated rollouts due to discarded groups.
- Code & Agents: On KodCode, TSC increases training gains by ~28% and hits uniform sampling's peak accuracy using 63% of the rollouts. On the rubric-graded research agent—where zero-variance groups are rare (1.1%)—TSC doesn't raise the final ceiling, but reaches uniform sampling's final score using 45% of the rollouts.
Limitations and Future Work
- Upfront sorting cost: Building the initial bins requires 8 rollouts per prompt across the entire pool (~304k rollouts for DeepScaleR). While amortized across experiments, future work could cut this cost using fewer rollouts or lightweight text-based difficulty predictors.
- Static bin memberships: On math and code, prompts stay in their initial bins even after the model masters them, causing zero-variance rates in TSC to slowly creep up over 1,000 steps. Periodically re-binning active bins is a natural next step.
- Adapter sensitivity & noise: All experiments use LoRA (not full fine-tuning); doubling the LoRA rank shrunk TSC's advantage, and most settings used only two random seeds.
- Better signals for graded rewards: Partial-credit rubrics flatten variance differences across prompts; tracking per-criterion spread or recent learning progress could yield stronger curriculum signals for agents.
Summary updated