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:
- 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.
- 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.
- 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}$).
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.
- 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