B2Opt: Learning to Optimize Black-box Optimization with Little Budget

Xiaobin Li, Kai Wu, Xiaoyu Zhang, Handing Wang

Introduction

Black-box optimization (BBO) is a fundamental challenge in modern artificial intelligence, underpinning critical tasks such as hyperparameter tuning, neural architecture search, and robotic control. In these scenarios, the underlying objective function is often unknown, high-dimensional, and computationally expensive to evaluate. Traditional approaches, including Genetic Algorithms (GAs) and Evolution Strategies (ES), rely on static, hand-designed rules that may not adapt efficiently to complex landscapes. While "Learning to Optimize" (L2O) frameworks offer a promising alternative by training neural networks to act as optimizers, they frequently suffer from a "catch-22": the training process itself requires a massive number of expensive function evaluations, making them impractical for budget-constrained real-world applications.

Methodology: The B2Opt Framework

B2Opt introduces a novel L2O architecture that reimagines the Transformer as a learnable Genetic Algorithm. The core of the framework is the B2Opt Block (OB), a neural unit designed to simulate a single generation of evolution. By stacking multiple OBs, the model can represent a multi-generational optimization trajectory.

Overview of the B2Opt architecture and the internal components of the B2Opt Block (OB).

Each B2Opt Block consists of three primary components:

  1. Self-Attention Crossover (SAC): This module leverages the self-attention mechanism to facilitate information sharing across the population. By sorting individuals by fitness prior to processing, the SAC becomes invariant to specific problem scales, enhancing its ability to generalize across different objective functions.
  2. FFN-based Mutation (FM): A Feed-Forward Network (FFN) with ReLU activation serves as a learnable mutation operator. This component allows the model to explore the search space dynamically and escape local optima.
  3. Residual and Selection Module (RSSM): Mimicking the "survival of the fittest" principle, the RSSM uses residual connections and pairwise fitness comparisons to ensure that only the most promising solutions progress to the subsequent block.

A key innovation of B2Opt is its training strategy. Rather than training on expensive target functions, the authors utilize "cheap" synthetic surrogate functions. This allows the model to learn general optimization strategies (the "how") rather than memorizing specific landscapes, enabling high performance on complex tasks with a minimal computational budget.

Experimental Evaluation

The researchers evaluated B2Opt across a diverse set of benchmarks to test its robustness and generalization capabilities:

  • BBOB Benchmarking: A standard suite of 24 challenge functions tested in both 10 and 100 dimensions.
  • Planar Mechanical Arm: A robotic control task requiring the optimizer to determine joint angles and lengths to reach a target coordinate.
  • Neuroevolution: Directly optimizing the weights of a convolutional neural network (CNN) for MNIST classification, bypassing traditional gradient-based methods.

Key Results and Insights

B2Opt demonstrated significant improvements over state-of-the-art (SOTA) baselines. On the BBOB benchmark, it outperformed five leading Evolutionary Algorithms (including CMA-ES and L-SHADE) and four Bayesian Optimization methods (such as TurBO and HEBO), achieving top performance in 20 out of 24 functions at 10D and 19 out of 24 at 100D.

Performance comparison of B2Opt against baseline optimization algorithms across 24 BBOB benchmark functions.

Beyond raw performance, B2Opt exhibited remarkable efficiency. In the mechanical arm task, it found more accurate solutions with fewer evaluations than L-SHADE. Furthermore, despite being trained on simple synthetic functions, B2Opt generalized effectively to the MNIST neuroevolution task, reaching high classification accuracy faster than specialized L2O methods.

The study also revealed that the architecture itself provides a strong inductive bias; even an untrained B2Opt model with random weights outperformed several baseline algorithms. This underscores the power of combining selection, mutation, and crossover within a structured neural framework.

Conclusion and Future Work

B2Opt represents a significant step forward in making L2O practical for real-world BBO. By framing evolution as a sequence of learnable Transformer-like operations and training on inexpensive surrogates, it achieves SOTA performance with high efficiency. Future research will focus on enhancing population diversity to prevent premature convergence and exploring the scalability of the architecture to ultra-high-dimensional problems involving millions of parameters.

Summary updated

BibTeX
@inproceedings{li2025b,
  author = {Xiaobin Li and Kai Wu and Xiaoyu Zhang and Handing Wang},
  title = {{B2Opt: Learning to Optimize Black-box Optimization with Little Budget}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i17.34036},
}
Figure