A progressive training method for optimizing the phase configuration of ONNs with MZI

Through the gradual training method, the phase configuration of MZI was gradually optimized, and the problem of phase configuration error in large photon neural networks was solved, the recognition accuracy was improved, the inaccuracy caused by unsatisfactory photon devices was achieved, and the recognition of large networks was improved. Accuracy.

CN117313815BActive Publication Date: 2024-12-06CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311205923.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2024-12-06
Estimated Expiration
2043-09-19

Smart Images

  • Figure CN117313815B_ABST
    Figure CN117313815B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of photon signal processing technology, and specifically relates to a progressive training method for optimizing the ONNs phase configuration of MZI, including: in a certain number of iterations, gradually determining the phase of each column according to the MZI arrangement mode; considering the phase error and beam splitter error carried by the MZI based on the determined phase part, and starting iterative basic training again to offset the error carried by the previous element with the value of the subsequent phase shifter; repeatedly training to the last column of the grid. The phase value obtained by the progressive training of the present invention can counteract the inaccuracy caused by the undesirable photonic device, thereby improving the classification accuracy of ONNs reduced by the error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of photon signal processing, and in particular relates to a progressive training method for optimizing ONNs phase configuration of MZI. Background Art

[0002] Optical neural networks (ONNs) have attracted extensive attention in the field of artificial intelligence due to their low energy consumption and ultra-high computing speed. The rapid development of the complementary metal oxide semiconductor (CMOS) compatible silicon technology (Silicon-On-Insulator, SOI) platform provides a hardware foundation for the construction of ONNs based on Mach-Zehnder Interferometer (MZI). ONNs composed of cascaded MZIs are easy to integrate, insensitive to the external environment, and easy to cascade to build large-scale ONNs, and are often used in recognition tasks.

[0003] However, the errors and inherent losses of photonic devices caused by manufacturing defects will accumulate as the scale of ONNs increases, thus affecting the recognition accuracy of optical neural networks. At the same time, the phase trained by the network is lossless. If it is directly mapped to the ONN grid, there will be errors, and the actual accuracy of the ONN will deviate from the ideal value. In previous studies, there are some optimization schemes to reduce the inaccuracy caused by optical components in ONNs. On the one hand, starting from the grid of ONNs, the MZI grid topology is improved to combat errors. However, this scheme increases the complexity of the network at the cost of doubling the grid size and parameter space. On the other hand, the photonic devices with errors are directly optimized by locally correcting the hardware errors in a single optical gate in ONNs. However, using these strategies in integrated ONNs is very time-consuming and requires additional hardware support. The scheme of using genetic algorithms (GA) to train MZI-based ONNs takes into account the errors of the photonic devices themselves and uses this scheme to increase the robustness of ONNs. However, this scheme only considers small networks suitable for GA algorithms and cannot be applied to large networks.

[0004] In summary, the existing technology for phase configuration training of photonic neural networks based on MZI interferometers only considers small networks suitable for GA algorithms and cannot be applied to large networks. Summary of the invention

[0005] In order to solve the above technical problems, the present invention proposes a progressive training method for optimizing the ONNs phase configuration of MZI, comprising the following steps:

[0006] S1, initialize ONNs, determine ONN input features N, and the maximum number of iterations E;

[0007] S2, iterate from Epoch 0 to E, and obtain the phase list D before normal training under the current iteration number;

[0008] S3, start normal training, and save the phase updated by SVM to list P;

[0009] S4. Calculate the integer value of the formula n=(Epoch+1) / 100, and determine the phase that needs to be fixed and updated according to the number of iterations;

[0010] S5. Obtaining a position index c of the phase shifter to be fixed according to n;

[0011] S6. Obtaining, according to n, a position index w of the phase shifter for adding an error to the just-fixed phase;

[0012] S7, judging whether the integer value n is zero, if it is 0, it means that the normal training times do not exceed 100 times, and there is no need to fix the phase value, and go to step S11; if it is not 0, it is necessary to fix the phase value corresponding to the nth column, and go to step S8;

[0013] S8, replace the phases of the first n columns of MZI in the updated phase list P with the phase values ​​of the same position in D, and keep the rest unchanged, so that the phase is fixed;

[0014] S9, judging whether the formula (Epoch+1)%100 is 0, if it is 0, it means that the phase error and beam splitter error need to be considered for the fixed phase value under the current iteration number, and go to step S10; if it is not 0, it does not need to consider the error, and go to step S11;

[0015] S10, taking into account the phase error and the beam splitter error in the phase of the first n columns of the MZI represented in the phase list P;

[0016] S11, update the phase list P, update the number of iterations Epoch = Epoch + 1;

[0017] S12, determine whether the number of iterations Epoch is equal to the maximum number of iterations E. If it is equal to the maximum number of iterations E, it means that the training is completed, and jump to step 13; if it is not equal, continue training, and jump to step 2;

[0018] S13. Output the optimal phase P.

[0019] The progressive training scheme proposed in the present invention gradually determines the phase of each column according to the MZI arrangement in a certain number of iterations; based on the determined phase part, the phase error carried by the MZI and the beam splitter error are considered, and the basic training is iterated again to offset the error carried by the previous element with the value of the subsequent phase shifter; the training is repeated until the last column of the grid, and the phase value obtained by the progressive training can counteract the inaccuracy caused by the non-ideal photonic device, thereby improving the classification accuracy of ONNs reduced by the error. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of a single MZI structure in a progressive training method for optimizing ONNs phase configuration of an MZI according to the present invention;

[0021] Figure 2 A structural diagram of ONNs based on MZI in a progressive training method for optimizing ONNs phase configuration of MZI of the present invention;

[0022] Figure 3 A flow chart of a progressive training method for optimizing ONNs phase configuration of MZI of the present invention;

[0023] Figure 4 This is a simulation result diagram after in-situ training and direct mapping of the phase configuration of a photonic neural network based on a Mach-Zehnder interferometer;

[0024] Figure 5 A diagram of simulation results of a progressive training method for optimizing ONNs phase configuration of an MZI according to the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] like Figure 1 As shown, the phase error and beam splitter error that need to be optimized come from Figure 2 Optical phase shifters and couplers in.

[0027] like Figure 2 As shown in the figure, in ONNs based on MZI, the MZIs are cascaded in a rectangular arrangement, and the number of MZIs in odd and even columns is inconsistent. In normal training, the phase values ​​of all MZI phase shifters are configured from left to right and from top to bottom in the order of arrangement. Figure 2The number of MZIs in the even-numbered columns is half of the input eigenvalue, and the number of MZIs in the odd-numbered columns is the number of MZIs in the even-numbered columns minus one. The progressive training scheme obtains the position index of the MZI phase shifters located in the odd-numbered columns and the even-numbered columns according to the arrangement rule of the MZIs. Figure 2 The numbers on the MZI phase shifter shown are the position index values ​​of the phase configuration obtained through training. Therefore, we can control the fixed phase value by the number of iterations of normal training according to the number of columns and arrangement of the MZI. The position index list c of the phase shifters to be fixed is calculated, and the position index list w of the phase shifters to which errors need to be added to the just fixed phase is obtained.

[0028] In the embodiment of the present invention, a 4-input 4-output MNIST data set simulation task is selected as an example, the number of MZIs required for a weight matrix is ​​calculated according to the input eigenvalues, and the MZIs are arranged according to the rectangular decomposition method as follows Figure 2 shown.

[0029] A progressive training method to optimize the phase configuration of ONNs in MZI, such as Figure 3 As shown, including:

[0030] S1, initialize ONNs, determine ONN input features N = 4, and the maximum number of iterations E = 400;

[0031] S2, iterate from Epoch 0 to E, and obtain the phase list D before normal training under the current iteration number;

[0032] S3. Start normal training and obtain the updated phase list P after training, that is, normal training converges to obtain a set of phase values ​​in the first 100 iterations.

[0033] S4. Calculate the integer value of the formula n=(Epoch+1) / 100, and determine the phase that needs to be fixed and updated according to the number of iterations;

[0034] S5. Calculate the position index c of the phase shifter to be fixed based on n. In this example, when the value of n is 1, the MZI phase index list c that needs to be fixed is 0, 1, 2, and 3 respectively; when the value of n is 2, it means that the phase of the second column needs to be fixed, and c adds 4 and 5 respectively, and the value in w is 0-5 at this time; when the value of n is 3, the MZI phase index list c that needs to be fixed continues to add index values ​​6, 7, 8, and 9, and the value in c is 0-9 at this time; when the value of n is 4, the MZI phase index list c that needs to be fixed continues to add index values ​​10 and 11, and the value in c is 0-11 at this time;

[0035] S6. Calculate the position index w of the phase shifter that needs to add an error to the just-fixed phase based on n. In this example, when the n value is 1, the phase index list w that needs to consider the phase error and beam splitter error in the just-fixed MZI is 0, 1, 2, and 3 respectively; when the n value is 2, it means that the second column phase needs to be fixed, and the MZI phase index list w values ​​that need to consider the error are 4 and 5; when the n value is 3, the MZI phase index w values ​​that need to consider the error are 6, 7, 8, and 9; when the n value is 4, the MZI phase index values ​​that need to consider the error are 10 and 11 respectively;

[0036] S7, determine whether the integer value n is zero. If it is 0, it means that the normal training times do not exceed 100 times, and there is no need to fix the phase value, and go to step S11. If it is not 0, it is necessary to fix the phase value corresponding to the n columns, and go to step S8.

[0037] S8. Replace the phases of the first n columns of MZI in the updated phase list P with the phase values ​​of the same position in D, and keep the rest unchanged. When the number of iterations exceeds 100, the phase value of the first column of MZI will be fixed according to the index value of the phase of the first column of MZI, which is still the phase value before training. Normal training only updates the phases except the first column.

[0038] S9, determine whether the formula (Epoch+1)%100 is 0. If it is 0, it means that the phase error and beam splitter error need to be considered for the fixed phase value at the current iteration number, and go to step S10. If it is not 0, it does not need to consider the error, and go to step S11;

[0039] S10. In the phase list P, the phase of the first n columns of the MZI is represented by taking into account the phase error and the beam splitter error, that is, the phase value indexed as w in P is added with the phase error and the beam splitter error; the fixed phase is also lossless and ideal, and at this time, the phase error and the beam splitter error of the fixed photonic device are taken into account in the network. The phase with error is involved in the subsequent training, and the training is started again to use the phase of the subsequent phase shifter to offset the error carried by the previous element.

[0040] S11, update the phase list P, update the number of iterations Epoch = Epoch + 1, and fix a phase column every 100 iterations in the subsequent training until the last column

[0041] S12, determine whether the number of iterations Epoch is equal to the maximum number of iterations E. If it is equal to the maximum number of iterations, it means that the training is completed, and jump to step 13. If it is not equal, continue training and jump to step 2.

[0042] S13, outputting the optimal phase P. The phase value obtained by progressive training can counteract the inaccuracy caused by non-ideal photonic devices.

[0043] like Figure 4 , in this example, the confusion matrix of the handwritten digit recognition task of 0-5 of the MNSIT dataset is selected. In the ONN composed of a cascaded MZI array with 3 layers of linear units and a total of 90 phase shifters, if the trained lossless phase is directly mapped without considering the device error, the recognition accuracy is only 73.66%.

[0044] like Figure 5 , the confusion matrix diagram of the training using the progressive training scheme proposed by the present invention to optimize the phase configuration of the photonic neural network based on Mach-Zehnder interferometer. Figure 4 The structure is consistent with that in the ONN, which consists of a cascaded MZI array with 3 layers of linear units and a total of 90 phase shifters. Figure 1 The flowchart of the progressive training scheme for the phase configuration of a photonic neural network based on Mach-Zehnder interferometer is shown in the figure. The number of iterations in this example is 600. When the 100th training iteration is completed, the first column of phase values ​​of the three-layer MZI array in the ONN will be obtained at the same time. At this time, the position index list c value of the phase shifter that needs to be fixed is calculated to be [0-5], and the position index list w[0-5] of the column where the phase shifter that needs to add an error to the phase just fixed is located. Similarly, the position index list c value of the phase shifter that needs to be fixed can be obtained at the 200th iteration [6-9], and the position index list c value of the third column of MZI phase shifters can be obtained at the 300th iteration [10-15], until all phases are obtained after the last 500 iterations. From this process, it can be seen that the scheme proposed in the present invention can progressively obtain the phase configuration according to the arrangement of MZI and the number of iterations. The accuracy rate of the training case using the progressive training scheme proposed in the present invention to optimize the phase configuration of a photonic neural network based on Mach-Zehnder interferometer is 87.66%, compared with Figure 4 Direct mapping is improved by 22.33%.

[0045] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A progressive training method for optimizing the phase configuration of ONNs of MZI, characterized in that: include: S1, initialize ONNs, determine ONN input features N, and the maximum number of iterations E; S2, iterate from Epoch 0 to E, and obtain the phase list D before normal training under the current iteration number; S3, start normal training, and save the phase updated by SVM to list P; S4. Calculate the integer value of the formula n=(Epoch+1) / 100, and determine the phase that needs to be fixed and updated according to the number of iterations; S5. Obtaining a position index c of the phase shifter to be fixed according to n; S6. Obtaining, according to n, a position index w of the phase shifter for adding an error to the just-fixed phase; S7, judging whether the integer value n is zero, if it is 0, it means that the normal training times do not exceed 100 times, and there is no need to fix the phase value, and go to step S11; if it is not 0, it is necessary to fix the phase value corresponding to the nth column, and go to step S8; S8, replace the phases of the first n columns of MZI in the updated phase list P with the phase values ​​of the same position in D, and keep the rest unchanged, so that the phase is fixed; S9, judging whether the formula (Epoch+1)%100 is 0, if it is 0, it means that the phase error and beam splitter error need to be considered for the fixed phase value under the current iteration number, and go to step S10; if it is not 0, it does not need to consider the error, and go to step S11; S10, taking into account the phase error and the beam splitter error in the phase of the first n columns of the MZI represented in the phase list P; S11, update the phase list P, update the number of iterations Epoch = Epoch + 1; S12, determine whether the number of iterations Epoch is equal to the maximum number of iterations E. If it is equal to the maximum number of iterations E, it means that the training is completed, and jump to step 13; if it is not equal, continue training, and jump to step 2; S13. Output the optimal phase P.

2. A progressive training method for optimizing ONNs phase configuration of MZI according to claim 1, characterized in that: The position index c of the phase shifter to be fixed is calculated based on n, including: When the n value is 1, the position index c of the MZI phase index list that needs to be fixed is 0, 1, 2, and 3 respectively; when the n value is 2, the phase of the second column needs to be fixed, and c is added with 4 and 5 respectively. At this time, the position index value in the phase shifter that needs to be fixed is 0-5; when the n value is 3, the position index c of the MZI phase index list that needs to be fixed continues to add index values ​​6, 7, 8, and 9. At this time, the position index value in the phase shifter that needs to be fixed is 0-9; when the n value is 4, the position index c of the MZI phase index list that needs to be fixed continues to add index values ​​10 and 11. At this time, the position index value in the phase shifter that needs to be fixed is 0-11.

3. A progressive training method for optimizing ONNs phase configuration of MZI according to claim 1, characterized in that: The position index w of the phase shifter that adds an error to the just fixed phase is obtained according to n, including: When the n value is 1, the index w in the phase index list that needs to consider the phase error and beam splitter error in the just fixed MZI is 0, 1, 2, and 3 respectively; when the n value is 2, it means that the phase of the second column needs to be fixed, and the index w values ​​in the MZI phase index list that need to consider the error are 4 and 5; when the n value is 3, the MZI phase index w values ​​that need to consider the error are 6, 7, 8, and 9; when the n value is 4, the MZI phase index values ​​that need to consider the error are 10 and 11 respectively.

Citation Information

Patent Citations

  • Optical neural network training method and system, storage medium and equipment

    CN113869508A

  • Optical neural network training method and device, equipment and medium

    CN114399038A