ZOOpt: a toolbox for derivative-free optimization

Yu-Ren Liu, Yi-Qi Hu, Hong Qian, Chao Qian, Yang YuScience China Information Sciences 2022

Introduction

Derivative-free (zeroth-order) optimization is a critical tool for machine learning tasks where gradients are unavailable or unreliable, such as hyperparameter tuning, reinforcement learning policy search, and subset selection. These "black-box" functions are often non-differentiable, non-continuous, and contain numerous local optima. ZOOpt is a comprehensive Python toolbox designed to handle these "messy" challenges, particularly high dimensionality and evaluation noise. By combining classification-based sampling with a distributed computing backend, ZOOpt provides a high-performance, user-friendly solution for black-box optimization.

Methodology

The core of ZOOpt is built on classification-based optimization. Unlike traditional local search or evolutionary heuristics, ZOOpt’s algorithms, such as SRacos (Sequential Random Constraint Optimization), learn to partition the search space into "good" and "bad" regions by training a classifier. This approach provides a theoretically grounded sampling strategy compared to simple random search.

Key technical features include:

  • Diverse Search Spaces: Native support for continuous, discrete (categorical), and hybrid variables.
  • Subset Selection: Implementation of POSS (Pareto Optimization for Subset Selection) for binary vector spaces with constraints.
  • Dimensionality Reduction: Use of random embeddings to project high-dimensional problems into a lower-dimensional "effective" space, mitigating the curse of dimensionality.
  • Noise Robustness: Strategies like resampling, value suppression, and threshold selection to find true optima in noisy environments.
  • Distributed Execution: Integration with the Ray framework allows users to scale from a single machine to a cluster with minimal code changes.

The toolbox prioritizes a simple user experience, offering a "one-line" optimization interface (Opt.min) that hides the complexity of the underlying asynchronous distributed computing and random embeddings.

Experimental Evaluation

The authors evaluated ZOOpt using standard synthetic benchmark functions: Ackley, Rastrigin, Schwefel (highly non-convex), and Sphere (smooth baseline). These benchmarks were used to assess convergence rates, scalability with increasing dimensions, and performance under Gaussian noise.

Key Results

In comparisons with popular toolboxes—including pycma, DEAP, pygad, and hyperopt—ZOOpt demonstrated superior performance across several metrics.

Convergence and Scalability

ZOOpt consistently reached lower objective values faster across the benchmark functions. Its performance remained more stable than competitors as dimensionality increased, validating the effectiveness of its random embedding approach.

Convergence rate comparison on the Ackley function (dim=20).

Noise Handling

In environments with Gaussian noise, ZOOpt's specialized modules allowed it to identify global optima where other toolboxes were often misled by noisy evaluations.

Optimization performance on a noisy Schwefel function (sigma=300).

Discussion and Future Work

While highly efficient for black-box problems, derivative-free methods are generally slower than gradient-based methods (like Adam or SGD) when gradients are available. Additionally, high-dimensional performance gains depend on the problem having a "low effective dimension." Future work involves deeper integration with automated machine learning (AutoML) pipelines and expanding the library of classification-based models.

Summary updated

BibTeX
@article{liu2022zoopt,
  author = {Yu-Ren Liu and Yi-Qi Hu and Hong Qian and Chao Qian and Yang Yu},
  title = {{ZOOpt: a toolbox for derivative-free optimization}},
  journal = {Science China Information Sciences},
  year = {2022},
  url = {https://openreview.net/forum?id=pEiOgtpLLv},
}
Figure