Data Mixing Can Induce Phase Transitions in Knowledge Acquisition

Xinran Gu, Kaifeng Lyu, Jiazheng Li, Jingzhao Zhang

Overview: The Scaling Law Gap

In Large Language Model (LLM) development, the prevailing paradigm suggests that performance scales predictably with compute and parameter count. While previous research indicated that models trained on pure, high-quality data acquire knowledge linearly, real-world training involves complex data mixtures—vast quantities of web-scraped text (e.g., FineWeb) interspersed with small streams of high-quality "gold" data (e.g., Wikipedia).

This study investigates a critical gap in our understanding: how does this mixing affect knowledge acquisition? Does a small model learn a fraction of the high-quality data, or does it ignore it entirely? The authors demonstrate that knowledge acquisition in these mixtures is not a smooth slope but a series of sharp phase transitions. Below a critical model size or mixing ratio, the model learns almost nothing; once a threshold is crossed, it suddenly "snaps" into memorizing the data.

Methodology and Experimental Setup

The researchers conducted controlled experiments using a variety of datasets and architectural scales:

  • Datasets:
    • SynBio: Synthetic biographies used to precisely measure memorization of facts.
  • WikiBio: Real-world Wikipedia biographies with paraphrased versions to test generalization.
  • Base Corpora: FineWeb-Edu and The Pile served as the "web data" background.
  • OpenWebMath & PopQA: Used to validate findings in reasoning tasks and real-world fact popularity.
  • Scaling Analysis: Models ranging from 14M to 6.9B parameters (Pythia architecture) were evaluated at various mixing ratios ($r$).
  • Theoretical Framework: The training process was modeled as a fractional knapsack problem. The LLM acts as an "optimal bounded-capacity learner," allocating its limited parameter budget to data that offers the highest marginal reduction in loss. This framework explains why models "ignore" low-frequency data until they have sufficient capacity.
  • Intervention Strategies: Techniques like Random Subsampling and Compact Knowledge Mixing (CKM) were tested to force knowledge acquisition at low mixing ratios.

The Phase Transition Phenomenon

The core finding is the existence of an "all-or-nothing" threshold. Below a critical model size or mixing ratio, the model fails to learn the target knowledge, regardless of training duration. Once this threshold is crossed, accuracy "snaps" from near-zero to high levels.

Phase transitions in knowledge acquisition as a function of model size across different mixing ratios.

This behavior is explained by the knapsack model: the LLM prioritizes data with the highest marginal value. If web data is more prevalent or easier to learn, it "starves" the high-quality data of capacity until the model is large enough to accommodate both. This suggests that "bigger is better" is not just about performance, but about the ability to learn rare or specific information at all.

Quantitative Results and Scaling Laws

The phase transition is highly predictable. The authors identified a power-law relationship between the critical mixing ratio ($r_{thres}$) and model size ($M$): $r_{thres} \sim 1 / M^{\alpha+1}$. This allows for predicting when larger models will begin to acquire specific datasets based on small-scale observations.

Impact of mixing ratio on training efficiency and the predictable scaling of required tokens.

Key empirical observations include:

  • Model Size Transition: At a fixed mixing ratio, increasing model size leads to a sudden jump in accuracy. For instance, a model might memorize 0% of biographies at 70M parameters but jump to over 60% accuracy at 160M parameters.
  • Mixing Ratio Transition: For a fixed model size, increasing the mixing ratio (e.g., from 0.2 to 0.3 for a 70M model) causes a similar skyrocket in performance.
  • The Training Time Limit: Crucially, for models below the threshold, extended training does not lead to learning. Even seeing a fact 3,000 times resulted in zero memorization if the mixing ratio was too low. This challenges the idea that more compute can always compensate for data scarcity.

Strategic Interventions and Future Directions

To overcome these thresholds, the authors propose two main strategies:

  • Subsampling Paradox: Counter-intuitively, if a model isn't learning a dataset, throwing away half the data can help. By reducing the total number of facts but keeping the token budget the same, you increase the frequency of the remaining facts, pushing them above the marginal value threshold.
  • Compact Knowledge Mixing (CKM): Rephrasing facts into dense, structured formats (e.g., tuples). On the WikiBio dataset, CKM increased the number of learned facts by 20x compared to standard training.

While the study's synthetic nature and computational costs are noted limitations, the findings provide a new lens for understanding LLM training. By observing which "rare" facts a model knows, researchers might even estimate the size of proprietary models (like GPT-4) using the established power-law formulas. Future work will explore if complex, multi-step reasoning follows the same "knapsack" logic.

Summary updated

BibTeX
@inproceedings{gu2025data,
  author = {Xinran Gu and Kaifeng Lyu and Jiazheng Li and Jingzhao Zhang},
  title = {{Data Mixing Can Induce Phase Transitions in Knowledge Acquisition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=tQZK5frjVU},
}
Figure