Skip to content

Repository files navigation

MetaBox Logo
NeurIPS 2023arXivDocumentationvisitorsPyPI VersionPyPI DownloadsQQ Group

Benchmarking Meta-Black-Box Optimization under
Diverse Optimization Scenarios with Efficiency and Flexibility

MetaBox-v1 has been accepted as an oral presentation at NeurIPS 2023!

MetaBox-v2 has been accepted as poster at NeurIPS 2025!

😀Online Documentation is here, you can get started quickly!😀

we propose MetaBox 2.0 version (MetaBox-v2) as a major upgradation of MetaBox-v1. MetaBox-v2 now supports plentiful optimization scenarios to embrace users from single-objective optimization, multi-objective optimization, multi-modal optimization, multi-task optimization and etc. Correspondingly, 18 optimization problem sets (synthetic + realistic), 1900+ problem instances and 36 baseline methods (traditional optimizers + up-to-date MetaBBOs) are reproduced within MetaBox-v2 to assist various research ideas and comprehensive comparison. To address MetaBBO's inherent efficiency issue, we have optimized low-level implementation of MetaBox-v2 to support parallel meta-training and evaluation, which reduces the running cost from days to hours. More importantly, we have optimized MetaBox-v2's sourcecode to support sufficient development flexbility, with clear and sound tutotials correspondingly. Enjoy your journey of learning and using MetaBBO from here!

Quick Start

Installation

Important

Below we install a cpu-version torch for you, if you need install any other versions,
see torch and replace the corresponding installation instruction below.

## create a venv
conda create -n metaevobox_env python=3.11.5 -y
conda activate metaevobox_env
## install pytorch
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu
## install metabox
pip install metaevobox

Common Usage

Important

The following is the code specific to Linux. If you are using Windows, please add: if __name__ == "__main__":

Train a MetaBBO baseline

create your_dir, then create a your_train.py file in your_dir, write following codes into your_train.py.

frommetaevoboximportConfig, Trainer# import meta-level agent of MetaBBO you want to meta-trainfrommetaevobox.baseline.metabboimportGLEET# import low-level BBO optimizer of MetaBBO you want to meta-trainfrommetaevobox.environment.optimizerimportGLEET_Optimizerfrommetaevobox.environment.problem.utilsimportconstruct_problem_set# put user-specific configurationconfig= {'train_problem': 'bbob-10D', # specify the problem set you want to train your MetaBBO 'train_batch_size': 16,
'train_parallel_mode':'subproc', # choose parallel training mode
}
config=Config(config)
# construct datasetconfig, datasets=construct_problem_set(config)
# initialize your MetaBBO's meta-level agent & low-level optimizergleet=GLEET(config)
gleet_opt=GLEET_Optimizer(config)
trainer=Trainer(config, gleet, gleet_opt, datasets)
trainer.train()

If you want to check out the visualized information of the training progress, run following code to start training logger.

cd your_dir/output/tensorboard
tensorboard --logdir=./

Test BBO/MetaBBO baselines

frommetaevoboximportConfig, Tester, get_baseline# import meta-level agent of MetaBBO you want to testfrommetaevobox.baseline.metabboimportGLEET# import low-level BBO optimizer of MetaBBO you want to testfrommetaevobox.environment.optimizerimportGLEET_Optimizer# import other baselines you want to compare with your MetaBBOfrommetaevobox.baseline.bboimportCMAES, SHADEfrommetaevobox.environment.problem.utilsimportconstruct_problem_set# specify your configurationconfig= {
'test_problem':'bbob-10D', # specify the problem set you want to benchmark'test_batch_size':16,
'test_difficulty':'difficult', # this is a train-test split mode'baselines':{
# your MetaBBO'GLEET':{
'agent': 'GLEET',
'optimizer': GLEET_Optimizer,
'model_load_path': None, # by default is None, we will load a built-in pre-trained checkpoint for you.
},
# Other baselines to compare 'SHADE':{'optimizer': SHADE},
'CMAES':{'optimizer':CMAES},
},
}
config=Config(config)
# load test datasetconfig, datasets=construct_problem_set(config)
# initialize all baselines to compare (yours + others)baselines, config=get_baseline(config)
# initialize testertester=Tester(config, baselines, datasets)
# testtester.test()

By default, MetaBox would automatically generate various visualized experimental results in your_dir/output/test/, enjoy these useful analysis results!

High-level Development Usage

We sincerely suggest researchers with interests to check out Online Documentation for further flexible usege of MetaBox-v2, such as implementing your own MetaBBO, customized experimental design & analysis, using pre-collected metadata and seamless API calling with other famous optimization repos.

Available Optimization Problem Set in MetaBox

TypeProblem SetDescription
NamePaperCode
Single-Objective OptimizationbbobPaperCodebbob is based on CoCo platform, which includes 96 representative single-objective synthetic problem instances. These instances all originate from the same group of 24 objective functions (CoCo-BBOB), which have been used in many papers and widely accepted as golden standard for evaluating the robustbess of an optimizer. In MetaBox-v2, bbob includes 4 subsets: bbob-10D, bbob-30D, bbob-noisy-10D and bbob-noisy-30D, each of them contains the 24 functions. "noisy" here indicates that the function's objective value is added with a gaussian noise before it is output, which significantly increase the solving difficulty.
bbob-surrogatePaperCodebbob-surrogate includes 72 problem instances, each of which is a surrogate model. In specific, it can be divided into 3 subsets: bbob-surrogate-2D, bbob-surrogate-5D and bbob-surrogate-10D, each of which corresponds to 24 bbob problems. We first train KAN or MLP networks to fit 24 black box functions from bbob, then use the one with more accuracy as the surrogate model. This set is mainly developed for users who aims at exploring the potential of surrogate model in MetaBBO.
hpo-bPaperCodehpo-b is an autoML hyper-parameter optimization benchmark which includes a wide range of hyperparameter optimization tasks for 16 different model types (e.g., SVM, XGBoost, etc.), resulting in a total of 935 problem instances. The dimension of these problem instances range from 2 to 16. We also note that HPO-B represents problems with ill-conditioned landscape such as huge flattern.
uavPaperCode uav provides 56 terrain-based landscapes as realistic Unmanned Aerial Vehicle(UAV) path planning problems, each of which is 30D. The objective is to select given number of path nodes (x,y,z coordinates) from the 3D space, so the the UAV could fly as shortly as possible in a collision-free way.
ne
(large-scale)
PaperCodeThis problem set is based on the neuroevolution interfaces in EvoX. The goal is to optimize the parameters of neural network-based RL agents for a series of Robotic Control tasks. We pre-define 11 control tasks (e.g., swimmer, ant, walker2D etc.), and 6 MLP structures with 0~5 hidden layers. The combinations of task & network structure result in 66 problem instances, which feature extremely high-dimensional problems (>=1000D).
proteinPaperCodeprotein-docking benchmark, where the objective is to minimize the Gibbs free energy resulting from protein-protein interaction between a given complex and any other conformation. We select 28 protein complexes and randomly initialize 10 starting points for each complex, resulting in 280 problem instances. To simplify the problem structure, we only optimize 12 interaction points in a complex instance (12D problem).
lsgo
(large-scale)
PaperCode lsgo contains 20 large-scale problems instances (>=905D. <=1000D):
  1. Fully-separable functions (F1-F3)
  2. Two types of partially separable functions:
    1. Partially separable functions with a set of non-separable subcomponents and one fully-separable subcomponents (F4-F7)
    2. Partially separable functions with only a set of non-separable subcomponents and no fully-separable subcomponent (F8-F11)
  3. Two types of overlapping functions:
    1. Overlapping functions with conforming subcomponents (F12-F13)
    2. Overlapping functions with conflicting subcomponents (F14)
  4. Fully-nonseparable functions (F15)
Multi-Objective Optimizationmoo-syntheticZDT
UF
DTLZ
WFG
Code moo-synthetic is constructed by mixing 4 well-known multi-objective problem sets: ZDT, UF, DTLZ and WFG. In total, we have constructed 187 problem instances. Their objective numbers range from 2~10, dimensions range from 6D~38D.
moo-uavpaper
Code We decompose the objective value of instances in uav into 5 separate objectives, which results in 56 30D realistic 5-objective problem instances.
Multi-Model OptimizationmmoPaperCode mmo is based on CEC2013LSGO benchmark and specially crafeted for multi-modal optimization, which includes 20 synthetic problem instances covering various dimensions (1D~20D), each with varied number of (1 ~ 216) global optima. Among them, F1 to F5 are simple uni-modal functions, F6 to F10 are dimension-scalable functions with multiple global optima, and F11 to F20 are complex composition functions with challenging landscapes.
Multi-Task Optimizationcec2017mtoPaperCode cec2017mto comprises 9 multi-task problem instances, each of which contains two basic problems. Optional basic problems include Shpere, Rosenbrock, Ackley, Rastrigin, Griewank, Weierstrass and Schwefel, with dimension ranging from 25D~50D.
wcci2020PaperCode wcci2020 comprises 10 multi-task problem instances, each of which contains 50 basic problems. Optional basic problems include Shpere, Rosenbrock, Ackley, Rastrigin, Griewank, Weierstrass and Schwefel, which are all 50D.
augmented-wcci2020PaperCode augmented-wcci2020 comprises 127 multi-task problems, each of which optinally contains 1~7 basic problems. Optional basic problems include Shpere, Rosenbrock, Ackley, Rastrigin, Griewank, Weierstrass and Schwefel, which are all 50D.

Available BBO/MetaBBO Baselines in MetaBox

Baseline NameTarget Optimization ScenarioTypePaperYear
Random_search
PSOSingle-Objective OptimizationBBOParticle swarm optimization1995
DESingle-Objective OptimizationBBODifferential Evolution – A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces1997
CMAESSingle-Objective OptimizationBBOCompletely Derandomized Self-Adaptation in Evolution Strategies2001
SHADESingle-Objective OptimizationBBOSuccess-history based parameter adaptation for differential evolution2013
GLPSOSingle-Objective OptimizationBBOGenetic Learning Particle Swarm Optimization2015
SDMSPSOSingle-Objective OptimizationBBOA Self-adaptive Dynamic Particle Swarm Optimizer2015
SAHLPSOSingle-Objective OptimizationBBOSelf-Adaptive two roles hybrid learning strategies-based particle swarm optimization2021
JDE21Single-Objective OptimizationBBOSelf-adaptive Differential Evolution Algorithm with Population Size Reduction for Single Objective Bound-Constrained Optimization: Algorithm j212021
MADDESingle-Objective OptimizationBBOImproving Differential Evolution through Bayesian Hyperparameter Optimization2021
NLSHADELBCSingle-Objective OptimizationBBONL-SHADE-LBC algorithm with linear parameter adaptation bias change for CEC 2022 Numerical Optimization2022
MOEADMulti-Objective OptimizationBBOMOEA/D: A Multiobjective Evolutionary Algorithm Based on Decomposition2007
MFEAMulti-Task OptimizationBBOMultifactorial Evolution: Toward Evolutionary Multitasking2016
RNNOPTSingle-Objective OptimizationMetaBBOLearning to learn without gradient descent by gradient descent2017
QLPSOSingle-Objective OptimizationMetaBBOA reinforcement learning-based communication topology in particle swarm optimization2019
DEDDQNSingle-Objective OptimizationMetaBBODeep reinforcement learning based parameter control in differential evolution2019
DEDQNSingle-Objective OptimizationMetaBBODifferential evolution with mixed mutation strategy based on deep reinforcement learning2021
LDESingle-Objective OptimizationMetaBBOLearning Adaptive Differential Evolution Algorithm From Optimization Experiences by Policy Gradient2021
RLPSOSingle-Objective OptimizationMetaBBOEmploying reinforcement learning to enhance particle swarm optimization methods2021
RLEPSOSingle-Objective OptimizationMetaBBORLEPSO:Reinforcement learning based Ensemble particle swarm optimizer2022
RLHPSDESingle-Objective OptimizationMetaBBODifferential evolution with hybrid parameters and mutation strategies based on reinforcement learning2022
NRLPSOSingle-Objective OptimizationMetaBBOReinforcement learning-based particle swarm optimization with neighborhood differential mutation strategy2023
OPROSingle-Objective OptimizationMetaBBOLarge Language Models as Optimizers2024
RLDASSingle-Objective OptimizationMetaBBODeep Reinforcement Learning for Dynamic Algorithm Selection: A Proof-of-Principle Study on Differential Evolution2024
SYMBOLSingle-Objective OptimizationMetaBBOSYMBOL: Generating Flexible Black-Box Optimizers through Symbolic Equation Learning2024
GLEETSingle-Objective OptimizationMetaBBOAuto-configuring Exploration-Exploitation Tradeoff in Evolutionary Computation via Deep Reinforcement Learning2024
RLDEAFLSingle-Objective OptimizationMetaBBOReinforcement Learning-based Self-adaptive Differential Evolution through Automated Landscape Feature Learning2025
Surr_RLDESingle-Objective OptimizationMetaBBOSurrogate Learning in Meta-Black-Box Optimization: A Preliminary Study2025
MADACMulti-Objective OptimizationMetaBBOMulti-agent Dynamic Algorithm Configuration2022
LGALarge Scale Global OptimizationMetaBBODiscovering Attention-Based Genetic Algorithms via Meta-Black-Box Optimization2023
LESLarge Scale Global OptimizationMetaBBODiscovering evolution strategies via meta-black-box optimization2023
GLHFLarge Scale Global OptimizationMetaBBOPretrained Optimization Model for Zero-Shot Black Box Optimization2024
B2OPTLarge Scale Global OptimizationMetaBBOB2Opt: Learning to Optimize Black-box Optimization with Little Budget2025
PSORLNSMulti-Modal OptimizationMetaBBOA reinforcement learning-based neighborhood search operator for multi-modal optimization and its applications2024
RLEMMOMulti-Modal OptimizationMetaBBORLEMMO: Evolutionary Multimodal Optimization Assisted By Deep Reinforcement Learning2024
L2TMulti-Task OptimizationMetaBBOLearning to Transfer for Evolutionary Multitasking2024

Citing MetaBox

The PDF version of the paper is available here. If you find our MetaBox useful, please cite it in your publications or projects.

@inproceedings{metabox-v1,
author={Ma, Zeyuan and Guo, Hongshu and Chen, Jiacheng and Li, Zhenrui and Peng, Guojun and Gong, Yue-Jiao and Ma, Yining and Cao, Zhiguang},
title={MetaBox: A Benchmark Platform for Meta-Black-Box Optimization with Reinforcement Learning},
booktitle = {Advances in Neural Information Processing Systems},
year={2023},
}
@inproceedings{metabox-v2,
title={MetaBox-v2: A Unified Benchmark Platform for Meta-Black-Box Optimization},
author={Zeyuan Ma and Yue-Jiao Gong and Hongshu Guo and Wenjie Qiu and Sijie Ma and Hongqiao Lian and Jiajun Zhan and Kaixu Chen and Chen Wang and Zhiyang Huang and Zechuan Huang and Guojun Peng and Ran Cheng and Yining Ma},
booktitle={Advances in Neural Information Processing Systems},
year={2025},
}

😁Contact Us

👨‍💻👩‍💻We are a research team mainly focus on Meta-Black-Box-Optimization (MetaBBO) which assists automated algorithm design for Evolutionary Computation.

Here is our homepage and github. 🥰🥰🥰Please feel free to contact us—any suggestions are welcome!

If you have any question or want to contact us:

  • 🌱Fork, Add, and Merge
  • ❓️Report an issue
  • 📧Contact WenJie Qiu (wukongqwj@gmail.com)
  • 🚨We warmly invite you to join our QQ group for further communication (Group Number: 952185139).