Ye Su, Yiyuan Xie
Optical neural networks (ONNs) based on Mach–Zehnder interferometers (MZIs) have attracted increasing attention due to their inherent advantages in high parallelism, low latency, and energy-efficient computing. However, the practical deployment of large-scale ONNs is severely hindered by input perturbations, fabrication imperfections, and thermal crosstalk. These will cause errors to accumulate gradually, resulting in significant performance degradation. In this work, we propose a hardware-friendly robustness enhancement approach for MZI-based ONNs by joint MZI phase optimization (JMPO). By constraining the dynamic range of the diagonal elements, the overall network matrix is conditioned to suppress noise amplification during forward propagation. The method adjusts only a limited number of phase shifters associated with the diagonal matrix obtained from singular value decomposition (SVD), which significantly reduces control complexity without additional hardware overhead. The effectiveness of the proposed approach is validated on the MNIST and Fashion-MNIST datasets across ONNs of different scales. Compared with existing PSO and GA phase optimization methods, our approach converges faster and has lower complexity. In addition, the optimized models consistently exhibit improved robustness under targeted attacks. Under adversarial attacks and phase gradient attacks, the classification accuracy is improved by up to 19.11% and 26.20% on MNIST and 9.44% and 33.95% on Fashion-MNIST, respectively. These results show that the proposed phase optimization strategy provides an effective and scalable solution for improving the robustness of ONNs in practical noisy environments.