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

Gradient Compressed Sensing: A Query-Efficient Gradient Estimator for High-Dimensional Zeroth-Order Optimization

Ruizhong Qiu, Hanghang Tong

Abstract

In high-dimensional black-box optimization, zeroth-order (ZO) methods often suffer from a prohibitive query complexity that scales linearly or logarithmically with the dimensionality $d$. This paper introduces GraCe (Gradient Compressed Sensing), a novel gradient estimator that leverages gradient sparsity to achieve a "double-logarithmic" query complexity of $O(s \log \log d)$. By refining the theoretical Indyk–Price–Woodruff (IPW) algorithm and introducing iterative zooming techniques, GraCe enables the optimization of functions with up to 100 million variables using only a handful of queries per step. Empirical results across synthetic benchmarks and adversarial graph attacks demonstrate that GraCe significantly outperforms existing state-of-the-art ZO estimators in both efficiency and convergence.

Introduction

Modern machine learning increasingly requires optimizing functions where the dimensionality $d$ is massive—ranging from fine-tuning large language models to executing adversarial attacks on high-resolution data. In many of these scenarios, we operate in a "zeroth-order" (ZO) regime: we can evaluate the objective function to obtain a scalar score, but we lack access to explicit gradient information.

Traditional ZO methods, such as those based on random search or coordinate descent, typically scale poorly as $d$ increases. While recent advances have utilized "gradient sparsity"—the observation that only a small subset of variables ($s \ll d$) significantly influences the output at any given iteration—even the most efficient sparse ZO methods have historically been limited by a logarithmic dependence on $d$. GraCe breaks this barrier, moving toward a double-logarithmic complexity ($O(s \log \log d)$), making optimization in extreme dimensions computationally feasible.

Methodology

GraCe: Gradient Compressed Sensing

The fundamental innovation of GraCe is the treatment of gradient estimation as a sparse recovery problem, drawing inspiration from the field of compressed sensing. The algorithm identifies the most significant components of the gradient through a multi-stage process:

  1. Dependent Random Partitioning: Rather than sampling random directions in the entire space, GraCe partitions the $d$ dimensions into discrete groups. It employs a signal-to-noise logic to determine which groups contain "large-gradient" dimensions.
  2. Iterative Zooming: Once a group with a significant gradient component is identified, the algorithm iteratively narrows the candidate set of dimensions. This recursive "zooming" mechanism is the primary driver behind the double-logarithmic efficiency.
  3. Refining the IPW Algorithm: The authors adapted the Indyk–Price–Woodruff (IPW) algorithm—originally designed for linear measurements—to the nonlinear context of ZO optimization. A critical contribution of this work is a new theoretical analysis that reduced the IPW algorithm's hidden constant by a factor of 4,300. This refinement transformed a theoretically optimal but practically unusable algorithm into a highly efficient tool.
  4. Approximate Sparsity: Unlike previous methods that required strict sparsity (where most gradients are exactly zero), GraCe is designed to handle approximate sparsity. This makes it robust for real-world functions where many variables may exert minor, non-zero influences on the objective.

Experimental Evaluation

The authors evaluated GraCe against 12 baseline methods across three distinct benchmarks:

  • DISTANCE: A synthetic quadratic function ($d=10,000$) designed to locate a hidden sparse vector. In this test, GraCe achieved near-optimal solutions within 1,000 queries, whereas all baselines failed to converge even after 5,000 queries.
  • MAGNITUDE: A synthetic non-convex function ($d=10,000$) used to evaluate the estimator's performance across varying gradient scales.
  • ATTACK: A practical adversarial graph attack ($d=13,225$). The objective was to minimally perturb a graph's adjacency matrix to disconnect specific nodes, simulating a black-box attack on network infrastructure.

Scaling to Extreme Dimensions

One of the most striking results of the study is GraCe's performance at extreme scales. When tested on a function with 100 million dimensions ($d=10^8$) and a sparsity of $s=1$, GraCe required only 19 queries per step to estimate the gradient. This demonstrates that for a $10,000\times$ increase in dimensionality, the query cost remains remarkably stable, underscoring the power of the $\log \log d$ scaling.

Discussion and Limitations

While GraCe represents a significant leap in ZO optimization efficiency, several avenues for future research remain:

  • Stochasticity: The current iteration of GraCe assumes noise-free function evaluations. In environments like reinforcement learning, where evaluations are inherently stochastic, the algorithm may require the integration of error-correcting codes to maintain accuracy.
  • Temporal Memory: GraCe currently treats each optimization step as an independent event. Future work could incorporate memory mechanisms to track which dimensions were important in previous steps, potentially further reducing the query count.
  • Theoretical Bounds: It remains an open question whether $O(s \log \log d)$ is the absolute lower bound for sparse zeroth-order optimization or if further efficiencies are mathematically possible.

Conclusion

GraCe provides a highly scalable solution for high-dimensional black-box optimization. By bridging the gap between nonlinear optimization and compressed sensing, and by drastically reducing the practical constants of theoretical algorithms, GraCe enables the optimization of million-dimensional systems with unprecedented query efficiency.

Summary updated

BibTeX
@inproceedings{qiu2024gradient,
  author = {Ruizhong Qiu and Hanghang Tong},
  title = {{Gradient Compressed Sensing: A Query-Efficient Gradient Estimator for High-Dimensional Zeroth-Order Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=vG7YpsJT74},
}
Figure