Physics-Constrained Comprehensive Optical Neural Networks

Yanbing Liu, Jianwei Qin, Xi Yue, Xun Liu, Guoqing Wang, Tianyu Li, Fangwei Ye, Wei LiNeurIPS 2024

Optical Neural Networks (ONNs) compute using light propagation and diffraction, offering incredible advantages in latency, power consumption, and parallelism compared to traditional silicon chips. However, they suffer from a massive "sim-to-real" gap: when a perfectly trained digital simulation of an ONN is deployed onto physical optical hardware, performance usually tanks.

This drop is caused by systematic errors in the physical setup. Some errors are measurable (like lens aberrations), while others are highly unpredictable (like ambient light, laser jitter, and crosstalk between light fields). Previous attempts to fix this involved "hardware-in-the-loop" training or using deep neural networks (DNNs) to model the errors. Because these digital DNNs are completely blind to the actual physics of the system, they face a massive optimization space, making training painfully slow or prone to divergence.

Physical implementation of the ONN and the impact of light intensity fluctuations.

To tackle this, the authors introduce a physics-constrained ONN learning framework that explicitly accounts for quantifiable physical errors, allowing a lightweight digital network to compensate for remaining hardware quirks.

A Physics-Constrained Framework

Instead of forcing a digital DNN to learn every single error from scratch, the researchers isolate two major quantifiable errors and handle them explicitly:

  1. Camera Exposure Mismatches (Hardware/Calibration): The CCD camera reading the output light has inherent biases. The authors carefully calibrate the CCD exposure time to ensure the overall light intensity perfectly matches the simulated ideal, effectively eliminating this baseline error.
  2. Laser Intensity Instability (Custom Loss Function): Lasers flicker. To prevent a random dip in laser intensity from changing a classification prediction, the authors designed a custom loss function. It forces the light intensity of the "winning" classification region to be significantly brighter than the second-place region—specifically, the gap must be larger than the known range of the laser's random fluctuations.
Comparison of ONN training frameworks, highlighting the proposed physics-constrained approach (d).

By mathematically constraining these two known physical errors, the search space for the digital error-compensation DNN is drastically reduced. The DNN—which sits in a hybrid training loop with the physical ONN—can now focus entirely on learning complex, unmeasurable errors like beam crosstalk and alignment imperfections.

Key Insights

  • Divide and Conquer the Physics: The biggest breakthrough is the realization that you shouldn't use a neural network to learn something you can already measure. By explicitly programming the known physical constraints into the system, the neural network is freed up to model the unknown.
  • Simplicity Yields Efficiency: Because the error-compensation DNN only has to model residual, unmeasurable errors, it can be incredibly small. The authors achieved state-of-the-art error compensation using a network with only about 5,000 learnable parameters.
  • Robustness via Margin: The custom loss function acts as a physical buffer. By forcing the network to output a classification signal that is physically "louder" than the hardware's noise floor, the system becomes inherently robust to real-time environmental fluctuations.

Experimental Results

The inclusion of quantifiable physical information resulted in massive accuracy improvements on actual, physical optical hardware across several standard image classification benchmarks:

  • MNIST: Accuracy skyrocketed from 61.6% (using a standard error-compensation DNN without physical priors) to 96.5% using the physics-constrained framework.
  • QuickDraw16: Experimental accuracy improved from 63.0% to 85.7%.
  • Fashion MNIST: Experimental accuracy improved from 56.2% to 77.5%.
  • CIFAR-10: Initial accuracy improved from 30% to 57% after optimization.

When compared to other state-of-the-art ONN error compensation architectures, this method achieved higher accuracy while requiring significantly less computational overhead during the training loop.

Limitations and Future Work

The authors note a key limitation: their proposed custom loss function, which relies on creating an intensity gap between the highest and second-highest output regions, is highly specific to classification tasks. It works perfectly when you just need one region to be brighter than the rest to declare a "winner." However, this specific trick will not work for other AI tasks like image restoration or dense segmentation, where the exact intensity of every single pixel matters.

Future work will focus on developing more generalizable physics-constrained approaches that can address systematic errors in ONNs across a wider variety of complex optical computing applications.

Summary updated

BibTeX
@inproceedings{liu2024physics,
  author = {Yanbing Liu and Jianwei Qin and Yan Liu and Xi Yue and Xun Liu and Guoqing Wang and Tianyu Li and Fangwei Ye and Wei Li},
  title = {{Physics-Constrained Comprehensive Optical Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=QhUXU2ilIG},
}
Figure