Influence functions estimate how individual training examples affect the behavior of large language models (LLMs). Analyzing how training data influence different behaviors of an LLM involves repeated influence computation. Reusing stored training gradients reduces the computational cost, but storing full gradients is prohibitively expensive at LLM scale. We study how to compress these gradients while preserving influence estimates for future queries that are unknown at storage time. Through a worst-case analysis, we characterize the optimal fixed-dimensional linear representation and propose eigenbasis-corrected one-bit gradient projection (EOGP) to approximate it at scale. Specifically, EOGP uses EK-FAC to reduce gradient dimensionality, then applies PCA within the retained subspace to learn compression directions from the training gradients. We then apply one-bit quantization to the resulting coordinates, allowing more coordinates to be retained within a fixed storage budget. On GPT-2, EOGP predicts retraining outcomes more accurately than the evaluated compression baselines while using one-sixteenth of their per-example storage. On OLMo 2 SFT models from 1B to 32B parameters, EOGP remains competitive with the baselines allocated over 100 times as much storage per example.
Figures & tables
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Source checkpoint
Dataset
GPT-2
gpt2
WikiText-2
OLMo 2 1B
allenai/OLMo-2-0425-1B-SFT
Tülu 3 mixture
OLMo 2 7B
allenai/OLMo-2-1124-7B-SFT
Tülu 3 mixture
OLMo 2 13B
allenai/OLMo-2-1124-13B-SFT
Tülu 3 mixture
OLMo 2 32B
allenai/OLMo-2-0325-32B-SFT
Tülu 3 mixture
Appendix
Table 1: Source model checkpoints and datasets.
Model
Uncompressed FP16 (GB/example)
One-bit representation (KB/example)
OLMo 2 1B
2.147
28.896
OLMo 2 7B
12.952
57.792
OLMo 2 13B
25.376
72.240
OLMo 2 32B
62.411
115.584
Appendix
Table 2: Per-example representation payloads at ku=2,048 per module. Uncompressed gradients cover the attributed parameters, and one-bit representations include packed signs and FP16 scales. Shared artifacts are accounted for in Section E.1 .
Model
EOGP PCA fitting (min)
Store construction (s/example)
EOGP
LoGra
OLMo 2 1B
4.5
0.0563
0.0577
OLMo 2 7B
8.9
0.0999
0.1315
OLMo 2 13B
11.1
0.1474
0.1661
OLMo 2 32B
18.4
0.2470
0.2780
Appendix
Table 3: PCA fitting and store-construction times on one NVIDIA B200. Fitting starts from cached coordinates and includes saving the correction matrices. Store-construction totals combine separately timed stages, including disk I/O.
Method
12 KB
24 KB
96 KB
EOGP
0.902
0.890
0.919
LoGra (Random)
0.604
0.447
0.086
LoGra (PCA)
0.750
0.570
−0.355
GraSS
0.330
0.079
−0.205
LoRIF
0.820
0.823
0.822
Appendix
Table 4: Pearson correlation between FP16 and one-bit influence scores on GPT-2. We report the median of the query-wise correlations over 481 queries. Storage budgets refer to one-bit storage per training example. The highest correlation at each budget is shown in bold.
University of Shanghai for Science and Technology, Shanghai, China · Shanghai Jiao Tong University, Shanghai, China · Zhejiang University, Hangzhou, China