Abstract
Zeroth-order optimization typically relies on finite differences to estimate gradients, a process plagued by a "precision vs. stability" trade-off. This paper introduces a novel single-point gradient estimator that uses complex-step derivatives to achieve the accuracy and low variance of multi-point methods without the risk of numerical cancellation, even as the smoothing parameter approaches zero. By extending the objective function into the complex domain, the proposed method achieves machine-precision accuracy and maintains theoretical convergence parity with state-of-the-art multi-point estimators.
Introduction
In many high-stakes engineering and machine learning applications—ranging from reinforcement learning and hyperparameter tuning to complex physical simulations—the objective function $f(x)$ is often a "black box." In these scenarios, explicit gradient information is unavailable, necessitating the use of zeroth-order (ZO) optimization.
Traditionally, ZO methods approximate gradients using finite differences. However, practitioners face a fundamental hurdle known as the precision-stability trade-off. If the smoothing parameter $\delta$ is too large, the estimate suffers from significant bias. Conversely, if $\delta$ is too small, the method encounters "subtractive cancellation": because $f(x+\delta)$ and $f(x)$ are nearly identical, floating-point precision limits cause the result to be dominated by round-off noise. This paper presents a solution that bypasses this trade-off entirely by leveraging complex-step derivatives.
The "Imaginary" Estimator
The authors propose a single-point estimator that extends the objective function to the complex domain. Instead of perturbing the input $x$ by a small real value, they perturb it by a small imaginary value: $x + i\delta y$, where $y$ is a random vector sampled from a unit sphere.
The Complex-Step Approach
The core contribution is the estimator: $$g_\delta(x) = \frac{n}{\delta} \Im(f(x + i\delta y))y$$
By utilizing the imaginary part ($\Im$), the estimator leverages the Cauchy-Riemann equations from complex analysis. Unlike traditional finite difference formulas, this approach involves no subtraction in the numerator. Consequently, $\delta$ can be set to arbitrarily small values (e.g., $10^{-100}$) without triggering numerical cancellation. This allows the estimator to achieve the low variance typically associated with multi-point methods while requiring only a single function evaluation per iteration.
Theoretical Convergence and Stability
The authors integrate this estimator into a standard gradient descent framework and provide rigorous convergence analysis across three primary function classes:
- Convex Functions: Achieving a regret scale of $O(nLR^2/K)$.
- Strongly Convex Functions: Demonstrating efficient convergence rates.
- Non-Convex Functions: Proving robustness in complex landscapes.
Crucially, the method maintains theoretical parity with multi-point methods. While standard single-point estimators often suffer from exploding variance as $\delta \to 0$, the complex-step (CS) method keeps variance bounded, providing a stable path to the global or local optimum.
Experimental Evaluation
The paper evaluates the algorithm on several mathematical benchmarks and engineering simulations designed to test numerical limits:
- Rosenbrock Function: In this classic non-convex "banana-shaped" valley, the CS estimator remained stable for $\delta$ values as small as $10^{-15}$. In contrast, forward-difference methods failed completely below $10^{-8}$ due to numerical noise.
- Lorenz System: In estimating parameters for this chaotic system of ordinary differential equations (ODEs), the CS method converged significantly faster and more reliably than central-difference methods, which were hampered by integration errors.
- Model Predictive Control (MPC): Tested on a 2D system where the black box is a controller simulation, demonstrating the method's utility in engineering feedback loops.
- Quadratic "Worst-Case" Function: Using Nesterov’s ill-conditioned quadratic function to verify theoretical scaling.
Key Insights
- Immunity to Cancellation: The most significant finding is that by stepping into the complex plane, the "noise floor" of numerical differentiation vanishes. The CS method reaches machine precision ($\approx 10^{-16}$) while finite differences bottom out much earlier.
- Efficiency: The method achieves the accuracy of two-point or multi-point estimators with only one function call, effectively doubling the efficiency of the optimization process in query-limited environments.
- The Analyticity Requirement: The primary theoretical constraint is that the function must be real analytic (locally representable by a power series). While this excludes functions with "kinks" (like ReLU activations), it covers a vast array of physics and engineering simulations.
Limitations and Future Work
Despite its advantages, the complex-step method requires a "Complex Oracle"—the black-box simulation must be able to process complex numbers. This is straightforward for software-based simulations (e.g., C++, Python, or MATLAB) but impossible for physical experiments where inputs must be real-valued.
Future research directions include extending the method to weakly convex functions and exploring its application in online optimization settings where the objective function may evolve over time. For now, the complex-step estimator provides a powerful tool for high-precision optimization in computational science.
Summary updated