TL;DR
Influence functions offer a principled way to trace a model’s predictions back to specific training data points, but computing them for billion-parameter models is bottlenecked by massive gradient sizes and Hessian inversions. This paper shows that randomly dropping most gradient coordinates (gradient dropout) drastically cuts compression time and memory overhead down to $O(r)$ while achieving tighter theoretical error bounds and matching or outperforming expensive dense projection methods.
What Problem Does This Paper Address?
Understanding which training examples drive model behavior is crucial for detecting mislabeled data, pruning datasets, and interpreting model outputs. The classical statistical tool for this—the influence function—measures how upweighting a single training example changes the model's loss on a test point.
However, evaluating influence functions requires calculating gradients with the same dimensionality $d$ as the model and computing an inverse Hessian-vector product (iHVP). In modern models where $d$ reaches billions:
- Dense Hessian computation and inversion are impossible ($O(d^2)$ memory, $O(d^3)$ compute).
- Existing dimension-reduction techniques (like random Gaussian projections used in TRAK) require storing and multiplying dense matrices of size $r \times d$, which introduces heavy computational ($O(nrd)$) and memory ($O(rd)$) bottlenecks—sometimes exceeding the memory and compute required for the model itself!
Methods
Instead of using dense Gaussian random projection matrices, the authors propose dropout-based gradient compression:
- Coordinate Subsampling: For an original gradient $g \in \mathbb{R}^d$, the method uniformly samples $r$ coordinate indices (where $r \ll d$) and retains only those components, discarding the rest.
- No Explicit Projection Matrix: While theoretically equivalent to multiplying by a sparse binary selection matrix $\tilde{I} \in \{0, 1\}^{r \times d}$, in practice it simply indexes $r$ elements. This slashes projection memory from $O(rd)$ to $O(r)$ and compression compute from $O(nrd)$ to $O(nr)$.
- Subspace iHVP: The compressed gradients $\tilde{g} = \tilde{I}g$ are used to form a downsized $r \times r$ Gauss-Newton Hessian $\tilde{H} = \tilde{I}H\tilde{I}^T$, making the inversion tractable ($O(nr^2 + r^3)$).
Datasets
The authors evaluated the method across several domains, tasks, and architectures:
- GLUE Benchmark: MRPC, QNLI, SST-2, RTE, and CoLA (used for LoRA fine-tuning on RoBERTa in synthetic mislabeled data detection experiments).
- CIFAR-10: Evaluated with ResNet-9 trained from scratch.
- WikiText: Evaluated with fully fine-tuned GPT-2.
- OpenWebText (OWT): Evaluated with fully fine-tuned Pythia (1.4B) and LLaMA-3.2 (1.24B).
No new datasets were introduced; standard public benchmarks were used.
Key Insights and Ideas
- Why Random Dropping Works: Modern deep networks are heavily overparameterized, and their Hessian spectra are dominated by a small number of large outlier eigenvalues while the rest sit near zero. Tracking influence only requires capturing these critical directions, which are distributed across the parameter space.
- Surprising Theoretical Bound: Counterintuitively, simply discarding gradient entries has a smaller theoretical spectral error bound than Gaussian projection:
- Gaussian projection error: $\mathcal{O}(d + d^2 \sigma_{\max}(H))$
-
Dropout compression error: $\mathcal{O}(\sigma_{\max}(H))$ Because $\tilde{I}^T\tilde{I}$ is a binary diagonal matrix whose spectral norm is bounded by 1 (independent of dimension $d$), it avoids the dimension-scaling explosion found in Gaussian random matrix bounds.
-
Efficiency Bottleneck Shift: Prior methods focused solely on speeding up the iHVP step, ignoring that compressing gradients with dense matrices can take longer than computing the gradients themselves.
Key Results
- Mislabeled Data Detection (AUC): On RoBERTa fine-tuned with LoRA (rank 2 and 8), Dropout matched or exceeded Gaussian projection and the exact original influence function across GLUE tasks (e.g., reaching 0.924 AUC on SST-2 vs. 0.920 for Gaussian and 0.502 for Hessian-Free with rank 8).
- Compression Speedup: In GPT-2 experiments, compressing gradients via Dropout took 9.98 seconds, compared to 964.65 seconds for Gaussian projection—a near 100× speedup during compression.
- Retraining Verification: Removing the top influential training examples identified by Dropout led to equal or steeper drops in performance (higher test perplexity / lower test accuracy) than baselines like DataInf, Hessian-Free, and LOGRA on ResNet-9, GPT-2, and Pythia-1.4B.
- Feasibility at Billion-Scale: On 1.4B models where Gaussian projection and exact methods trigger CUDA out-of-memory (OOM) errors, Dropout successfully ran with $r = 512$ while remaining practical on a single 80GB GPU.
Limitations and Future Work
- Variance at Low Compression Sizes ($r$): Discarding entries without mixing leads to higher variance when $r$ is extremely small ($r \le 2$). Performance stabilizes once $r \ge 3$, but tuning $r$ involves a trade-off between speed and variance.
- Raw Gradient Bottleneck Remains: While compression and iHVP calculations are accelerated, computing per-sample gradients for massive training sets upfront remains computationally expensive.
- Pre-training Contamination Effects: Retraining LLaMA-3.2 on OpenWebText showed diminished impact after removing influential data, likely because OpenWebText overlaps heavily with the model's base pre-training data.
Summary updated