# dattri-LLM: A Unified and Efficient Library for Training Data Attribution at LLM Scale

- **ID:** 1329
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2609.38767
- **Authors:** Shixuan Liu, Tongli Zhou, Junwei Deng, Pingbang Hu, Jiaqi W. Ma
- **Venue:** arXiv:2609.38767 (cs.LG), submitted 30 Sep 2026 (v2 1 Oct 2026); TRAIS-Lab (UIUC; Tongli Zhou, Google)
- **Published:** 2026
- **Source:** x
- **Language:** en
- **Access:** free
- **Added:** 2026-10-09
- **Verified:** 2026-10-09
- **Page:** https://papers.projxon.ai/entries/1329

## Summary

dattri-LLM is an open-source PyTorch library for gradient-based training data attribution (TDA) at LLM scale, from TRAIS-Lab (Shixuan Liu et al.). Efficiency comes from two exact per-example gradient representations - factorized (input-activation/output-gradient pairs) and materialized (dense per-sample weight gradients) - with a FLOP-aware cost model routing each layer and operation to the cheaper one, so 'ghost' inner products score samples without ever forming weight gradients when that is cheaper. Compatibility comes from non-invasive capture: autograd hooks assemble per-sample gradients from any training loop that calls backward(), with no changes to the loop, optimizer, or trainer - demonstrated on HuggingFace Trainer, TRL (SFT/GRPO trainers), and OLMo, under DDP and FSDP, with per-rank sharded gradient stores merged afterwards; gradients can be offloaded to disk during training and re-attributed by any method without the model. Extensibility comes from two interfaces: Attributor (plug-in attribution methods over one shared gradient stream) and HookManagerCallback (training-time applications acting on captured gradients, e.g. online data selection). Built-in attributors: TracIn, Grad-Dot/Grad-Cos, K-FAC and EK-FAC influence, DVEmb, LESS, AdamW-influence, plus a DataSelectionCallback for online data selection. Benchmarks on four H200s (512 training sequences, Qwen2.5 0.5B-72B plus Qwen1.5-110B; 1 query through 32B, 4 queries at 72B/110B) against Bergson, Kronfluence, and LogIX: dattri-LLM averages 3.2x the throughput of the fastest competing library per configuration across GradDot/K-FAC/EK-FAC, and is the only library besides Bergson to complete 72B/110B runs (Kronfluence OOMs beyond 7B on K-FAC; LogIX beyond 32B). Fidelity-cost trade-offs (LDS/LOO-style TSLOO on GPT-2, Qwen2.5-1.5B, OLMo-3-7B) favor dattri-LLM's EK-FAC and AdamW-influence. Code: MIT-licensed at github.com/TRAIS-Lab/dattri-llm (9 stars at catalog time; the library is the LLM-scale companion of the earlier dattri package). Paper license: arXiv non-exclusive distribution 1.0 (not CC).

## Research notes

- Discovery: Shixuan Liu (@ShixuanLiu40618, CS PhD @UofIllinois, ex-SonyAI, 'Understanding how data shapes models', 22 followers) X post 2026-10-08 ~3:27 PM ET (~3.3K views, 47 likes, 28 bookmarks), top of a 4-post thread; paper and code links from the thread. Relevance: the user trains his own LLMs, and entry 1627 (Relative Generalization Invariance) established that data curation is the primary lever on the loss structure - data attribution tells you WHICH training examples shape outputs, the natural complement. Also relevant to data-quality thinking (entry 1625 AfterQuery): dattri-LLM is the open-source tooling for actually measuring example-level influence. Catalog relationship: entry 1550 is EleutherAI's Bergson data-attribution library - Bergson is dattri-LLM's closest competitor in this paper's own benchmark (Table 4), so the catalog now holds both libraries head-to-head. Research note: the 3.2x figure is an average over methods/projection regimes vs the fastest competitor per configuration, and the paper's own conclusion flags it as implementation+capability comparison, not pure efficiency.

## Similar entries

- [K2 Horizon data release — DATA_NAVIGATOR index and the post-training data-generation pipelines](https://papers.projxon.ai/entries/1443) (tool, #1443)
- [Bergson: An Open Source Library for Data Attribution](https://papers.projxon.ai/entries/1241) (code, #1241)
- [The Curse of Recursion: Training on Generated Data Makes Models Forget](https://papers.projxon.ai/entries/588) (paper, #588)
- [PhantomEnvironments: Training LLM Agents in Fictional Worlds](https://papers.projxon.ai/entries/869) (paper, #869)
- [Synthetic Pre-pretraining Survives Scale, but Not as a Grammatical Prior](https://papers.projxon.ai/entries/848) (paper, #848)
- [daVinci-LLM: Towards the Science of Pretraining](https://papers.projxon.ai/entries/1127) (paper, #1127)
