Modeling All Response Surfaces in One for Conditional Search Spaces

Jiaxing Li, Wei Liu 0005, Chao Xue, Yibing Zhan, Xiaoxing Wang, Weifeng Liu 0001, Dacheng Tao

Abstract

Bayesian Optimization (BO) in conditional search spaces, such as those found in Automated Machine Learning (AutoML), typically involves building separate surrogate models for different algorithm branches. This approach is data-inefficient and fails to capture shared information across subspaces. We present AttnBO, a unified framework that treats hyperparameter configurations as sequences and employs a Transformer-based deep kernel to model the entire search space as a single response surface. By utilizing structure-aware embeddings and attention mechanisms, AttnBO maps diverse hierarchical structures into a unified latent space for Gaussian Process modeling. Experimental results across synthetic benchmarks, Neural Architecture Search, and OpenML tasks demonstrate that AttnBO significantly improves sample efficiency and outperforms existing state-of-the-art methods.

Introduction

In traditional Bayesian Optimization (BO), search spaces are often assumed to be "flat," where every configuration shares the same dimensions. However, real-world AutoML tasks—such as Combined Algorithm Selection and Hyperparameter optimization (CASH)—are inherently "conditional." For instance, selecting a Support Vector Machine (SVM) vs. an XGBoost model activates entirely different sets of hyperparameters. This creates a tree-structured search space with multiple distinct subspaces.

Current state-of-the-art methods often build separate Gaussian Process (GP) models for each branch. This approach is data-hungry and ignores potential correlations between parameters (e.g., "learning rate") that may behave similarly across different algorithms. The core challenge addressed in this work is building a single, unified model capable of understanding and navigating these diverse structures simultaneously.

Methodology: The AttnBO Framework

The authors propose AttnBO, which treats a hyperparameter configuration as a sequence of tokens and processes them using a unified surrogate model. The architecture is divided into three primary components:

  1. Structure-aware Hyperparameter Embedding: Each hyperparameter is encoded into a vector capturing its Identity, Index (for vector-valued parameters), Value, and Father Identity (the parent node it depends on). This encoding preserves the hierarchical tree structure within the embedding space.
  2. Attention-based Deep Feature Extractor: A Transformer encoder, consisting of six attention blocks, processes these embeddings. The attention mechanism naturally handles variable-length sequences, allowing the model to compare configurations from different subspaces and project them into a unified, fixed-dimension latent space.
  3. Deep Kernel Gaussian Process (DKGP): A standard GP is constructed on top of the latent space using a Matern 5/2 kernel. The entire pipeline is trained end-to-end by maximizing the log marginal likelihood.
The AttnBO architecture: from structure-aware embeddings to a unified latent space for GP-BO.

Unlike previous methods like AddTree, AttnBO supports parallel optimization, enabling the suggestion of a batch of queries in a single iteration.

Experimental Evaluation

AttnBO was evaluated across several diverse benchmarks:

  • Synthetic Simulation: A tree-structured function with 9 hyperparameters and 6 subspaces.
  • Neural Architecture Search (NAS): A complex space for CIFAR-10 models with 29 to 47 hyperparameters.
  • OpenML Tasks: Real-world tabular datasets involving SVM, XGBoost, and combined CASH tasks.
  • HPO-B Benchmark: A large-scale benchmark (935 tasks) used to assess meta-learning and "warm-starting" capabilities.

Key Results and Insights

The primary insight of AttnBO is treating hyperparameters as "tokens" in a sequence, similar to language modeling. This allows the self-attention mechanism to learn global dependencies that traditional tree-based kernels miss. By breaking down the silos between subspaces, information learned in one branch (e.g., SVM) can inform the model about another (e.g., XGBoost).

Performance comparison on synthetic simulation: AttnBO achieves significantly lower regret faster than baselines.

Key findings include:

  • Superior Performance: AttnBO consistently outperformed baselines such as SMAC, TPE, and AddTree.
  • Sample Efficiency: On simulation tasks, AttnBO reached optimal performance with roughly half the observations required by independent GP models.
  • Meta-Learning: In the HPO-B benchmark, AttnBO demonstrated strong transfer learning capabilities, achieving competitive results against specialized state-of-the-art methods.

Conclusion

AttnBO represents a significant step toward unified modeling in complex AutoML search spaces. By leveraging Transformer architectures to "flatten" hierarchical trees into a continuous latent space, it enables more efficient and parallelizable Bayesian Optimization. While the Transformer encoder adds computational overhead (~17 mins vs ~12 mins per 100 iterations), this is often negligible compared to the cost of evaluating expensive black-box functions. Future work will explore the scalability of the attention mechanism as the number of subspaces grows and its application to even larger-scale meta-learning domains.

Summary updated

BibTeX
@inproceedings{li2025modeling,
  author = {Jiaxing Li and Wei Liu and Chao Xue and Yibing Zhan and Xiaoxing Wang and Weifeng Liu and Dacheng Tao},
  title = {{Modeling All Response Surfaces in One for Conditional Search Spaces}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i17.34016},
}
Figure