Rethinking the Generation of High-Quality CoT Data from the Perspective of LLM-Adaptive Question Difficulty Grading

Qianjin Yu, Keyu Wu, Zihan Chen, Chushu Zhang, Manlin Mei, Lingjun Huang, Fang Tan, Yongsheng Du, Kunlin Liu, Yurui Zhu

TL;DR

This paper introduces LLM-Adaptive Question Difficulty Grading, a novel framework that customizes the difficulty distribution of Chain-of-Thought (CoT) training data to match the intrinsic capabilities of a specific "student" model. By distilling data from DeepSeek-R1 using this adaptive approach, the authors trained models (ZMath and ZCode) that outperform standard distilled baselines on complex math and coding benchmarks using as few as 2,000 finely tuned training samples.

What Problem Does This Paper Address?

While massive models like DeepSeek-R1 (671B) exhibit stunning reasoning capabilities, deploying them on edge devices or in real-time systems is computationally impossible. Researchers frequently attempt to distill these capabilities into smaller, more compact models (<70B parameters) using synthetic CoT data.

However, existing data distillation pipelines typically rely on static difficulty labels or massive, uncurated datasets. They ignore a crucial dynamic: the relationship between the student model's current competence and the difficulty of its training data. Training a small model on questions that are either too trivial or impossibly complex leads to data generation waste and inefficient supervised fine-tuning (SFT). This paper addresses how to efficiently curate a small, highly potent dataset tailored to a model's unique learning frontier.

Methods

The authors propose a three-stage framework to generate model-adaptive CoT data:

  1. Distribution Construction: The framework establishes a reference difficulty distribution. The authors explore two options: Option 1 (LLM-inferred), which uses the student model's actual performance on an evaluation set to map out a true difficulty distribution, and Option 2 (Curriculum Prior), a human-defined distribution where the number of samples decreases as difficulty increases.
  2. LLM-Adaptive Question Difficulty Grading & Distribution Sampling: Raw questions ($DB_{raw}$) are fed to the student model ($S_{LLM}$). Questions answered correctly are labeled "Easy." For incorrect answers, a Process Reward Model (PRM)-Grader analyzes the model's reasoning trajectory and assigns a score from 0 to 1, which is mapped onto five discrete difficulty levels. Questions are then sampled from this graded database ($DB_{Adaptive}$) to match the target reference distribution.
  3. LLM-Adaptive CoT Generation: The sampled questions are sent to a powerful teacher model ($T_{LLM}$), specifically DeepSeek-R1 (671B), to generate deep, accurate CoT reasoning paths. After passing through a final result verifier, this data forms the final training set ($COT_{Adaptive}$).
The Framework for CoT Data Generation via LLM-Adaptive Question Difficulty Grading

Datasets

  • Training Data Sources: Mathematical problems were pulled from NuminaMath, historical AIME problems, and OlympicArena. Coding tasks were sourced from TACO and CodeForces.
  • Evaluation Benchmarks:
  • Mathematics: AIME24, AIME25, MATH500, and GPQA (graduate-level physics/science).
  • Code Generation: LiveCodeBench (stratified by Easy, Medium, and Hard tasks).

Key Insights and Ideas

  • Model-Specific Tailoring is Crucial: One of the most striking findings was the "distribution transfer" experiment. When the authors took a difficulty distribution optimized for a 32B model and used it to train a 7B model, performance dropped. The training data must be adapted to the specific student model's capabilities to be fully effective.
  • Quality and Alignment Over Quantity: Rather than using hundreds of thousands of uncurated samples, the authors achieved state-of-the-art distillation results with a mere 2,000 samples.
  • PRMs Make Better Graders Than Unit Tests: For coding tasks, grading problem difficulty based on the internal reasoning trajectory (via a PRM) yielded significantly better downstream model performance than simply grading based on the percentage of unit tests passed.

Key Results

The LLM-Adaptive CoT method consistently pushed smaller models past heavily distilled baselines:

  • Math Reasoning: With only 2k mathematical CoT data points, ZMath-32B achieved 73.33% on the highly challenging AIME24 benchmark, outperforming DeepSeek-Distill-32B (which scored 66.67%).
  • Scaling Improvements: As shown below, the adaptive approach consistently provided massive accuracy boosts across 7B, 14B, and 32B model scales compared to baseline models and non-adaptive CoT training.
Figure 1: Constrcution of CoT Data with/without LLM- Adaptive question difficulty grading. For LLms of dif- ferent parameters, the former consistently outperforms the latter in reasoning performance on the mathematical competition dataset AIME24 (of America, 2024).
  • Code Generation: On LiveCodeBench, ZCode-32B (trained on just 2k code samples) outperformed DeepSeek-Distill-32B across all tiers, scoring 96.06% on Easy, 75.53% on Medium, and 31.85% on Hard tasks.

Limitations and Future Work

The authors noted that while the math models saw explosive gains from small datasets, coding performance improvements were slightly more modest. They hypothesize that code generation tasks inherently possess a higher variance or complexity that may require a slightly larger training corpus to maximize gains.

Moving forward, the research team plans to integrate this adaptive difficulty grading framework directly with reinforcement learning (RL) and online rejection sampling pipelines to further refine the reasoning boundaries of compact LLMs.

Summary updated

Abstract

Recently, DeepSeek-R1 (671B) (DeepSeek-AIet al., 2025) has demonstrated its excellent reasoning ability in complex tasks and has publiclyshared its methodology. This provides potentially high-quality chain-of-thought (CoT) data for stimulating the reasoning abilities of small-sized large language models (LLMs). To generate high-quality CoT data for different LLMs, we seek an efficient method for generating high-quality CoT data with LLM-Adaptive questiondifficulty levels. First, we grade the difficulty of the questions according to the reasoning ability of the LLMs themselves and construct a LLM-Adaptive question database. Second, we sample the problem database based on a distribution of difficulty levels of the questions and then use DeepSeek-R1 (671B) (DeepSeek-AI et al., 2025) to generate the corresponding high-quality CoT data with correct answers. Thanks to the construction of CoT data with LLM-Adaptive difficulty levels, we have significantly reduced the cost of data generation and enhanced the efficiency of model supervised fine-tuning (SFT). Finally, we have validated the effectiveness and generalizability of the proposed method in the fields of complex mathematical competitions and code generation tasks. Notably, with only 2k high-quality mathematical CoT data, our ZMath-32B surpasses DeepSeek-Distill-32B in math reasoning task. Similarly, with only 2k high-quality code CoT data, our ZCode-32B surpasses DeepSeek-Distill-32B in code reasoning tasks.
BibTeX
@misc{yu2025rethinking,
  author = {Qianjin Yu and Keyu Wu and Zihan Chen and Chushu Zhang and Manlin Mei and Lingjun Huang and Fang Tan and Yongsheng Du and Kunlin Liu and Yurui Zhu},
  title = {{Rethinking the Generation of High-Quality CoT Data from the Perspective of LLM-Adaptive Question Difficulty Grading}},
  year = {2025},
  eprint = {2504.11919},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.11919},
}
Figure