arXiv:2608.13515cs.CLAug 2026

Manuscript Offprint

arXiv:2608.13515

Measuring Task-Agnostic Training Data Influence Across Language Model Pretraining

Yuto Nishida, Hirokazu Kiyomaru, Yusuke Oda, Takashi Kodama, Chaoran Liu, Daisuke Kawahara, Yusuke Miyao, Max Müller-Eberstein, Masaru Isonuma

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Measuring training data influence consistently across language model pretraining is challenging. It is difficult to select downstream tasks or validation sets representative of a model’s general capabilities, and reliance on task performance at intermediate checkpoints complicates comparisons across training. We propose a measure of training data influence that does not require selecting a downstream task or validation set as the attribution target. Specifically, we define an example’s influence by how much its gradient update reduces the squared distance to the final parameters of a given pretraining run, and estimate this quantity from intermediate checkpoints without retraining. Applying the method to 18 configurations from the Pythia and PolyPythia suites, we find systematic temporal changes in influential data. Early in training, literature-related data are more strongly aligned with the trajectory toward the final parameters, whereas STEM data become more strongly aligned in later stages. This qualitative crossover is broadly consistent across model configurations. Our results provide a tractable trajectory-level view of how influential data change throughout pretraining, complementing influence analyses defined with respect to specific downstream tasks or validation sets.

1 Introduction

Understanding how individual training examples shape a model has long been an important problem in machine learning (Koh and Liang, 2017; Ghorbani and Zou, 2019; Ilyas et al., 2022). Such analyses are not only useful for answering questions about what a model learns from its data, but also for practical goals such as debugging anomalous predictions (Koh and Liang, 2017), identifying harmful or biased training instances (Pan et al., 2025; Jiao et al., 2025), guiding data curation (Yu et al., 2024; Xia et al., 2024), tracing data provenance (Akyurek et al., 2022), and supporting data valuation (Ghorbani and Zou, 2019; Choe et al., 2025).

Most existing methods for training data influence define an example’s effect with respect to a specific target behavior, such as the loss or prediction on a test point, or downstream task performance on an evaluation metric (Koh and Liang, 2017; Ghorbani and Zou, 2019; Pruthi et al., 2020; Hammoudeh and Lowd, 2024). Such task-specific analyses are natural when the goal is to explain or improve performance on a particular task and have already revealed informative patterns in pretraining, including shifts in which domains matter most for particular capabilities (de la Rosa et al., 2025; Wang et al., 2025).

Language model pretraining, however, aims to develop broad, general capabilities rather than optimize for a single task or capability. Therefore, it is difficult to select downstream tasks or validation sets that are representative of these general capabilities throughout training. Moreover, influence estimates tied to task performance at intermediate checkpoints can be difficult to compare consistently across the full pretraining trajectory, since early checkpoints may have acquired capabilities relevant to the target task without yet being able to fully solve it.

In this work, we reformulate training data influence across language model pretraining in task-agnostic terms. Rather than tying influence to a downstream metric, we view it as the extent to which an individual training example moves the model toward the final parameters of a given pretraining run (Figure 1). Specifically, we quantify an example’s influence by how much its gradient update reduces the squared L2 distance to the final model weights, and estimate this quantity from intermediate checkpoints without retraining. The final model thus serves as a common reference point throughout pretraining, yielding a notion of influence that can be compared consistently across different stages of training without relying on task labels or benchmark accuracy.

Across the full pretraining trajectories of 18 variants of the Pythia model family (Biderman et al., 2023; van der Wal et al., 2025), each with 154 checkpoints, we find consistent stage-dependent shifts in which kinds of data are most influential. For instance, literature data are more influential during early training, whereas STEM data become increasingly influential in later stages. These results suggest that the training examples that most strongly move the model toward its final pretrained parameters are not static across pretraining, motivating stage-aware approaches to pretraining data composition and curriculum design.

Our contributions are threefold:

  • We reformulate training data influence across language model pretraining in task-agnostic terms and derive a checkpoint-based approximation for post hoc estimation without retraining (§ 3).
  • We characterize how training data contribution evolves throughout pretraining, revealing systematic stage-dependent variation across different types of training data (§ 4).
  • We establish the reliability and scope of the proposed analysis across checkpoint approximation, reference endpoints, model configurations, and attribution targets (§ 5).

Figure

Figure 1: Overview of our task-agnostic, training data contribution measure: Top contributors move the model towards its final parameters, while bottom contributors yield negligible or opposing updates. Across pretraining, our experiments reveal a cross-over of STEM versus non-STEM domains, in which the former gain importance during later training.