# The Need for Speed: A Fast Guessing Entropy Calculation for Deep Learning-Based SCA
## 5 Experimental Results
### Random Hyperparameter Search with Different Validation Metrics  
We compare different early stopping metrics in a random hyperparameter search process for the two ASCAD datasets and different leakage models. The results for the CHES CTF dataset are only provided for the Hamming weight leakage model. Each randomly selected CNN is trained for 200 epochs, and we save the trained weights at the end of each epoch. At the end of the training, each early stopping metric indicates the best training epoch, and we restore the trained weights from that epoch. Then, as the training is finished, we compute GE for the attack set containing a larger number of traces. Note that 200 epochs is a relatively small number for training epochs, and, as shown in this section, stopping the training after 200 epochs may also deliver good results for some cases. Table 2 gives the number of validation traces \(V\) considered for each early stopping metric, while the partition \(Q\) is the number of the traces used to calculate each specific metric. For instance, GE is the average of multiple key rank executions over \(Q\) traces, randomly selected from a larger set \(V\) for each key rank execution. This way, we set \(V\) greater than \(Q\) so that sampling each data in \(Q\) preserves a certain randomness. By doing so, the obtained results would indicate a better generalization capacity of models. For mutual information, we apply \(V\) validation traces. FGE estimation considers only 50 traces for \(Q\) and 500 for \(V\). We tested other values for \(Q\) and \(V\), from 20 to 200 (with a step of 10 traces), and 50 was the minimum value for \(Q\) and \(V\), which still preserves the best results for FGE. This range was selected to align with the usually required number of attack traces reported in related works. More precisely, state-of-the-art techniques commonly require between 100 and 200 attack traces to break the considered datasets. At the same time, by considering a less than 100 attack traces setting, we allow for further improvements in the results. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Hyperparameter**} & \multicolumn{3}{c}{**Ranges**} \\ \cline{2-4}  & **Min** & **Max** & **Step** \\ \hline Batch Size & 100 & 1 000 & 100 \\ Convolution Layers & 1 & 4 & 1 \\ Convolution Filters & \(2\times 2^{c-1}\) & \(16\times 2^{c-1}\) & 2 \\ Kernel Size & 4 & 20 & 1 \\ Stride & 1 & 4 & 1 \\ Pooling Size & 1 & 4 & 1 \\ Pooling Stride & 1 & 4 & 1 \\ Dense layers & 1 & 4 & 1 \\ \hline \multicolumn{4}{c}{**Options**} \\ \hline Neurons & 10, 20, 30, 40, 50, 100, 200, 300, 400, 500 \\ Activation function & ReLU, ELU, or SELU \\ Learning Rate & \(5\times 10^{-3},1\times 10^{-3},5\times 10^{-4},1\times 10^{-4},5\times 10^{-5}, 1\times 10^{-5}\) \\ Pooling Type & Average, Max \\ Weight Initializer & He, Random Uniform, Glorot Uniform \\ Optimizer & Adam, RMSprop \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hyperparameter search space for CNNs (\(c\) in convolution filters indicates the convolution layer index). \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**ASCADf**} & \multicolumn{2}{c}{**ASCADr**} & \multicolumn{2}{c}{**CHES CTF**} \\  & \(V\) & \(Q\) & \(V\) & \(Q\) & \(V\) & \(Q\) \\ \hline Fast GE & 500 & 50 & 500 & 50 & 500 & 50 \\ Emp. GE & 5000 & 3000 & 10,000 & 5000 & 5000 & 3000 \\ GEEA & 5000 & 3000 & 10,000 & 5000 & 5000 & 3000 \\ MI & 5000 & 5000 & 10,000 & 10,000 & 5000 & 5000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Number of validation traces for each early stopping method. We execute 500 searches for each dataset, considering the Hamming weight and identity leakage models. Table 3 provides the average time overhead in percentage for each considered metric. As we can see, the FGE estimation provides a maximum of 3.35% overhead among the four considered scenarios. For the ASCADr dataset, the overhead is only 1.19% and 1.49%, which can be considered negligible for the training time compared with its counterparts.