Source-linked AI summary
Schizophrenia Detection from EEG Signals: A Transformer Framework with Spectrogram Representation
Abtin Shafiei, Mohsen Hooshmand, Majid Ramezani
TL;DR
EEG-based schizophrenia classification faces variation in datasets, preprocessing, and validation, while reliable subject-independent evaluation remains a concern. This study converts EEG into spectrograms and evaluates conventional and deep-learning classifiers with subject-level partitions. The Transformer family performs best overall, with CST-SZ leading image-level results and CT-SZ leading subject-level results.
Problem
EEG schizophrenia-detection studies vary in datasets, preprocessing, feature engineering, and validation strategies, motivating standardized and reproducible evaluation.
Source: §I · p. 1Method
The framework converts EEG recordings into spectrograms and evaluates conventional machine-learning and CNN-Transformer models using subject-level data partitions.
Source: §I · pp. 1–2Results
The Transformer family has the highest performance; CST-SZ performs best at image level, while CT-SZ has the highest subject-level scores.
Source: §IV · pp. 5–6Takeaways & Limitations
The study compares spectrogram-based models with conventional methods under a subject-level evaluation protocol on ASZED-153.
Source: §I · p. 2
Abstract
from arXiv · showhide
Schizophrenia is a serious psychiatric disorder that affects millions of people worldwide, and its diagnosis remains primarily dependent on clinical assessment. Electroencephalography (EEG) provides a non-invasive approach to investigate brain activity and has shown potential to support automated Schizophrenia detection. However, existing EEG-based classification studies often suffer from limitations including small datasets, inconsistent preprocessing strategies, and evaluation protocols that may not adequately prevent subject-related data leakage. In this study, we propose an EEG-based Schizophrenia classification framework that transforms preprocessed EEG recordings into time-frequency representations using the Short-Time Fourier Transform. The generated spectrogram images are classified using both conventional Machine Learning algorithms, including Support Vector Machines, Random Forests, and XGBoost, and Deep Learning models, including convolutional architectures and CNN-Transformer hybrids. To ensure reliable evaluation, all data partitions are performed at the subject level, and image-level predictions are aggregated into subject-level decisions. On the independent test set of 18 subjects, the CNN-Transformer (CT-SZ) model achieves a subject-level AUC-ROC of 95.00%, while the CNN + Squeeze-and-Excitation + Transformer (CST-SZ) model achieves 92.50%.
I. INTRODUCTION
EEG-based schizophrenia detection has drawn on diverse datasets, preprocessing, and validation strategies, motivating standardized and reproducible evaluation. This study proposes spectrogram-based CNN-Transformer architectures and evaluates them alongside conventional methods using subject-level data partitioning.
I. INTRODUCTION
- The literature varies in datasets, preprocessing, feature engineering, and validation, motivating standardized and reproducible evaluation.Source: §I · p. 1
- The framework represents EEG as time-frequency spectrograms and proposes CNN-Transformer architectures for schizophrenia detection.The study describes spectrograms as two-dimensional inputs from which temporal and spectral patterns can be learned.Source: §I · pp. 1–2
- All training, validation, and test partitions are made at the subject level, keeping each individual’s EEG recordings within one subset.The paper presents this protocol as supporting fair comparison and reliable evaluation.Source: §I · pp. 1–2
- The proposed methods are evaluated on ASZED-153 alongside conventional machine-learning techniques and approaches from prior work.Source: §I · p. 2
II. RELATED WORK
Prior EEG schizophrenia-detection work includes time-frequency image pipelines, wavelet features, attention-based CNNs, and hybrid feature-learning methods. The paper contrasts this varied literature with a unified subject-level evaluation of its models and a reimplemented baseline.
II. RELATED WORK
- Prior work spans STFT, CWT, and SPWVD image inputs for CNNs, DWT/PCA features, scalograms with deep feature selection, and attention-integrated 1-D CNNs.These approaches use different datasets, preprocessing, and evaluation protocols.Source: §II · p. 2
- Other work combines mel-spectrogram CNNs with interpretability tools or VMD, entropy, and fractal features with machine-learning classifiers.The VMD study reports subject-wise Leave-One-Out Cross-Validation to prevent data leakage.Source: §II · p. 2
- The study reimplements a DWT-based baseline and evaluates it with the proposed models under a unified subject-level protocol.Source: §II · p. 2
III. PROPOSED METHOD
The proposed framework moves EEG recordings through preprocessing and spectrogram generation before schizophrenia detection.
III. PROPOSED METHOD
- The framework’s pipeline begins with preparing dataset recordings and preprocessing input vectors.Source: §III · p. 2
- Spectrogram generation follows preprocessing in the proposed pipeline.Source: §III · p. 2
- The final pipeline stage is schizophrenia detection.Source: §III · p. 2
A. Raw EEG Recordings’ Dataset
The study uses ASZED-153, a 19-channel EEG dataset collected at two medical institutions in Nigeria. It contains 153 subjects, divided into case and control subsets, and the paper describes its cohort as larger and richer than other schizophrenia datasets.
A. Raw EEG Recordings’ Dataset
- ASZED-153 contains 153 subjects, with 76 in the case subset and 77 in the control subset.Source: A. Raw EEG Recordings’ Dataset · pp. 2–3
- The dataset was collected at two medical institutions in Nigeria and has 19-channel recordings.Source: A. Raw EEG Recordings’ Dataset · p. 2
- The paper characterizes ASZED-153 as a larger and richer cohort than other schizophrenia datasets.Source: A. Raw EEG Recordings’ Dataset · p. 3
- The dataset demographics figure covers age and gender.Source: A. Raw EEG Recordings’ Dataset · p. 3, Figure 2 · p. 3
B. Preprocessing
Recordings passing initial integrity checks undergo preprocessing before conversion to image inputs. The pipeline standardizes channel and sampling settings, filters noise, and rejects heavily contaminated recordings.
B. Preprocessing
- Recordings shorter than 2 seconds were discarded, 19 EEG channels selected, and 200-Hz recordings resampled to 256 Hz.Preprocessing was applied to EDF recordings that passed initial integrity checks, following established EEG practices.Source: B. Preprocessing · p. 3
- Signals were band-pass filtered at 0.5–40 Hz, using FIR when recording duration sufficed and IIR otherwise.Source: B. Preprocessing · p. 3
- Notch filters at 50 and 100 Hz addressed power-line interference, while common average referencing reduced common-mode noise.Source: B. Preprocessing · p. 3
- Recordings were discarded if more than 20% of their samples exceeded an amplitude of ±200 µV.Source: B. Preprocessing · p. 3
C. Spectrogram Generation
Preprocessed EEG signals are converted into standardized spectrogram images for image-based classification. The dataset is split by subject rather than image to prevent leakage and support a realistic evaluation.
C. Spectrogram Generation
- STFT spectrograms use a 256-sample Hann window with 75% overlap, averaging spectral power across 19 channels and expressing it in dB.Source: C. Spectrogram Generation · p. 3
- Spectrograms used the viridis colormap and were resized to 128 × 128 pixel PNG images; each subject contributed between 4 and 15 spectrogram images, with dataset splits performed at subject level.Source: C. Spectrogram Generation · p. 4
- Figure 3 shows generated spectrogram images for case and control samples.Source: Figure 3 · p. 4, C. Spectrogram Generation · p. 4
D. Classification Models
The classification approaches include conventional classifiers and three deep models built around CNNs, with CT-SZ and CST-SZ adding Transformer-based modeling. The hybrids combine local feature extraction with modeling of broader spectrogram relationships.
D. Classification Models
- C-SZ uses four convolutional blocks followed by global average pooling and a fully connected binary classifier.Two stacked 3 × 3 convolutions per block provide a 5 × 5-equivalent receptive field with additional nonlinearities; global average pooling reduces trainable parameters and is intended to mitigate overfitting on the relatively small training dataset.Source: D. Classification Models · p. 4
- The conventional machine-learning baselines are SVM, Random Forest, and XGBoost.Source: D. Classification Models · p. 4
- CT-SZ combines CNN-extracted local features with a Transformer encoder that models long-range relationships across spectrogram time and frequency.Its CNN stem produces 256 spatial tokens, and four Transformer encoder blocks process them; the training adds a five-epoch linear learning-rate warm-up.Source: D. Classification Models · p. 4
- CST-SZ extends the CNN–Transformer with Squeeze-and-Excitation blocks that learn channel-importance weights and rescale feature maps.The Transformer attends across spatial relationships, while SE modules adaptively emphasize feature channels.Source: D. Classification Models · p. 4
E. Feature extraction for ML methods
The machine-learning methods require fixed-length features extracted from spectrogram images. The handcrafted representation combines color, frequency, texture, and dimensionality-reduction descriptors.
E. Feature extraction for ML methods
- Spectrogram images are converted into fixed-length feature vectors using complementary handcrafted descriptors summarized in Table II.Source: E. Feature extraction for ML methods · p. 4, Table II · p. 5
- The descriptors include RGB and grayscale statistics, frequency-band statistics, HOG edge and texture patterns, and GLCM texture properties.The GLCM properties include contrast, homogeneity, energy, and correlation.Source: E. Feature extraction for ML methods · p. 5
- PCA is applied to flattened pixel values to produce a compact representation that preserves dominant modes of image variation while reducing dimensionality.Source: E. Feature extraction for ML methods · p. 5
IV. RESULTS
The Transformer family has the highest reported performance among the evaluated approaches, with CST-SZ strongest at image level and CT-SZ strongest at subject level. Evaluation used subject-level splits and compared the proposed methods with conventional machine-learning and literature approaches.
IV. RESULTS
- The subject-level 70%/15%/15% split retained 1,276 spectrogram images from 122 subjects, with 192 images from 18 subjects in the test set.The test set contained 10 control and 8 patient subjects.Source: §IV · p. 5
- SVM and XGBoost hyperparameters were searched with five-fold GroupKFold using subject identifiers to keep each subject’s images within one fold.AUC-ROC guided the search; CNN training used class-weighted binary cross-entropy and validation-AUPRC-based learning-rate adjustment with early stopping.Source: §IV · p. 5
- Subject-level predictions average probabilities across each subject’s spectrograms, then assign the final class at a 0.5 threshold.The evaluation also reports image-level predictions.Source: §IV · p. 5
- The comparison included a reimplemented DWT-CNN under the same preprocessing and subject-wise evaluation protocol, plus SVM, Random Forest, and XGBoost.The DWT-CNN had originally been applied to IBIB PAN with a limited number of subjects.Source: §IV · p. 5
- The Transformer family has the highest performance; CST-SZ leads at image level, CT-SZ at subject level, and C-SZ is lowest among proposed approaches.Table III compares test-set performance at image and subject levels.Source: Table III · p. 6, §IV · p. 6
V. CONCLUSION
The paper presents an EEG-to-spectrogram framework for schizophrenia classification, evaluated with classical machine-learning and CNN-based models under subject-level partitioning. It concludes that spectrograms contain discriminative information and identifies larger, multi-center validation and other model directions for future work.
V. CONCLUSION
- The framework classifies EEG-derived time-frequency spectrograms using classical machine-learning algorithms, CNNs, and CNN–Transformer hybrids.A standardized preprocessing pipeline produces image-based representations, and experiments use subject-level partitioning.Source: §V · p. 6
- The results indicate that EEG-derived spectrograms contain discriminative information that both traditional machine-learning and deep-learning approaches can exploit.The paper describes subject-level evaluation as a more realistic assessment of generalization than sample-level validation.Source: §V · p. 6
- Future work includes advanced time-frequency representations, self-supervised and Transformer-based architectures, multimodal EEG feature fusion, and validation on larger, multi-center datasets.These directions may contribute to more robust and clinically applicable computer-aided diagnostic systems.Source: §V · p. 6