Data Difficulty and the Generalization–Extrapolation Tradeoff in LLM Fine-Tuning

Siyuan Liu, Tinghong Chen, Xinghan Li, Yifei Wang, Jingzhao Zhang

Supervised Fine-Tuning (SFT) is the standard method for transforming raw base models into capable assistants. However, the AI community remains divided on the ideal data difficulty for SFT. Should we use "hard" data to push the model's limits, "easy" data to align with its existing strengths, or find a "Goldilocks" middle ground?

This paper reveals that these conflicting findings stem from ignoring a crucial variable: data scale. There is no "one-size-fits-all" difficulty level. Instead, the optimal data difficulty is a moving target that shifts from easy to hard as the training data budget increases.

The Core Mechanism: Generalization vs. Extrapolation

The authors propose a theoretical and empirical framework based on a fundamental tradeoff between two competing forces:

  • The Generalization Gap: The model's ability to learn the training distribution. This gap increases with data difficulty because harder concepts are inherently more difficult to learn and memorize.
  • The Extrapolation Gap: The model's ability to bridge the gap to complex, unseen test cases. This gap decreases with data difficulty because training on hard examples makes complex test cases less surprising.

The Scaling Effect: For a fixed data budget, there is an "interior optimum" for difficulty. If the data is too easy, the extrapolation gap is too high (the model fails on hard test cases). If it is too hard, the generalization gap is too high (the model fails to learn the training data and may even "forget" existing capabilities).

However, as the data budget grows, the "cost" of learning hard examples shrinks. This allows the model to effectively utilize harder data, shifting the optimal difficulty sweet spot toward more complex examples. Furthermore, difficulty is relative: stronger base models possess better priors, making them more resilient to hard data and allowing them to benefit from a wider range of difficulty.

Methodology and Datasets

To map this "difficulty-size" landscape, the researchers conducted a systematic 2D study fine-tuning models (Qwen2.5-Math and Llama-3.2) across a grid of training set sizes (1k to 128k examples) and difficulty buckets.

  • Difficulty Metrics: They primarily used Chain-of-Thought (CoT) length as a proxy for difficulty, validating it against Negative Log-Likelihood (NLL) and pass rates.
  • Real-World Data: The study utilized datasets like OpenMath (3.2M problems), OpenR1-Math-94k, and OpenScience, evaluated on benchmarks including Math500, AIME24, Minerva Math, MMLU, and GPQA.
  • Synthetic Experiments: To isolate the effects of difficulty without real-world noise, they ran controlled synthetic experiments using the iGSM (interpretable Grade School Math) framework, where the number of operations could be precisely controlled.
  • Theoretical Framework: They formalized their findings using PAC-Bayesian generalization bounds to mathematically decompose total error into the generalization and extrapolation gaps.

Key Findings

  • Small vs. Large Scale: In low-data regimes (e.g., 1k–5k samples), removing the hardest 10% of data actually improves performance. Conversely, in large-data regimes (e.g., 50k+ samples), removing the easiest 10% yields the best results.
  • Saturation: Easy data leads to performance saturation much faster than hard data. Once a model masters the easy concepts, adding more easy data provides diminishing returns.
  • Dynamic Fine-Tuning (DFT): The authors analyzed DFT, a method that favors "easy" tokens. They found DFT is more robust when data is too difficult for a small budget. However, standard SFT eventually surpasses it as data volume grows, because DFT's bias prevents it from fully mastering complex patterns.

Limitations and Future Directions

While the paper proves the existence of an optimal difficulty, pinpointing that exact peak for a new, messy dataset remains practically challenging. Additionally, the study relies on heuristics like CoT length and NLL, which are highly effective for math and science but may not translate perfectly to domains like creative writing or coding.

Future research will focus on developing adaptive search strategies that can automatically "tune" the difficulty of the training mixture based on the available data budget and the model's evolving capabilities.

Summary updated

BibTeX
@inproceedings{liu2026data,
  author = {Siyuan Liu and Tinghong Chen and Xinghan Li and Yifei Wang and Jingzhao Zhang},
  title = {{Data Difficulty and the Generalization–Extrapolation Tradeoff in LLM Fine-Tuning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=LCosvYhXvi},
}

Loading related content...

Figure