Optical neural network training method, device and equipment robust to process errors

By randomly superimposing noise and mapping weight parameters during the training process of the optical neural network chip, the problem of chip processing deviation and long calibration time is solved, and the chip's robustness and mass production capability are improved.

CN116523015BActive Publication Date: 2024-09-10TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310300927.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-09-10
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

There are deviations in the processing of optical neural network chips, and it is impossible to guarantee a perfect mapping between the theoretical model and chip processing. Moreover, by compensating for the phase and amplitude errors of light, calibration takes a long time and is difficult, making it unable to meet the needs of future large-scale mass production.

Method used

By obtaining the processing error distribution of neuron weight parameters in the optical neural network, a weight error model is established, and noise is randomly superimposed on the neuron weight parameters during the training process until the end of the training. The trained neuron weight parameters are mapped to optical neural networks. Processing parameters of network chips to reduce the impact of errors.

Benefits of technology

It improves the robustness of the optical neural network chip, reduces the performance impact caused by errors, simplifies the calibration process, and meets the needs of large-scale mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116523015B
    Figure CN116523015B
Patent Text Reader

Abstract

The present application relates to the field of optical neural network technology, and in particular to an optical neural network training method, device and equipment that are robust to process errors, wherein the method includes: obtaining the processing error distribution of the neuron weight parameters in the optical neural network to obtain a weight error model; in the process of training the optical neural network, randomly superimposing noise on the neuron weight parameters according to the weight error model until the training is completed, and obtaining the trained neuron weight parameters; mapping the trained neuron weight parameters to the processing parameters of the optical neural network chip. Thus, the problems of deviation in the processing of optical neural network chips in the related technology, inability to ensure perfect mapping between theoretical models and chip processing, and long calibration time and difficulty by compensating for the phase and amplitude errors of light are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optical neural network technology, and in particular to an optical neural network training method, device and equipment that are robust to process errors. Background Art

[0002] Light has the fastest propagation speed in physical space and has the advantages of multi-dimensional and multi-scale. Photons replace electrons and optical paths replace circuits. Optical computing chips have disruptive advantages such as high speed, parallelism, and low power consumption. Especially with the in-depth development of artificial intelligence algorithms, the mathematical expression of the physical process of light's limited propagation in a medium is highly similar to that of deep neural network algorithms. The use of optical chips to implement neural network computing is expected to break through the energy efficiency bottleneck of traditional electronic chips.

[0003] In related technologies, optical neural network chips usually need to obtain the parameters of neurons in the network through pre-training on an electronic computer, and then map them to the design parameters of the chip structure. However, there are certain deviations in chip processing, and it is impossible to guarantee the perfect mapping of theoretical models and chip processing. At present, most of them use peripheral optical paths and circuits after chip manufacturing and combine error calibration algorithms to compensate for the phase and amplitude errors of light. However, the calibration time is long and difficult, and the technical route of calibrating each chip one by one cannot meet the needs of large-scale mass production in the future. Summary of the invention

[0004] The present application provides an optical neural network training method, device, electronic device and storage medium that are robust to process errors, so as to solve the problems in the related art that there are deviations in the processing of optical neural network chips, the perfect mapping between theoretical models and chip processing cannot be guaranteed, and there are problems such as long calibration time and great difficulty in compensating for the phase and amplitude errors of light.

[0005] The first aspect of the present application provides an optical neural network training method that is robust to process errors, comprising the following steps: obtaining the processing error distribution of neuron weight parameters in the optical neural network to obtain a weight error model; during the training of the optical neural network, randomly superimposing noise on the neuron weight parameters according to the weight error model until the training is completed, thereby obtaining trained neuron weight parameters; and mapping the trained neuron weight parameters to the processing parameters of the optical neural network chip.

[0006] Optionally, in one embodiment of the present application, the processing error distribution of neuron weight parameters in the optical neural network is obtained to obtain a weight error model, including: obtaining the error probability distribution and size range between the actual processing size and the design size of the optical neural network chip physical device, establishing a model correspondence between the intermediate layer neuron weight parameters and the processing physical device size, and obtaining the intermediate layer neuron weight parameter error model.

[0007] Optionally, in one embodiment of the present application, the architecture of the optical neural network includes multiple intermediate layers, each intermediate layer includes multiple neurons, and the physical structure size of the neurons corresponds to the neuron weight parameters, and a model correspondence between the intermediate layer neuron weight parameters and the processing size is established, including: establishing a modulation relationship function between the physical size of the neurons and the physical properties of light based on physical simulation, and using the relationship function to determine the model correspondence.

[0008] Optionally, in one embodiment of the present application, the optical neural network includes any one of a diffraction neural network, an interference neural network and a scattering neural network.

[0009] The second aspect of the present application provides an optical neural network training device that is robust to process errors, including: an acquisition module, used to obtain the processing error distribution of neuron weight parameters in the optical neural network to obtain a weight error model; a determination module, during the training of the optical neural network, randomly superimposes noise on the neuron weight parameters according to the weight error model until the training is completed, thereby obtaining the trained neuron weight parameters; a mapping module, used to map the trained neuron weight parameters into processing parameters of an optical neural network chip.

[0010] Optionally, in one embodiment of the present application, the acquisition module is further used to obtain the error probability distribution and size range between the actual processing size and the design size of the physical device of the optical neural network chip, establish a model correspondence between the weight parameters of the neurons in the intermediate layer of the optical neural network and the size of the physical device, and obtain the error model of the weight parameters of the neurons in the intermediate layer.

[0011] Optionally, in one embodiment of the present application, the architecture of the optical neural network includes multiple intermediate layers, each intermediate layer includes multiple neurons, and the physical structure size of the neurons corresponds to the neuron weight parameters, and the acquisition module is further used to establish a modulation relationship function between the physical size of the neurons and the physical properties of light based on physical simulation, and use the relationship function to determine the model correspondence.

[0012] Optionally, in one embodiment of the present application, the optical neural network includes any one of a diffraction neural network, an interference neural network and a scattering neural network.

[0013] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement an optical neural network training method that is robust to process errors as described in the above embodiments.

[0014] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement an optical neural network training method that is robust to process errors as described in the above embodiments.

[0015] Therefore, this application has at least the following beneficial effects:

[0016] The embodiment of the present application can determine the random error of the weight of the optical neural network, and add the corresponding random error of the weight to the weight parameter of the intermediate layer neuron during the training process of the neural network weight parameter, so that different input training sets can meet the output accuracy requirements, reduce the performance impact caused by the error in the processing of the optical neural network chip, and improve the robustness of the optical neural network chip. Thus, the problem of deviation in the processing of the optical neural network chip in the related art is solved, and the perfect mapping between the theoretical model and the chip processing cannot be guaranteed, and there are problems such as long calibration time and difficulty by compensating for the phase and amplitude errors of light.

[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0019] Figure 1 A flowchart of an optical neural network training method that is robust to process errors provided according to an embodiment of the present application;

[0020] Figure 2 A schematic diagram of a diffraction groove processing error provided according to an embodiment of the present application;

[0021] Figure 3 A schematic diagram of an optical neural network architecture and network training error back propagation provided according to an embodiment of the present application;

[0022] Figure 4 A schematic diagram of the physical layout of a diffractive neural network chip provided according to an embodiment of the present application;

[0023] Figure 5 A block diagram of an optical neural network training device that is robust to process errors provided according to an embodiment of the present application;

[0024] Figure 6 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0026] The following describes the optical neural network training method, device, electronic device and storage medium that are robust to process errors in the embodiments of the present application with reference to the accompanying drawings. In response to the problems mentioned in the above background technology, the present application provides an optical neural network training method that is robust to process errors. In this method, by determining the random error of the weight of the optical neural network, the corresponding random error of the weight is added to the weight parameters of the intermediate layer neurons during the training of the neural network weight parameters, so that different input training sets can meet the output accuracy requirements, reduce the performance impact caused by the errors in the processing of the optical neural network chip, and improve the robustness of the optical neural network chip. As a result, the problems of deviations in the processing of optical neural network chips in the related technology, the inability to ensure perfect mapping between the theoretical model and the chip processing, and the long calibration time and difficulty by compensating for the phase and amplitude errors of light are solved.

[0027] Specifically, Figure 1 A flowchart of an optical neural network training method that is robust to process errors provided in an embodiment of the present application.

[0028] like Figure 1 As shown, the optical neural network training method that is robust to process errors includes the following steps:

[0029] In step S101, the processing error distribution of the neuron weight parameters in the optical neural network is obtained to obtain a weight error model.

[0030] Among them, the optical neural network is not limited to a specific optical neural network, and includes but is not limited to diffraction neural network, interference neural network, and scattering neural network.

[0031] In one embodiment of the present application, the processing error distribution of neuron weight parameters in the optical neural network is obtained to obtain a weight error model, including: obtaining the error probability distribution and size range between the actual processing size and the design size of the optical neural network chip physical device, establishing a model correspondence between the intermediate layer neuron weight parameters and the processing physical device size, and obtaining the intermediate layer neuron weight parameter error model.

[0032] For the convenience of explanation, the present application embodiment is Figure 2 Taking the diffraction groove processing schematic diagram shown in the figure as an example, the random error distribution of the neuron weight parameters is determined. Specifically, Figure 2As shown, the dotted box is the designed physical parameter, but due to non-ideal factors such as exposure and etching process, the actual diffraction groove size obtained by processing deviates from the designed value. The embodiment of the present application can obtain the probability distribution and size range of processing errors through parameter fitting through parameter characterization of large-area processing, and obtain the corresponding deviation of the weight value by combining the model correspondence between the weight parameters of the intermediate layer neurons in the neural network and the chip processing size.

[0033] In one embodiment of the present application, a model correspondence between the weight parameters of the intermediate layer neurons and the processing dimensions is established, including: establishing a relationship function between the physical dimensions of the diffraction groove and the phase modulation of light according to physical simulation, and determining the model correspondence using the relationship function.

[0034] In the embodiment of the present application, the architecture of the optical neural network generally includes an input layer, an intermediate layer and an output layer, each intermediate layer includes a plurality of neurons, and the physical structure size of the neuron corresponds to the neuron weight parameter, such as Figure 3 The design of optical neural network chips is usually done by updating the weight parameters of each neuron in the middle layer through the error back propagation algorithm on the computer, such as Figure 3 h1-h n For a specific optical neural network, the weight parameters can be mapped to the physical parameters of optical chip processing through a certain model. Figure 4 Take the diffraction neural network chip in as an example, and Figure 3 The optical neural network architecture in is one-to-one, with three intermediate layers. Each intermediate layer is composed of multiple diffraction grooves. Each or multiple diffraction grooves can be regarded as a neuron. According to physical simulation, the relationship function between the physical size of the diffraction groove and other parameters and the phase modulation of light can be established. Among them, the phase change value of light is the weight parameter of the neuron in the neural network.

[0035] In step S102, during the training of the optical neural network, noise is randomly superimposed on the neuron weight parameters according to the weight error model until the training is completed, thereby obtaining the trained neuron weight parameters.

[0036] It is understandable that the embodiment of the present application can add an appropriate amount of random error to the weight parameters of the intermediate layer neurons during the training process of the optical neural network chip to obtain the trained neuron weight parameters, so that different input training sets can meet the output accuracy requirements and improve the robustness of the optical neural network chip. In the actual execution process, the size range and probability distribution of the random error in the embodiment of the present application can be determined by combining the chip processing parameter distribution with the chip physical parameters and the neuron weight mapping relationship.

[0037] In step S103, the trained neuron weight parameters are mapped to processing parameters of the optical neural network chip.

[0038] The embodiment of the present application can map the neuron weight parameters of the trained network model to the processing parameters of the optical neural network chip, thereby reducing the impact of the optical neural network chip processing on the neural network performance.

[0039] According to the optical neural network training method that is robust to process errors proposed in the embodiment of the present application, by determining the random error of the weight of the optical neural network, the corresponding random error of the weight is added to the weight parameters of the intermediate layer neurons during the training process of the neural network weight parameters, so that different input training sets can meet the output accuracy requirements, reduce the performance impact caused by the errors in the processing of the optical neural network chip, and improve the robustness of the optical neural network chip. Thus, the problems of deviation in the processing of optical neural network chips in the related art, the inability to ensure the perfect mapping between the theoretical model and the chip processing, and the long calibration time and difficulty in compensating for the phase and amplitude errors of light are solved.

[0040] Next, an optical neural network training device that is robust to process errors proposed in an embodiment of the present application is described with reference to the accompanying drawings.

[0041] Figure 5 It is a block diagram of an optical neural network training device that is robust to process errors according to an embodiment of the present application.

[0042] like Figure 5 As shown, the optical neural network training device 10 that is robust to process errors includes: an acquisition module 100 , a determination module 200 and a mapping module 300 .

[0043] Among them, the acquisition module 100 is used to obtain the processing error distribution of the neuron weight parameters in the optical neural network to obtain the weight error model; the determination module 200 randomly superimposes noise on the neuron weight parameters according to the weight error model during the training of the optical neural network until the training is completed to obtain the trained neuron weight parameters; the mapping module 300 is used to map the trained neuron weight parameters to the processing parameters of the optical neural network chip.

[0044] In one embodiment of the present application, the acquisition module 100 is further used to obtain the error probability distribution and size range between the actual processing size and the design size of the physical device of the optical neural network chip, establish a model correspondence between the weight parameters of the neurons in the intermediate layer of the optical neural network and the size of the physical device, and obtain the error model of the weight parameters of the neurons in the intermediate layer.

[0045] In one embodiment of the present application, the architecture of the optical neural network includes multiple intermediate layers, each intermediate layer includes multiple neurons, and the physical structure size of the neurons corresponds to the neuron weight parameters. The acquisition module is further used to establish a modulation relationship function between the physical size of the neurons and the physical properties of light based on physical simulation, and use the relationship function to determine the model correspondence.

[0046] In one embodiment of the present application, the optical neural network includes any one of a diffraction neural network, an interference neural network and a scattering neural network.

[0047] It should be noted that the aforementioned explanation of the embodiment of the optical neural network training method that is robust to process errors is also applicable to the optical neural network training device that is robust to process errors of this embodiment, and will not be repeated here.

[0048] According to the optical neural network training device that is robust to process errors proposed in the embodiment of the present application, by determining the random error of the weight of the optical neural network, the corresponding random error of the weight is added to the weight parameters of the intermediate layer neurons during the training of the neural network weight parameters, so that different input training sets can meet the output accuracy requirements, reduce the performance impact caused by the errors in the processing of the optical neural network chip, and improve the robustness of the optical neural network chip. Thus, the problems of deviation in the processing of optical neural network chips in the related art, the inability to ensure perfect mapping between the theoretical model and the chip processing, and the long calibration time and difficulty of compensating for the phase and amplitude errors of light are solved.

[0049] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0050] A memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .

[0051] When the processor 602 executes the program, the optical neural network training method that is robust to process errors provided in the above embodiment is implemented.

[0052] Furthermore, the electronic device further comprises:

[0053] The communication interface 603 is used for communication between the memory 601 and the processor 602 .

[0054] The memory 601 is used to store computer programs that can be executed on the processor 602 .

[0055] The memory 601 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0056] If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0057] Optionally, in a specific implementation, if the memory 601, the processor 602 and the communication interface 603 are integrated on a chip, the memory 601, the processor 602 and the communication interface 603 can communicate with each other through an internal interface.

[0058] The processor 602 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0059] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above optical neural network training method that is robust to process errors.

[0060] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0061] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0062] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0063] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0064] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0065] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An optical neural network training method that is robust to process errors, characterized in that: The following steps are involved: Obtain the error probability distribution and size range between the actual processing size and the design size of the physical device of the optical neural network chip, establish a model correspondence between the weight parameters of the neurons in the middle layer of the optical neural network and the processing size of the physical device, and obtain the weight error model of the neurons in the middle layer; During the training of the optical neural network, randomly superimposing noise onto the neuron weight parameters according to the weight error model until the training is completed, thereby obtaining the trained neuron weight parameters; Mapping the trained neuron weight parameters into processing parameters of the optical neural network chip; The architecture of the optical neural network includes a plurality of intermediate layers, each intermediate layer includes a plurality of neurons, and the physical structure size of the neurons corresponds to the neuron weight parameters, and a model correspondence relationship between the intermediate layer neuron weight parameters and the processing size is established, including: A modulation relationship function between the physical size of the neuron and the physical property of light is established according to physical simulation, and the model correspondence is determined using the relationship function.

2. The method according to claim 1, characterized in that The optical neural network includes any one of a diffraction neural network, an interference neural network and a scattering neural network.

3. An optical neural network training device that is robust to process errors, characterized in that: include: An acquisition module is used to obtain the error probability distribution and size range between the actual processing size and the design size of the physical device of the optical neural network chip, establish a model correspondence between the weight parameters of the neurons in the middle layer of the optical neural network and the processing size of the physical device, and obtain the weight error model of the neurons in the middle layer; A determination module, during the training of the optical neural network, randomly superimposes noise onto the neuron weight parameters according to the weight error model until the training is completed, thereby obtaining the trained neuron weight parameters; A mapping module, used for mapping the trained neuron weight parameters into processing parameters of the optical neural network chip; The architecture of the optical neural network includes a plurality of intermediate layers, each intermediate layer includes a plurality of neurons, and the physical structure size of the neurons corresponds to the neuron weight parameters, and the acquisition module is further used for: A modulation relationship function between the physical size of the neuron and the physical property of light is established according to physical simulation, and the model correspondence is determined using the relationship function.

4. The device according to claim 3, characterized in that The optical neural network includes any one of a diffraction neural network, an interference neural network and a scattering neural network.

5. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the optical neural network training method that is robust to process errors as claimed in claim 1 or 2.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the optical neural network training method that is robust to process errors as claimed in claim 1 or 2.