Manuscript Offprint

arXiv:2609.37842

Scaling Influence Functions in LLMs through Eigenbasis-Corrected One-Bit Gradient Projection

Jaeseung Heo, J Rosser, Dongwoo Kim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

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.

1 INTRODUCTION

Influence functions are widely used to analyze how training data shape the diverse behaviors of large language models (LLMs). Their applications include studying generalization (Grosse et al., 2023; Ruis et al., 2025; Kou et al., 2025), selecting data for fine-tuning (Zhou et al., 2024; Heo et al., 2026; Chen et al., 2026), and identifying training examples that contribute to undesired behavior (Zhang et al., 2025; Coalson et al., 2025). By estimating how individual training examples affect a model's predictions (Koh & Liang, 2017), influence functions provide a common framework for investigating these connections between training data and model behavior.

Each attribution query asks which training examples contribute to a particular model output or behavior. Analyzing different behaviors of a fixed model therefore involves multiple queries, but the training-example gradients used in influence estimation can be reused across them. Computing and storing these gradients once would avoid repeated backward passes over the training data as new queries arise. At LLM scale, however, storing full gradients is costly: a single training-example gradient for an 8B-parameter model requires 16 GB in half precision. Supporting repeated attribution queries efficiently thus calls for compact gradient representations that can be stored and reused.

Existing gradient-compression methods reduce this storage cost through random (Schioppa, 2024; Choe et al., 2025; Hu et al., 2025) or curvature-informed projections (Schioppa et al., 2022; Choe et al., 2025), representing each gradient with a small number of coordinates. The central challenge is deciding which information these coordinates should preserve. Since future attribution queries are not known when the representations are constructed, compression must retain information that remains useful across different subsequent influence calculations.

We address this challenge by defining a compression objective based on the discrepancy between influence scores computed from compressed and uncompressed gradients across possible future queries. Under a normalized worst-case influence-error criterion, we show that the top-k PCA coordinates of half-whitened training gradients are optimal among k-dimensional linear representations. This result provides a concrete target for constructing reusable gradient representations.

To approximate this target at LLM scale, we propose Eigenbasis-corrected One-bit Gradient Projection (EOGP). Computing PCA directly on full gradients is prohibitively expensive for billion-parameter models. We therefore first reduce their dimensionality using projection directions derived from EK-FAC (George et al., 2018), then apply PCA to the resulting representations to learn the final compression basis. This allows us to refine the representation using the training gradients within a computationally manageable space. We then apply one-bit quantization to the resulting coordinates, allowing more coordinates to be stored within a fixed budget. Together, these steps address which directions to retain and how much precision to allocate to each coordinate.

We evaluate the resulting representations through retraining-based validation and comparison with an uncompressed influence reference. On GPT-2 (Radford et al., 2019), EOGP outperforms the tested compression baselines in both linear datamodeling score (LDS) (Park et al., 2023) and counterfactual retraining (Bae et al., 2024). On OLMo 2 SFT models (OLMo et al., 2024) from 1B to 32B parameters, EOGP more accurately reproduces the reference influence rankings at matched storage budgets. Even with less than 16 KB per example, it remains competitive with all tested compression baselines allocated over 100 times as much storage. These results show that compact, reusable gradient representations can retain useful attribution information at substantially lower storage cost.

References (60)

  • QLESS: A quantized approach for data valuation and selection in large language model fine-tuning (opens arXiv in a new tab)
  • If influence functions are the answer, then what is the question? Advances in Neural Information Processing Systems, 35:17953–17967, 2022
  • Training data attribution via approximate unrolling
  • Scalable influence and fact tracing for large language model pretraining
  • Influence-preserving proxies for gradient-based data selection in LLM fine-tuning
  • Advances in Neural Information Processing Systems, 38:145944–145985, 2025
  • IF-Guide: Influence function-guided detoxification of LLMs
  • The approximation of one matrix by another of lower rank
  • Fast approximate natural gradient descent in a Kronecker factored eigenbasis
  • Roger Grosse, Juhan Bae, Cem Anil, Nelson Elhage, Alex Tamkin, Amirhossein Tajdini, Benoit Steiner, Dustin Li, Esin Durmus, Ethan Perez, et al. Studying large language model generalization with influence functions. arXiv preprint arXiv:2308.03296, 2023. (opens arXiv in a new tab)
  • FastIF: Scalable influence functions for efficient model interpretation and debugging
  • Interaction-aware influence functions for group attribution (opens arXiv in a new tab)
  • GraSS: Scalable data attribution with gradient sparsification and sparse projection
  • Cumulated gain-based evaluation of IR techniques
  • Understanding black-box predictions via influence functions
  • Which data attributes stimulate math and code reasoning? An investigation via influence functions
  • DataInf: Efficiently estimating data influence in LoRA-tuned LLMs and diffusion models
  • Tulu 3: Pushing Frontiers in Open Language Model Post-Training
  • LoRIF: Low-rank influence functions for scalable training data attribution (opens arXiv in a new tab)
  • Optimizing neural networks with Kronecker-factored approximate curvature
  • Pointer Sentinel Mixture Models
  • Team OLMo, Pete Walsh, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Shane Arora, Akshita Bhagia, Yuling Gu, Shengyi Huang, Matt Jordan, et al. 2 OLMo 2 furious. arXiv preprint arXiv:2501.00656, 2024. (opens arXiv in a new tab)
  • TRAK: Attributing model behavior at scale
  • Estimating training data influence by tracing gradient descent
  • Language models are unsupervised multitask learners
  • XNOR-Net: ImageNet classification using binary convolutional neural networks
  • Procedural knowledge in pretraining drives reasoning in large language models
  • Scaling up influence functions
  • LESS: Selecting influential data for targeted instruction tuning
  • HyperINF: Unleashing the HyperPower of the Schulz's method for data influence estimation (opens arXiv in a new tab)
  • If it is zero, both sides are zero
  • The second uses $\mu_j \ge \mu_k$ for $j \le k$ and $\alpha_j \le 1$
  • Then $R = U U^\top$, so
  • Thus $Q_m P$ minimizes reconstruction error over all k-dimensional subspaces of range( $Q_m$)
  • This subspace is feasible for the restricted problem, so the restricted minimum is at most the full-space minimum
  • We write $g_{i,u}$ and $q_u$ for the training and query gradient blocks of module $u$
  • The same realized transform is used for gradient storage and query projection
  • Computing signs and scales from an already projected training representation costs $O(\sum_u k_u)$ operations
  • The GPT-2 attribution checkpoint is fine-tuned using the protocol in Appendix D.1
  • Both training and query gradients use token-summed next-token cross entropy
  • For OLMo 2, EOGP, LoGra, GraSS, and LoRIF fit their curvature estimates on the same 10,000 conversations
  • Under our removal-based influence convention, the predicted subset score is
  • We use average ranks for ties
  • We use a set S of five seeds, matched across methods
  • For each configuration, all metrics use the same attribution score matrix
  • The resulting correlations are
  • Let $\mathcal{U}$ denote the attributed modules, $m_u$ and $k_u$ the first-stage and final output dimensions of module $u$, respectively, and $N_{\text{store}}$ the number of stored examples
  • Uncompressed gradients cover the attributed parameters, and one-bit representations include packed signs and FP16 scales
  • This cost is independent of the number of stored examples, so its relative contribution decreases as the store grows
  • For example, keeping $m_u$ unchanged and reducing $k_u$ to 256 lowers the total correction-matrix storage to approximately 60.1 GB for the 32B model
  • Per-example budgets count representation payloads, with shared artifacts accounted for separately
  • Both EOGP and EOGP-R use $2048/8 + 2 = 258$ bytes per module per example
  • Fitting starts from cached coordinates and includes saving the correction matrices
  • >Model</td><td rowspan=
  • NDCG@20 (left) and Spearman correlation (right) measure agreement with EK-FAC influence at matched per-example storage budgets
  • On OLMo 2 7B SFT, EOGP substantially outperforms both variants at matched per-example storage budgets, showing that matching the reference curvature alone does not explain its advantage
  • One possible explanation is that estimating curvature after projection accounts for the variances and correlations of the retained coordinates, whereas applying half-whitening before projection produces a different transformation
  • We report the median of the query-wise correlations over 481 queries
  • Horizontal lines denote uncompressed references
  • LoGra and GraSS show substantially weaker agreement in several configurations