# DenseNet-Based Classification of EEG Abnormalities Using Spectrograms
## 1 Introduction  
Electroencephalogram (EEG) is a important tool that assists in the analysis of various neurological disorders, including epilepsy, Parkinson's disease, and Alzheimer's disease [1]. By recording electrical activity in the brain, EEG provides valuable insights into the brain's functioning and helps in the diagnosis and monitoring of these conditions. The classification of EEG signals into normal and abnormal patterns is a fundamental first step in this analysis [2], as it enables clinicians to identify potential abnormalities that may indicate underlying neurological issues. This classification not only facilitates timely intervention but also guides treatment decisions, ultimately improving patient outcomes and advancing our understanding of these complex diseases. Previous research on EEG-based event classification methods has relied on estimating features from the time, frequency, and time-frequency domains, which are then used as inputs for machine learning algorithms [3, 4]. This approach requires a solid background insignal processing, and the performance of these models heavily depends on the quality of the estimated features. In response, deep learning methods have been introduced to classify EEG events without the need for manual feature extraction [5; 6; 7]. However, these techniques require large EEG datasets for training to achieve high performance. Additionally, complex deep-learning architectures demand substantial training time and computational resources [8]. Transfer learning has emerged as a viable solution, allowing researchers to leverage pre-trained weights to address these challenges [9]. Consequently, more researchers [10; 11; 12] are adopting transfer learning methods to analyze EEG events. Despite advancements in artificial intelligence techniques for EEG analysis that enhance performance, the interpretability of these methods has become increasingly challenging [13]. Explainability is particularly crucial in the medical domain, where understanding model decisions can significantly impact patient care [14]. Techniques such as SHapley Additive eXPlanations (SHAP) [15], Local Interpretable Model-agnostic Explanations (LIME) [16] and Gradient-weighted Class Activation Mapping (Grad-CAM) [17] have been proposed to improve the interpretability of these models and enhance our understanding of their decision-making processes. The Temple University Hospital Abnormal EEG Dataset (TUAB) [18] was created from archived records at Temple University Hospital and is regarded as the largest publicly available collection of clinical EEG recordings worldwide [19]. The TUAB dataset has been annotated as either normal or abnormal and has been widely utilized in various studies [20; 21; 22; 23; 24; 25] to develop methods for classifying abnormal EEG signals. Channels T5 and O1 are often chosen in TUAB EEG tasks [20; 23], because they provide critical information about temporal and occipital brain activity, regions commonly involved in pathological conditions like epilepsy and encephalopathy [19]. Channel T5 located in the left temporal lobe, is sensitive to abnormalities such as spikes and sharp waves [26], while channel O1, in the left occipital region, detects patterns like occipital slowing or periodic discharges. These channels are less prone to artifacts from eye movements compared to frontal channels [27; 28], making them ideal for identifying abnormalities with higher sensitivity and signal quality. Therefore, channels T5 and O1 were chosen as inputs in this study for classifying normal and abnormal EEGs in the TUAB dataset [20; 23]. Signal images, spectrograms, and scalograms are commonly used for EEG event analysis, providing insights from various domains. To ensure a fair comparison among these EEG representations, we evaluated their performance under consistent model settings. To improve performance with limited data and to reduce computational costs, we used these representations as input to a DenseNet transfer learning-based strategy, with post-processing applied across multiple images.