TL;DR
This paper introduces ZeroShotOpt, a novel pretrained transformer model for efficient black-box optimization. By leveraging offline reinforcement learning on millions of synthetic optimization trajectories, ZeroShotOpt achieves robust zero-shot generalization on unseen problems, matching or surpassing state-of-the-art Bayesian optimization methods with significantly reduced hyperparameter tuning.
What Problem Does This Paper Address?
Many real-world scientific and engineering problems involve optimizing expensive, "black-box" functions where direct gradient information is unavailable. Think of tasks like discovering new drug formulations or optimizing material properties, where each evaluation (e.g., a lab experiment or simulation) is costly and time-consuming. Traditional methods like Bayesian Optimization (BO) are effective but heavily rely on carefully tuned hyperparameters (like kernel choices and acquisition functions) that are problem-specific and difficult to optimize themselves. This often requires expert knowledge and additional evaluations, defeating the purpose of efficiency. The core challenge is to create a general-purpose optimizer that can perform well across diverse problems with minimal tuning and a limited budget of function evaluations.
Methods
The authors propose ZeroShotOpt, a pretrained transformer model inspired by Decision Transformer for offline reinforcement learning. Here's a breakdown of their approach:
- Data Generation: They created a massive dataset of synthetic optimization trajectories. This involved:
- Gaussian Process (GP) Function Generation: Using GPs to generate millions of diverse, continuous black-box functions across dimensions 2D to 20D. This allows for control over function complexity and landscape.
- Expert Trajectory Collection: Running 12 different Bayesian Optimization variants (with various kernel and acquisition function combinations) on these synthetic functions to generate "expert" optimization trajectories. These trajectories represent successful optimization paths.
- Model Architecture: A causal decoder-only transformer model is employed. It takes historical query points and their function values as input and predicts the next optimal query point. Crucially, it's conditioned on desired "trajectory quality" (defined as normalized regret) and the evaluation budget.
- Training: The transformer model is trained using offline reinforcement learning on the collected synthetic trajectories. The objective is to learn a policy that can generate efficient optimization paths without direct interaction during training.
- Inference: At inference time, ZeroShotOpt is given a few initial random samples and then iteratively proposes new points to evaluate. It aims to achieve a target regret (set to zero for best performance) within the specified evaluation budget. They also developed a specific "Scaled High" inference scaling strategy to handle the lack of information about the function's range during inference.
Datasets
- Training Data: The paper introduces a novel, large-scale dataset consisting of approximately 19.2 million synthetic optimization trajectories. These trajectories were generated from 1.6 million diverse synthetic Gaussian Process (GP) functions across dimensions 2D to 20D, using 12 different Bayesian Optimization (BO) variants.
- Evaluation Datasets:
- In-distribution: A test set of GP functions similar to those used for training.
- Out-of-distribution: * BBOB (Black-Box Optimization Benchmarking): A standard suite of 24 diverse, unconstrained optimization functions.
- VLSE (Virtual Library of Simulation Experiments): A benchmark suite for simulating real-world optimization problems.
- HPO-B (Hyperparameter Optimization Benchmark): A dataset derived from real-world machine learning hyperparameter tuning tasks.
Key Insights and Ideas
- Leveraging Offline RL for Optimization: The core idea of framing optimization as a sequence prediction problem solvable with offline reinforcement learning is powerful. It allows learning from pre-recorded "expert" behavior without needing to interact with the expensive black-box function during training.
- Synthetic Data is Key: Generating millions of diverse synthetic functions and expert trajectories is crucial for training a robust, generalizable model. This allows the model to learn underlying optimization principles rather than memorizing specific problem instances.
- Zero-Shot Generalization is Achievable: The model demonstrates impressive performance on entirely unseen functions (out-of-distribution) without any task-specific fine-tuning, highlighting the effectiveness of the pretraining strategy.
- Transformer's Sequential Modeling Power: Transformers are well-suited to capture the sequential nature of optimization, where each decision (choosing the next point) depends on past observations.
- Fine-tuning for Domain Adaptation: While the model excels at zero-shot learning, fine-tuning it on smaller, domain-specific datasets (like HPO-B) further boosts its performance, suggesting a hybrid approach is viable.
Key Results
- State-of-the-Art Performance: ZeroShotOpt consistently achieves top-tier performance across various benchmarks (GP, BBOB, VLSE), often matching or surpassing leading Bayesian Optimization methods.
- Robust Zero-Shot Generalization: On out-of-distribution datasets like BBOB and VLSE, ZeroShotOpt performs exceptionally well, demonstrating its ability to generalize to unseen problems.
- Fine-tuned Performance: When fine-tuned on the HPO-B dataset, ZeroShotOpt becomes a top-performing method, outperforming even specialized BO methods.
- Computational Efficiency: ZeroShotOpt is significantly faster at inference time compared to traditional BO methods, especially in higher dimensions. For example, on 20D functions, ZeroShotOpt takes ~5.5 seconds per evaluation, while GP-LogEI (Matern) takes ~87 seconds.
- Model Size Matters: An ablation study shows that a larger model (200M parameters) performs better than a smaller one (90M parameters), suggesting that scaling up the model size can further improve results.
Limitations and Future Work
- Dimensionality Limit: The current model is limited to continuous, single-objective optimization up to 20 dimensions. Extending it to combinatorial, mixed-integer, or multi-objective problems is a key future direction.
- Model Size: While larger models perform better, reducing model size through parameter-efficient techniques or pruning could improve deployment efficiency.
- Outperforming Top BO: While competitive, ZeroShotOpt is occasionally outperformed by the absolute best BO variants on specific distributions. Further improvements could bridge this gap.
- Incorporating Semantic Information: The authors suggest that future work could incorporate semantic information (like parameter names or definitions) into the model, which is difficult for traditional BO methods.
- Broader Function Spaces: Expanding the training data to include a wider variety of function types and distributions could further enhance generalization.
Summary updated