# A Hybrid CNN-GRU-LSTM Algorithm with SHAP-Based Interpretability for EEG-Based ADHD Diagnosis
## 1 Introduction  
Attention deficit hyperactivity disorder (ADHD) is one of the most prevalent neurodevelopmental disorders among child populations. It is characterized by the occurrence ofpersistent symptoms of inattention, hyperactivity, and impulsivityity that cause disruption in academic, social, and emotional functioning. ADHD has been estimated to occur in about 5-7% of school children worldwide [1]. Precise and timely diagnosis is very important in order to implement early interventions that have a higher chance of optimizing long-term developmental outcomes. However, standard techniques of diagnosis mainly rely on subjective judgments of behavior and rating scales. This can result in variable or delayed diagnoses because of clinician variability or variation in symptom presentation [2; 3]. Recent neuroimaging and electrophysiological techniques have created new possibilities for the objective assessment of ADHD. Of these, EEG is a low-cost, non-invasive technique with high temporal resolution to record dynamic brain activity [4]. EEG-based biomarkers have shown potential to distinguish between ADHD children and typically developing (TD) peers on the basis of brainwave patterns associated with cognitive control, attention, and executive functioning [5; 6]. While these findings are promising, manual analysis of EEG signals is still challenging and labor-intensive, rendering it impossible in routine clinical practice [7]. To circumvent these limitations, machine learning and deep learning strategies offer an effective avenue for automatically and objectively classifying EEG data. Deep neural networks have demonstrated significant success in extracting discriminative features from raw EEG signals [8; 9]. Moreover, hybrid architectures that combine spatial and temporal processing capabilities further enhance classification performance by capturing the complex, multiscale nature of brain activity [10]. Building on this foundation, the present study proposes a hybrid deep learning framework for the objective evaluation of cognitive features in children with ADHD using EEG signals recorded during attention-demanding cognitive tasks. The proposed system adopts a hybrid deep learning approach that captures both spatial and temporal dynamics in EEG data. The present study aims to develop an interpretable, task-specific deep learning framework for EEG-based ADHD diagnosis. A novel hybrid model integrating CNN, GRU, and LSTM layers is proposed to jointly capture localized spatial features and both short- and long-term temporal dynamics in EEG signals recorded during cognitively demanding attention tasks. This hybrid CNN-GRU-LSTM model demonstrates superior classification performance compared to the baseline CNN-LSTM architecture. To enhance clinical interpretability, SHAP are incorporated to provide feature-level insight, allowing practitioners to identify the most diagnostically relevant EEG channels and relate them to established neurophysiological patterns of ADHD. To further expand the framework's diagnostic generalizability, the study also explores transformer-based encoder architectures, which have gained significant attention in clinical neuroinformatics for their ability to model global, long-range dependencies through self-attention. Although transformer variants (2\(\times\) and 3\(\times\)) and the spatiotemporal transformer demonstrate high cross-validation accuracy, their generalization across test partitions is less stable. To overcome this limitation, the proposed hybrid CNN-RNN-transformer model integrates convolutional, recurrent, and transformer components into a unified architecture, achieving the highest accuracy, F1-score, and interpretability among all tested models. The main contributions of this study are three-fold:  
1. Formulation of a hybrid deep learning architecture integrating CNN, GRU, and LSTM components for efficient extraction of spatial-temporal features from task-evoked EEG signals. 2.