# Numerical Simulation of an InP Photonic Integrated Cross-Connect for Deep Neural Networks on [PERSON] Shi
## 5 Image Classification via a Three-Layer Photonic Deep Neural Network
The accuracy changes from 89.7% when the 1 st layer is substituted with a photonic layer (Figure 6b), down to 86.7% when both the 1 st and the 2 nd layers are substituted with photonic layers (Figure 6c), and down to 85.8% when all 3 layers of matrix multiplications are computed via three photonic layers (Figure 6d). This may be due to the error accumulation which causes prediction accuracy degradation. Furthermore, the simulation result aligns well with the experimental result trend as shown in Figure 7a. Figure 7a plots the error evolution with an increasing number of the photonic layers. The solid lines with open symbols represent the results from the simulation and the dashed lines with filled symbols represent the experimental results. The circles show the error induced by each single layer on the 3-layer network, where the errors keep staying almost at the same level, about 0.07 in the simulation and 0.08 in the experiment. The triangles plot the accumulated error from layer to layer, which increases from 0.1 to 0.18 for simulation and from 0.10 to 0.20 in the experiment. The squares represent the final prediction accuracy as we calculated from the correlation matrix, which decreases from 89.2% to 85.8% as shown in Figure 6 for simulation and from 91.2% to 85.8% for experiments [27]. The experimental results show great agreement with the simulations, which means that investigating the performance while changing some of the parameters involved in the photonic integrated circuit (PIC) will help  
Figure 5: **(a)** The simulation structure of one layer of neurons; **(b)** Trained 3-layer deep neural network (DNN) employed to solve the iris flower classification. **(c)** Output data obtained from Neuron 1 at (i) Layer 1, (ii) Layer 2, and (iii) Layer 3, with calculated errors between simulated computation (blue line) and the expected computation (red line), resulting in errors of 0.123, 0.051, and 0.055, respectively. to get some insight into the photonic chip architecture and scalability. From the perspective of the final prediction accuracy and error induced by the photonic neural network chip, the impact of the optical crosstalk from the AWG and the waveguide crossings are investigated. We tune the crosstalk from \(-15\) dB to \(-30\) dB with \(1\) dB steps and implement the 3-layer neural network after generating the weight calibration curves as reported in Section 4. Figure 7b plots the results at the output of layer 1, with the blue line representing the average NRMSE from 4 neurons at layer 1 and the red line plotting the variation of the final prediction. Similarly, Figure 7c,d illustrate the average NRMSE and the final prediction versus the optical crosstalk in the layers. The error induced by the chip is almost in the same range for different crosstalk values, though it slightly reduces when the crosstalk decreases. The prediction accuracy for Layer 1 in Figure 7b shows a stronger crosstalk dependency; a smaller optical crosstalk at Layer 1 provides a better prediction accuracy. This may be related to the fact that the first layer operates on high resolution multilevel input signals, which require a higher optical to signal ratio available. A better accuracy also appears when the crosstalk is high, i.e., near \(-15\) dB. This might be attributed to the errors leading the prediction of the flower label to a different minima location, i.e., to changes of the state of the network, as will also be found in Section 5. Figure 7c shows a flattened accuracy for optical crosstalk smaller than \(-20\) dB. Figure 7d shows an even more flattened accuracy level as the variation of the induced error is smaller. The accuracy level is maintained from the 2 nd layer onwards. Figure 6: (**a**) Label prediction of the trained DNN, indicating an accuracy of 95%. (**b**) Simulated image prediction using photonic DNN as the 1 st hidden layer, with an accuracy of 89.2%. (**c**) Simulated label prediction using photonic DNN as the 1 st and 2 nd hidden layers, with an accuracy of 86.7%.