Training a neural network usually feels like a solved problem: just use backpropagation. But what happens when you can’t see the "insides" of your network? This isn't a hypothetical scenario—it's a major hurdle for emerging hardware like optical neural networks and analog in-memory computing. In these systems, manufacturing variations and complex physics make it nearly impossible to get the accurate internal gradients that backpropagation requires.
A new paper by Sawada et al., set to appear in PMLR 2025, introduces Natural Perturbations, a clever way to train these "black-box" systems using Zeroth-Order (ZO) optimization that is significantly more efficient than standard random guessing.
TL;DR
The authors propose "Natural Perturbations," a sampling strategy for zeroth-order optimization that uses the Fisher Information Matrix to shape random noise. By ensuring that parameter tweaks don't radically alter the network's output distribution, they achieve faster convergence and higher accuracy on hardware-constrained training tasks compared to standard random search.
What Problem Does This Paper Address?
Standard deep learning relies on "white-box" optimization. We know the exact mathematical form of every neuron, so we can calculate gradients perfectly. However, when a neural network is implemented directly in hardware (like an optical chip), the "math" of the simulation often doesn't perfectly match the "physics" of the device.
To train these devices, researchers use Zeroth-Order (ZO) optimization. Instead of calculating a gradient, you slightly perturb the parameters, see if the loss goes down, and move in that direction. It’s essentially "fumbling in the dark." The problem? In deep networks, parameters are highly correlated. Standard ZO methods sample noise from a uniform or Gaussian distribution, which ignores these correlations and leads to "noisy" gradient estimates that scale poorly as networks get deeper.
Methods
The core innovation is the Natural Perturbation (NP) sampling strategy.
- The Concept: Standard ZO uses isotropic noise (noise that spreads equally in all directions). NP instead samples noise from a multivariate normal distribution $\mathcal{N}(0, \Sigma)$ where the covariance $\Sigma$ is specifically tuned.
- The Objective: The authors design $\Sigma$ to maximize the entropy of the perturbations (to explore the parameter space as much as possible) while minimizing the Function Space Discrepancy (FSD). In plain English: they want to shake the parameters hard, but only in ways that don't "break" the network's current output behavior.
- The "Natural" Connection: This inherits the logic of the Natural Gradient. By regularizing the FSD, they derive an optimal covariance matrix: $\Sigma = (\lambda_P I + \lambda_F F_\theta)^{-1}$, where $F_\theta$ is the Fisher Information Matrix (FIM).
- Scalability: Computing a full FIM for a large network is impossible ($N^2$ memory). The authors solve this by partitioning parameters into small blocks and using a block-diagonal FIM, making the matrix inversion computationally practical.
Datasets
The authors evaluated their method (ZO-NP) against standard ZO (ZO-I) and coordinate-wise ZO (ZO-co) across several tasks:
- Standard Vision: MNIST, FashionMNIST, and CIFAR10 (using CNNs and MLP-Mixers).
- Hardware-Specific Tasks:
- Equalization: A regression task for Optical Neural Networks (ONNs).
- Copying Memory: A classic RNN task testing long-term dependency, implemented using a hardware-inspired unitary matrix architecture.
Key Insights and Ideas
- Noise with a "Shape": The "aha moment" here is realizing that the shape of the noise matters as much as the direction of the search. By using the FIM, the algorithm "learns" which parameters can be moved together without causing chaotic changes in the output.
- Entropy vs. Stability: The paper provides a beautiful visualization showing that Natural Perturbations achieve a better trade-off between exploration (entropy) and stability (FSD) than standard Gaussian noise.
- Black-Box Jacobian: Since they can't use backprop, they compute the Jacobian matrices needed for the FIM using a column-wise difference quotient—a purely black-box approach that still manages to capture essential parameter correlations.
Key Results
The proposed ZO-NP consistently outperformed existing black-box methods:
- Accuracy Boost: On FashionMNIST, ZO-NP reached 85.8% accuracy, compared to 79.6% for standard ZO. On CIFAR10, it achieved 62.5% vs 59.5%.
- Hardware Efficiency: In the "Equalization" task for optical networks, ZO-NP achieved a near-perfect $R^2$ of 0.993, significantly higher than the 0.944 achieved by other methods.
- Convergence: While ZO-NP has a slight computational overhead per epoch to calculate the FIM, it converges in fewer iterations and often reaches higher accuracy in less total wall-clock time than its competitors.
Limitations and Future Work
- The Million-Parameter Wall: While the block-diagonal approach helps, the authors admit that scaling to networks with millions of parameters (like LLMs) remains a challenge. The overhead of computing the FIM for thousands of blocks can become a bottleneck.
- Approximation Accuracy: The block-diagonal assumption ignores correlations between blocks. The authors suggest that developing "stronger approximations" of the FIM that capture more global correlations without the $N^2$ cost is a primary direction for future research.
- Hardware-in-the-loop: While the paper simulates hardware constraints, the next step is deploying this directly on physical optical or analog chips to see how it handles real-world thermal noise and non-linearities.
Summary updated