Online Difficulty Filtering for Reasoning Oriented Reinforcement Learning

Sanghwan Bae, Jiwoo Hong, Min Young Lee, Hanbyul Kim, Jeongyeon Nam, Donghyun Kwak · DOI

Abstract

Reinforcement Learning with Verifiable Rewards (RLVR) is a cornerstone for developing reasoning capabilities in Large Language Models (LLMs), yet it suffers from significant sample inefficiency. Problems that are either trivial or insurmountable for the current model provide little to no learning signal. We present Balanced Online Difficulty Filtering (BODF), a method that dynamically identifies tasks of intermediate difficulty—the "Goldilocks Zone"—during training. By filtering prompts based on a real-time pass rate proxy and utilizing an asynchronous fixed-batch sampling strategy, BODF achieves up to a 12% performance improvement on competitive math benchmarks while requiring significantly fewer gradient updates.

Introduction

The success of models like DeepSeek-R1 highlights the power of Reinforcement Learning (RL) in enhancing logical and mathematical reasoning. However, standard RL pipelines often waste compute on "uninformative" samples. Problems that the model solves with 100% accuracy offer no room for policy improvement, while those with 0% accuracy provide no successful trajectories to reinforce. This paper addresses the need for a dynamic curriculum that evolves alongside the model, ensuring it consistently encounters problems of intermediate difficulty.

Methodology: Balanced Online Difficulty Filtering

The proposed method integrates directly into the Group Relative Policy Optimization (GRPO) framework. The core innovation lies in the use of a "Pass Rate" proxy, $p(\mathbf{x})$, defined as the fraction of correct responses generated for a given prompt $\mathbf{x}$ across $G$ rollouts.

Overview of the Balanced Online Difficulty Filtering process within the GRPO framework.

To maintain training stability, the authors implement Asynchronous Fixed-Batch Sampling. Unlike naive filtering which can lead to fluctuating batch sizes and hardware underutilization, this system continuously generates responses in the background. It populates the training batch only when a sufficient number of samples meeting the difficulty criteria (e.g., $0.2 < p(\mathbf{x}) < 0.8$) are identified.

Theoretical Foundation: Variance as the Learning Signal

A key contribution of this work is the mathematical proof linking policy improvement to the variance of success probability. The authors demonstrate that the learning signal—formally the lower bound of the reverse KL divergence between the current and optimal policy—is proportional to the variance of the Bernoulli distribution of the pass rate. Since variance is maximized at $p(\mathbf{x}) = 0.5$, focusing on intermediate difficulty is mathematically optimal for maximizing the gradient signal.

Experimental Results

The effectiveness of BODF was evaluated using Qwen2.5-3B and 7B models trained on the NuminaMath dataset. Performance was measured across several rigorous benchmarks, including MATH500, AIME, and AMC.

Performance comparison of various filtering strategies across mathematical reasoning benchmarks.

As shown in the results, Balanced Filtering (removing both extremes) consistently outperforms "Skewed" filtering (removing only easy or only hard problems). For instance, on the AMC benchmark, the balanced approach achieved a score of 32.8, a significant improvement over the plain GRPO baseline. Furthermore, online filtering proved superior to offline methods that rely on static difficulty estimates from external models, confirming that difficulty is a relative metric that must be assessed dynamically. The method also demonstrated remarkable efficiency, reaching peak performance in less than 50% of the gradient updates required by standard GRPO.

Conclusion and Future Work

Balanced Online Difficulty Filtering offers a robust solution to the efficiency challenges of RL-based reasoning training. By focusing compute on the most informative samples, the method achieves higher accuracy in less than half the training time of standard approaches. Future research will explore the applicability of this method to other domains, such as code generation and scientific reasoning, and its scalability to frontier-class models exceeding 70 billion parameters.

Summary updated

BibTeX
@misc{bae2025online,
  author = {Sanghwan Bae and Jiwoo Hong and Min Young Lee and Hanbyul Kim and Jeongyeon Nam and Donghyun Kwak},
  title = {{Online Difficulty Filtering for Reasoning Oriented Reinforcement Learning}},
  year = {2025},
  eprint = {2504.03380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.03380},
}
Figure