Pretrained Optimization Model for Zero-Shot Black Box Optimization

Xiaobin Li, Kai Wu, Yujian Betterest Li, Xiaoyu Zhang, Handing Wang, Jing Liu

Abstract

Zero-shot optimization involves optimizing a target task that was not seen during training, aiming to provide the optimal solution without or with minimal adjustments to the optimizer. It is crucial to ensure reliable and robust performance in various applications. Current optimizers often struggle with zero-shot optimization and require intricate hyperparameter tuning to adapt to new tasks. To address this, we propose a Pretrained Optimization Model (POM) that leverages knowledge gained from optimizing diverse tasks, offering efficient solutions to zero-shot optimization through direct application or fine-tuning with few-shot samples. Evaluation on the BBOB benchmark and two robot control tasks demonstrates that POM outperforms state-of-the-art black-box optimization methods, especially for high-dimensional tasks. Fine-tuning POM with a small number of samples and budget yields significant performance improvements. Moreover, POM demonstrates robust generalization across diverse task distributions, dimensions, population sizes, and optimization horizons.

Introduction

Black-box optimization (BBO) is a fundamental challenge in machine learning, appearing in everything from hyperparameter tuning to neural architecture search. In these scenarios, we can evaluate a function $f(x)$, but we have no access to its gradients or Hessian. While classic algorithms like CMA-ES or Differential Evolution (DE) are powerful, they often require expert-level hyperparameter tuning to perform well on a specific new task.

The "zero-shot" challenge is to create an optimizer that works effectively on a completely unseen problem immediately, without any manual adjustment. Existing "learned" optimizers often struggle to generalize across different dimensions or suffer from training instability. To bridge this gap, we introduce the Pretrained Optimization Model (POM), a transformer-inspired architecture designed to solve black-box optimization problems without any task-specific tuning.

The Pretrained Optimization Model (POM)

POM treats the optimization process as a learnable strategy. Its architecture consists of two primary components designed to mimic and improve upon traditional evolutionary operators:

  1. Learnable Mutation Module (LMM): Inspired by self-attention mechanisms, LMM analyzes the fitness and ranking of the entire population to dynamically generate mutation weights. This allows the model to "sense" the landscape and decide which individuals should influence the next generation.
  2. Learnable Crossover Module (LCM): This module adaptively determines crossover probabilities. To make this discrete operation trainable via gradients, we employ the Gumbel-Softmax trick, providing a differentiable estimator for the crossover process.
Overview of the POM architecture, training process via MetaGBT, and zero-shot testing procedure.

The model is trained using MetaGBT (Meta Gradient-Based Training). Unlike reinforcement learning approaches that can be unstable, MetaGBT uses end-to-end gradients to update the model parameters $\theta$ by minimizing a normalized loss function across a diverse set of training tasks. By applying Multi-head Self-Attention (MSA) to the population, POM uses the relative performance of individuals as "context" to understand the objective function's topology without needing explicit gradients.

Experimental Setup

POM was trained on a collection of synthetic functions (TF1-TF5) representing different landscape features like unimodality, separability, and ill-conditioning (e.g., Rosenbrock, Griewank). We evaluated the model on two primary benchmarks:

  • BBOB (Black-Box Optimization Benchmarking): 24 diverse functions tested at dimensions $d=30, 100,$ and $500$.
  • Robot Control Tasks: The Bipedal Walker ($d=874$ parameters) and Enduro ($d=4149$ parameters) environments from OpenAI Gym, which test the model's ability to optimize neural network weights for locomotion and racing.

Key Results

POM demonstrates significant advantages in zero-shot scenarios, particularly as task complexity and dimensionality increase.

  • Zero-Shot Dominance: POM significantly outperformed state-of-the-art methods like CMA-ES and L-SHADE on the BBOB benchmark.
  • High-Dimensional Success: In the Enduro task ($d=4149$), POM achieved stable and swift convergence where other learned optimizers (like LGA and LES) suffered from premature convergence.
  • Few-Shot Efficiency: When allowed a tiny budget of just 25 random evaluations for fine-tuning, POM's performance improved by over 30%, demonstrating high sample efficiency.
Performance comparison of POM against baseline optimizers on high-dimensional robotics tasks.

Conclusion and Future Work

POM represents a significant step toward general-purpose learned optimizers. By framing evolutionary operators as differentiable neural network blocks, we bridge the gap between heuristic search and deep learning. However, limitations remain. The attention mechanism in the LMM has a time complexity of $O(n^2)$ relative to the population size $n$, which may limit scaling to very large populations. Future work will focus on scaling laws and refining loss functions to better balance population convergence with genetic diversity.

Summary updated

BibTeX
@inproceedings{li2024pretrained,
  author = {Xiaobin Li and Kai Wu and Yujian Betterest Li and Xiaoyu Zhang and Handing Wang and Jing Liu},
  title = {{Pretrained Optimization Model for Zero-Shot Black Box Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=fWQhXdeuSG},
}
Figure