MATES: Dynamic Data Selection for Efficient LLM Pretraining
TL;DR MATES (Model-Aware data selecTion with data influencE modelS) is a novel pretraining framework that dynamically selects the most helpful data for a language model as it trains. By using a small auxiliary model to predict which data points will best improve the main model's current state, MATES achieves the same performance as standard random selection while using less than half the total compute (FLOPs).
The Problem: Static Data Selection
Pretraining large language models (LLMs) requires massive amounts of web data and millions of GPU hours. However, not all data is equally useful at every stage of training. Current data selection methods generally fall into two static categories:
- Heuristic-based: Using fixed rules like deduplication or removing short documents.
- Reference-based: Using a larger, static model (e.g., GPT-3.5) to score data quality upfront.
The authors argue that these methods miss a crucial dynamic: a model's "appetite" for data changes as it learns. What is helpful at step 1,000 (learning basic grammar) might be redundant at step 50,000 (learning complex reasoning). As training progresses, the correlation between what a model finds influential early on versus later drops significantly.
The MATES Approach
To address this, the authors introduce MATES, a "side-by-side" learning framework. It uses a small Data Influence Model (DIM)—such as a BERT-base model—to track and predict the evolving preferences of the larger pretraining model.
The process works in continuous cycles:
- Oracle Probing: Every few thousand steps, the pretraining model is "probed" using a small hold-out set. The "Oracle" influence of a data point is measured by performing one training step on it and observing how much it reduces the loss on a reference task (like LAMBADA).
- Training the DIM: Because probing the entire massive corpus is computationally prohibitive, the smaller DIM is trained to regress and predict these Oracle scores.
- Selection: The DIM scores the entire pretraining corpus. The system then selects the most influential data for the next stage of pretraining, using a Gumbel-Top-k sampling method to maintain data diversity.
- Iteration: As the pretraining model evolves, the DIM is updated with new probes, ensuring the data selection remains strictly "model-aware."
Key Results and Insights
The authors tested MATES on 410M and 1B parameter models trained on 25 billion tokens from the C4 dataset, evaluating across 9 downstream tasks (including SciQ, ARC, HellaSwag, and PIQA).
- 2.3x Speedup: To reach the same average downstream accuracy that random selection achieves at the end of its budget, MATES required less than half the FLOPs.
- Performance Boost: MATES outperformed random selection by an average of 1.3% (410M model) and 1.1% (1B model) across all downstream tasks.
- Dynamic Curriculum: MATES naturally discovers an automated curriculum. Early in training, it prefers natural narratives; later, it shifts toward factual Wikipedia-style pages, and eventually toward complex academic or technical texts.
- Compute Efficiency: While the DIM adds overhead (probing and training), it is relatively small. For a 1B parameter model, the selection process accounts for only about 11.5% of the total FLOPs, but it makes the remaining 88.5% of compute vastly more effective.
Limitations and Future Work
While highly effective at the 1B parameter scale, it remains to be seen how MATES performs on production-level models with hundreds of billions of parameters. Additionally, the "Oracle" influence relies heavily on the choice of the reference task, which acts as a prior on what the model learns. Future work will explore more advanced data influence architectures and scaling this dynamic selection to massive foundation models.
Summary updated