On Training Data Influence of GPT Models

Yekun Chai, Qingyi Liu, Shuohuan Wang, Yu Sun, Qiwei Peng, Hua Wu

Abstract

Amidst the rapid advancements in generative language models, the investigation of how training data shapes the performance of GPT models is still emerging. This paper presents GPTfluence, a novel approach that leverages a featurized simulation to assess the impact of training examples on the training dynamics of GPT models. Our approach not only traces the influence of individual training instances on performance trajectories, such as loss and other key metrics, on targeted test points but also enables a comprehensive comparison with existing methods across various training scenarios in GPT models, ranging from 14 million to 2.8 billion parameters, across a range of downstream tasks. Contrary to earlier methods that struggle with generalization to new data, GPTfluence introduces a parameterized simulation of training dynamics, demonstrating robust generalization capabilities to unseen training data. This adaptability is evident across both fine-tuning and instruction-tuning scenarios, spanning tasks in natural language understanding and generation. We make our code and data publicly available at https://github.com/ernie-research/gptfluence.

1. Introduction

The rapid proliferation of autoregressive language models has heightened the need to understand Training Data Attribution (TDA)—the study of how specific training examples influence model performance. Identifying influential data is crucial for dataset curation, curriculum optimization, and model interpretability. However, existing TDA methods suffer from three primary limitations: they often focus exclusively on test loss rather than generation metrics like BLEU or ROUGE; they fail to generalize to unseen data points (index-based simulators); and they have largely ignored the specific dynamics of GPT-style autoregressive architectures.

2. Methodology: The GPTfluence Framework

To address these gaps, we propose GPTfluence, a framework that utilizes featurized simulation to track training dynamics. Unlike gradient-based methods that are computationally prohibitive at scale, GPTfluence models the training process as an $n$-th order Markov process.

Overview of the GPTfluence framework: (Step 1) GPT training dynamics collection, (Step 2) Featurized simulator training using semantic embeddings, and (Step 3) Inference to predict future performance metrics.

The core innovation lies in semantic featurization. Instead of tracking data by index, GPTfluence uses frozen sentence encoders (e.g., BERT) to convert training and test examples into low-dimensional embeddings. The simulator then learns to predict multiplicative ($\alpha$) and additive ($\beta$) factors that describe state transitions in performance metrics. This approach allows the model to generalize to entirely new training samples.

We found that higher-order Markov assumptions (up to 10 steps) improve accuracy for Natural Language Understanding (NLU) tasks. Furthermore, using a BERT-based encoder for the simulator often yielded better results than GPT-based encoders, likely due to BERT's bidirectional context capturing more robust sentence-level semantics. To support this research, we introduce the GPTDynamics dataset, containing over 350 trajectories across model sizes ranging from 14M to 2.8B parameters.

3. Experimental Results

We evaluated GPTfluence across various NLU tasks (RTE, SST-2, BoolQ) and Natural Language Generation (NLG) tasks (WebNLG, WMT-16).

Simulation results for Loss, BLEU, and ROUGE-L across different datasets. GPTfluence ("Ours") closely tracks the ground truth trajectories, significantly outperforming baselines like Simfluence, TracInCP, and Grad-Dot.

Key findings include:

  • Superior Accuracy: GPTfluence reduced prediction Mean Squared Error (MSE) by 42% and Mean Absolute Error (MAE) by 28% compared to the state-of-the-art Simfluence baseline.
  • Metric Versatility: The framework successfully simulates generation-specific metrics (BLEU/ROUGE), providing a more relevant signal for LLM development than loss alone. This is critical for researchers who need to know if specific data helps a model write better, not just guess tokens.
  • Efficiency: GPTfluence performs inference in approximately 0.2 seconds per sample, a massive speedup over gradient-based methods like TracIn-CP (~153 seconds).
  • Scalability: The method remains robust across the Pythia model suite, showing consistent performance from 14M to 2.8B parameters. It also proved effective at identifying mislabeled training data, where correcting labels led to measurable improvements in final test performance.

4. Discussion and Conclusion

GPTfluence demonstrates that semantic featurization is a powerful tool for understanding data influence in large-scale language models. By moving beyond index-based simulation, it enables the assessment of unseen data and complex generation metrics. While the initial collection of training dynamics (GPTDynamics) requires substantial compute, the resulting simulator offers a highly efficient and accurate tool for data analysis. Future work will explore scaling these simulations to "frontier" models exceeding 70B parameters and extending the framework to multimodal domains.

Summary updated

Abstract

Amidst the rapid advancements in generative language models, the investigation of how training data shapes the performance of GPT models is still emerging. This paper presents GPTfluence, a novel approach that leverages a featurized simulation to assess the impact of training examples on the training dynamics of GPT models. Our approach not only traces the influence of individual training instances on performance trajectories, such as loss and other key metrics, on targeted test points but also enables a comprehensive comparison with existing methods across various training scenarios in GPT models, ranging from 14 million to 2.8 billion parameters, across a range of downstream tasks. Contrary to earlier methods that struggle with generalization to new data, GPTfluence introduces a parameterized simulation of training dynamics, demonstrating robust generalization capabilities to unseen training data. This adaptability is evident across both fine-tuning and instruction-tuning scenarios, spanning tasks in natural language understanding and generation. We make our code and data publicly available at https://github.com/ernie-research/gptfluence.
BibTeX
@inproceedings{chai2024training,
  author = {Yekun Chai and Qingyi Liu and Shuohuan Wang and Yu Sun and Qiwei Peng and Hua Wu},
  title = {{On Training Data Influence of GPT Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=IIPWiX1stp},
}
Figure