Skip to main content
QUICK REVIEW

[Paper Review] Towards Learning Universal Hyperparameter Optimizers with Transformers

Yutian Chen, Xingyou Song|arXiv (Cornell University)|May 26, 2022
Machine Learning and Data ClassificationComputer Science19 citations
TL;DR

This paper introduces OptFormer, a universal hyperparameter optimization framework based on Transformers that learns both policy and function priors from diverse, real-world HPO data, such as Google's Vizier database. It outperforms Gaussian Processes and multiple HPO baselines by jointly predicting hyperparameter suggestions and objective function values, achieving superior calibration and generalization across varied search spaces and out-of-distribution tasks.

ABSTRACT

Meta-learning hyperparameter optimization (HPO) algorithms from prior experiments is a promising approach to improve optimization efficiency over objective functions from a similar distribution. However, existing methods are restricted to learning from experiments sharing the same set of hyperparameters. In this paper, we introduce the OptFormer, the first text-based Transformer HPO framework that provides a universal end-to-end interface for jointly learning policy and function prediction when trained on vast tuning data from the wild, such as Google's Vizier database, one of the world's largest HPO datasets. Our extensive experiments demonstrate that the OptFormer can simultaneously imitate at least 7 different HPO algorithms, which can be further improved via its function uncertainty estimates. Compared to a Gaussian Process, the OptFormer also learns a robust prior distribution for hyperparameter response functions, and can thereby provide more accurate and better calibrated predictions. This work paves the path to future extensions for training a Transformer-based model as a general HPO optimizer.

Motivation & Objective

  • To overcome the limitation of existing meta-learning HPO methods that require identical hyperparameter spaces across tasks.
  • To enable end-to-end learning of both hyperparameter selection policies and objective function priors from heterogeneous, real-world HPO data.
  • To develop a universal, text-based interface for modeling diverse HPO experiments using sequence modeling with Transformers.
  • To improve optimization performance by augmenting the model’s policy with acquisition functions like Expected Improvement.
  • To demonstrate robustness and generalization of the learned optimizer on out-of-distribution and unseen HPO tasks.

Proposed method

  • Transforms hyperparameter trials and metadata into a sequence of text tokens using a serialization scheme, enabling sequence modeling with Transformers.
  • Trains a supervised Transformer model to predict both future hyperparameter suggestions and corresponding objective function values from historical trajectories.
  • Leverages the model’s own function predictions during inference to refine hyperparameter selection via acquisition functions such as Expected Improvement.
  • Uses a universal interface to handle diverse search spaces and hyperparameter types, including continuous, discrete, and categorical variables.
  • Applies a self-supervised pretraining strategy on large-scale HPO data to learn rich priors over objective functions.
  • Augments the base policy with model-based optimization strategies, enabling online adaptation and improved sample efficiency.

Experimental results

Research questions

  • RQ1Can a single Transformer-based model learn to imitate multiple distinct HPO algorithms across diverse hyperparameter search spaces?
  • RQ2How well can a Transformer-based model learn a robust prior over objective functions compared to Gaussian Processes, especially in terms of predictive calibration and log-likelihood?
  • RQ3Can the integration of acquisition functions (e.g., Expected Improvement) with a learned policy improve optimization performance in online settings?
  • RQ4How does the model generalize to out-of-distribution HPO tasks not seen during training, such as neural architecture search or real-world ML hyperparameter tuning?
  • RQ5To what extent does the model’s performance depend on data diversity and the heterogeneity of hyperparameter spaces in the training data?

Key findings

  • OptFormer successfully imitates at least seven different HPO algorithms, including non-adaptive, evolutionary, and Bayesian methods, using a single unified architecture.
  • The model achieves significantly better log-predictive likelihood and expected calibration error (ECE) than Gaussian Processes on both public and private datasets.
  • OptFormer (EI), the policy augmented with Expected Improvement, outperforms all baselines—including Vizier and HyperBO—across all trial steps on HPO-B and RealWorldData.
  • The model generalizes robustly to out-of-distribution tasks, achieving comparable or better performance than Vizier on BBOB benchmark functions and real-world ML tuning tasks like NASBench-201 and CIFAR-10.
  • Ablation studies confirm that Expected Improvement yields the best performance among acquisition functions, while Thompson Sampling and PI show slower but sustained improvement.
  • The model demonstrates resilience to function outliers and non-i.i.d. surrogate functions, unlike GP-based methods such as HyperBO, which are sensitive to data generation assumptions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.