Amortized Inference for Gaussian Process Hyperparameters of Structured Kernels

Matthias Bitzer, Mona Meister, Christoph ZimmerUAI 2023

Introduction

Gaussian Processes (GPs) are considered the "gold standard" for regression and Bayesian optimization due to their robust uncertainty estimates. However, their primary drawback is the computational intensity of training. To deploy a GP, one must optimize hyperparameters (such as lengthscales or noise levels) through iterative Type-2 Maximum Likelihood estimation. This process is computationally expensive ($O(n^3)$ per step) and often converges to local optima.

While previous "amortized inference" techniques have attempted to replace this optimization with neural network predictions, they were typically limited to a fixed kernel structure (e.g., only RBF kernels). This research introduces a framework that amortizes inference over the combined space of datasets and arbitrary symbolic kernel structures, allowing for a truly flexible, one-shot GP training process.

Methodology

The authors propose a framework that treats kernels as symbolic expressions (e.g., $SE \times LIN + PER$) derived from a structured grammar. This allows the model to process a vast family of kernels as sequences of symbols.

The full architecture of the proposed framework, showing the interaction between the Dataset Encoder, the Kernel Encoder-Decoder, and the final hyperparameter output layer.

The architecture consists of three core modules:

  1. Dataset Encoder: A Transformer-based module that creates permutation-invariant embeddings for the data.
  2. Kernel Encoder-Decoder: A novel block that "cross-pollinates" information between the symbolic kernel description and the dataset embeddings.
  3. Output Layer: A flexible head that maps these embeddings to the specific parameter spaces required by the chosen kernel.

The model is trained on 9 million simulated datasets generated from various GP priors. This simulation-based training enables the model to generalize to real-world data without task-specific retraining, effectively "teaching" the network the characteristics of optimal GP fits.

Key Results and Insights

The proposed method achieves a massive 800x speedup over traditional optimization methods while maintaining competitive accuracy across seven real-world benchmark datasets (including Energy, Concrete, and Wine).

A qualitative example of a GP regression fit using a linear (LIN) kernel structure with hyperparameters predicted by the amortized model.

Key Advantages:

  • Zero-Shot Inference: The model can predict hyperparameters for brand-new datasets and kernels instantly, often outperforming 100 steps of gradient descent.
  • Fast Ensembling: The speed of inference allows for Bayesian Model Averaging, where multiple kernel structures are evaluated simultaneously and their predictions averaged for increased robustness.
  • Inductive Bias: By respecting natural symmetries (like permutation invariance), the model generalizes effectively to unseen data distributions.

Limitations and Future Work

Despite its speed, the model tends to be conservative, often favoring broader uncertainty intervals. Additionally, while faster than $O(n^3)$ optimization, the Transformer's attention mechanism is $O(n^2)$ relative to the number of data points. Future work will likely explore sparse attention layers to scale the framework to even larger datasets and refine the model's ability to capture long-range periodic structures.

Summary updated

BibTeX
@inproceedings{bitzer2023amortized,
  author = {Matthias Bitzer and Mona Meister and Christoph Zimmer},
  title = {{Amortized Inference for Gaussian Process Hyperparameters of Structured Kernels}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
}
Figure