# A Hybrid CNN-GRU-LSTM Algorithm with SHAP-Based Interpretability for EEG-Based ADHD Diagnosis
## 4 Results
### Model Performance Metrics  
For assessing the stability and generalizability of each model, we conducted a stratified five-fold cross-validation, ensuring balanced class distributions in both the training and validation sets. All six architectures--CNN-LSTM, CNN-GRU-LSTM, transformer encoder (2\(\times\) blocks), transformer encoder (3\(\times\) blocks), spatiotemporal transformer, and the proposed hybrid CNN-RNN-transformer--were evaluated using five core metrics: accuracy, precision, recall, F1-score, and area under the curve (AUC). Table 2 presents the average performance of each model across all folds. \begin{table}
\begin{tabular}{l c c c c c c} \hline \hline
**Model** & **Fold** & **Accuracy (\%)** & **Precision** & **Recall** & **F1-Score** & **AUC** \\ \hline CNN–LSTM & Fold 1 & 91.20 & 0.89 & 0.92 & 0.905 & 0.934 \\  & Fold 2 & 92.50 & 0.91 & 0.93 & 0.920 & 0.945 \\  & Fold 3 & 93.10 & 0.92 & 0.94 & 0.930 & 0.948 \\  & Fold 4 & 91.80 & 0.90 & 0.92 & 0.910 & 0.938 \\  & Fold 5 & 93.20 & 0.91 & 0.95 & 0.930 & 0.941 \\ CNN–GRU–LSTM & Fold 1 & 0.9965 & 0.9980 & 0.9949 & 0.9963 & 0.9998 \\  & Fold 2 & 0.9963 & 0.9987 & 0.9940 & 0.9962 & 0.9999 \\  & Fold 3 & 0.9965 & 0.9976 & 0.9954 & 0.9965 & 0.9998 \\  & Fold 4 & 0.9956 & 0.9987 & 0.9926 & 0.9956 & 0.9996 \\  & Fold 5 & 0.9968 & 0.9991 & 0.9945 & 0.9968 & 0.9999 \\ Transformer Encoder (2\(\times\)) & Fold 1 & 0.7561 & 0.7702 & 0.7300 & 0.4239 & 0.8450 \\  & Fold 2 & 0.7670 & 0.9228 & 0.5827 & 0.3692 & 0.8547 \\  & Fold 3 & 0.7285 & 0.7898 & 0.6228 & 0.3859 & 0.8126 \\  & Fold 4 & 0.7700 & 0.8004 & 0.7194 & 0.4202 & 0.8570 \\  & Fold 5 & 0.7710 & 0.7830 & 0.7650 & 0.4465 & 0.8570 \\ Transformer Encoder (3\(\times\)) & Fold 1 & 0.7358 & 0.7527 & 0.7024 & 0.4138 & 0.8158 \\  & Fold 2 & 0.7058 & 0.7030 & 0.7128 & 0.4182 & 0.7838 \\  & Fold 3 & 0.7674 & 0.7771 & 0.7499 & 0.4305 & 0.8547 \\  & Fold 4 & 0.7555 & 0.8361 & 0.6356 & 0.3902 & 0.8407 \\  & Fold 5 & 0.7484 & 0.7723 & 0.7123 & 0.4210 & 0.8301 \\ Spatiotemporal Transformer & Fold 1 & 0.9997 & 1.0000 & 0.9995 & 0.9997 & 0.9999 \\  & Fold 2 & 0.9998 & 0.9998 & 0.9996 & 0.9997 & 0.9997 \\  & Fold 3 & 0.9998 & 1.0000 & 0.9999 & 0.9999 & 1.0000 \\  & Fold 4 & 0.9998 & 1.0000 & 0.9998 & 0.9999 & 0.9997 \\  & Fold 5 & 0.9999 & 1.0000 & 0.9999 & 0.9999 & 1.0000 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Average classification performance metrics across 5-fold-stratified cross-validation for all evaluated models. Figure 15: Topographic maps of ICA components for EEG in ADHD class. As observed, the CNN-GRU-LSTM model significantly outperformed the baseline CNN-LSTM architecture, achieving an average accuracy of approximately 99.62% compared to 92.36%, reflecting an improvement of more than 7%. It also demonstrated substantial gains in F1-score (from \(\sim\)0.9190 to \(\sim\)0.9963) and AUC (from \(\sim\)0.9412 to \(\sim\)0.9998), indicating an enhanced ability to capture both short- and long-term temporal dependencies in EEG sequences. In contrast, the transformer encoder models (2\(\times\) and 3\(\times\)) exhibited considerably lower and more unstable performance. The 2\(\times\) encoder showed an average accuracy of ~75.85%, with F1-scores ranging from 0.3692 to 0.4465 and AUC values between 0.8126 and 0.8570. Similarly, the 3\(\times\) encoder achieved an average accuracy of ~74.26%, with F1-scores from 0.3902 to 0.4305 and AUC between 0.7838 and 0.8547. These results reflect poor generalization and high sensitivity to data partitioning, primarily due to a higher false positive rate in classifying control cases as ADHD. The spatiotemporal transformer model performed almost perfectly, with accuracy greater than 99.98% and, on average, F1-scores greater than 0.9999 and AUC greater than 1.0000, reflecting the benefit of adding 2D positional encoding to model electrode topography and spatial-temporal interactions.