# Research on Side-Channel Analysis Based on Deep Learning with Different Sample Data
## 5 Experiment and Model Evaluation
### Experiment C: Experiments with Sample Data of Different Scales
For the CNN model, during the training of the first 100 epochs, the model fluctuated significantly with the increase in the number of iterations. At the 100 th epoch, the accuracy of the model under 40k, 30k, 20k, 10k, and 5k data increased to 0.3197, 0.3197, 0.2033, 0.1599, and 0.1125, respectively, and the loss value decreased to 2.3388, 2.3388, 2.8812, 3.2683, and 3.6635, respectively. With the increase in the number of iterations, after the 300 th epoch, the training accuracy and loss value curve of the MLP model under different scale data gradually converge smoothly and tend to be stable. Between 350 and 400 epochs, the average training accuracy of the MLP under 5k, 10k, 20k, 30k, and 40k data volume is 0.3045, 0.3826, 0.5258, 0.5352, and 0.5441, respectively, the training loss values are 2.4804, 2.1234, 1.4856, 1.4234, and 1.3806, respectively, and the test accuracy rates are 0.2180, 0.3450, 0.4820, 0.5133, and 0.5265, respectively. The test loss values are 2.8696, 2.2371, 1.6300, 1.4520, and 1.4232, respectively. There is no fitting phenomenon of MLP under each data volume, and the rank value is 2. The specific parameters and experimental results of the CNN model are shown in Table 5 below. Figures 23 and 24 show the performance of RNN for different size data and RNN loss values under different scales of data, respectively. For the RNN model, during the training of the first 100 epochs, the model converges rapidly with the increase in the number of iterations. At the 100 th epoch, the accuracy of the model under the data of 40k, 30k, 20k, 10k, and 5k increases to 0.3067, 0.3229, 0.2267, 0.1393, and 0.1245, respectively, and the loss value decreases to 2.3427, 2.1726, 2.5977, 3.1857, and 3.3066, respectively. With the increase in iteration time, the training accuracy and loss value curve of the MLP model under different scale data gradually converge smoothly and tend to be stable. Between 350 and 400 epochs, the average training accuracy of the MLP under 5k, 10k, 20k, 30k, and 40k data volume is 0.2025, 02809, 0.4281, 0.4818, and 0.5237, respectively, the training loss values are 2.7272, 2.3556, 1.7523, 1.5794, and 1.4271, respectively, and the test accuracy rates are 0.1100, 0.2350, 0.4105, 0.4390, and 0.4265, respectively. The test loss values are 3.5471, 2.7587, 1.8600, 1.7173, and 1.8233, respectively. There is no fitting phenomenon of RNN under each data volume. The rank value under 5k data volume is 3, and the rank value under other data volumes is 2. The specific parameters and experimental results of the RNN model are shown in Table 6 below. Figures 25 and 26 show the performance of LSTM for different size data and LSTM loss values under different scales of data, respectively. For the LSTM model, during the training of the first 100 epochs, with the number of iterations, the model has no obvious fluctuation under the amount of 5k data. At the 100 th epoch, the accuracy of the model under the number of 40k, 30k, 20k, 10k, and 5k data increased to 0.1922, 0.1825, 0.1448, 0.0837, and 0.0252, respectively, and the loss value decreased to 2.6289, 2.6858, 2.9755, 3.4882, and 4.1442, respectively. With the increase in iteration time, the training accuracy and loss value curve of the MLP model under different scale data gradually converge smoothly and tend to be stable. Between 350 and 400 epochs, the average training accuracy of MLP under 5k, 10k, 20k, 30k, and 40k data volume is 0.1932, 0.2820, 0.3826, 0.3954, and 0.4671, respectively, the training loss values are 2.6546, 2.2234, 1.8559, 1.7949, and 1.5768, respectively, and the test accuracy rates are 0.1780, 0.2770, 0.3695, 0.3863, and 0.3718, respectively. The test loss values are 2.8335, 2.2410, 1.9201, 1.8032, and 2.0258, respectively. There is no fitting phenomenon of the LSTM under each data volume. The rank value under 5k and 20k data volumes are 3, and the rank value under other data volumes is 2. Overall, the model accuracy does not necessarily have a linear relationship with the amount of training data.