Improving Linear System Solvers for Hyperparameter Optimisation in Iterative Gaussian Processes

Jihao Andreas Lin, Shreyas Padhy, Bruno Kacper Mlodozeniec, Javier Antoran, José Miguel Hernández-Lobato

TL;DR

This paper introduces three general-purpose techniques—pathwise gradient estimation, warm starting, and cumulative early stopping—to drastically accelerate hyperparameter optimization in iterative Gaussian Processes (GPs). By leveraging previous computations and smarter mathematical estimators, the authors achieve up to $72\times$ speedups across various linear solvers without sacrificing predictive performance, making GPs significantly more viable for massive datasets.

The Scaling Problem in Gaussian Processes

Gaussian Processes are the "gold standard" for probabilistic modeling due to their excellent uncertainty estimates and data efficiency. However, they have a notorious scaling problem: training them involves inverting a kernel matrix, which costs $O(n^3)$ time and $O(n^2)$ memory for $n$ data points.

To handle large datasets, researchers often turn to iterative methods. Instead of a direct matrix inversion, they use solvers like Conjugate Gradients (CG) or Stochastic Gradient Descent (SGD) to solve linear systems ($Ax=b$). While this is more efficient, hyperparameter tuning requires solving these systems hundreds of times as the model parameters evolve. These "inner-loop" solves remain the primary computational bottleneck, often converging slowly as the system becomes poorly conditioned during training.

Proposed Methods

The authors propose a hierarchical view of GP optimization and introduce three key improvements to the linear system solver step:

The hierarchical structure of iterative GP optimization.
  1. Pathwise Gradient Estimator: Standard methods use the Hutchinson trace estimator to approximate the gradient of the marginal likelihood. The authors propose a "pathwise" version that absorbs the inverse kernel matrix into the distribution of the probe vectors. This ensures the solution stays closer to the origin, allowing solvers to converge much faster.
  2. Warm Starting: Most solvers start from zero at every optimization step. Since hyperparameters usually change only slightly between steps, the authors propose "warm starting" the solver with the solution from the previous step.
  3. Cumulative Early Stopping: On massive datasets, solving to full numerical tolerance is impossible. The authors show that warm starting allows solver progress to "accumulate" over multiple optimization steps. Even if you stop a solver early (e.g., after only 10 iterations), the next step starts where the last one left off, eventually reaching a high-quality solution.

Key Insights

  • The "Distance" Advantage: The mathematical core of the pathwise estimator is that it keeps the "initial distance" to the solution constant. In standard estimators, as the GP fits the data better (and noise precision increases), the solution moves further from the origin, making the solver work harder. The pathwise estimator avoids this "moving goalpost" problem.
  • Amortized Predictions: A beautiful side effect of the pathwise estimator is that the linear solve used for the gradient can be directly transformed into posterior samples. This means you get model predictions almost "for free" after finishing the training step.
  • The Bias-Variance Tradeoff: Warm starting technically introduces bias because it reuses probe vectors across steps. However, the authors provide a theoretical proof showing that the optimization still converges to the true maximum likelihood estimate as the number of samples increases.
  • Visualizing the Start: Warm starting places the initial guess much closer to the actual quadratic minimum compared to starting at the origin, drastically cutting down the required solver iterations.

Key Results

The methods were evaluated on a wide range of regression tasks from the UCI Machine Learning Repository, ranging from small datasets to large-scale tasks with up to 1.8 million data points.

Runtime comparison across different solvers and datasets.
  • Massive Speedups: Combining pathwise estimation and warm starting yielded average speedups of up to $72\times$ for Alternating Projections (AP) and significant gains for CG and SGD.
  • Better Convergence: When restricted to a strict compute budget (early stopping), the proposed techniques decreased the average residual norm (a measure of solver error) by up to $7\times$.
  • Solver Robustness: The authors found that while CG is very fast when solving to high precision, AP and SGD are much more robust when forced to stop early, making them better candidates for truly "big data" scenarios.

Limitations and Future Work

  • Random Feature Dependence: The pathwise estimator requires sampling from the GP prior. For large datasets, this necessitates using approximations like Random Fourier Features. While the authors show this works well in practice, it adds a layer of approximation.
  • Residual Norm vs. Performance: An interesting finding was that a lower residual norm (more "accurate" linear solve) doesn't always translate to better test performance. This suggests that the community needs better metrics for determining when a solver has done "enough" work for the sake of the outer optimization loop.
  • Hyperparameter Sensitivity: The performance of SGD is still sensitive to the choice of learning rate, which can change as the hyperparameters evolve. Automating this tuning remains a challenge.

Summary updated

BibTeX
@inproceedings{lin2024improving,
  author = {Jihao Andreas Lin and Shreyas Padhy and Bruno Kacper Mlodozeniec and Javier Antoran and José Miguel Hernández-Lobato},
  title = {{Improving Linear System Solvers for Hyperparameter Optimisation in Iterative Gaussian Processes}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=CAdBTYBlOv},
}
Figure