Scaling Data Difficulty: Improving Coding Models via Reinforcement Learning on Fresh and Challenging Problems

Zongqian Li, Tengchao Lv, Shaohan Huang, Yixuan Su, Qinzheng Sun, Qiufeng Yin, Ying Xin, Scarlett Li, Lei Cui, Nigel Collier, Furu Wei · DOI

Abstract

Training next-generation code generation models requires high-quality datasets, yet existing datasets face difficulty imbalance, format inconsistency, and data quality problems. We address these challenges through systematic data processing and difficulty scaling. We introduce a four-stage Data Processing Framework encompassing collection, processing, filtering, and verification, incorporating Automatic Difficulty Filtering via an LLM-based predict-calibrate-select framework that leverages multi-dimensional difficulty metrics across five weighted dimensions to retain challenging problems while removing simplistic ones. The resulting MicroCoder dataset comprises tens of thousands of curated real competitive programming problems from diverse platforms, emphasizing recency and difficulty. Evaluations on strictly unseen LiveCodeBench demonstrate that MicroCoder achieves 3x larger performance gains within 300 training steps compared to widely-used baseline datasets of comparable size, with consistent advantages under both GRPO and its variant training algorithms. The MicroCoder dataset delivers obvious improvements on medium and hard problems across different model sizes, achieving up to 17.2% relative gains in overall performance where model capabilities are most stretched. These results validate that difficulty-aware data curation improves model performance on challenging tasks, providing multiple insights for dataset creation in code generation.

Introduction

Current Large Language Models (LLMs) for code generation are hitting a performance plateau. Despite the abundance of open-source data, three primary "data bottlenecks" impede progress:

  1. Difficulty Imbalance: Datasets are often saturated with "Easy" problems that provide minimal learning signal for advanced models.
  2. Data Leakage & Recency: Models frequently encounter training data that overlaps with evaluation benchmarks, leading to memorization rather than reasoning.
  3. Quality & Consistency: Scraped data often suffers from broken descriptions, missing test cases, and inconsistent task formats.

This research investigates whether systematically scaling training data difficulty can push models beyond these limits.

Methodology: The MicroCoder Framework

The authors propose a comprehensive four-stage Data Processing Framework designed to curate high-quality, challenging coding problems.

The four-stage Data Processing Framework: Collection, Processing, Filtering, and Verification.

1. Systematic Data Pipeline

  • Collection: Real-world problems are gathered from platforms like AIZU, AtCoder, and CodeChef, prioritizing recent releases to mitigate data contamination.
  • Processing: An LLM-driven pipeline translates non-English content, removes noise (e.g., advertisements), and generates robust test suites for solution verification.
  • Automatic Difficulty Filtering: Utilizing a Predict-Calibrate-Select framework, GPT-4o evaluates problems across five weighted dimensions to identify truly challenging tasks.
  • Verification: A human-in-the-loop stage ensures final data readability and accuracy.

2. Multi-Dimensional Difficulty Metrics

The core innovation lies in the granular assessment of problem difficulty. Rather than relying on simplistic platform tags, the framework evaluates five specific dimensions:

  • Problem Comprehension Difficulty (PCD): The complexity of understanding the task.
  • Knowledge Breadth Requirements (KBR): The range of syntax and data structures needed.
  • Algorithmic Thinking Complexity (ATC): The depth of logic required (high weight).
  • Implementation Difficulty (ID): The complexity of writing the code (high weight).
  • Optimization Depth (OD): The necessity for efficient, optimized solutions.
Multi-dimensional difficulty metrics and the weighted scoring system used for filtering.

Datasets and Training

The resulting MicroCoder dataset contains 13,300 curated competitive programming problems. Unlike many synthetic datasets, MicroCoder consists entirely of real-world challenges. For training, the researchers employed Reinforcement Learning (RL) algorithms, specifically GRPO and DAPO, to encourage diverse and creative problem-solving.

Key Results and Insights

The MicroCoder dataset demonstrates that the quality and difficulty of data are more critical than sheer volume.

  • Efficiency Gains: MicroCoder achieved 3x larger performance gains within the first 300 training steps compared to standard baseline datasets like APPS or CodeContests.
  • Benchmark Performance: On the AtCoder benchmark, MicroCoder provided a +3.6 point absolute improvement over the DeepCoder baseline.
  • The "Difficulty Sweet Spot": The most significant improvements occurred on "Medium" and "Hard" problems. For instance, LeetCode "Medium" problems saw a 40.4% relative improvement when trained with the DAPO algorithm.
  • Scaling with Model Size: The advantages of difficulty-aware curation became more pronounced as model parameters increased (from 1.7B to 8B), indicating that larger models benefit disproportionately from harder training signals.

Conclusion and Future Work

MicroCoder validates that difficulty-aware data curation is essential for advancing code generation models. While currently focused on competitive programming, future work aims to extend this framework to general software engineering tasks, such as system design and API integration. Additionally, the authors suggest exploring "dynamic difficulty assessment," where training data evolves in real-time to match a model's current learning frontier.

Summary updated

BibTeX
@misc{li2026scaling,
  author = {Zongqian Li and Tengchao Lv and Shaohan Huang and Yixuan Su and Qinzheng Sun and Qiufeng Yin and Ying Xin and Scarlett Li and Lei Cui and Nigel Collier and Furu Wei},
  title = {{Scaling Data Difficulty: Improving Coding Models via Reinforcement Learning on Fresh and Challenging Problems}},
  year = {2026},
  eprint = {2603.07779},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.07779},
}
Figure