ReLIZO: Sample Reusable Linear Interpolation-based Zeroth-order Optimization

Xiaoxing Wang, Xiaohan Qin, Xiaokang Yang, Junchi YanNeurIPS 2024

TL;DR

ReLIZO is a novel zeroth-order optimization framework that significantly reduces the number of expensive function evaluations by reusing samples from previous iterations. By framing gradient estimation as a quadratically constrained linear program (QCLP), it decouples the required sample size from the variable dimension, enabling high-performance optimization in high-dimensional spaces with a fraction of the usual query cost.

What Problem Does This Paper Address?

In many real-world scenarios—like attacking a "black-box" neural network, searching for the best AI architecture (NAS), or fine-tuning massive language models (LLMs)—we don't have access to the underlying gradients. We only have the output (the "zeroth-order" information).

Standard Zeroth-Order (ZO) optimization methods estimate gradients by "poking" the function in different directions and seeing how the output changes. However, this is notoriously expensive. Traditional "smoothing" methods provide biased estimates and require many samples. "Linear interpolation" methods are more accurate but typically require a number of samples equal to the dimension of the problem ($d$). If you are optimizing a model with millions of parameters, querying it millions of times per step is impossible. ReLIZO addresses this "query thirst" by finding a way to reuse the work done in previous steps.

Methods

The authors introduce ReLIZO (Sample Reusable Linear Interpolation-based Zeroth-order Optimization). Its core machinery consists of three main components:

  1. QCLP Formulation: Instead of standard interpolation, they model gradient estimation as a Quadratically Constrained Linear Program. They seek a direction that maximizes the alignment with the true gradient while keeping the estimate's magnitude constrained. They derive an elegant analytical solution for this, which allows them to estimate gradients even when the number of samples ($n$) is much smaller than the dimension ($d$).
  2. Sample Reusing Strategy: Because optimization steps are usually small, the points queried in iteration $k-1$ are often very close to the current point at iteration $k$. ReLIZO uses a "reusable distance bound" ($b$) to identify which old samples are still valid for the current Taylor expansion.
  3. Complexity Reduction via Indexing: Reusing samples could lead to redundant matrix calculations. The authors developed a method to "index" intermediate variables from previous iterations, slashing the computational overhead of the gradient estimation itself.

Datasets

The authors evaluated ReLIZO across a diverse set of benchmarks:

  • CUTEst: A standard library for testing non-linear optimization algorithms (e.g., SROSENBR, BOXPOWER).
  • CIFAR-10: Used for generating universal black-box adversarial perturbations against deep neural networks.
  • NAS-Bench-201: A benchmark for Neural Architecture Search to find optimal network structures.
  • SST2 (Stanford Sentiment Treebank): Used for Parameter-Efficient Fine-Tuning (PEFT) of the OPT-1.3b large language model.

Key Insights and Ideas

  • Decoupling Sample Size from Dimension: The biggest "aha" moment is that you don't actually need $d$ samples to get a useful gradient direction. By solving the QCLP, ReLIZO can work effectively in high-dimensional spaces with very few new queries.
  • The "Free" Query: In most ZO methods, once a query is used, it's discarded. ReLIZO recognizes that in a continuous landscape, a query from a moment ago is still a valuable piece of data.
  • Mathematical Generality: The paper proves that ReLIZO is a generalized version of traditional linear interpolation. If you have $n=d$ and orthogonal directions, it collapses back into known, successful methods, but it offers much more flexibility when those conditions aren't met.

Key Results

ReLIZO demonstrates strong convergence properties across various tasks, consistently outperforming standard ZO baselines.

Convergence on CUTEst benchmark functions
  • Efficiency in NAS: On NAS-Bench-201, ReLIZO achieved state-of-the-art accuracy while using 39% fewer queries than other ZO solvers.
  • Superior Adversarial Attacks: In black-box attacks on CIFAR-10, ReLIZO reached a 92% attack success rate, outperforming the next best method (ZO-AdaMM at 87%) while maintaining similar image distortion.
  • LLM Fine-Tuning: When fine-tuning an OPT-1.3b model, ReLIZO actually outperformed standard SGD in accuracy for full fine-tuning and was significantly more memory-efficient, proving its scalability to models with over a billion parameters.
Loss reduction comparison across ZO optimization methods
  • Robustness: Ablation studies showed that even with an 80% reuse rate, the performance drop was negligible, highlighting the massive potential for query savings.

Limitations and Future Work

  • Computational Overhead: While ReLIZO reduces function queries (which are usually the bottleneck), it introduces the need to solve a QCLP. If the function evaluation is extremely "cheap" (like a simple mathematical formula), the overhead of the QCLP might outweigh the benefits of reusing samples.
  • Hyperparameter Sensitivity: The "reusable distance bound" ($b$) is a key parameter. While the authors suggest $b=2\eta$ (twice the learning rate) works well, finding the optimal bound for highly irregular landscapes remains a challenge.
  • Future Directions: The authors suggest exploring scenarios where the cost of a single query is negligible to see if the QCLP approach still holds a competitive edge through its more accurate gradient estimation.

Summary updated

BibTeX
@inproceedings{wang2024relizo,
  author = {Xiaoxing Wang and Xiaohan Qin and Xiaokang Yang and Junchi Yan},
  title = {{ReLIZO: Sample Reusable Linear Interpolation-based Zeroth-order Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=yzviAnpvU6},
}
Figure