Efficient Two-Stage Gaussian Process Regression Via Automatic Kernel Search and Subsampling

Shifan Zhao, Jiaying Lu, Carl Ji Yang, Edmond Chow, Yuanzhe XiarXiv 2024

Abstract

Gaussian Process Regression (GPR) is widely used in statistics and machine learning for prediction tasks requiring uncertainty measures. Its efficacy depends on the appropriate specification of the mean function, covariance kernel function, and associated hyperparameters. Severe misspecifications can lead to inaccurate results and problematic consequences, especially in safety-critical applications. However, a systematic approach to handle these misspecifications is lacking in the literature. In this work, we propose a general framework to address these issues. Firstly, we introduce a flexible two-stage GPR framework that separates mean prediction and uncertainty quantification (UQ) to prevent mean misspecification, which can introduce bias into the model. Secondly, kernel function misspecification is addressed through a novel automatic kernel search algorithm, supported by theoretical analysis, that selects the optimal kernel from a candidate set. Additionally, we propose a subsampling-based warm-start strategy for hyperparameter initialization to improve efficiency and avoid hyperparameter misspecification. With much lower computational cost, our subsampling-based strategy can yield competitive or better performance than training exclusively on the full dataset. Combining all these components, we recommend two GPR methods—exact and scalable—designed to match available computational resources and specific UQ requirements. Extensive evaluation on real-world datasets, including UCI benchmarks and a safety-critical medical case study, demonstrates the robustness and precision of our methods.

Introduction

Gaussian Process Regression (GPR) is a cornerstone of modern machine learning, particularly valued for its ability to provide calibrated uncertainty estimates alongside point predictions. However, GPR is notoriously sensitive to "misspecification"—errors in defining the mean function, the covariance kernel, or the hyperparameters. In safety-critical domains like medical diagnostics or autonomous robotics, a model that is overconfident yet incorrect is a significant liability. Current literature lacks a systematic methodology to mitigate these risks, often relying on human intuition which can fail in complex data regimes. Furthermore, the $O(n^3)$ scaling of GPR makes iterative manual tuning computationally prohibitive.

Methodology

To address these challenges, we propose a robust framework consisting of three integrated components:

1. Two-Stage Architecture

Standard GPR often assumes a zero-mean prior, which can lead to significant bias if the data exhibits a strong trend. Our framework decouples these tasks. In Stage 1, Kernel Ridge Regression (KRR) is employed to capture the underlying mean trend. In Stage 2, the data is "demeaned" using the Stage 1 results, and a zero-mean GP is applied to the residuals. This separation ensures that the GP focuses exclusively on modeling variance and uncertainty, eliminating mean misspecification bias.

The proposed two-stage GPR framework separating mean prediction and uncertainty quantification.

2. Automatic Kernel Search (AKS)

Kernel selection is often arbitrary. We introduce an AKS algorithm based on a derived probabilistic bound that distinguishes between reducible error (which diminishes with more data) and irreducible noise. By evaluating a dictionary of candidate kernels (e.g., RBF, Matérn-3/2), the algorithm automatically selects the kernel that best aligns with the data's distribution.

3. Subsampling Warm-Start

Hyperparameter optimization is prone to getting stuck in poor local minima. We propose a "warm-start" strategy where the model is initially trained on a small, random subset of the data. The resulting parameters provide a high-quality initialization for full-scale training, improving both convergence speed and final model accuracy.

Experimental Evaluation

The framework was rigorously tested across nine UCI benchmark datasets and two high-stakes medical case studies: clinical note inference (MedNLI) and breast cancer histopathology (BreakHis).

Key Results and Insights

  • Superior Uncertainty Quantification: On datasets like "Naval Propulsion" and "Power Plant," standard GPR often fails, producing massive Negative Log-Likelihood (NLL) values. Our two-stage approach reduces these errors by orders of magnitude, providing reliable confidence intervals.
  • The Bias of Zero-Means: We demonstrate that a standard GP with a zero-mean prior tends to underestimate data-fitting loss, leading to overconfident underfitting. Demeaning the data allows for a more accurate representation of the true variance.
  • Foundation Model Integration: In medical tasks, using the two-stage GP as a final layer for models like ClinicalBERT or ViT outperformed standard methods like Monte Carlo Dropout, particularly in identifying "uncertain" cases that require human review.
Comparison of uncertainty quantification: ground truth (left), a misspecified model with 50% coverage (middle), and the proposed framework achieving 96.67% coverage (right).

Conclusion

The proposed two-stage GPR framework effectively mitigates the risks of model misspecification while improving computational efficiency. While KRR was used for the first stage in this study, future work could explore more complex models like neural networks for mean estimation. Additionally, while the framework shows promise for classification via the Dirichlet trick, developing a native two-stage GP specifically for classification remains an open area for research.

Summary updated

BibTeX
@misc{zhao2024efficient,
  author = {Shifan Zhao and Jiaying Lu and Carl Ji Yang and Edmond Chow and Yuanzhe Xi},
  title = {{Efficient Two-Stage Gaussian Process Regression Via Automatic Kernel Search and Subsampling}},
  year = {2024},
  eprint = {2405.13785},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.13785},
}
Figure