arXiv:2506.11565 · Tenth International Conference on Information Optics and Photonics
Gradients of unitary optical neural networks using parameter-shift rule
Jinzhe Jiang, Xin Zhang, Li Chen, Yunlong Yu, Hailing Liu
Abstract
This paper explores the application of the parameter-shift rule (PSR) for computing gradients in unitary optical neural networks (UONNs). While backpropagation has been fundamental to training conventional neural networks, its implementation in optical neural networks faces significant challenges due to the physical constraints of optical systems. We demonstrate how PSR, which calculates gradients by evaluating functions at shifted parameter values, can be effectively adapted for training UONNs constructed from Mach-Zehnder interferometer meshes. We develop a theoretical framework for two distinct scenarios, real-valued outputs and complex-valued outputs of optical networks, which derives exact analytical gradients directly from hardware measurements for phase parameters in optical neural networks. For the first real-valued scenario, the gradient calculation directly conforms to PSR. For the second complex-valued scenario, we improved PSR to obtain the gradient. Then we simulate the training of optical neural networks based on optical PSR and both scenarios complete the classification tasks well. The optical PSR offers a powerful and analytically precise approach for calculating gradients in unitary optical neural networks. This approach offers a promising alternative to traditional in silico training methods and circumvents the limitations of both finite difference approximations and all-optical backpropagation implementations. We present the theoretical framework and practical methodology for applying PSR to optimize phase parameters in optical neural networks, potentially advancing the development of efficient hardware-based training strategies for optical computing systems.