GLHF: General Learned Evolutionary Algorithm Via Hyper Functions

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

TL;DR

The Pretrained Optimization Model (POM) is a "foundation model" for black-box optimization. By pretraining on a diverse set of synthetic tasks, POM can solve entirely new, high-dimensional optimization problems (zero-shot) or rapidly adapt with minimal samples (few-shot), significantly outperforming traditional hand-designed algorithms like CMA-ES.

What Problem Does This Paper Address?

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 don't have access to its gradients or Hessian.

Traditionally, we rely on heuristic "Evolutionary Algorithms" (EAs) like Differential Evolution (DE) or CMA-ES. While powerful, these algorithms often require expert manual tuning to work on new problems. Recent attempts to "learn" optimizers using AI often suffer from two flaws: they overfit to specific tasks or they fail to generalize when the problem's dimensionality changes. The authors aim to create a truly general, pretrained optimizer that works "out of the box" across different dimensions and task distributions.

Methods

The authors introduce POM, a population-based model that mimics the structure of evolutionary computation but replaces manual rules with learnable neural blocks.

The Architecture

POM consists of three primary modules:

  1. Learned Mutation Module (LMM): Uses Multi-head Self-Attention (MSA) to look at the entire population. It assigns weights to individuals based on their relative fitness and ranking to generate new candidate solutions.
  2. Learned Crossover Module (LCM): Uses a Feed-Forward Network to adaptively decide the crossover probability ($cr$) for each individual. To keep the process differentiable during training, they use the Gumbel-Softmax trick.
  3. Selection Module (SM): A standard survival-of-the-fittest mechanism that chooses the best individuals for the next generation.
The overall architecture of POM, showing the flow from population $X^t$ through LMM and LCM to produce the next generation.

Training: MetaGBT

To train POM, the authors developed MetaGBT (Meta Gradient-Based Training). Even though the model performs gradient-free optimization during testing, it is trained end-to-end using gradients on a diverse set of differentiable synthetic functions. This allows the model to learn robust strategies that generalize to non-differentiable "black-box" tasks later.

Datasets

  • Training Set: A collection of synthetic functions (TF1-TF5) covering various landscapes: unimodal, separable, multimodal, and ill-conditioned.
  • Evaluation (BBOB Benchmark): The standard Black-Box Optimization Benchmarking suite containing 24 diverse functions.
  • Real-world Tasks: Two complex robot control environments from OpenAI Gym: Bipedal Walker (874 parameters) and Enduro (4,149 parameters).

Key Insights and Ideas

  • Zero-Shot Generalization: Remarkably, POM was trained on 10-dimensional problems but outperformed SOTA methods on 500-dimensional problems. This suggests it has learned fundamental "laws" of optimization rather than just memorizing paths.
  • The Power of Ranking: Instead of looking at raw fitness values (which vary wildly between tasks), POM uses normalized fitness and relative ranking. This "position encoding" allows the model to understand the population's progress regardless of the specific function's scale.
  • Few-Shot Efficiency: If the zero-shot performance isn't enough, POM can be fine-tuned. The authors found that just 25 random function evaluations could improve performance by over 30%.
  • Attention to Diversity: The LMM's use of attention allows it to balance exploration and exploitation dynamically. Visual analysis shows that the model assigns higher weights to "superior" individuals as the population converges, but maintains a uniform weight distribution for "disadvantaged" individuals to help them escape local optima.

Key Results

POM consistently ranked as the top performer across the BBOB benchmark suite.

Critical difference diagram showing POM's superior performance ranking compared to state-of-the-art baselines like CMA-ES and L-SHADE.

In robot control tasks, which involve thousands of parameters, POM demonstrated much faster and more stable convergence than traditional heuristics. In the Bipedal Walker task, POM achieved the highest score while baselines like L-SHADE and LGA suffered from premature convergence.

Convergence curves for Bipedal Walker and Enduro, showing POM (red line) achieving higher rewards faster than other methods.

Limitations and Future Work

  • Computational Complexity: Because POM uses an attention mechanism over the population, its time complexity is $O(n^2)$ relative to the population size $n$. This makes it slower than simple heuristics for very large populations.
  • Model Scaling: The relationship between model size and performance isn't strictly linear; larger models are significantly harder to train, and the authors note that a clear "scaling law" for optimization models is still missing.
  • Future Directions: The authors suggest designing more sophisticated loss functions that explicitly reward population diversity to further improve robustness.

Summary updated

BibTeX
@misc{li2024glhf,
  author = {Xiaobin Li and Kai Wu and Yujian Betterest Li and Xiaoyu Zhang and Handing Wang and Jing Liu},
  title = {{GLHF: General Learned Evolutionary Algorithm Via Hyper Functions}},
  year = {2024},
  eprint = {2405.03728},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.03728},
}

Loading related content...

Figure