TL;DR
Researchers have identified a "diversity dilemma" in LLM pre-training: selecting data based on similarity to "high-quality" sources (like Wikipedia) causes dimensional collapse, where the model's internal representations become narrow and redundant. To fix this, they introduced DiSF (DiverSified File selection), an algorithm that selects the most decorrelated files to ensure a balanced feature space. This approach achieves 5x data efficiency and outperforms full-dataset training using only 1.5% of the original files.
What Problem Does This Paper Address?
Training a Large Language Model (LLM) is an expensive game of data curation. To save on compute, researchers often use "proxy models" to pick the "best" data from massive crawls, usually by looking for text that closely resembles high-quality sources such as Wikipedia or BookCorpus.
However, the authors argue that this "similarity-first" approach creates a trap called the diversity dilemma. When data is selected solely because it is similar to a target domain, the resulting dataset lacks variety in its underlying feature space. This leads to dimensional collapse: the model's embeddings cluster into a narrow band, making it highly capable at specific domain-related tasks but terrible at general reasoning and broad "physical world" knowledge. Essentially, by trying to be exclusively "high quality," the data becomes too repetitive for the model to learn a robust, multi-dimensional understanding of the world.
Methods
The authors propose DiSF (DiverSified File selection) to combat this collapse. Instead of filtering for similarity, DiSF optimizes for decorrelation.
- Feature Extraction: A pre-trained proxy model (like Contriever) is used to turn text files into feature vectors.
- Covariance Optimization: The goal is to make the eigenvalues of the feature covariance matrix as uniform as possible. In plain English: the algorithm ensures the data spreads out evenly across all possible "directions" in the feature space rather than bunching up.
- The Math: The authors prove that ensuring eigenvalue uniformity is mathematically equivalent to minimizing the Frobenius norm of the covariance matrix.
- Greedy Batch Selection: Since calculating this for billions of files is computationally impossible, they employ a "greedy" algorithm. They break the data into batches and iteratively pick the file that adds the most "new" information (the highest marginal gain in diversity) to the set.
- Theoretical Backing: They frame this as a $\gamma$-weakly submodular optimization problem, providing a theoretical guarantee that their greedy approach gets reasonably close to the mathematically "optimal" set of diverse files.
Datasets
- Pre-training Corpus: SlimPajama, a massive open-source dataset containing roughly 590 million training files (over 600B tokens).
- Evaluation Benchmark: The Harness framework, specifically focusing on nine tasks:
- Reading Comprehension: ARC-e, ARC-c, OBQA, BoolQ.
- Physical/Common Sense Knowledge: PIQA, HellaSwag, WinoGrande.
- Problem Solving: MMLU (5-shot) and BBH (3-shot).
Key Insights and Ideas
- Similarity is the Enemy of Diversity: Traditional methods (like DSIR or QuRating) that filter for "Wikipedia-like" text inadvertently prune away the "long tail" of data that helps a model generalize.
- The Frobenius Norm Shortcut: Directly optimizing eigenvalues is computationally heavy. Discovering that minimizing the Frobenius norm of the covariance matrix serves as a proxy for eigenvalue uniformity is a key insight that makes the algorithm scalable.
- Data Quality vs. Data Coverage: The paper suggests that for general-purpose LLMs, coverage of the feature space is just as important as the "cleanliness" or "quality" of individual samples.
- Efficiency Gains: The most striking insight is that you don't need the whole dataset. By picking the right 1.5% of files, you can actually train a better model than if you used the whole thing, because you've removed the "noise" of redundant, highly correlated data.
Key Results
DiSF consistently outperformed baselines (DSIR, D4, QuRating) across almost all evaluation tasks. On TinyLlama 1.1B, it showed a 3.4% improvement over the popular DSIR method.
Beyond raw performance, DiSF achieved 5x data efficiency. Training on just 9 billion tokens selected by DiSF outperformed training on 50 billion tokens of "full" data. Furthermore, it reached the performance level of full-data training roughly 1.5x faster. These benefits held true as the authors scaled the model size from 120M to 1.1B parameters and tested across different architectures like Pythia and OPT.
Limitations and Future Work
- Proxy Model Dependence: The method relies on a feature extractor (like Contriever). If the proxy model itself has biases or "blind spots" in its feature space, DiSF will inherit them.
- Computational Overhead: While more efficient than training on full data, DiSF still requires an initial pass to extract features and run the selection algorithm. The authors note this takes about 26 hours on 8 GPUs for their setup.
- Hyperparameter Tuning: The "selection scale" (batch size) requires tuning. If the batch is too small, you lose diversity; if it's too large, the computational cost spikes.
- Future Directions: The authors suggest exploring how DiSF could be used for "continual learning" or fine-tuning, where maintaining diversity is often a struggle.
Summary updated