How Faithful Is Trajectory-Based Data Attribution? Error Sources, Remedies, and Practical Guidelines

Junwei Deng, Pingbang Hu, Suliang Jin, Hao Lu, Jiachen T. Wang, Shichang Zhang, Jiaqi W. MaarXiv 2026

TL;DR

Trajectory-based data attribution methods are powerful tools for identifying which training samples drive a model's predictions, but their real-world accuracy has long been a black box. This paper provides the first systematic error analysis for these methods, revealing that a common shortcut—assuming an SGD optimizer when a model actually uses AdamW—drastically undermines attribution fidelity. By introducing a mathematically aligned AdamW-influence method and a unified $K$-step look-ahead framework, the authors significantly boost attribution accuracy and provide a practical recipe for data selection.

What Problem Does This Paper Address?

Data attribution answers a fundamental question in machine learning: Which training examples caused my model to make this specific prediction? Trajectory-based attribution methods answer this by tracing the model's parameter updates throughout the training process.

While these methods are widely used for data cleaning, valuation, and selection, practitioners have lacked a rigorous understanding of their errors. How faithful are these approximations to reality? Where do the errors come from? The authors categorize the total attribution error into three buckets:

  1. Config-level error: Mismatches between the attribution formula and the actual training setup (e.g., using the wrong optimizer formula).
  2. Algorithm-level error: Gaps introduced by mathematical approximations made for efficiency (like first-order Taylor expansions).
  3. System-level error: Irreducible noise from floating-point precision and GPU non-determinism.

The paper specifically tackles the massive, previously unaddressed config-level error caused by optimizer mismatch, alongside the algorithm-level errors stemming from Taylor approximations.

Methods

The authors introduce two key technical innovations to mitigate these errors:

  • AdamW-influence: Standard trajectory-based methods derive their formulas assuming Stochastic Gradient Descent (SGD). However, modern deep learning almost universally relies on AdamW. Because AdamW's updates are highly non-linear due to running momentum and coordinate-wise adaptive scaling, standard SGD approximations fail. The authors mathematically derive AdamW-influence, which explicitly tracks these coupled moment states through a backward recurrence. To make this computationally viable at scale, they introduce a random masking technique that sub-selects gradient coordinates without breaking AdamW's coordinate-wise structure.
  • Unified $K$-Step Look-Ahead Framework: For the downstream task of data selection, the authors unify traditional "offline" (post-training) and "online" (on-the-fly) selection strategies. They introduce a parameter, $K$, which dictates the look-ahead horizon: How much will including this data point help validation loss $K$ steps from now?
Figure 1: An error taxonomy of trajectory-based attribution and our three key contributions. (a) Three error sources and how their proportion changes along the training trajectory. The absolute error of SGD-influence on MNIST+MLP decomposes into config-level (green, optimizer mismatch), algorithm-level (blue, first-order Taylor), and system-level (gray) components. (b) The proposed AdamW-influence algorithm corrects the dominant config-level error. AdamW-influence (blue) improves over SGD-influence (orange) significantly in attribution fidelity measured by the Spearman ρ against TSLOO ground truth across four settings. (c) Dissecting the algorithm-level error shows that learning rate and trajectory length are governing factors. Intra-step Spearman ρ of AdamW-influence rises as the learning rate decreases and as training steps approach the trajectory end (shorter remaining trajectory). (d) Our error corrections through aligned optimizer and short-horizon attribution can significantly boost data selection quality. Online AdamW-influence (purple) outperforms online SGD-influence (red) and offline AdamW-influence (green) on MLP image classification (error rate, ↓) and Llama 3.2-1B SFT on Tulu3 (perplexity, ↓).

Datasets

The authors evaluated their methods across four distinct settings to ensure broad applicability:

  • MNIST: Evaluated using both a 3-layer Multi-Layer Perceptron (MLP) and a Convolutional Neural Network (CNN).
  • WikiText-2: Used for the continual pretraining of a GPT-2 language model.
  • Alpaca & Tulu3: Used for instruction fine-tuning of the Llama 3.2-1B architecture.

Key Insights and Ideas

  • The Optimizer Mismatch is a Silent Killer: You cannot faithfully attribute data on an AdamW-trained model using an SGD-based formula. Aligning the attribution math with the actual optimizer is the single most impactful fix for attribution fidelity.
  • More Information $\neq$ Better Results (The Horizon Trade-off): Intuitively, one might think that looking across the entire training trajectory ("offline" selection) yields the best data attribution. However, because these methods rely on a first-order Taylor approximation, errors compound over long trajectories. Looking just a few steps ahead ($K$-step online selection) keeps approximation errors low while still capturing crucial optimization dynamics.
  • Learning Rate Dictates the Horizon: The optimal look-ahead horizon $K$ is tightly coupled with the learning rate. A smaller learning rate keeps per-step linearization errors small, meaning the mathematical approximation remains accurate over a longer horizon (larger $K$).

Key Results

  • Massive Fidelity Gains: Switching from SGD-influence to AdamW-influence improved the Spearman correlation between estimated and ground-truth influence by 10% to over 300% across all tested models and datasets.
  • Superior Data Selection: In practical data selection pipelines, online AdamW-influence consistently outperformed online SGD-influence and matched or exceeded computationally expensive offline methods, achieving lower error rates on MNIST and lower perplexity on Llama 3.2-1B.
  • Accurate Error Proxy: The authors derived a closed-form proxy to estimate algorithm-level error without retraining. This proxy achieved a remarkably high Spearman correlation ($\rho \in [0.83, 0.89]$) against actual ground-truth error norms.

Limitations and Future Work

While this work marks a major step forward, the authors note a few boundaries:

  • First-Order Limitations: The analysis is strictly tailored to trajectory methods relying on first-order Taylor expansions. Extending this taxonomy to other popular attribution frameworks (like MAGIC or Simfluence) remains an open challenge.
  • Scale Constraints: Due to computational limits, LLM evaluations were capped at the Llama 3.2-1B scale. Verifying these insights on larger frontier models is an essential next step.
  • Domain Scope: The empirical focus was restricted to supervised classification and language modeling; future work will need to explore if these guidelines hold true for reinforcement learning and diffusion models.

Summary updated

BibTeX
@misc{deng2026how,
  author = {Junwei Deng and Pingbang Hu and Suliang Jin and Hao Lu and Jiachen T. Wang and Shichang Zhang and Jiaqi W. Ma},
  title = {{How Faithful Is Trajectory-Based Data Attribution? Error Sources, Remedies, and Practical Guidelines}},
  year = {2026},
  eprint = {2605.18814},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18814},
}
Figure