Dual adaptive training of photonic neural networks

Ziyang Zheng, Zhengyang Duan, Hang Chen, Rui Yang, Sheng Gao, Haiou Zhang, Hongkai Xiong, Xing Lin

TL;DR

Photonic Neural Networks (PNNs) offer incredible speed and energy efficiency, but their performance often collapses when moving from a perfect computer simulation to imperfect physical hardware. This paper introduces Dual Adaptive Training (DAT), a method that uses lightweight "error-prediction networks" to create a high-fidelity digital twin of the physical system, allowing PNNs to maintain near-perfect accuracy even in the presence of significant hardware misalignments and fabrication flaws.

What Problem Does This Paper Address?

PNNs compute using light instead of electrons, promising low latency and massive parallelism. However, they face a "reality gap." When you train a PNN model on a digital computer (in silico) and deploy it to physical hardware, the performance usually plummets. This is due to systematic errors: tiny geometric misalignments, thickness variations in optical layers, or fabrication tolerances in integrated circuits.

Existing solutions are often impractical. In situ training (training directly on the hardware) usually requires complex optical setups to measure "backward" light propagation for gradients, or it requires an exhaustive, layer-by-layer measurement process that doesn't scale well to large, deep networks. The authors sought a way to make PNNs robust to these errors without requiring specialized hardware for backpropagation.

Methods

The core innovation is Dual Adaptive Training (DAT). Instead of just having a numerical model of the PNN, the authors introduce Systematic Error Prediction Networks (SEPNs).

The training process is a "dual" loop consisting of four steps per training sample:

  1. Measurement: Feed an input into the physical PNN and measure the output (and optionally, internal states).
  2. Extraction: Feed the same input into the digital numerical model.
  3. Similarity Optimization: Update the SEPNs to minimize the difference between the digital model's output and the physical hardware's output. Essentially, the SEPNs learn to "model the messiness" of the real world.
  4. Task Optimization: Update the actual PNN weights (the physical parameters) to solve the target task (e.g., classification). Crucially, this uses the SEPN-corrected model to calculate accurate gradients.

The SEPNs are designed as "mini-UNets" and are incorporated using residual connections. This means the SEPN doesn't have to learn the entire physics of light propagation; it only has to learn the deviation from the ideal physical model.

Datasets

The researchers evaluated DAT using two standard computer vision benchmarks:

  • MNIST: 70,000 grayscale images of handwritten digits (0-9).
  • Fashion-MNIST (FMNIST): 70,000 grayscale images of 10 categories of clothing (t-shirts, shoes, etc.), which is generally considered a more challenging task than basic MNIST.

They tested these datasets across two different PNN architectures: Diffractive PNNs (DPNNs), which use free-space light diffraction, and Interference-based PNNs (MPNNs), which use integrated Mach-Zehnder Interferometer (MZI) meshes.

Key Insights and Ideas

  • The Power of Residuals: By using a residual architecture for the SEPNs, the system remains grounded in known physics while using deep learning to "patch" the unknown hardware errors. This makes the error-correction much more efficient than trying to learn the system from scratch.
  • Hardware-Free Backprop: DAT achieves the benefits of in situ training (adapting to real hardware) without needing the "backward optical field propagation" hardware that many other state-of-the-art methods require.
  • Scalability via "Separable Mode": For very large networks, the authors developed a "separable mode" where different parts of the network can be optimized independently, preventing the gradient errors from compounding too severely during training.
  • Internal States are Optional: While measuring light intensity at every layer (internal states) improves performance, the authors showed that DAT still works remarkably well even if you only measure the final output, significantly reducing the measurement burden.

Key Results

The results show that DAT effectively "rescues" PNNs from hardware imperfections:

  • Robustness to Misalignment: In a large-scale Diffractive PNN (DPNN-M) on MNIST, a 1cm Z-axis shift error caused standard deployment accuracy to drop to 25.5%. The previous state-of-the-art (Physics-Aware Training) recovered it to 66.9%, but DAT restored it to 96.6%—nearly identical to the error-free baseline of 98.6%.
  • Superiority in High-Error Regimes: On the Fashion-MNIST task with significant beamsplitter and phase shifter errors, DAT outperformed existing methods by an average of 35.5% to 42.1% in classification accuracy.
  • Efficiency: The SEPNs are extremely lightweight. For the integrated photonic circuits, the SEPNs used only 0.05% to 0.12% of the parameters of a standard UNet, proving that you don't need a massive digital model to correct physical hardware.

Limitations and Future Work

  • Measurement Overhead: While DAT avoids complex hardware, it still requires a physical measurement for every training sample to update the SEPNs. This could be time-consuming for massive datasets.
  • Static vs. Dynamic Errors: The paper primarily focuses on "systematic" errors (errors that are constant once the hardware is built). It is unclear how well DAT would handle "dynamic" errors like rapid thermal drift or high-frequency noise.
  • Generalization: While the authors suggest DAT can be generalized to other analog AI systems (like memristor-based crossbars), this paper only demonstrates it on photonic systems. Testing on other analog substrates would be a logical next step.

Summary updated

BibTeX
@article{zheng2023dual,
  author = {Ziyang Zheng and Zhengyang Duan and Hang Chen and Rui Yang and Sheng Gao and Haiou Zhang and Hongkai Xiong and Xing Lin},
  title = {{Dual adaptive training of photonic neural networks}},
  journal = {Nat. Mac. Intell.},
  year = {2023},
  doi = {10.1038/s42256-023-00723-4},
}
Figure