TL;DR
Training large language models to reason via reinforcement learning requires generating millions of trial-and-error answers—a massive computational bottleneck. DUDS (Dual-stage Data Selection) solves this by acting like a smart tutor: first curating a lean, diverse textbook of appropriately challenging problems before training begins, and then dynamically adapting which problems the model practices in real time. The result? Models reach the same (or better) math reasoning capabilities using just 20% of the data and 40% of the compute rollouts.
What Problem Does This Paper Address?
Recently, Reinforcement Learning with Verifiable Rewards (RLVR)—popularized by models like DeepSeek-R1—has become the go-to recipe for unlocking reasoning in LLMs. Instead of relying on a complex AI judge, RLVR checks answers against a simple ground-truth rule (like verifying a math solution) and gives a binary pass/fail reward. Under algorithms like Group Relative Policy Optimization (GRPO), the model generates a group of candidate solutions (called rollouts) for every prompt to figure out which reasoning paths work best.
Here is the catch: generating all those rollouts is brutally expensive, and most training prompts are wasted effort. If a problem is way too easy, the model gets every rollout right; if it's way too hard, it fails every time. In both "zero-variance" cases, there is no contrast between good and bad answers, meaning the gradient signal is zero and the compute was burned for nothing.
Existing fixes try to prune the dataset in one of two ways, each with a catch:
- Offline selection prunes the dataset once before training. It's cheap, but static—what challenges a model on step 1 becomes trivial by step 500.
- Online selection filters prompts on the fly during training. It adapts well, but requires generating extra rollouts at every step just to gauge difficulty, eating up the very compute it tries to save.
Methods
DUDS bridges these two worlds, pairing a one-time offline filter with a lightweight online curriculum.
1. Offline Stage: Quality-Diversity Warm Start
Before RL training begins, the initial model attempts the full dataset to find each prompt's baseline pass rate. Using a Gaussian curve centered at 0.5, DUDS scores prompts highest when the model gets them right ~50% of the time—right at the edge of its capability. Simultaneously, a lightweight encoder (all-MiniLM-L6-v2) embeds the prompts to measure semantic similarity. Both signals are fed into a Determinantal Point Process (DPP)—a mathematical tool that naturally selects a subset (e.g., 20% of the data) maximizing both individual quality and overall diversity without needing manual balancing hyperparameters.
2. Online Stage: Zero-Overhead Adaptive Curriculum During GRPO training, DUDS tracks the evolving difficulty of prompts in the candidate pool without generating any extra evaluation rollouts:
- Bayesian Pass-Rate Tracking: Each prompt's pass rate is modeled as a Beta distribution, anchored by its offline pass rate and updated via simple addition after each training rollout.
- Freshness-Guided Sampling: Prompts are sampled using a narrower Gaussian centered at a 0.5 pass rate, plus a logarithmic "freshness bonus" based on how long a prompt has sat on the bench—ensuring neglected problems get revisited as the model improves.
- Asymmetric Zero-Variance Filtering: If a prompt repeatedly yields all-correct or all-incorrect rollouts, DUDS probabilistically drops it. Crucially, it is asymmetric: it aggressively phases out mastered problems while showing more patience to currently unsolvable ones, which still hold rich learning potential.
Datasets
No new benchmarks were introduced; the authors evaluated DUDS across standard, rigorous mathematical reasoning suites:
- Training Corpora: Primary experiments used DAPO-Math. Robustness checks also trained on HARP (5k samples), Open-R1 (30k samples), and DeepScaleR (40k samples).
- Evaluation Benchmarks: Math500, AIME25, AMC, and Olympiad Bench.
Key Insights and Ideas
- Diversity belongs offline; difficulty belongs online: Computing pairwise prompt similarities inside every training batch is prohibitively slow. Recognizing that semantic diversity is static while problem difficulty shifts as the policy learns lets DUDS offload diversity to preprocessing.
- Math twins aren't equally hard: Two math problems can look semantically identical to an embedding model while requiring vastly different reasoning leaps. Combining pass-rate quality with embedding similarity in the DPP prevents throwing out uniquely tricky variations of familiar-looking problems.
- Patience pays off asymmetrically: Treating "too easy" and "too hard" identically is a mistake. Quickly retiring mastered prompts saves compute, whereas keeping hard prompts around slightly longer gives the improving policy a chance to crack them.
Key Results
Across Qwen2.5-Math (1.5B, 7B), DeepSeek-R1-Distill-Llama-8B, and scaled-up Qwen2.5 14B and 32B models, DUDS consistently outperformed both offline (LIMR, Learnalign) and online (Efficient-RL, GRESO) baselines.
- Massive Compute Savings: DUDS uses just a 20% candidate pool and 40% of the online rollouts (compared to 60% for online baselines like GRESO), while matching or beating them in accuracy.
- Strong Accuracy Retention: On Qwen2.5-Math-1.5B, DUDS achieved 47.5% average accuracy across the four benchmarks—nearly matching full-dataset, 100%-rollout training (48.2%) at a fraction of the cost, and beating GRESO (47.1%). On DeepSeek-R1-Distill-Llama-8B, DUDS hit 62.9% vs. GRESO's 62.8%.
- Wall-Clock Speedups: Online training time dropped substantially across the board—for instance, shrinking total training hours on DeepSeek-R1-Distill-Llama-8B from 102.8 hours (GRESO) down to 83.4 hours (~19% faster).
Limitations and Future Work
- Upfront Preprocessing Cost: Estimating initial pass rates across the entire raw dataset requires a one-time offline rollout pass before training can start (though DUDS still wins in total end-to-end compute).
- Binary Rewards Only: DUDS relies on crisp, binary pass/fail outcomes (like math verification) to update its Beta distributions and zero-variance counters. Extending this dual-stage framework to domains with softer, continuous, or subjective reward signals remains an open avenue for future work.
Summary updated