TL;DR
This paper investigates how different approximations of the Hessian matrix affect the accuracy of influence functions, a method for understanding which training data points most influence a model's predictions. They find that better Hessian approximations consistently lead to more reliable influence scores, and crucially, that the Kronecker factorization step in methods like K-FAC is the primary source of error, more so than initial linearizations or block-diagonal assumptions.
What Problem Does This Paper Address?
Understanding why a machine learning model makes a particular prediction is crucial for debugging, fairness, and scientific discovery. Influence functions offer a principled way to do this by tracing a model's output back to individual training data points. However, calculating influence functions requires inverting the Hessian matrix of the model's loss function. For large, modern deep learning models, this Hessian is enormous and ill-conditioned, making exact computation intractable. Various approximations, like the Generalised Gauss-Newton (GGN) and Kronecker-Factored Approximate Curvature (K-FAC), have been proposed to make this feasible. The core problem this paper addresses is: how much do these approximations degrade the quality of influence function attributions, and which parts of the approximation process are most detrimental? It's not immediately obvious that better Hessian approximations should lead to better influence scores, as influence functions might be robust to certain types of approximation errors.
Methods
The authors systematically decompose the K-FAC approximation into three key steps:
- Implicit Model Linearization: Replacing the full Hessian with the Generalised Gauss-Newton (GGN) matrix. This removes non-linear curvature terms from the loss function, focusing on output-space curvature.
- Block-Diagonal Approximation: Approximating the GGN by assuming independence between blocks of parameters (e.g., layers). This allows for parallel computation and reduces the inversion cost.
- Pre-post Activation Approximation (Kronecker Factorization): Using a separable Kronecker structure to approximate the covariance between pre-activation gradients and inputs within each block. This is the core of K-FAC.
They then introduce Eigenvalue Correction (EK-FAC), which uses the same Kronecker eigenbasis as K-FAC but corrects the per-direction scaling to better match empirical curvature.
To evaluate the impact of these approximations, they design controlled experiments varying:
- Training duration: Observing how approximations behave from early to late training stages.
- Network depth: Investigating how deeper, more complex architectures affect approximation fidelity.
- Network width: Examining the impact of wider networks.
They use two primary evaluation metrics:
- Linear Data-modelling Score (LDS): A measure of how well influence attributions predict the outcome of removing subsets of training data (Expected Leave-Some-Out retraining).
- Approximation Error: A direct measure of how closely the approximated Hessian-vector product matches the true Hessian-vector product.
Datasets
The experiments were conducted on the Digits dataset, which consists of 1,797 greyscale images of handwritten digits (0-9). Each 8x8 image was converted into a 64-dimensional vector. The data was split into 1,617 training samples and 179 test samples. The models used were multi-layer perceptrons (MLPs) with Tanh activation functions.
Key Insights and Ideas
- Better Hessians = Better Influences: The paper provides strong empirical evidence that improving the fidelity of Hessian approximations consistently leads to higher quality influence function attributions. This validates recent research efforts in this direction.
- Kronecker Factorization is the Bottleneck: The most significant source of error and loss in influence attribution quality stems from the Kronecker factorization step within K-FAC. This suggests that while GGN and block-diagonal approximations have some impact, the way K-FAC approximates the covariance structure within blocks is the primary culprit for degraded performance.
- Eigenvalue Correction Helps, But Doesn't Solve: EK-FAC, which corrects the scaling within the K-FAC eigenbasis, consistently outperforms K-FAC. However, it doesn't fully recover the influence quality lost by the factorization, highlighting that the underlying eigenbasis choice itself can be problematic.
- Depth Exacerbates Approximation Issues: The negative impact of approximations, particularly the block-diagonal assumption and Kronecker factorization, becomes more pronounced as network depth increases. This is linked to increased cross-layer coupling.
- Early Training is Most Sensitive to GGN: In the early stages of training, the initial step of approximating the Hessian with the GGN has the largest impact on influence fidelity, even though its absolute error contribution might be smaller later on.
Key Results
- Across all experimental settings (training duration, depth, width), a consistent inverse relationship was observed between Hessian approximation error and influence fidelity (LDS).
- The EK-FAC → K-FAC step was the dominant contributor to the total Hessian→K-FAC error gap, accounting for approximately 40-60% of the error in epoch sweeps and around 50-65% in depth sweeps.
- The GGN → Block-GGN step contributed a smaller but increasing share of error with depth, consistent with increasing cross-layer coupling.
- At 10 epochs, the Hessian → GGN substitution showed a large LDS drop (≈ -71.6 pp) for a small error share (≈3.5%), indicating high sensitivity early in training.
- As depth increased, sensitivity shifted towards the block-diagonal approximation, with larger LDS losses per unit of error.
- EK-FAC consistently achieved higher eigenvalue overlap with the true GGN than K-FAC, demonstrating its spectral improvement, but neither matched the full block-diagonal GGN.
Limitations and Future Work
- Architecture and Scale: The study was limited to small MLPs due to computational constraints. The results might not transfer directly to larger models, CNNs, or transformers, which have different curvature structures. Wider networks might behave closer to the Neural Tangent Kernel (NTK) regime, potentially altering the relative benefits of approximations.
- Evaluation Design: The use of an eigendecomposition pseudo-inverse with a hard threshold introduces bias by discarding small-magnitude modes. The paper did not ablate this threshold or compare it extensively with other regularization techniques like Tikhonov damping.
- Future Work: The authors suggest further investigation into the sensitivity of these controls (e.g., the pseudo-inverse threshold) and a more systematic ablation study. They also highlight the need for replication at larger scales and on different architectures to draw more general conclusions. The impact of these approximations on specific downstream tasks beyond influence functions could also be explored.
Summary updated