Abstract
Accurate Zeroth-Order (ZO) Hessian estimation is a cornerstone of derivative-free methods, essential for tasks such as bilevel optimization, Bayesian inference, and uncertainty quantification. However, obtaining a complete suite of low-variance estimators for the Hessian and its inverse in high-dimensional settings remains a significant challenge. To address this, we propose a unified framework that reinterprets ZO Hessian approximation through the lens of single-step Policy Optimization (PO). This perspective establishes a theoretical equivalence between general ZO Hessian estimators and the Hessian of a smoothed PO objective, unifying distinct classical randomized estimators as specific instances of baseline selection. Building on this foundation, we introduce ZoVH, a comprehensive suite of variance-reduced estimators for the full Hessian matrix, its regularized inverse, and the bias-corrected inverse Hessian-gradient product.
1. The Challenge of Black-Box Optimization
In many real-world scenarios—such as executing adversarial attacks on "black-box" AI models or fine-tuning massive Large Language Models (LLMs) under strict memory constraints—practitioners cannot access a model's internal gradients. Zeroth-Order (ZO) optimization addresses this by estimating gradients and curvatures (Hessians) using only function evaluations (forward passes).
While estimating the gradient is relatively well-understood, estimating the Hessian (the matrix of second derivatives) is notoriously difficult in high dimensions. Standard methods either require a prohibitive number of queries ($O(d^2)$ for $d$ dimensions) or suffer from extreme variance and noise. Without an accurate Hessian, algorithms cannot perform "second-order" updates, which are otherwise highly efficient at navigating complex loss landscapes.
2. The ZoVH Framework: Bridging ZO and Policy Optimization
To overcome these limitations, this paper introduces ZoVH (Zeroth-Order Variance-reduced Hessian), a unified framework that bridges derivative-free optimization and Reinforcement Learning (RL).
2.1 The Policy Optimization (PO) Lens
The most profound theoretical insight of this work is that estimating a ZO Hessian is mathematically equivalent to finding the Hessian of a smoothed objective in a single-step RL policy. This connection allows decades of variance-reduction techniques from the RL domain to be directly applied to black-box optimization.
2.2 Optimal Averaged Baseline
In high dimensions, the "signal" of the Hessian is often drowned out by random noise. To combat this, ZoVH derives a specific "baseline" term (a constant subtracted from function values) that acts as a noise-canceling filter. This averaged baseline is provably optimal for minimizing the variance of the Hessian estimator without introducing any bias, making curvature information visible even with very few samples.
2.3 Query Reuse
Most ZO algorithms are "memoryless," discarding expensive function evaluations after a single step. ZoVH instead stores these evaluations in a history buffer. Because local loss landscapes change slowly, these historical queries can be reused to reinforce the current Hessian estimate at no additional sampling cost, drastically improving sample efficiency.
2.4 Efficient Inversion
Inverting a massive Hessian matrix typically incurs an $O(d^3)$ computational cost. To bypass this bottleneck, ZoVH utilizes the Woodbury matrix identity. This enables the computation of the inverse Hessian-gradient product—the core component of second-order optimization—in linear time ($O(d)$).
3. Experimental Setup and Key Results
The authors rigorously evaluated ZoVH across a diverse set of benchmarks, including synthetic optimization functions (Quadratic, Rosenbrock, Ackley, Levy, Styblinski-Tang), Convolutional Neural Networks on MNIST, and LLM fine-tuning (OPT-1.3B and OPT-13B) on GLUE and SuperGLUE NLP tasks.
Key Empirical Findings: * Massive Error Reduction: In neural network experiments, ZoVH reduced Hessian estimation error by up to 9x compared to standard central-difference methods. * Faster Convergence: On synthetic optimization tasks, ZoVH achieved an average 22x speedup over vanilla ZO methods. * Adversarial Efficiency: In black-box adversarial attacks, ZoVH successfully found perturbations 4x faster than baseline approaches. * Superior LLM Performance: When fine-tuning OPT models, ZoVH consistently outperformed state-of-the-art methods like MeZO and HiZOO in both convergence speed and final test accuracy across multiple NLP tasks.
4. Limitations and Future Directions
While ZoVH offers substantial improvements, it introduces a few considerations:
- The Bias-Variance Drift: Reusing queries assumes the landscape has not changed drastically. If the learning rate is too high or the history buffer is too large, "stale" data can introduce bias that hinders convergence.
- Smoothing Radius ($\mu$): Like all ZO methods, performance is sensitive to the smoothing radius. A radius that is too small leads to high variance, while one that is too large blurs the actual curvature.
- Orthogonality Assumption: Some efficient inverse approximations assume random probing directions are orthogonal. While approximately true in high dimensions, this remains a theoretical gap.
Future work could explore adaptive history lengths, allowing the algorithm to automatically shrink or grow the query buffer based on the rate of change in the model parameters.
Summary updated