Training Data Attribution (TDA) aims to answer a critical question in machine learning: If a model makes a specific prediction, which training examples caused it? Understanding this helps debug models, attribute credit to data creators, and improve overall dataset quality.
Currently, researchers rely on two primary strategies for TDA, both of which have significant limitations:
- Implicit Differentiation (Influence Functions): These methods are mathematically elegant and computationally efficient because they only analyze the final, trained model. However, they assume the model has reached a perfect, unique optimum. Modern deep learning rarely meets this criterion due to early stopping, complex optimizers like Adam, and multi-stage pipelines (e.g., pre-training followed by fine-tuning).
- Unrolling: This approach tracks the influence of a data point through every single step of gradient descent. While highly accurate, it is incredibly memory-intensive. Storing the model's parameters at every iteration is practically impossible for large-scale neural networks.
To address this "efficiency vs. accuracy" trade-off, researchers have introduced SOURCE (Segmented statiOnary UnRolling for Counterfactual Estimation), a novel TDA method designed for scenarios where models haven't fully converged or were trained in multiple distinct stages.
The SOURCE Methodology
SOURCE acts as a middle ground, bridging the gap between efficient but limited influence functions and accurate but unscalable unrolling techniques. It achieves this through a few core innovations:
- Trajectory Segmentation: Instead of tracking every single optimization step, SOURCE divides the training history into a few discrete "segments" (e.g., early, middle, and late training).
- Stationary Approximation: Within each segment, the algorithm assumes that the distribution of gradients and the curvature of the loss landscape (the Hessian) remain relatively stationary.
- Closed-Form Formula: By leveraging these stationary assumptions, the authors derive a formula that resembles a traditional influence function but crucially includes terms that account for the "forgetting" of early training information and the specific path the optimizer took.
- EK-FAC Integration: To scale the math for massive neural networks, SOURCE utilizes EK-FAC (Eigenvalue-corrected Kronecker-Factored Approximate Curvature). This technique allows the method to efficiently approximate and invert the massive Hessian matrices required for the calculations.
Key Insights: Optimization Bias and Forgetting
Traditional influence functions ignore how a model arrived at its solution. SOURCE demonstrates that the optimizer's path—including learning rate schedules and momentum—significantly alters which data points are deemed "influential."
Furthermore, the loss landscape features both "high curvature" and "low curvature" directions. SOURCE mathematically captures how the training process "forgets" the influence of early data points much more quickly in high-curvature directions. Because SOURCE is segmented, it can also perform multi-stage attribution. It can answer complex questions like, "How much did the pre-training data affect this fine-tuned prediction?"—a scenario where traditional influence functions fail because they treat the starting point of fine-tuning as a fixed constant.
Empirical Results
The authors evaluated SOURCE across a wide range of tasks, including regression (UCI datasets), image classification (MNIST, CIFAR-10), domain generalization (RotatedMNIST, PACS), and natural language processing (GLUE benchmarks, WikiText-2).
Using the Linear Datamodeling Score (LDS)—a metric measuring how well an attribution method predicts the change in model behavior when data is removed—SOURCE consistently outperformed baselines like TracIn, TRAK, and standard Influence Functions (IF). In "subset removal" tests, where the most influential points are removed and the model is retrained, SOURCE was the most effective at identifying the specific points that would actually cause a model's prediction to flip. It also showed remarkable robustness in multi-stage training simulations, significantly outperforming traditional methods that cannot distinguish between different training phases.
Limitations and Future Directions
While a significant step forward, SOURCE has a few limitations:
- Stationarity Assumption: The method assumes the Hessian doesn't change wildly within a segment. If a model undergoes a massive "phase shift" mid-segment, the approximation's accuracy may degrade.
- Computational Overhead: Though much cheaper than full unrolling, SOURCE is still more computationally expensive than a simple influence function because it requires processing multiple checkpoints.
- Automatic Segmentation: Currently, users must manually choose how to segment the training trajectory. Future work could explore algorithms that automatically detect optimal "cut" points based on gradient statistics.
- Scaling to LLMs: While successfully tested on GPT-2, scaling SOURCE to trillion-parameter models remains a significant engineering challenge, particularly regarding the storage and inversion of EK-FAC factors.
Summary updated