Deep optical neural network training method and system in noise environment
By incorporating forward propagation and balanced detection modules into the optical neural network chip, the robustness and computational efficiency issues of optical neural networks in noisy environments are resolved, achieving high-precision training and low-energy computation.
Patent Information
- Application Number
- CN202511687987.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-03-06
AI Technical Summary
Existing optical neural network training algorithms are not robust in noisy environments and have low computational efficiency, failing to fully leverage the advantages of optical neural networks.
A novel training method and system are adopted, which utilizes an optical neural network chip for forward propagation and balance detection module processing, and combines photoelectric conversion and computer loss function calculation to achieve weight updates, reduce intermediate value storage and energy consumption, and adapt to the influence of external noise.
Maintaining training accuracy in noisy environments improves computational efficiency and reduces energy consumption, demonstrating the advantages of high parallelism and low power consumption of optical neural networks.
Smart Images

Figure CN121615702A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical computing technology, specifically relating to a training method and system for deep optical neural networks in noisy environments. Background Technology
[0002] With the development of artificial intelligence, neural networks have played a vital role in all aspects of our lives. From the initial LeNet-5 and AlexNet to today's GPT-5 and DeepSeek-v3, the scale of networks has grown exponentially, with the number of parameters increasing from tens of thousands to hundreds of billions or even trillions. While the increase in network size and parameter count has brought significant improvements in network performance, the computational power required has also increased significantly. Among these, matrix-vector multiplication (MVM) is the most computationally intensive. As network size continues to increase, the computational power consumption for MVM will become unacceptable, thus necessitating the search for new solutions.
[0003] Optical neural networks (MVMs) are considered a promising alternative. Compared to traditional electrical neural networks, optical neural networks offer numerous advantages, including high parallelism, low power consumption, and high speed. In integrated photonic circuits, MVMs are deployed in parallel within the circuit in an analog manner, significantly improving computational efficiency.
[0004] However, current mainstream online training algorithms for optical neural networks are based on traditional backpropagation, which requires significant intermediate value storage and photoelectric conversion, failing to fully leverage the advantages of optical neural networks. Furthermore, the robustness of traditional backpropagation-based optical neural network training algorithms is poor when external noise is present. Therefore, researching a scheme that can fully demonstrate the advantages of optical neural networks and maintain training accuracy even under external noise is crucial. Summary of the Invention
[0005] Based on the above problems, the purpose of this invention is to provide a training method for optical neural networks, so as to maintain the training accuracy of optical neural networks under the influence of external noise, and to realize deep optical neural networks, thus taking an important step towards the use of optical neural networks in practical environments.
[0006] The training method for deep optical neural networks in noisy environments proposed in this invention includes the following specific steps: (1) Set the initial weights of the deep optical neural network and deploy the weights onto the weight devices on the integrated optical chip; (2) Process positive and negative input data in the computer. For negative data processing, you can choose to apply random stripes to the positive data. (3) Encode the positive and negative input data onto optical signals of different wavelengths and input them into the deep optical neural network; (4) Perform forward propagation in the deep optical neural network chip to obtain the convolution calculation result of the positive and negative data of this layer multiplied by the weights; (5) Input the calculation results into a balanced detection module consisting of two photodetectors connected in series, where one photodetector... ; (7) Set the weights updated in this iteration into the optical neural network chip; (8) Transfer the positive and negative data results calculated in this layer to the next layer, and repeat steps (4)-(7). (9) Transmit the positive data results of the last layer to the final classification layer to obtain the training classification results, and calculate the loss and gradient of the classification layer; (10) Update the gradient of the final classification layer; (11) Repeat steps (3)-(10) to obtain the trained optical neural network parameters.
[0007] To achieve the above process, this invention provides a hardware implementation system, comprising a light source, an adjustable optical attenuator, an optical neural network chip, a photodetector, an arbitrary function generator, a multi-channel voltage source, an NI data acquisition card, and a computer. Wherein: The light source can be either a discrete light source or an on-chip integrated light source, and its wavelength and power can be selected according to task requirements. It is used as the input signal source for the overall network.
[0008] The adjustable optical attenuator can be replaced by other devices capable of modulating light intensity, such as electro-optic modulators, and can be integrated or discrete. It is used to load positive and negative data signals into the operating wavelength.
[0009] The optical neural network chip can be selected from a crossbar architecture composed of Mach-Zehnder interferometers (MZI) or microring resonators (MRR), or other architectures capable of matrix-vector multiplication.
[0010] The photodetector can be an off-chip discrete device or an on-chip integrated photodetector. It is used to implement the balanced detection module.
[0011] The arbitrary function generator is used to encode the input positive and negative data into electrical signals and control the adjustable optical attenuator to encode light intensity.
[0012] The multi-channel voltage source can be replaced with a low-speed or high-speed digital-to-analog converter, and the bandwidth can be selected according to the task requirements. It is used to regulate on-chip weighting devices.
[0013] The NI acquisition card has a sampling rate that can be selected according to the task requirements. It is used to sample the final signal, facilitating subsequent loss function and gradient calculations on a computer.
[0014] The overall system implementation process is as follows: Two different wavelengths of light are used as signal sources for positive and negative data; the input light is input into an adjustable optical attenuator, and an arbitrary function generator generates an electrical signal to control the adjustable optical attenuator to encode the positive and negative data into light intensity signals; the encoded signals are input into an optical neural network chip to obtain the convolution calculation results, and wavelength decomposition is implemented on the chip; the light of positive and negative data is input into two photodetectors in the balanced detection module to obtain photocurrent; the current signal is converted into a voltage signal and acquired by an NI acquisition card, and transmitted to a computer; the computer performs subsequent calculations such as loss function calculation and gradient calculation to obtain the weight values that need to be updated in this iteration; based on the updated weight values, the multi-channel voltage source is controlled to change the weights of the on-chip weighting devices.
[0015] To implement a deep optical neural network, the above training scheme is adopted.
[0016] In this invention, the deep optical neural network is composed of multiple blocks, each block consisting of three convolutional layers and one classification layer, with a final classification layer connected after all the blocks.
[0017] This invention proposes a novel training scheme and deep convolutional network architecture that, in the presence of external errors, avoids the effects of error gradient accumulation compared to traditional backpropagation update schemes. Furthermore, this invention proposes... The calculation scheme is perfectly adapted to the functions of the balance detection module, eliminating the need for an additional analog-to-digital converter, reducing energy consumption and improving calculation efficiency. Attached Figure Description
[0018] Figure 1 This is a flowchart of the online training system of the present invention.
[0019] Figure 2 This is a schematic diagram of a deep optical neural network architecture according to the present invention.
[0020] Figure 3 This is a hardware schematic diagram of the online training system of the present invention. Detailed Implementation
[0021] The present invention will be further described below through examples.
[0022] This embodiment provides the hardware of an optical neural network training system, the structure of which is as follows: Figure 3 As shown.
[0023] As an example, the deep convolutional neural network architecture has six convolutional layers, i.e., two blocks of network training. Two different wavelengths of light source are selected as the signal sources for positive and negative data, and the Imagenet-100 dataset is used for network training. Positive data is the original data in the dataset, and negative data is obtained by randomly adding stripes to the positive data. The positive and negative data are input into an arbitrary function generator to generate corresponding electrical signals, which control an adjustable optical attenuator to encode the input light, encoding the positive and negative data into light intensity signals. The encoded light signals are input into an optical neural network chip to obtain the matrix-vector multiplication calculation result, i.e., the convolution result. The optical neural network chip used in this example is a crossbar architecture chip composed of Mach-Zehnder interferometers (MZI). Wavelength separation is performed on-chip; this example uses a microring resonator for wavelength separation, separating the positive and negative data and transmitting them in two separate channels. The separated positive and negative data are input into a balanced detection module to obtain... The on-chip computation results are then acquired via an NI data acquisition card, input into a computer, and used to calculate the loss function and weight gradient to obtain the weights that need to be updated. A multi-channel voltage source is then controlled to update the weights of the on-chip MIZ based on the updated weights.
[0024] After completing one iteration of the first convolutional layer, the second and third convolutional layers are iterated using the same steps. The input positive and negative data for the subsequent two convolutional layers are the positive and negative data calculated by the previous layer. After all three convolutional layers have been calculated and updated, the positive data calculation results from the second and third layers are input into the fully connected classification layer. In this example, due to limitations in actual chip size, the fully connected classification layer is deployed on a computer; however, on-chip deployment can be chosen depending on the actual chip architecture. The classification result obtained after passing through the fully connected classification layer is compared with the data label values, the loss function value and weight gradient of this layer are calculated, and the gradient of the fully connected classification layer is updated. This completes one iteration update for one block.
[0025] The training and update process for the second block is the same as that for the first block. The input for the second block is the positive and negative data calculation results of the third convolutional layer of the first block.
[0026] After updating the first and second blocks, the outputs of the fully connected classification layers from the first and second blocks are input into the final fully connected classification layer. In this example, due to chip size limitations, the final classification layer is deployed on a computer. Depending on the actual chip size, the final classification layer can be deployed on a physical chip. The final classification layer outputs the predicted class, which is compared with the label value. The loss function value and weight gradient of this layer are calculated, and the gradient of the final classification layer is updated, completing one iterative update of the entire network.
[0027] After 200 iterations of training, the network achieved a final training accuracy of 95%. Despite the presence of actual physical noise in the chip, the model still trained successfully and achieved a high training accuracy.
Claims
1. A method for training a deep optical neural network in a noisy environment, the method comprising: The specific steps are: (1) setting the initial weights of the deep optical neural network, deploying the weights to the weight devices on the integrated optical chip; (2) processing positive and negative input data in the computer, and the negative data processing selects to apply random stripes to the positive data; (3) encoding the positive and negative input data into optical signals of different wavelengths and inputting them into the optical neural network; (4) performing forward propagation in the deep optical neural network chip to obtain the convolution calculation result of the multiplication of the positive and negative data of this layer and the weights; (5) inputting the calculation result into the balanced detection module composed of two series-connected photodetectors, and the output of the photodetector is the difference between the two input optical signals; ; 7) setting the updated weights in this round of iteration to the deep optical neural network chip; (8) transmitting the positive and negative data results of this layer calculation to the next layer, and repeating steps (4)-(7); (9) transmitting the positive data result of the last layer to the final classification layer to obtain the classification result of the training, and calculating the loss and gradient of the classification layer; (10) updating the gradient of the final classification layer; (11) repeating steps (3)-(10) to obtain the trained deep optical neural network parameters.
2. The method of training a deep optical neural network of claim 1, wherein, The deep optical neural network is composed of multiple blocks, each block is composed of 3 layers of convolutional network and one layer of classification layer, and a final classification layer is connected after all the blocks.
3. A system for implementing the training method of the deep optical neural network of claim 1 or 2, characterized in that, It is composed of a light source, an adjustable optical attenuator, a deep optical neural network chip, a photodetector, an arbitrary function generator, a multi-channel voltage source, an NI data acquisition card, and a computer; wherein: The light source is used as the input signal source of the whole network, which is a separate light source or an integrated light source on a chip, and the wavelength and power are selected according to the task requirements; The adjustable optical attenuator is used to load positive and negative data signals into the working wavelength; integrated devices or discrete devices are used; The optical neural network chip adopts a crossbar architecture composed of Mach-Zehnder interferometers or micro-ring resonators, or other architectures for matrix-vector multiplication calculation; The photodetector has two functions, which are used to realize balanced detection, and uses off-chip discrete devices or on-chip integrated photodetectors; The arbitrary function generator is used to encode the input positive and negative data into electrical signals to control the adjustable optical attenuator to encode the optical intensity; The multi-channel voltage source is used to regulate the on-chip weight device; The NI acquisition card is used to sample the final signal, which is convenient for subsequent loss function and gradient calculation on the computer; the sampling rate is selected according to the task requirements.
4. The system of claim 3, wherein, The workflow is as follows: two different wavelengths of light are used as the signal source of positive data and negative data; input light is input into an adjustable optical attenuator, an arbitrary function generator generates an electrical signal to control the adjustable optical attenuator to encode the positive and negative data into an optical intensity signal; the encoded signal is input into an optical neural network chip to obtain a convolution calculation result and realize wavelength decomposition on the chip; the light of the positive data and the light of the negative data are respectively input into two photodetectors to obtain photocurrents; the current signals are converted into voltage signals and collected by an NI acquisition card and transmitted to a computer; the computer performs loss function calculation and gradient calculation to obtain the weight value to be updated in this iteration; according to the updated weight value, a multi-channel voltage source is controlled to change the weight of the on-chip weight device.