NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Zeroth-Order Block Coordinate Descent Algorithm for Huge-Scale Black-Box Optimization

HanQin Cai, Yuchen Lou, Daniel McKenzie, Wotao Yin

Introduction

Black-box optimization without access to gradients—known as zeroth-order (ZO) optimization—is a critical challenge in machine learning. It is frequently used for tasks like hyperparameter tuning or crafting adversarial attacks against proprietary models where internal weights are hidden. However, scaling ZO optimization to "huge-scale" settings, where the number of variables ($d$) exceeds $10^7$, introduces a severe curse of dimensionality.

Standard ZO algorithms scale linearly with $d$, meaning a problem with a million variables might require a million function evaluations just to take a single optimization step. Furthermore, simply storing the random vectors needed to estimate these gradients can easily exceed standard memory limits. To overcome this, researchers have developed ZO-BCD, a novel algorithm that combines block coordinate descent with compressed sensing to achieve sub-linear computational complexity and a minimal memory footprint.

Methodology: Breaking the Curse of Dimensionality

The ZO-BCD (Zeroth-Order Block Coordinate Descent) algorithm is built on three core pillars designed to make optimization both query-efficient and computationally lean:

  1. Block Coordinate Descent (BCD): Rather than attempting to update millions of variables simultaneously, ZO-BCD randomly selects a "block" (a subset of variables) to update in each iteration. This drastically reduces the computational burden per step.
  2. Compressed Sensing (CoSaMP): To estimate the gradient of a block without accessing the function's internals, the algorithm assumes the gradient is sparse (i.e., most variables have a negligible effect). It uses a signal processing technique called Compressive Sampling Matching Pursuit (CoSaMP) to reconstruct the gradient from just a few noisy function evaluations.
  3. Circulant Matrices (ZO-BCD-RC): To resolve the memory bottleneck, the algorithm employs "circulant" measurement matrices. Instead of storing a massive $m \times d$ matrix of random numbers, it generates a single random vector and shifts it to create the matrix, saving massive amounts of RAM.

To maximize the effectiveness of this sparsity assumption, the authors apply ZO-BCD to adversarial attacks in the wavelet domain. By targeting the wavelet coefficients of an image or audio clip rather than raw pixels or time-series data, they exploit the natural sparsity of these signals.

Experimental Setup

The algorithm was rigorously evaluated on synthetic functions (Sparse Quadric and Max-s-sum-squared) to test convergence speed and scalability. For real-world applicability, it was tested on two primary benchmarks:

  • ImageNet: Using a pre-trained Inception-v3 model to evaluate untargeted image attacks.
  • SpeechCommands: A dataset of 1-second audio clips (e.g., "yes," "no," "left"), using a 5-layer convolutional network (commandNet) for targeted audio attacks.

Key Insights

  • Sparsity is the Secret Sauce: The efficiency of ZO-BCD hinges entirely on gradient sparsity. Moving from the pixel or time domain to the wavelet domain makes these gradients even sparser, which explains the algorithm's exceptionally strong performance on media files.
  • Randomized Blocks Distribute Sparsity: By randomly assigning variables to blocks, the algorithm ensures that the non-zero (important) components of the gradient are evenly distributed. This prevents any single block from bottlenecking the optimization process.
  • Sub-linear Scaling: ZO-BCD is the first ZO algorithm to achieve both sub-linear query complexity and sub-linear per-iteration computational complexity. In short, it becomes increasingly efficient compared to baseline methods as the problem size grows.

Key Results

  • Audio Attacks at Scale: On an audio attack problem with over 1.7 million dimensions, ZO-BCD achieved a 97.93% success rate with a mean distortion of -6.32 dB.
  • State-of-the-Art Image Attacks: On ImageNet, the "large-coefficients-only" variant of their attack reached a 96% success rate with a record-low $\ell_2$ distortion of 13.7, significantly outperforming prior methods like ZORO and ZO-AdaMM.
  • Computational Efficiency: In synthetic tests, the circulant version (ZO-BCD-RC) demonstrated significantly faster performance than ZORO as dimensionality increased, proving its viability for huge-scale tasks.

Limitations and Future Work

While highly effective, ZO-BCD has a few limitations. First, its performance is strictly tied to the sparsity assumption; if a problem has a "dense" gradient where all variables matter equally, the compressed sensing approach will struggle. Second, the algorithm exhibits hyperparameter sensitivity. The number of blocks ($J$) and the sparsity level ($s$) are manual inputs that directly impact the trade-off between speed and convergence accuracy.

Finally, while the algorithm works exceptionally well in practice on non-convex neural networks, the theoretical guarantees provided in the paper primarily assume convexity. Extending these rigorous proofs to the non-convex regime remains a logical and necessary next step for future research.

Summary updated

BibTeX
@inproceedings{cai2021zeroth,
  author = {HanQin Cai and Yuchen Lou and Daniel McKenzie and Wotao Yin},
  title = {{A Zeroth-Order Block Coordinate Descent Algorithm for Huge-Scale Black-Box Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=BYbWWCMUxxc},
}
Figure