NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Pre-trained Gaussian Processes for Bayesian Optimization

Zi Wang, George E. Dahl, Kevin Swersky, Chansoo Lee, Zachary Nado, Justin Gilmer, Jasper Snoek, Zoubin Ghahramani

TL;DR

This paper introduces HyperBO, a novel Bayesian Optimization (BO) framework that leverages pre-trained Gaussian Processes (GPs) to automatically learn effective priors from related tasks. This approach significantly reduces the need for manual prior specification, a major bottleneck in applying BO to complex problems like hyperparameter tuning, leading to substantial efficiency gains.

What Problem Does This Paper Address?

Bayesian Optimization (BO) is a powerful technique for optimizing expensive black-box functions, commonly used for hyperparameter tuning in machine learning. However, BO's effectiveness heavily relies on a well-specified prior, which encodes domain knowledge about the function being optimized. For complex problems, like tuning hyperparameters of modern deep learning models, defining such a prior is extremely challenging, even for experts. This difficulty often leads to suboptimal performance or hinders the adoption of BO. The paper addresses this gap by proposing a method to learn these priors automatically from data collected on similar tasks, thereby making BO more accessible and effective.

Methods

The core of the proposed method, HyperBO, lies in pre-training a Gaussian Process (GP). Instead of manually defining a GP prior, the authors train a GP on data from related tasks using a Kullback-Leibler (KL) divergence-based loss function. This pre-trained GP then serves as the prior for BO on a new, unseen task. The paper details two approximations for this pre-training objective: Empirical KL (EKL) and Negative Log Likelihood (NLL). EKL is particularly effective when training data shares common input locations, while NLL offers more flexibility for tasks with differing input locations. HyperBO then uses this pre-trained GP as the prior within a standard BO loop, employing acquisition functions to guide the search for optimal hyperparameters. Theoretically, the authors provide bounds on posterior predictions and regret for HyperBO, demonstrating its effectiveness even without knowledge of the true underlying GP.

Datasets

The paper introduces a new benchmark dataset called PD1 (PD1 Neural Net Tuning Dataset). This dataset comprises hyperparameter tuning data for modern deep learning models, collected by training tens of thousands of configurations of models like ResNet50 on various image, text, and protein sequence datasets. This benchmark is designed to be challenging and relevant for evaluating BO methods in real-world deep learning applications. Additionally, the authors evaluate HyperBO on the HPO-B benchmark, a collection of 16 multi-task BO benchmarks for classic machine learning models.

Key Insights and Ideas

  • Automating Prior Specification: The most significant insight is that domain knowledge for BO can be learned from data on related tasks, rather than requiring manual, often difficult, specification. This democratizes the use of BO for complex problems.
  • Pre-training as Meta-Learning: The pre-training approach is framed as a form of meta-learning, where the model learns "how to learn" by acquiring a good prior from past experiences.
  • GP Priors for Hyperparameter Tuning: The paper demonstrates that pre-trained GPs are particularly well-suited for hyperparameter tuning, a domain where function landscapes are notoriously complex and hard to model.
  • Trade-offs between EKL and NLL: The authors highlight that EKL and NLL have different strengths. EKL leverages correlations in matching-input data, while NLL is more flexible for non-matching inputs, offering a choice based on data structure.
  • Theoretical Guarantees: Providing theoretical bounds on posterior predictions and regret for HyperBO, even without knowing the ground truth GP, is a crucial insight that builds confidence in the method's robustness.

Key Results

  • On average, HyperBO achieved at least 3 times speedup compared to the best competing methods on the PD1 dataset in terms of BO iterations needed to find good hyperparameters.
  • On the HPO-B benchmark, HyperBO achieved an average speedup of at least 10 times compared to competitive baselines.
  • HyperBO variants (H-NLL and H-EKL) consistently outperformed other methods, including baselines and other meta-BO approaches, across various metrics like regret, fraction of tasks solved, and ranking.
  • The study showed that HyperBO benefits from more training tasks and datapoints, and is robust to "negative transfer" effects where related tasks might hinder performance.

Limitations and Future Work

  • Finite Domain Assumption: Theoretical analyses for regret bounds were primarily conducted under assumptions of finite input domains, which may not always hold in practice.
  • Different Search Spaces: The paper acknowledges that handling search spaces where variables have different meanings across tasks (Case II) is more complex and suggests future work in this area, referencing concurrent research.
  • Invalid Evaluations: Real-world BO problems often involve infeasible evaluations (e.g., due to hardware failures or divergent training). The current approach of mapping these to negative values is a simplification, and more principled solutions are needed.
  • Alternative Divergences: While KL divergence was used for pre-training, exploring other divergence measures could offer benefits, especially for GPs with parametric models where KL can be ill-defined.
  • Generalizing to Other Models: The pre-training methodology is described for GPs, but extending it to other functional distributions or probabilistic models for function approximation is a promising avenue.

Summary updated

BibTeX
@article{wang2024pre,
  author = {Zi Wang and George E. Dahl and Kevin Swersky and Chansoo Lee and Zachary Nado and Justin Gilmer and Jasper Snoek and Zoubin Ghahramani},
  title = {{Pre-trained Gaussian Processes for Bayesian Optimization}},
  journal = {Journal of Machine Learning Research},
  year = {2024},
  url = {https://openreview.net/forum?id=edouIGD7WC},
}
Figure