LoRIF: Pushing the Scalability Frontier of Training Data Attribution
Organizations: EPFL, Switzerland · UNC Charlotte, USA · Stony Brook University, USA
Abstract
Training data attribution (TDA) identifies which training examples most influenced a model's prediction. Influence function methods are a theoretically grounded family of TDA methods and exploit gradients. To overcome the scalability challenge arising from gradient computation, the most popular strategy is random projection (e.g., TRAK, LoGRA). However, this still faces two bottlenecks when scaling to large training sets and high-quality attribution: (i) storing and loading projected per-example gradients for all training examples, where query latency is dominated by I/O; and (ii) forming the inverse Hessian approximation, which costs memory. Both bottlenecks scale with the projection dimension , yet increasing is necessary for attribution quality -- creating a quality--scalability tradeoff. We introduce LoRIF (Low-Rank Influence Functions), which exploits low-rank structures of gradient to address both bottlenecks. First, we store rank- factors of projected per-example gradients rather than full matrices, reducing storage and query-time I/O from to per layer per sample. Second, we use truncated SVD with the Woodbury identity to approximate the inverse Hessian term in an -dimensional subspace, reducing memory from to . On models from 0.1B to 70B parameters trained on datasets with millions of examples, LoRIF achieves up to 20 storage reduction and query-time speedup compared to LoGRA, while matching or exceeding its attribution quality. LoRIF makes gradient-based TDA practical at frontier scale. Code is available at https://github.com/doub7e/LoRIF.
Figures & tables
| Method | LDS | Storage | Latency | |||
|---|---|---|---|---|---|---|
| Contextual baselines | ||||||
| EK-FAC | – | – | – | 2.1 GiB | 20 hr | |
| RepSim | – | – | – | 340.7 MiB | 0.15 s | |
| High storage regime | ||||||
| GradDot | 8 | – | – | 574.9 GiB | 209.8 s | |
| TrackStar | 8 | – | – | 574.9 GiB | 241.1 s | |
| Method | Tail-patch (%) | Storage | Latency | |||
| OLMo-3-7B | ||||||
| RepSim | – | – | – | 16.99 GiB | 7.26 s | |
| GradDot | 128 | – | – | 1638.6 GiB | 781.4 s | |
| LoGRA | 128 | – | – | 1638.6 GiB | 782.1 s | |
| LoRIF | 128 | 1 | 80.9 GiB | 35.6 s | ||
| LoRIF | 16 | 1 | 647.4 GiB | 469.7 s | ||
| Avg. relevance | Preference (%) | ||||
|---|---|---|---|---|---|
| Model | LoRIF | LoGRA | LoRIF | LoGRA | Tie |
| OLMo-3-7B | 3.04 | 2.49 | 35.1 | 8.0 | 56.9 |
| Apertus-70B | 2.91 | 2.24 | 40.8 | 9.1 | 50.1 |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Family / method | What the score uses | Extra training information | Per-example artifact stored for repeated queries |
|---|---|---|---|
| Subset-based valuation / simulation | Marginal effects of including or excluding training subsets; sometimes a learned simulator of model behavior from subset membership. | Usually many subset-trained models or evaluations; in-run variants instead require logging during the training run. | Usually no query-specific gradient store; may store global values or a learned simulator. |
| Trajectory-aware attribution | Gradients or parameter changes accumulated along the optimization path. | Saved checkpoints, update history, or an unrolled/differentiable training trajectory; no new retraining if the trajectory was stored. | Sometimes checkpoint-gradient caches; not a final-checkpoint-only representation. |
| Representation or text similarity | Text overlap, embedding similarity, or hidden-state similarity between training and query examples. | No retraining or saved training trajectory. | Text, embedding, or representation store for nearest-neighbor retrieval. |
| Gradient similarity / Hessian-free IF | Dot products between training and query gradients, often using selected layers or an identity curvature approximation. | No retraining or saved training trajectory. | Optional full- or layer-gradient cache; otherwise training gradients must be streamed or recomputed. |
| Parameter-space IF / iHVP | Training and query gradients preconditioned by an inverse-Hessian-vector product or curvature approximation. | No retraining or saved training trajectory, but requires an iHVP or curvature solver. | Optional full- or layer-gradient cache; many implementations stream or recompute training gradients. |
| Projection-based IF | Projected per-example gradients, optionally with curvature or preconditioning. | No saved training trajectory; typically computed from one or a few final checkpoints. | Full projected-gradient store for all training examples. |
| Method | Stage 1 | Stage 2 | Total | |||
| EK-FAC | – | – | – | 7 hr | – | 7 hr |
| LoGRA | 64 | – | – | 15 min | 1 s | 15 min |
| LoGRA | 32 | – | – | 15.5 min | 6 s | 16 min |
| LoGRA | 16 | – | – | 18 min | 1 min | 19 min |
| LoGRA | 8 | – | – | 23.5 min | 13 min | 37 min |
| LoRIF | 32 | 1 | 16 min | 12 s | 16 min |
| Method | Stage 1 | Stage 2 | Total | |||
|---|---|---|---|---|---|---|
| LoGRA | 360 | – | – | 68 hr | 2 min | 68 hr |
| LoGRA | 256 | – | – | 67 hr | 4 min | 67 hr |
| LoGRA | 180 | – | – | 68 hr | 6.5 min | 68 hr |
| LoGRA | 128 | – | – | 67.5 hr | 13.5 min | 68 hr |
| LoRIF | 128 | 1 | 67.5 hr | 2 min | 68 hr | |
| LoRIF | 64 | 1 | 68 hr | 9 min | 68 hr |
| Method | Stage 1 | Stage 2 | Total | |||
|---|---|---|---|---|---|---|
| LoGRA | 512 | – | – | 180 hr | 18 min | 180 hr |
| LoRIF | 256 | 1 | 185 hr | 30 min | 186 hr | |
| LoRIF | 64 | 1 | 195 hr | 5 hr | 200 hr |
| Setting | Preprocessing | Latency/batch | ||
|---|---|---|---|---|
| GPT2-small, low storage | 487 | 16 / 18 min | 16.4 / 2.93 s | 8.9 |
| OLMo-3-7B, higher quality | 1,000 | 68 / 72 hr | 782.1 / 469.7 s | 46.1 |
| Apertus-70B, efficient | 1,000 | 180 / 186 hr | 1087.9 / 222.5 s | 25.0 |
| Apertus-70B, higher quality | 1,000 | 180 / 200 hr | 1087.9 / 843.8 s | 295.0 |
| Method | LDS | Storage | Storage/Ex. | Latency | |||
| LoRIF w/o truncated SVD | 8 | 1 | – | 8.3 GiB | 0.04 MiB | 72.7 s | |
| LoRIF w/o truncated SVD | 4 | 16/32 | – | OOM | – | – | – |
| LoRIF w/o rank factorization | 4 | – | 2297.7 GiB | 10.1 MiB | 1548.0 s | ||
| LoRIF | 4 | 16 | 255.5 GiB | 1.12 MiB | 165.9 s | ||
| LoRIF | 4 | 32 | 511.0 GiB | 2.25 MiB | 287.1 s | ||
| LoRIF w/o truncated SVD | 4 | 1 | – | OOM | – | – | – |
| Model | Module | Err. | EVR | Err. | EVR |
|---|---|---|---|---|---|
| GPT2-small (124M) | attn | 0.787 | 37.6% | 0.557 | 67.8% |
| GPT2-small (124M) | mlp | 0.834 | 30.2% | 0.711 | 49.3% |
| OLMo-3-7B | attn | 0.773 | 38.8% | 0.594 | 63.5% |
| OLMo-3-7B | mlp | 0.827 | 31.2% | 0.694 | 51.3% |
| Apertus-70B | attn | 0.479 | 74.3% | 0.211 | 93.8% |
| Apertus-70B | mlp | 0.641 | 55.0% | 0.454 | 77.1% |
| Model | Module | EVR@10% | EVR@25% | EVR@50% | |
|---|---|---|---|---|---|
| GPT2-small, | attn | 1152 | 0.49 | 0.67 | 0.83 |
| GPT2-small, | mlp | 2304 | 0.42 | 0.60 | 0.79 |
| OLMo-3-7B, | attn | 1024 | 0.43 | 0.59 | 0.77 |
| OLMo-3-7B, | mlp | 2752 | 0.36 | 0.52 | 0.72 |
| Apertus-70B, | attn | 576 | 0.77 | 0.84 | 0.91 |
| Apertus-70B, | mlp | 5376 | 0.53 | 0.66 | 0.81 |
| Method | Storage | LDS | |||
| Medium storage | |||||
| FactGraSS-RM | 48 | – | – | 16.6 GiB | |
| Selective-FactGraSS | 48 | – | – | 16.6 GiB | |
| LoRIF | 4 | 1 | 4096 | 16.6 GiB | |
| Low storage | |||||
| FactGraSS-RM | 96 | – | – | 4.1 GiB | |
| Regime | Method | Time | Speedup | LDS |
|---|---|---|---|---|
| Medium | LoRIF | 0.5687 | ||
| RM-LoRIF | 0.4082 | |||
| SM-LoRIF | 0.4083 | |||
| Low | LoRIF | 0.2805 | ||
| RM-LoRIF | 0.2080 | |||
| SM-LoRIF | 0.2082 |
| Method | Mean Spearman | 95% query-bootstrap CI |
|---|---|---|
| LoGRA, | 0.3648 | |
| LoRIF, | 0.3966 |
| Removed | LoRIF PPL | LoGRA PPL | LoRIF LoGRA |
|---|---|---|---|
| 128 examples | |||
| 1% | |||
| 10% | |||
| 25% |
| Removed | LoRIF PPL | LoGRA PPL | LoRIF LoGRA |
|---|---|---|---|
| 128 examples | |||
| 1% | |||
| 10% | |||
| 25% |
| Score | Meaning |
|---|---|
| 1 | Completely irrelevant. |
| 2 | Vaguely related field. |
| 3 | Same broad topic. |
| 4 | Closely related problem or task. |
| 5 | Nearly identical problem or task. |
| Model | Avg. score | Score 1 rate | Score rate | Preference: LoRIF / LoGRA / Tie |
|---|---|---|---|---|
| OLMo-3-7B | 3.04 / 2.49 | 17.8% / 31.7% | 39.1% / 25.2% | 35.1% / 8.0% / 56.9% |
| Apertus-70B | 2.91 / 2.24 | 16.0% / 41.3% | 33.3% / 18.8% | 40.8% / 9.1% / 50.1% |
| Score | Meaning | OLMo LoRIF | OLMo LoGRA | Apertus LoRIF | Apertus LoGRA |
|---|---|---|---|---|---|
| 1 | Completely irrelevant | 17.8% | 31.7% | 16.0% | 41.3% |
| 2 | Vaguely related | 17.7% | 24.9% | 25.7% | 20.7% |
| 3 | Same broad topic | 24.5% | 17.3% | 25.0% | 19.2% |
| 4 | Closely related | 19.9% | 12.2% | 18.2% | 10.2% |
| 5 | Nearly identical | 19.2% | 13.0% | 15.1% | 8.6% |
| Method | LLM-judge relevance | Tail-patch score |
|---|---|---|
| RepSim | 2.83 | 0.144 |
| LoGRA | 2.49 | 0.546 |
| LoRIF | 3.04 | 0.986 |
Training Data Attribution
Training data attribution identifies which examples, sources, or groups shape a model’s predictions, capabilities, and failures.
See all 83 papers