# A Hybrid CNN-GRU-LSTM Algorithm with SHAP-Based Interpretability for EEG-Based ADHD Diagnosis
## 4 Results
### Confusion Matrix Analysis  
To further evaluate the classification performance of the proposed models, confusion matrices were analyzed to provide insight into class-specific prediction accuracy and error distribution. Figure 16 demonstrates the classification outcomes of the CNN-LSTM model for EEG-based ADHD detection. The model classified 191,275 control samples and 188,814 ADHD samples accurately. However, it made 725 false-positive and 2912 false-negative errors. These classification results suggest that the model has high sensitivity and specificity. The fairly high number of false negatives at observations suggests ADHD cases are under-identified and that this model might be missing some ADHD-structured clues. The confusion matrix in Figure 17 demonstrates exceptionally high classification accuracy between children with ADHD and the control group. An almost perfect diagonal is observed, with 190,808 correctly classified control samples and 191,684 correctly classified ADHD samples and only minimal misclassifications (1055 false positives and 178 false negatives, respectively). This is a sign of very low levels of both false positives and false negatives, pointing to the model's high capacity for differentiating between structurally similar signal patterns. These findings validate that the CNN-GRU-LSTM combination of architectures achieves excellent generalization performance on the validation set, which is essential for clinical utility. Figure 18 illustrates the classification results of the transformer model 2\(\times\) on the test set. The value 131,211 represents correctly identified typically developing children (true negatives), while 159,881 corresponds to correctly classified ADHD cases (true positives). The model produced 60,652 false positives (control misclassified as ADHD) and 31,981 false negatives (ADHD misclassified as control). Figure 19 presents the confusion matrix of the transformer model 3\(\times\). Both classes show good classification performance, as seen from the diagonal values, with 134,802 correctly classified control samples and 151,182 correctly classified ADHD samples. Although  
Figure 16: Confusion matrix of CNN–LSTM model for EEG-based ADHD classification. Figure 17: Confusion matrix of CNN + GRU + LSTM model for EEG-based ADHD classification. Figure 18: Confusion matrix of transformer encoder model with 2 stacked encoder blocks. overall accuracy is high, the model has now been shown to not only misclassify control samples but also ADHD samples at a significant rate, which is a concern with respect to its clinical utility unless additional calibration or regularization is undertaken. Figure 20 presents the confusion matrix of the spatiotemporal transformer model. The matrix reveals excellent classification performance across both classes, with 191,822 control samples and 191,858 ADHD samples correctly classified. Just 41 control cases were incorrectly classified as ADHD, and four ADHD cases were incorrectly classified as control, indicating a very dependable decision boundary. This very low misclassification rate demonstrates the model's outstanding capacity to generalize between classes, furthering its prospects for clinical utility in EEG-based ADHD diagnosis with little chance of diagnostic mistake. Figure 21 illustrates the confusion matrix of the hybrid CNN-RNN-transformer model, showcasing almost flawless classification performance. It correctly classifies 191,859 control samples and 191,860 ADHD samples and misclassifies just 4 control samples and 2 ADHD samples. Such negligible error rates reflect an extremely high degree of generalization and class discrimination. In comparison to other models assessed, the hybrid architecture has the lowest misclassification rate, which further strengthens its clinical validity and practical reliability for EEG-based ADHD detection. Figure 19: Confusion matrix of transformer encoder model with 3 stacked encoder blocks. Figure 20: Confusion matrix for spatiotemporal transformer model.