TL;DR
Training neural networks without backpropagation—like in optical or quantum hardware—is like feeling your way down a steep, twisted canyon in pitch darkness. ZO-F2 gives this "zeroth-order" optimization a massive upgrade by mapping the canyon’s local curvature using the Fisher Information Matrix, squeezing quadratically more signal out of every blind probe while dodging the numerical explosions that usually plague full-matrix second-order methods.
What Problem Does This Paper Address?
Standard deep learning relies on backpropagation, which stores intermediate activations during the forward pass to compute exact gradients on the way back. Put a neural network onto physical hardware like photonic chips or quantum circuits—or try fine-tuning a massive LLM on a tight memory budget—and backprop breaks down because you either cannot observe internal states or cannot afford to store them.
Enter zeroth-order (ZO) optimization. Instead of backpropagating, ZO treats the network as a black box: nudge the parameters with random perturbations, observe how the loss changes, and estimate the gradient via finite differences.
The catch? Deep networks have notoriously ill-conditioned loss landscapes—steep cliffs in some directions, flat valleys in others. First-order ZO gets stuck zig-zagging. Second-order methods fix this by rescaling (preconditioning) updates using curvature matrices like the Hessian or the Fisher Information Matrix (FIM). However, in a black-box setting, you have to estimate curvature blindly too. Existing ZO second-order methods suffer from crippling trade-offs: they either amplify noise by preconditioning an already-noisy gradient, restrict themselves to crude diagonal approximations, or require $d$ extra function evaluations per step (where $d$ is the parameter count).
Methods
Rather than preconditioning the noisy gradient estimate after the fact, ZO-F2 preconditions the random perturbations themselves using a matrix $\mathbf{W}$ before querying the black-box model. What makes ZO-F2 novel is how it estimates and updates $\mathbf{W}$:
- Bilinear FIM Estimation via Pairwise Reuse: Curvature estimators generally take a quadratic form (using one perturbation vector) or a bilinear form (using two independent perturbations). ZO-F2 uses the bilinear form alongside the FIM. Because the FIM decomposes into Jacobian-vector products (JVPs)—which we already approximate during standard forward passes—any $q$ perturbations used to estimate the gradient can be paired up in $\frac{q(q-1)}{2} = \mathcal{O}(q^2)$ combinations to estimate curvature, with zero extra function evaluations!
- Whitening Strategy: Explicitly inverting a full $d \times d$ curvature estimate is a recipe for numerical instability when the matrix is ill-conditioned. ZO-F2 bypasses matrix inversion entirely. Recognizing that an ideal preconditioner "whitens" the regularized FIM into an identity matrix, the authors track an exponential moving average of the preconditioned target, clip small or negative eigenvalues at a threshold $\tau$, and update $\mathbf{W}$ smoothly via Cholesky decomposition.
- Practical Scalers: For larger networks, ZO-F2 supports block-diagonal approximations of $\mathbf{W}$, periodic updates (every $T_{\text{ud}}$ steps), and forward-difference variants.
Datasets
The authors evaluate black-box training from scratch across four benchmarks (no new datasets are introduced):
- MNIST: Handwritten digit classification (with a linear model).
- EMNIST: Extended handwritten character/digit image classification (with a CNN).
- Copying Memory Task: A standard synthetic sequence-memory benchmark frequently used to test unitary/optical RNNs.
- CIFAR-10: Natural image classification (with ResNet-20 using group normalization).
Key Insights and Ideas
- Bilinear beats quadratic by an order of dimension: The authors prove for the first time how ZO matrix estimation variance scales with parameter count $d$. Quadratic estimators suffer from $\mathcal{O}(d^4)$ variance, causing them to diverge as models grow, whereas bilinear estimators drop this to $\mathcal{O}(d^3)$.
- FIM unlocks "free" $\mathcal{O}(q^2)$ sample efficiency: Estimating the Hessian bilinearity via Taylor expansion requires evaluating $\mathcal{L}(\boldsymbol{\theta} + \mu\mathbf{u} + \mu\mathbf{v})$, tying two perturbations together per forward pass and yielding only $\mathcal{O}(q)$ samples. Because FIM relies on individual JVPs, every perturbation can pair with every other perturbation post-hoc, yielding $\mathcal{O}(q^2)$ estimator samples for free.
- Whitening tames the condition number: By iteratively nudging the target toward the identity matrix $\mathbf{I}_d$, the Cholesky target's eigenvalues hover near $1$, keeping condition numbers rock-steady while direct matrix-solving approaches blow up.
Key Results
Across all four architectures, ZO-F2 consistently beat standard unpreconditioned ZO (ZO-I), quadratic Hessian (ZO-H1), and bilinear Hessian (ZO-H2):
- Accuracy gains widen at scale: On EMNIST (CNN, $d=15,903$), ZO-F2 hit 82.2% test accuracy versus 80.0% (
ZO-H2) and 77.3% (ZO-I). On CIFAR-10 (ResNet-20, $d=270,410$), ZO-F2 reached 68.1%, outperformingZO-H2(65.1%) andZO-I(59.9%). On the optical RNN Copying task, it achieved 97.9% vs. 94.3% forZO-I. - Variance and stability: On MNIST,
ZO-H1estimation errors diverged violently as $d$ approached 800, whereas ZO-F2 stayed flat and accurate. On the RNN task, direct matrix inversion spiked condition numbers past $10^5$ (diverging on 1 of 3 runs), while whitening kept condition numbers near $10^1$. - Low overhead: On ResNet-20 with forward differences, ZO-F2 added less than 10% wall-clock time overhead compared to vanilla
ZO-I, whereasZO-H2added over 50% due to extra coupled function evaluations.
Limitations and Future Work
- Memory and compute scaling with $d$: Storing and decomposing full $d \times d$ preconditioners becomes infeasible once parameters reach the thousands or millions, forcing reliance on block-diagonal approximations (capped at block sizes $d_{\max} \times d_{\max}$) and less frequent eigenvalue decompositions.
- Theoretical lower-bound assumption: While the whitening and clipping rules allowed the authors to drop an artificial upper-bound assumption used in prior convergence proofs, their convergence rate ($\mathcal{O}(\epsilon^{-4}d)$) still relies on assuming a strict positive lower bound $m > 0$ on the minimum eigenvalue of $\mathbf{W}_t\mathbf{W}_t^\top$.
- (Future directions are not explicitly discussed in the main text of the paper.)
Summary updated