Iterative Approximate Cross-Validation

Yuetian Luo, Zhimei Ren, Rina BarberICML 2023

TL;DR

Researchers have developed Iterative Approximate Cross-Validation (IACV), a new method to estimate leave-one-out cross-validation (LOO-CV) errors without waiting for models to finish training. Unlike previous approximations that only work at convergence, IACV provides accurate error estimates throughout the entire optimization process, making it ideal for large-scale machine learning and early-stopping scenarios.

What Problem Does This Paper Address?

Cross-validation is the gold standard for assessing how well a model will perform on unseen data. However, "leave-one-out" CV is notoriously expensive: if you have 1,000 data points, you have to train your model 1,000 times.

To save time, researchers previously developed "shortcuts" like the Newton Step (NS) or Infinitesimal Jackknife (IJ). These methods use the final trained model to "guess" what the model would have looked like if one data point were missing. The catch? These shortcuts assume you have found the exact mathematical minimum of your loss function. In modern deep learning and large-scale statistics, we rarely reach that point—we often stop early to prevent overfitting or because we run out of compute. When these existing shortcuts are used on partially trained models, their accuracy collapses.

Methods

The authors introduce IACV, which tracks the "leave-one-out" models alongside the main model as it trains.

  1. Iterative Tracking: Instead of a one-time correction at the end, IACV updates its approximation at every step of the optimization (e.g., every step of Gradient Descent).
  2. Taylor Expansion Shortcut: To avoid the cost of actually training $n$ separate models, IACV uses a Taylor expansion of the gradient. Crucially, it performs this expansion around the current iterate of the full-data model. This allows the computation to be shared across all $n$ leave-one-out approximations.
  3. Broad Applicability: The paper provides specific formulations for three major optimization families:
  4. Gradient Descent (GD)
  5. Stochastic Gradient Descent (SGD)
  6. Proximal Gradient Descent (ProxGD) (used for models with non-smooth penalties like Lasso).

Datasets

The researchers evaluated IACV using synthetic datasets designed to simulate common statistical challenges:

  • Logistic Regression: Data generated with $p=20$ dimensions and sample sizes ranging from $n=250$ to $n=5000$.
  • Regularization: They tested both Ridge (smooth) and Lasso (non-smooth) penalties to verify the method's robustness across different objective functions.

Key Insights and Ideas

  • Accuracy Along the Trajectory: The most significant "aha moment" is that IACV remains accurate even when the model is far from convergence. While NS and IJ methods produce massive errors early in training, IACV tracks the true CV loss almost perfectly from the start.
IACV maintains low error throughout training compared to NS and IJ methods.
  • Convergence to Newton Step: The authors prove theoretically that if you do run the algorithm to completion, IACV naturally converges to the standard Newton Step approximation. It is essentially a generalization that makes CV approximation "safe" at any timestamp.
  • Efficiency via Separability: Because Empirical Risk Minimization (ERM) involves summing losses over individual data points, the authors show that the Hessian and gradient calculations required for IACV can be computed very efficiently, avoiding the $O(n^2)$ bottleneck.

Key Results

  • Speedup: In simulations with $n=1000$, IACV was approximately 6-7 times faster than running exact leave-one-out cross-validation.
  • Theoretical Guarantees: The authors established that the approximation error for GD is $O(1/n^2)$, matching the best-known rates for converged models but applying it to the entire training path.
  • SGD Performance: For Stochastic Gradient Descent, the error scales at $O(1/nK)$ (where $K$ is batch size). While slightly higher than the GD rate, it still offers a massive improvement over baseline estimates.
Comparison of approximation error, relative CV error, and runtime.

Limitations and Future Work

  • Memory Overhead: IACV requires storing the data, gradients, and Hessians, leading to a memory cost of $O(np + p^2)$. While manageable when $n \gg p$, it could be a constraint for extremely high-dimensional models.
  • High-Dimensional Settings: The current theoretical guarantees assume the Hessian is well-conditioned (the "$n > p$" regime). The authors suggest that future work could adapt IACV for high-dimensional cases ($p > n$) by running the approximation on a selected "active set" of features, similar to existing work in Lasso optimization.
  • Non-Convexity: While the method shows promise, the current theory relies on certain regularity and convexity conditions. Extending these guarantees to non-convex landscapes (like deep neural networks) remains an open challenge.

Summary updated

BibTeX
@inproceedings{luo2023iterative,
  author = {Yuetian Luo and Zhimei Ren and Rina Barber},
  title = {{Iterative Approximate Cross-Validation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=BZDqjqbJmg},
}
Figure