Deciphering the Impact of Pretraining Data on Large Language Models through Machine Unlearning
Yang Zhao, Li Du, Xiao Ding, Kai Xiong, Zhouhao Sun, Jun Shi, Ting Liu, Bing Qin
TL;DR
This work tackles the opaque relationship between pretraining data and large language model capabilities by introducing GRACE, a gradient ascent–based machine unlearning framework augmented with retraining to measure data influence while preserving non-target knowledge. By analyzing 48 target corpora across 31 benchmarks and using Llama-2-7B, the authors identify high-impact data (notably Books, Shell, and GitHub) and reveal how corpora interact as correlated, complementary, or orthogonal, shaping both individual abilities and joint performance. They further show that corpus organization, data correlations, and training order materially affect pretraining efficiency and capability emergence, offering concrete guidelines for data proportioning, scheduling, and evaluation. The findings provide a data-driven foundation for more efficient pretraining and point to directions for extending machine unlearning analyses to broader model families and training stages.
Abstract
Through pretraining on a corpus with various sources, Large Language Models (LLMs) have gained impressive performance. However, the impact of each component of the pretraining corpus remains opaque. As a result, the organization of the pretraining corpus is still empirical and may deviate from the optimal. To address this issue, we systematically analyze the impact of 48 datasets from 5 major categories of pretraining data of LLMs and measure their impacts on LLMs using benchmarks about nine major categories of model capabilities. Our analyses provide empirical results about the contribution of multiple corpora on the performances of LLMs, along with their joint impact patterns, including complementary, orthogonal, and correlational relationships. We also identify a set of ``high-impact data'' such as Books that is significantly related to a set of model capabilities. These findings provide insights into the organization of data to support more efficient pretraining of LLMs.
