Abstract
B2Opt is a novel "Learning to Optimize" (L2O) framework that transforms the classic Genetic Algorithm (GA) into a deep neural network architecture. By parameterizing crossover, mutation, and selection as neural modules, it learns highly efficient optimization strategies from cheap surrogate tasks, outperforming state-of-the-art black-box optimizers by multiple orders of magnitude on expensive, high-dimensional problems.
Introduction
Many real-world engineering problems—such as hyperparameter tuning for massive AI models or robotic arm design—are "black-box" optimization (BBO) problems. In these scenarios, the underlying objective function is unknown, and evaluations are often expensive and time-consuming. Traditional methods like Genetic Algorithms (GAs) rely on hand-designed rules that may not be optimal for specific tasks, while Bayesian methods often struggle with high dimensionality. B2Opt addresses these challenges by seeking a global optimum faster and within a significantly smaller evaluation budget.
The B2Opt Architecture
B2Opt reimagines the stages of a Genetic Algorithm as layers within a deep Transformer-like network. The core of the system is the B2Opt Block (OB), which consists of three primary modules:
- Self-Attention Crossover (SAC): Instead of random swaps, this module utilizes self-attention to allow all individuals in a population to interact. It learns to combine the most promising parts of solutions based on their relative fitness.
- FFN-based Mutation (FM): A Feed-Forward Network with ReLU activation serves as the mutation operator, enabling the population to escape local optima in the fitness landscape.
- Residual and Selection Module (RSSM): Mimicking "survival of the fittest," this module uses pairwise comparisons and residual connections to ensure only the best-performing individuals progress to the next generation.
By stacking these blocks, the network simulates multiple generations of evolution. B2Opt is trained using cheap, differentiable surrogate functions, allowing it to learn an optimization strategy via gradient descent before being applied to expensive real-world tasks.
Experimental Evaluation
The researchers evaluated B2Opt across three distinct domains:
- Synthetic Benchmarks: Nine standard mathematical functions (F1-F9), including Sphere, Rosenbrock, and Rastrigin. The model was trained on simple versions (F1-F3) and tested on complex, unseen functions (F4-F9) in 10 and 100 dimensions.
- Planar Mechanic Arm: A robotic control problem requiring the optimization of lengths and angles for a 100-segment arm to reach a target point.
- Neuroevolution: Training a small convolutional neural network for MNIST digit classification using B2Opt as the optimizer.
Key Results and Insights
B2Opt demonstrated superior efficiency, particularly in high-dimensional settings. On 100-dimensional synthetic functions, it achieved performance improvements of multiple orders of magnitude compared to classic baselines like CMA-ES and DE.
Key findings include:
- Beating the Experts: B2Opt outperformed L-SHADE, a highly engineered state-of-the-art Differential Evolution variant, in complex high-dimensional cases.
- Robotic Precision: In the mechanic arm problem, B2Opt achieved a distance error of 14.7, significantly lower than the 218 achieved by the next best baseline.
- Generalization through Ranking: By sorting the population by fitness, the SAC module becomes invariant to specific problem values, enhancing generalization across different landscapes.
Conclusion and Future Work
B2Opt proves that the structure of an optimization algorithm can be effectively represented as a neural network architecture. While highly successful, current limitations include a focus on finding the optimum at the potential expense of population diversity. Future work will explore diversity regularization and even deeper architectures to tackle increasingly complex optimization landscapes.
Summary updated