Dynamic Sampling that Adapts: Iterative DPO for Self-Aware Mathematical Reasoning

Jun Rao, Xuebo Liu, Hexuan Deng, Zepeng Lin, Zixiong Yu, Jiansheng Wei, Xiaojun Meng, Min Zhang · DOI

Abstract

Training Large Language Models (LLMs) for complex mathematical reasoning typically relies on static datasets. However, as a model evolves, its learning needs change. We present SAI-DPO (Self-Aware Iterative Direct Preference Optimization), a framework that dynamically aligns training data with a model's current competence. By identifying specific "error clusters" and focusing on a "Goldilocks zone" of difficulty, SAI-DPO achieves gains of up to 21.3 percentage points on elite math benchmarks like AIME24 and AMC23, while requiring significantly less data than traditional reinforcement learning methods.

The Challenge of Static Data Selection

Traditional post-training for LLMs involves Supervised Fine-Tuning (SFT) or Reinforcement Learning (RL) on fixed datasets. These datasets are often curated by external "teacher" models based on static metrics of difficulty or diversity. The fundamental flaw in this approach is that a model's capabilities are dynamic. A problem that is challenging at the start of training may become trivial later, offering no further learning signal. Conversely, problems that are too advanced provide no useful gradient for improvement.

Conceptual illustration of how different models perceive the difficulty of the same knowledge points differently.

SAI-DPO: A Self-Aware Training Loop

To address this, SAI-DPO introduces a "self-aware" mechanism where the model-under-training actively participates in its own data selection. The framework consists of two primary stages: measurement and iterative optimization.

1. The Measurer

The system first categorizes the training pool and assesses the model's current state:

  • Knowledge Points Similarity: A teacher model (e.g., DeepSeek-R1-Distill-Qwen-14B) tags questions with specific mathematical concepts, which are then clustered.
  • Self-aware Difficulty: The model is tested on a data subset. Difficulty is not an absolute score but is derived from internal performance metrics: P@K (success rate over $K$ attempts), the number of reasoning steps, and the average response length.

2. The Iterative Loop

With these measurements, the framework enters a continuous improvement cycle:

  • Dynamic Data Acquisition: The model identifies categories where it frequently fails ("error clusters") and samples more heavily from these areas in the main data pool.
  • Difficulty Filtering: The system discards "too easy" and "too hard" problems, focusing on the top 70% of challenging but solvable tasks—the "Goldilocks zone."
  • Iterative DPO: The model undergoes Direct Preference Optimization (DPO) on this tailored dataset, and the cycle repeats.
The complete SAI-DPO framework, illustrating the Measurer components and the iterative loop for data acquisition and preference optimization.

Key Results and Efficiency

SAI-DPO was evaluated across eight benchmarks, including high-stakes competitions like AIME24 and AMC23. The results demonstrate significant improvements over standard Iterative DPO (IDPO) and traditional RL:

  • Performance Gains: On AIME24, SAI-DPO boosted Qwen2.5-Math-7B from 13.3 to 23.3. On AMC23, the score jumped from 45.0 to 70.0.
  • Data Efficiency: SAI-DPO outperformed standard PPO (Proximal Policy Optimization) while using only 48k samples, compared to the 400k required by PPO.
  • The "Goldilocks" Effect: Analysis confirmed that training on the simplest data contributes negligible value, while focusing on model-specific "hard" problems accelerates convergence.

Conclusion and Future Directions

SAI-DPO proves that what a model learns is as critical as how it learns. By making the training process adaptive and self-aware, we can achieve higher reasoning performance with greater efficiency. Future work will explore extending these self-aware metrics to more subjective domains like coding and creative writing, as well as moving from offline DPO to online exploration.

Summary updated

BibTeX
@misc{rao2025dynamic,
  author = {Jun Rao and Xuebo Liu and Hexuan Deng and Zepeng Lin and Zixiong Yu and Jiansheng Wei and Xiaojun Meng and Min Zhang},
  title = {{Dynamic Sampling that Adapts: Iterative DPO for Self-Aware Mathematical Reasoning}},
  year = {2025},
  eprint = {2505.16176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.16176},
}
Figure