Abstract
Reinforcement Learning (RL) has emerged as a critical component in enhancing the reasoning capabilities of Large Language Models (LLMs). However, the computational overhead of RL fine-tuning—driven by inefficient data sampling and the high cost of generating rollouts—remains a significant barrier. This paper presents a dual-strategy framework consisting of Difficulty-targeted Online Data Selection (DOTS) and Rollout Replay (RR). DOTS prioritizes training on "moderate difficulty" samples where the model's success rate is approximately 50%, maximizing the gradient signal. RR reduces generation costs by reusing previous rollouts through importance sampling. Experimental results across multiple mathematical and scientific benchmarks demonstrate that this approach reduces training time by up to 62% while maintaining performance parity with standard algorithms like GRPO.
Introduction
The success of models such as DeepSeek-R1 has highlighted the power of Reinforcement Learning in refining the logical reasoning of LLMs. Despite these gains, the RL fine-tuning process is notoriously resource-intensive. Training even a modest 1.5B parameter model can require thousands of GPU hours. This inefficiency stems from two primary sources: the uniform sampling of training data, which often includes "too easy" or "too hard" questions that offer little learning signal, and the repetitive cost of generating new model responses (rollouts) at every training iteration.
To address these challenges, we introduce a framework designed to optimize both data selection and compute utilization. By focusing on the most informative data points and recycling previous computations, we significantly accelerate the RL fine-tuning pipeline without sacrificing model quality.
Methodology
Difficulty-targeted Online Data Selection (DOTS)
Standard RL fine-tuning typically samples questions uniformly from a dataset. However, questions that the model already solves with 100% accuracy or fails 100% of the time provide negligible gradient updates. DOTS introduces an adaptive selection mechanism that targets the "Goldilocks" zone: questions where the model has a success rate near 0.5.
To identify these questions without performing expensive rollouts on the entire dataset, DOTS employs a lightweight, attention-based difficulty predictor. The process involves:
- Reference Sampling: Running rollouts for a small subset of questions to determine their current difficulty.
- Similarity Mapping: Using a frozen 1.5B backbone with a 3-layer MLP adapter to estimate the difficulty of unlabeled questions based on their similarity to the reference set.
- Dynamic Pruning: Prioritizing questions with predicted success rates near 0.5, ensuring the model always works on the "frontier" of its current capabilities.
Rollout Replay (RR)
Rollout generation often accounts for over 50% of total training time. Inspired by experience replay in traditional robotics, Rollout Replay (RR) allows the training process to reuse responses generated in previous steps.
The primary challenge with reusing data is that it is "off-policy" — the model that generated the old response is no longer identical to the model being trained. To maintain stability, the authors modified the Group Relative Policy Optimization (GRPO) loss function using importance sampling. This mathematical adjustment accounts for the distribution shift between the old and current policies, allowing up to 50% of a training batch to consist of "recycled" data safely.
Theoretical Foundation: The 0.5 Success Rate
The core intuition behind DOTS is supported by Theorem 1, which demonstrates that the gradient signal—the mathematical instruction used to update model weights—is maximized when the probability of a correct response is exactly 0.5. In scenarios where the success rate is 0 or 1, the gradient effectively vanishes, leading to wasted compute. By targeting the 0.5 threshold, DOTS ensures that every training step contributes maximally to the model's improvement.
Experimental Results
The framework was evaluated using Qwen2.5-Math models (1.5B, 3B, and 7B) across several demanding datasets, including MATH, DeepScaleR-40K, and Open-Reasoner-Zero.
Efficiency and Speed
The combination of DOTS and RR yielded substantial computational savings:
- Training Time: Total RL fine-tuning time was reduced by 23% to 62% depending on the dataset.
- Data Utilization: DOTS selected 25.4% more "effective" questions (those providing non-zero gradients) compared to uniform sampling.
- Performance Parity: Despite the reduced compute, models reached final accuracies on benchmarks like GSM8K and MATH500 that were equivalent to those trained with the full GRPO baseline.
Generalization Beyond Mathematics
To test the versatility of the approach, the researchers applied the framework to the SCP-25K dataset, which covers physics, chemistry, and biology. The method significantly outperformed the original GRPO on MMLU science subsets, proving that the principle of targeting moderate difficulty is a generalizable strategy for LLM alignment across domains.
Conclusion
By addressing the twin bottlenecks of data and rollout inefficiency, DOTS and RR provide a more sustainable path for RL fine-tuning. The ability to achieve state-of-the-art reasoning performance with a fraction of the compute time opens new possibilities for scaling RL to even more complex domains. Future work may explore more sophisticated reference set selection and prioritized replay strategies to further refine these efficiency gains.
Summary updated