Abstract
Modern machine learning tools have shown promise in detecting symptoms of neurological disorders. However, current approaches typically train a unique classifier for each subject. This subject-specific training scheme requires long labeled recordings from each patient, thus failing to detect symptoms in new patients with limited recordings. This paper introduces an unsupervised domain adaptation approach based on adversarial networks to enable few-shot, cross-subject epileptic seizure detection. Using adversarial learning, features from multiple patients were encoded into a subject-invariant space and a discriminative model was trained on subject-invariant features to make predictions. We evaluated this approach on the intracranial EEG (iEEG) recordings from 9 patients with epilepsy. Our approach enabled cross-subject seizure detection with a 9.4% improvement in 1-shot classification accuracy compared to the conventional subject-specific scheme.
Introduction
The detection of neurological symptoms, such as epileptic seizures, is a critical task in clinical neurology. Most existing machine learning models are subject-specific, meaning they are trained and tested on data from the same individual. This necessity arises because brain signals are highly idiosyncratic, influenced by unique neuroanatomy and variations in electrode placement. Consequently, a model trained on one patient often fails when applied to another—a phenomenon known as domain shift.
To overcome this, clinicians must currently collect and label extensive data for every new patient, which can take days or weeks. This requirement is a major bottleneck for "few-shot" scenarios, where rapid deployment of a detector is needed for a new patient with minimal prior data. This study addresses this challenge by proposing an unsupervised domain adaptation framework that maps disparate patient signals into a shared, subject-invariant feature space.
Methods
The proposed framework utilizes an adversarial domain adaptation architecture to align features across different subjects. The system consists of four primary components:
- Autoencoders: Handcrafted biomarkers (e.g., line-length, frequency band power) are processed through encoders to generate latent representations. Decoders then attempt to reconstruct the original features from these representations. This reconstruction loss is vital for preventing "mode collapse," ensuring the latent space retains the essential information necessary for seizure detection.
- Subject Discriminator (SD): An adversarial network that attempts to identify the source subject of a given latent feature vector.
- Adversarial Training: The encoders are optimized to "fool" the discriminator, effectively stripping away subject-specific identifiers while the reconstruction loss preserves diagnostic information. This process results in a subject-invariant feature space.
- Classification: A LightGBM ensemble (gradient boosted trees) is trained on these invariant features to perform the final seizure vs. non-seizure classification.
The model was evaluated using intracranial EEG (iEEG) recordings from 9 patients with epilepsy, encompassing 97 seizure events. Twelve handcrafted features, including variance and power in various frequency bands (delta through gamma), were extracted from 1-second signal windows.
Results and Discussion
The cross-subject (CS) approach was compared against a traditional subject-specific (SS) baseline using Area Under the ROC Curve (AUC) as the primary metric.
The CS model demonstrated significant performance gains in few-shot scenarios. In 1-shot classification—where only a single labeled seizure from the target patient is available—the CS approach achieved an average AUC of 0.899, representing a 9.4% improvement over the SS baseline (0.822). Furthermore, the model showed robust 0-shot capability, achieving an AUC of 0.705 without any prior data from the target subject.
Visual analysis via t-SNE plots confirms the effectiveness of the adversarial training. Before adaptation, features from different subjects form distinct, separated clusters. After adaptation, these distributions overlap significantly, indicating that the model has successfully learned a "universal language" for brain activity that transcends individual differences.
Conclusion
This work demonstrates that unsupervised adversarial domain adaptation can effectively mitigate the domain shift problem in cross-subject seizure detection. By learning subject-invariant features, the model significantly reduces the data burden for new patients. While the current study is limited by a small patient cohort and reliance on handcrafted features, the framework provides a foundation for future end-to-end deep learning approaches and applications to other neurological conditions like Parkinson’s disease or migraines.
Summary updated