Improving Pretraining Data Using Perplexity Correlations

Tristan Thrush, Christopher Potts, Tatsunori Hashimoto

Researchers from Stanford have developed a novel framework to select high-quality LLM pretraining data without needing to train a single model of their own. By analyzing how the perplexity (loss) of 90 existing public LLMs on specific web domains correlates with their downstream benchmark scores, they can identify which data "predicts" a high-performing model and select it for future training.

The Data Selection Bottleneck

It is widely understood that the quality of pretraining data is the single most important factor in LLM performance. However, finding the "best" data remains a massive bottleneck. Currently, researchers usually rely on three imperfect options:

  1. Hand-curation: Slow, expensive, and biased toward what human annotators think constitutes good data.
  2. N-gram overlap: Selecting data that looks textually similar to the target benchmark (e.g., DSIR). This is simple but often misses deeper semantic quality.
  3. Proxy models: Training small "pilot" models on different data mixtures to see what works. This is prohibitively expensive because it requires training hundreds of models to explore the search space.

This paper tackles the bottleneck by asking a clever question: Can we use the millions of dollars already spent on public models to value data for us?

The Perplexity-Performance Hypothesis

The core of the paper relies on the Perplexity-Performance Hypothesis: if a model’s ability to predict a certain text (low perplexity) is highly correlated with its score on a benchmark (like SciQ), then that text is likely high-quality training material for that task.

Diagram illustrating the perplexity correlation framework for data selection.

The authors developed a statistical framework called a Single-Index Model (SIM) to map these relationships:

  • Data Collection: They took 90 open-weight models from the Hugging Face Open LLM Leaderboard and measured their loss on tens of thousands of web domains from RedPajama V2.
  • Correlation Estimation: They calculated the correlation between a model's loss on a domain and its accuracy on a benchmark. Crucially, they used a robust rank-based correlation (a U-statistic) rather than raw linear regression, making the method resistant to outliers in model loss.
  • Data Selection: They selected domains with the highest positive correlations. To scale this to massive datasets, they trained a simple fastText classifier to distinguish these "high-correlation" documents from the rest of the web.
  • Linear Projection: They used a constrained optimization approach to turn these correlations into a concrete "data recipe"—deciding exactly how many tokens to take from each domain to stay within a specific token budget.

Experimental Setup

The framework was tested using a massive pretraining pool consisting of the "sample-100B" subset of RedPajama V2 (RPJv2) and the DataComp-LM (DCLM) pool (240 trillion tokens). Initial evaluations were run on ARC Easy, PIQA, SciQ, and LAMBADA (including translations), and later scaled to the DCLM Core, an aggregate of 22 benchmarks. The 90 public LLMs used for estimation ranged from ~33M to 9B parameters, including families like Pythia, Qwen, and OpenLlama.

Key Results and Insights

By looking at 90 models, the authors effectively "crowdsourced" data valuation from the AI community's previous training runs. This "free experiment" yielded several major insights:

  • Domain-Level Signal: Web domains provide a surprisingly stable signal for data quality. Certain obscure technical domains are much better predictors of downstream intelligence than general-purpose sites.
  • Outperforms Baselines: In controlled 160M parameter experiments, the method beat DSIR (n-gram selection) on every single benchmark.
  • Matches SOTA: It matched the performance of the best hand-engineered classifier from the DataComp-LM project, which was built using significant human intuition and manual filtering.
Table showing the average rank of various data selection methods, with Perplexity Correlations performing highly.
  • Multilingual Success: The method successfully "discovered" that it should select French data to improve French LAMBADA scores, purely by looking at perplexity correlations, without being explicitly told which language was which.
  • Scale-Positive: Unlike many data selection heuristics that fall apart as models get bigger, this method’s performance actually improves as you scale from 160M to 1.4B parameters.

Limitations and Future Directions

While highly effective, the approach has some limitations. It struggles with "outlier" models trained on very unusual data (like the Phi models or GPT-4 synthetic data), as they don't follow the same perplexity-performance patterns as standard web-trained models. Additionally, while it avoids training costs, running inference with 90 models on a sample of data to build the initial correlation matrix still requires significant GPU time.

Finally, the current approach relies on web domains. If a single domain contains a mix of very high-quality and very low-quality data, the domain-level correlation might be diluted. Future work could explore more granular, cluster-based selection to refine the data pool even further.

Summary updated

BibTeX
@inproceedings{thrush2025improving,
  author = {Tristan Thrush and Christopher Potts and Tatsunori Hashimoto},
  title = {{Improving Pretraining Data Using Perplexity Correlations}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=huuKoVQnB0},
}
Figure