Many deep learning approaches have been developed for EEG-based seizure detection; however, most rely on access to large centralized annotated datasets. In clinical practice, EEG data are often scarce, patient-specific distributed across institutions, and governed by strict privacy regulations that prohibit data pooling. As a result, creating usable AI-based seizure detection models remains challenging in real-world medical settings. To address these constraints, we propose a two-stage federated few-shot learning (FFSL) framework for personalized EEG-based seizure detection. The method is trained and evaluated on the TUH Event Corpus, which includes six EEG event classes. In Stage 1, a pretrained biosignal transformer (BIOT) is fine-tuned across non-IID simulated hospital sites using federated learning, enabling shared representation learning without centralizing EEG recordings. In Stage 2, federated few-shot personalization adapts the classifier to each patient using only five labeled EEG segments, retaining seizure-specific information while still benefiting from cross-site knowledge. Federated fine-tuning achieved a balanced accuracy of 0.43 (centralized: 0.52), Cohen's kappa of 0.42 (0.49), and weighted F1 of 0.69 (0.74). In the FFSL stage, client-specific models reached an average balanced accuracy of 0.77, Cohen's kappa of 0.62, and weighted F1 of 0.73 across four sites with heterogeneous event distributions. These results suggest that FFSL can support effective patient-adaptive seizure detection under realistic data-availability and privacy constraints.
Epilepsy is a neurological disorder, which affects over 50 million people worldwide Thijs et al. [2019] and is characterized by unpredictable, recurrent seizures resulting from abnormal, hyper-synchronous neuronal discharges Stafstrom and Carmant [2015]. These seizures can severely impact cognitive function, quality of life, and, in some cases, lead to sudden unexpected death in epilepsy Anwar et al. [2020], Costa et al. [2024]. Diagnosing epilepsy remains a complex challenge due to its diverse etiologies, seizure types, and highly patient-specific manifestation patterns Giourou et al. [2015], Pinto et al. [2021]. As such, accurate and individualized seizure detection continues to be a critical clinical priorityAbdallah et al. [2024].
Since seizures are unpredictable and often separated by long intervals, continuous hospital monitoring is impractical Saab et al. [2020], Shoeibi et al. [2021]. This creates a critical need for real-time seizure detection in out-of-clinic settings. Recent advances in wearable EEG devices have made continuous monitoring feasible outside hospitals, supporting patient-specific, on-device detection under privacy constraints Donner et al. [2024], Brinkmann et al. [2021]. However, in order to use such systems for seizure prediction as well as detection requires models that perform reliably despite limited data, decentralized storage, and legal restrictions on data sharing (e.g., GDPR, HIPAA) Khalid et al. [2023], Fang et al. [2024]. These challenges cannot be met by standard supervised learning alone due to the inherent data limitations.
To address the challenges of data scarcity and unavailability at a single location, we combine two machine learning paradigms, few-shot learning (FSL) and federated learning (FL): two complementary approaches that support model development under data-scarce and privacy-sensitive conditions. FSL enables models to generalize from only a small number of labeled examples Yang et al. [2021], Parnami and Lee [2022], making it well-suited for personalized medical applications where large-scale annotation is impractical, distribution shifts are common, and rapid adaptation to new tasks is essential Finn et al. [2017a], Wang et al. [2020a], Li et al. [2024]. FL facilitates collaborative training across decentralized institutions without sharing raw data, preserving privacy while improving generalization by exposing the model to a more diverse set of examples than would be available at a single siteMcMahan et al. [2016], Sheller et al. [2020], Teo et al. [2024]. Together, these paradigms are expected to support patient-specific model personalization under realistic clinical data and privacy constraints, while each paradigm alone is insufficient. FL enables privacy-preserving collaborative training, but its performance degrades when each site has only a small amount of labeled Li et al. [2023]. Conversely, FSL can learn from limited examples, but cannot take advantage of information distributed across sites when data cannot be centralized.
In this work, we introduce a two-stage federated few-shot learning (FFSL) framework tailored to EEG-based seizure detection. In the first stage, a pretrained biosignal transformer is fine-tuned in a federated manner across simulated clinical sites to learn global seizure-related representations without sharing raw EEG. In the second stage, patientspecific FFSL personalization is performed, which is designed to preserve individual seizure characteristics while still leveraging shared knowledge. This design enables rapid adaptation from only a few labeled seizure events per patient while maintaining data privacy.
This approach provides a practical route toward privacy-preserving seizure monitoring under clinically motivated decentralized data conditions. By enabling personalization from limited labeled EEG and avoiding centralized data transfer, the framework addresses key challenges in ambulatory and long-term neurological monitoring. While realworld deployment remains future work, the strategy aligns with emerging applications in wearable technology and remote seizure-management systems Nielsen et al. [2021], Bernini et al. [2024].
Beyond reporting model performance, we examine why federated and few-shot adaptation succeeds or fails across sites. Specifically, we relate client-level results to seizure morphology, embedding separability, and patient-specific EEG characteristics, illustrating how neurological variability influences learning dynamics. This analysis provides insight into when personalized updates complement federated aggregation and when heterogeneity introduces challenges, offering practical guidance for future decentralized seizure-monitoring systems.
EEG-based seizure detection faces two fundamental challenges: limited labeled data and strict privacy requirements, which restrict centralized supervised learning pipelines. To address data scarcity, few-shot learning (FSL) approaches aim to adapt models to
This content is AI-processed based on open access ArXiv data.