Abstract
Many training data attribution (TDA) methods aim to estimate how a model's behavior would change if one or more data points were removed from the training set. Methods based on implicit differentiation, such as influence functions, can be made computationally efficient, but fail to account for underspecification, the implicit bias of the optimization algorithm, or multi-stage training pipelines. By contrast, methods based on unrolling address these issues but face scalability challenges. In this work, we connect the implicit-differentiation-based and unrolling-based approaches and combine their benefits by introducing Source, an approximate unrolling-based TDA method that is computed using an influence-function-like formula. While being computationally efficient compared to unrolling-based approaches, Source is suitable in cases where implicit-differentiation-based approaches struggle, such as in non-converged models and multi-stage training pipelines. Empirically, Source outperforms existing TDA techniques in counterfactual prediction, especially in settings where implicit-differentiation-based approaches fall short.
Introduction
Which training examples actually "taught" your model to make a specific prediction? This is the core question of Training Data Attribution (TDA). While conceptually simple, existing methods usually force a trade-off: computational efficiency at the cost of accuracy on real-world models (Implicit Differentiation/Influence Functions), or high accuracy at the cost of a massive memory and compute footprint (Unrolled Differentiation).
Researchers from the University of Toronto, Vector Institute, NVIDIA, and Anthropic have introduced SOURCE (Segmented statiOnary UnRolling for Counterfactual Estimation). This approach bridges the gap by providing a middle ground that accounts for the optimization path while remaining computationally feasible for modern, complex training pipelines.
The TDA Landscape: Implicit vs. Unrolled Differentiation
To understand why a model behaves a certain way, we look at counterfactuals: "How would the prediction change if I had removed this specific image from the training set?" Historically, two main strategies have dominated this space:
- Implicit Differentiation (Influence Functions): These are fast but rely on the assumption that the model has perfectly converged to a unique optimum. In deep learning, models rarely fully converge, and the specific path taken by the optimizer (like SGD or Adam) matters.
- Unrolled Differentiation: This tracks the influence of a data point through every single gradient update. While highly accurate, it requires storing model parameters for every step of training, which is prohibitive for large-scale networks.
Methodology: Segmented Stationary Unrolling
SOURCE bridges this gap by partitioning the training trajectory into a few discrete segments. The key technical innovation lies in two approximations:
- Segmented Stationarity: Within each segment, the authors assume the distributions of gradients and Hessians are stationary. This allows thousands of individual steps to be replaced with a single statistical summary.
- Closed-Form Unrolling: By treating these segments as independent, they derive a formula resembling a chain of influence-like terms that can be computed using only a handful of checkpoints (typically around 6).
To scale to millions of parameters, SOURCE utilizes EK-FAC (Eigenvalue-corrected Kronecker-Factored Approximate Curvature), allowing efficient handling of massive Hessian matrices via matrix exponentials.
Key Insights and Empirical Results
The authors conducted extensive evaluations across regression, image classification (CIFAR-10, PACS), and language modeling (BERT, GPT-2). Performance was primarily measured using the Linear Datamodeling Score (LDS), which correlates predicted influence with the actual change in loss upon data removal.
Major Findings:
- Superior Accuracy: SOURCE consistently achieved higher LDS scores than Influence Functions (IF), TracIn, and TRAK across almost all datasets.
- Robustness to Non-Convergence: In "stress tests" where models were trained for only a few epochs, traditional influence functions failed. SOURCE maintained high accuracy, proving it does not require the "perfect optimum" assumption.
- The "Damping" Connection: The mathematical derivation of SOURCE naturally produces a term that resembles the heuristic "damping" factor used in influence functions, providing a theoretical justification for why damping helps account for non-convergence.
- Success in Multi-Stage Training: Because SOURCE is segmented, it can explicitly attribute influence to different stages of training, such as identifying which early training points remain influential after a model has been fine-tuned on a new dataset.
Conclusion
SOURCE represents a significant step toward making data attribution a reliable tool for debugging modern AI. While it requires access to intermediate checkpoints and carries a higher computational cost than standard influence functions, its ability to handle non-converged models and multi-stage pipelines makes it far more robust for real-world applications. Future work may involve automatically detecting "regime changes" in training to place segments more intelligently.
Summary updated