# TransformEEG: Towards Improving Model Generalizability in Deep Learning-based EEG Parkinson's Disease Detection

arXiv: https://arxiv.org/abs/2507.07622 · HTML: https://mlsanity.com/paper/2507.07622/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 58 references that are in the map.
- First posted on arXiv 10 Jul 2025.

## Builds on (most cited first, 15 of 15)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization](https://mlsanity.com/paper/1610.02391/) (2016)
- [EEGNet: A Compact Convolutional Network for EEG-based Brain-Computer Interfaces](https://mlsanity.com/paper/1611.08024/) (2016)
- [Metrics for Multi-Class Classification: an Overview](https://mlsanity.com/paper/2008.05756/) (2020)
- [ICLabel: An automated electroencephalographic independent component classifier, dataset, and website](https://mlsanity.com/paper/1901.07915/) (2019)
- [Data augmentation for learning predictive models on EEG: a systematic comparison](https://mlsanity.com/paper/2206.14483/) (2022)
- [SelfEEG: A Python library for Self-Supervised Learning in Electroencephalography](https://mlsanity.com/paper/2401.05405/) (2023)
- [The more, the better? Evaluating the role of EEG preprocessing for deep learning applications](https://mlsanity.com/paper/2411.18392/) (2024)
- [The role of data partitioning on the performance of EEG-based deep learning models in supervised cross-subject analysis: a preliminary study](https://mlsanity.com/paper/2505.13021/) (2025)
- [Boosting Generalization in Bio-Signal Classification by Learning the Phase-Amplitude Coupling](https://mlsanity.com/paper/2009.07664/) (2020)
- [A Hybrid Deep Spatio-Temporal Attention-Based Model for Parkinson's Disease Diagnosis Using Resting State EEG Signals](https://mlsanity.com/paper/2308.07436/) (2023)
- [xEEGNet: Towards Explainable AI in EEG Dementia Classification](https://mlsanity.com/paper/2504.21457/) (2025)

## Built on by (most cited first, 1 of 1)

- [Multimodal Surface EMG Hand Gesture Recognition Using Query-Based Transformers for Prosthetic Control](https://mlsanity.com/paper/2607.22779/) (2026)

## Abstract (arXiv)

Electroencephalography (EEG) is establishing itself as an important, low-cost, noninvasive diagnostic tool for the early detection of Parkinson's Disease (PD). In this context, EEG-based Deep Learning (DL) models have shown promising results due to their ability to discover highly nonlinear patterns within the signal. However, current state-of-the-art DL models suffer from poor generalizability caused by high inter-subject variability. This high variability underscores the need for enhancing model generalizability by developing new architectures better tailored to EEG data. This paper introduces TransformEEG, a hybrid Convolutional-Transformer designed for Parkinson's disease detection using EEG data. Unlike transformer models based on the EEGNet structure, TransformEEG incorporates a depthwise convolutional tokenizer. This tokenizer is specialized in generating tokens composed by channel-specific features, which enables more effective feature mixing within the self-attention layers of the transformer encoder. To evaluate the proposed model, four public datasets comprising 290 subjects (140 PD patients, 150 healthy controls) were harmonized and aggregated. A 10-outer, 10-inner Nested-Leave-N-Subjects-Out (N-LNSO) cross-validation was performed to provide an unbiased comparison against seven other consolidated EEG deep learning models. TransformEEG achieved the highest balanced accuracy's median (78.45%) as well as the lowest interquartile range (6.37%) across all the N-LNSO partitions. When combined with data augmentation and threshold correction, median accuracy increased to 80.10%, with an interquartile range of 5.74%. In conclusion, TransformEEG produces more consistent and less skewed results. It demonstrates a substantial reduction in variability and more reliable PD detection using EEG data compared to the other investigated models.
