Transfer Learning for Bayesian Optimization on Heterogeneous Search Spaces
Abstract
Transfer learning for Bayesian Optimization (BO) typically requires that source and target tasks share identical search spaces. This constraint limits the utility of historical data when tuning models with different hyperparameter configurations. This paper introduces MPHD (Model Pre-training on Heterogeneous Domains), a framework that leverages a neural network to map domain metadata to Gaussian Process (GP) priors. By decoupling domain structure from the optimization process, MPHD enables effective zero-shot transfer across diverse and entirely new optimization landscapes.
Introduction: The Challenge of Heterogeneity
Bayesian Optimization is a powerful tool for tuning "black-box" functions, such as machine learning hyperparameters. Its efficiency relies heavily on the quality of the "prior"—the initial belief about the function's behavior. While transfer learning can inform these priors using past experiments, traditional methods are restricted to homogeneous search spaces. For instance, knowledge gained from tuning a Random Forest cannot easily be applied to a Support Vector Machine because their hyperparameter sets (domains) differ in type and dimensionality.
This paper addresses the "heterogeneous search space" problem. The goal is to enable BO to learn from a diverse library of past tasks, regardless of their specific architecture, to accelerate optimization on novel domains.
Methodology: The MPHD Framework
The proposed MPHD framework introduces a two-step pre-training process that bridges the gap between different search spaces using domain metadata.
- Domain-Specific Contexts: Each search space is represented by a "context vector" ($S$). This vector encodes structural metadata, such as the count of continuous versus discrete dimensions and the total dimensionality of the domain.
- The Mapping Function ($\phi$): A neural network is trained to act as a universal bridge. It takes a domain's context vector as input and predicts the optimal parameters for a Hierarchical Gaussian Process (GP) prior.
- Two-Step Pre-training:
- Step 1: For each individual training domain (e.g., Domain A, Domain B), the optimal GP parameters (length-scales, noise variance) are estimated using Maximum Likelihood Estimation (MLE).
- Step 2: The mapping function $\phi$ is trained to predict these optimal parameters based on the corresponding context vectors.
When encountering a new search space (Domain T), MPHD uses the learned model $\phi$ to instantly generate a high-quality, customized GP prior based solely on the new domain's metadata.
Experimental Evaluation
The authors evaluated MPHD across synthetic and real-world benchmarks to test its generalization capabilities. The core of this evaluation involves "super-datasets" that aggregate information across varied domains.
- Synthetic Super-datasets: Used to verify the model's ability to recover ground-truth priors in a controlled environment.
- HPO-B Benchmark: A massive dataset comprising over 6 million evaluations across 16 distinct search spaces, including XGBoost and Decision Trees.
- PD1 Dataset: Focused on deep learning hyperparameter tuning. This was used for "zero-shot" transfer tests, where the model was trained on HPO-B and tested on the entirely different PD1 ecosystem.
Key Insights and Results
The study yielded several significant findings:
- Metadata as a Predictive Signal: Simple context vectors proved remarkably effective at predicting GP priors. This suggests that optimization landscapes share fundamental structural "shapes" related to their dimensionality and complexity.
- Asymptotic Consistency: The authors provided theoretical proof that MPHD's estimated priors converge to the true underlying distributions as the number of training tasks increases.
- Superior Performance: In "Not Trained on Test" (NToT) scenarios, MPHD consistently outperformed standard BO baselines and existing meta-learning methods. On the PD1 dataset, it achieved lower regret significantly faster than non-transfer methods.
- Robustness: The use of a hierarchical GP allowed the model to better manage the uncertainty inherent in cross-domain transfer, leading to more stable optimization.
Conclusion and Future Directions
MPHD represents a significant step toward universal Bayesian Optimization. By mapping domain metadata to GP priors, it breaks the requirement for identical search spaces in transfer learning.
However, limitations remain. Currently, only the GP prior is meta-learned; future work could involve jointly pre-training the acquisition function. Additionally, incorporating richer metadata—such as dataset statistics or text descriptions of hyperparameters—could further refine the generated priors. Finally, extending the model to handle non-stationary functions would enhance its applicability to even more complex real-world optimization problems.
Summary updated