FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks for Decentralized EEG Seizure Detection
Abstract
1. Introduction
- Depthwise separable Temporal Convolutional Networks—We propose a compact model which replaces plain convolutions with depthwise operations, significantly reducing the number of parameters while keeping its temporal-feature extracting ability, an important factor for analyzing EEG data [8].
- Adaptive asynchronous FL aggregation—We propose a time-aware aggregation algorithm that weights client updates by the transmission delay and relevance of datasets, resulting in faster convergence compared to synchronous baselines [9].
- The first application of depthwise separable TCNs with asynchronous FL in EEG-based seizure detection.
- A thorough clinical-grade evaluation on datasets recorded in clinics is presented, with an accuracy of 96.95% and a 40.4% reduction in communication overhead.
- We adopted asynchronous aggregation when training the TCN in FL, which provides faster convergence up to 38.5% compared with the synchronous aggregation approach.
2. Related Works
3. Methodology
3.1. Datasets
- Condition 1 (Eyes open): 2875 samples;
- Condition 2 (Eyes closed): 2875 samples;
- Condition 3 (Healthy brain activity): 2875 samples;
- Condition 4 (Tumor-affected regions): 2875 samples;
- Condition 5 (Ictal seizure activity): 2875 samples.
3.2. Federated Learning Setup
3.2.1. Client Selection and Count Rationale
3.2.2. Non-IID Data Simulation
- Patient-specific models (simulating physiological differences between subjects);
- Changes in class imbalance (clients with different numbers of seizures and non-seizures);
- Temporal pattern diversity (varied patterns of seizure onset among clients).
3.2.3. Privacy Guarantees:
- Differential privacy with ε = 0;
- Secure aggregation using homomorphic encryption;
- Gradient Clipping (as a possible defense against any data leakage from model updates) with threshold = 1.0.
3.3. FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks
3.3.1. Depthwise Separable Temporal Convolutional Network
3.3.2. Asynchronous Federated Aggregation Method
- METHOD async_client_train(client):
- client.train()
- ACQUIRE update_lock
- round_num = self.current_round
- model_update = deep_copy(client.model)
- weight = client.train_samples
- # Calculate staleness (delay between client’s round and current round)
- staleness = round_num − client.last_round_participated
- # Store update with staleness info
- self.received_updates[round_num][client.id] = (model_update, weight, staleness)
- # Pass staleness to aggregation
- self.aggregate_update(model_update, weight, staleness)
- NOTIFY condition
- RELEASE update_lock
- METHOD aggregate_update(model_update, weight, staleness):
- ACQUIRE model_lock
- self.global_counter += 1
- # Staleness-aware weighting (e.g., polynomial decay: α(t) = (staleness + 1)^ −β)
- beta = 0.5 # decay factor (hyperparameter, most optimized value)
- staleness_weight = (staleness + 1) ∗∗ (−beta)
- effective_weight = weight ∗ staleness_weight
- self.total_weight += effective_weight
- # Weighted aggregation
- FOR server_param, client_param IN zip(self.temp_model.parameters(), model_update.parameters()):
- server_param.data += client_param.data ∗ effective_weight
- IF sufficient_updates_received:
- NORMALIZE global_model by total_weight
- RELEASE model_lock
4. Results and Discussion
4.1. Training Performance
4.2. Classification Performance
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- World Health Organization. “Epilepsy”, World Health Organization Fact Sheets. 2024. Available online: https://www.who.int/news-room/fact-sheets/detail/epilepsy (accessed on 1 July 2025).
- Moon, S.; Lee, W. Privacy-preserving federated learning in healthcare. In Proceedings of the 2023 International Conference on Electronics, Information, and Communication (ICEIC), Singapore, 5-8 February 2023; IEEE: New York, NY, USA, 2023; pp. 1–4. [Google Scholar] [CrossRef]
- Chen, M.; Shlezinger, N.; Poor, H.V.; Eldar, Y.C.; Cui, S. Communication-efficient federated learning. Proc. Natl. Acad. Sci. USA 2021, 118, e2024789118. [Google Scholar] [CrossRef] [PubMed]
- Chen, M.; Mao, B.; Ma, T. FedSA: A staleness-aware asynchronous Federated Learning algorithm with non-IID data. Future Gener. Comput. Syst. 2021, 120, 1–12. [Google Scholar] [CrossRef]
- Li, Q.; Wen, Z.; Wu, Z.; Hu, S.; Wang, N.; Li, Y.; Liu, X.; He, B. A survey on federated learning systems: Vision, hype and reality for data privacy and protection. IEEE Trans. Knowl. Data Eng. 2021, 35, 3347–3366. [Google Scholar] [CrossRef]
- Huang, W.; Ye, M.; Shi, Z.; Wan, G.; Li, H.; Du, B.; Yang, Q. Federated learning for generalization, robustness, fairness: A survey and benchmark. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 46, 9387–9406. [Google Scholar] [CrossRef] [PubMed]
- Xu, C.; Qu, Y.; Xiang, Y.; Gao, L. Asynchronous federated learning on heterogeneous devices: A survey. Comput. Sci. Rev. 2023, 50, 100595. [Google Scholar] [CrossRef]
- Lim, Z.Y.; Pang, Y.H.; Ooi, S.Y.; Khoh, W.H.; Hiew, F.S. MLTCN-EEG: Metric learning-based temporal convolutional network for seizure EEG classification. Neural Comput. Appl. 2024, 37, 2849–2875. [Google Scholar] [CrossRef]
- Wang, Z.; Zhang, Z.; Tian, Y.; Yang, Q.; Shan, H.; Wang, W.; Quek, T.Q. Asynchronous federated learning over wireless communication networks. IEEE Trans. Wirel. Commun. 2022, 21, 6961–6978. [Google Scholar] [CrossRef]
- Tran, L.V.; Tran, H.M.; Le, T.M.; Huynh, T.T.; Tran, H.T.; Dao, S.V. Application of machine learning in epileptic seizure detection. Diagnostics 2022, 12, 2879. [Google Scholar] [CrossRef] [PubMed]
- Aayesha Qureshi, M.B.; Afzaal, M.; Qureshi, M.S.; Fayaz, M. Machine learning-based EEG signals classification model for epileptic seizure detection. Multimed. Tools Appl. 2021, 80, 17849–17877. [Google Scholar] [CrossRef]
- Assali, I.; Blaiech, A.G.; Abdallah, A.B.; Khalifa, K.B.; Carrere, M.; Bedoui, M.H. CNN-based classification of epileptic states for seizure prediction using combined temporal and spectral features. Biomed. Signal Process. Control. 2023, 82, 104519. [Google Scholar] [CrossRef]
- Zhao, W.; Wang, W.F.; Patnaik, L.M.; Zhang, B.C.; Weng, S.J.; Xiao, S.X.; Wei, D.Z.; Zhou, H.F. Residual and bidirectional LSTM for epileptic seizure detection. Front. Comput. Neurosci. 2024, 18, 1415967. [Google Scholar] [CrossRef] [PubMed]
- Rajora, R.; Kumar, A.; Malhotra, S.; Sharma, A. Data security breaches and mitigating methods in the healthcare system: A review. In Proceedings of the 2022 International Conference on Computational Modelling, Simulation and Optimization (ICCMSO); IEEE: New York, NY, USA, 2022; pp. 325–330. [Google Scholar]
- Baghersalimi, S.; Teijeiro, T.; Atienza, D.; Aminifar, A. Personalized real-time federated learning for epileptic seizure detection. IEEE J. Biomed. Health Inform. 2022, 26, 898–909. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Ning, Y.; Slawski, M.; Rangwala, H. Asynchronous online federated learning for edge devices with non-IID data. In Proceedings of the 2020 IEEE International Conference on Big Data (Big Data); IEEE: New York, NY, USA, 2020; pp. 15–24. [Google Scholar]
- Liu, J.; Jia, J.; Che, T.; Huo, C.; Ren, J.; Zhou, Y.; Dai, H.; Dou, D. Fedasmu: Efficient asynchronous federated learning with dynamic staleness-aware model update. In Proceedings of the AAAI Conference on Artificial Intelligence; AAAI Publications: Washington, DC, USA, 2024; Volume 38, pp. 13900–13908. [Google Scholar] [CrossRef]
- Zhou, Y.; Pang, X.; Wang, Z.; Hu, J.; Sun, P.; Ren, K. Towards efficient asynchronous federated learning in heterogeneous edge environments. In Proceedings of the *IEEE INFOCOM 2024-IEEE Conference on Computer Communications*; IEEE: New York, NY, USA, 2024; pp. 2448–2457. [Google Scholar]
- Ma, Y.; Huang, Z.; Su, J.; Shi, H.; Wang, D.; Jia, S.; Li, W. A multi-channel feature fusion CNN-BI-LSTM epilepsy EEG classification and prediction model based on attention mechanism. IEEE Access 2023, 11, 62855–62864. [Google Scholar] [CrossRef]
- Sinha, D.; El-Sharkawy, M. Thin mobilenet: An enhanced mobilenet architecture. In Proceedings of the 2019 IEEE 10th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON); IEEE: New York, NY, USA, 2019; pp. 0280–0285. [Google Scholar]
- Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2017; pp. 1251–1258. [Google Scholar]
- Jagtap, S.; Yadav, D.M. Optimizing stress detection: Harnessing MobileNet-V2 with azimuthal EEG mapping. In Proceedings of the 2024 11th International Conference on Reliability, Infocom Technologies and Optimization (ICRITO); IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar]
- Wu, Q.; Fokoue, E. Epileptic Seizure Recognition Data Set. Rochester Inst. Technol. 2017. Available online: https://www.kaggle.com/datasets/harunshimanto/epileptic-seizure-recognition (accessed on 1 July 2025).
- Guha, A.; Ghosh, S.; Roy, A.; Chatterjee, S. Epileptic seizure recognition using deep neural network. In Emerging Technology in Modelling and Graphics; Springer: Berlin/Heidelberg, Germany, 2020; pp. 21–28. [Google Scholar] [CrossRef]
- Nikoupour, M.; Keyvanpour, M.R.; Shojaedini, S.V. A robust framework for epileptic seizure diagnosis: Utilizing GRU-CNN architectures in EEG signal analysis. In Proceedings of the 20th CSI International Symposium on Artificial Intelligence and Signal Processing (AISP); IEEE: New York, NY, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Ahmad, I.; Wang, X.; Javeed, D.; Kumar, P.; Samuel, O.W.; Chen, S. A hybrid deep learning approach for epileptic seizure detection in EEG signals. IEEE J. Biomed. Health Inform. 2023, 30, 1019–1029. [Google Scholar] [CrossRef] [PubMed]
- Khalil, K.; Kumar, A.; Bayoumi, M. Accurate hardware predictor for epileptic seizure. IEEE Trans. Circuits Syst. I Regul. Pap. 2025, 72, 2153–2166. [Google Scholar] [CrossRef]
- Qi, L.; Li, F.; Shang, J.; Ge, D.; Wang, S.; Yuan, S. Epileptic seizure prediction using multi-strategy data augmentation and hierarchical contrastive learning. IEEE J. Biomed. Health Inform. 2025, 30, 2023–2033. [Google Scholar] [CrossRef] [PubMed]
- Lim, Z.Y.; Pang, Y.H.; Ooi, S.Y.; Sekaran, S.R.; Chew, Y.J. FCEEG: Federated learning-based seizure diagnosis through electroencephalogram (EEG) analysis. Cogent Eng. 2025, 12, 2547636. [Google Scholar] [CrossRef]








| Model | Average Time Taken for 30 Training Rounds (Seconds) | 95% CI | Standard Deviation |
|---|---|---|---|
| Normal TCN with Synchronous Aggregation | 4658.63 | [4651.71, 4670.01] | 46.12 |
| Normal TCN with Asynchronous Aggregation | 3788.13 | [3774.37, 3795.25] | 52.61 |
| Depthwise Separable TCN with Synchronous Aggregation | 4668.07 | [4656.34, 4675.94] | 49.39 |
| Depthwise Separable TCN with Asynchronous Aggregation (FDSTCN-EEG) | 2864.57 | [2851.61, 2872.45] | 52.51 |
| Model | Number of Parameters |
|---|---|
| Normal TCN | 9,769,436 |
| FDSTCN-EEG | 5,823,508 |
| Metric | Mean | 95% CI | Standard Deviation |
|---|---|---|---|
| Accuracy | 0.9696 | [0.9689, 0.9698] | 0.002190 |
| Recall | 0.9698 | [0.9694, 0.9703] | 0.002301 |
| Precision | 0.9706 | [0.9702, 0.9713] | 0.002618 |
| Specificity | 0.9694 | [0.9692, 0.9701] | 0.002132 |
| F1-Score | 0.9702 | [0.9696, 0.9706] | 0.002567 |
| Metric | Wilcoxon W Value | p-Value |
|---|---|---|
| Accuracy | 125,250.0 | 6.32 × 10−84 |
| Recall | 125,250.0 | 6.32 × 10−84 |
| Precision | 125,250.0 | 6.32 × 10−84 |
| Specificity | 125,250.0 | 6.32 × 10−84 |
| F1-Score | 125,250.0 | 6.32 × 10−84 |
| Precision vs. Recall | 37,789.0 | 1.55 × 10−14 |
| Accuracy vs. F1-Score | 46,821.0 | 1.01 × 10−6 |
| Recall vs. Specificity | 52,656.0 | 2.04 × 10−3 |
| Model | Accuracy | Recall | Precision | Specificity | F1-Score |
|---|---|---|---|---|---|
| CNN-Bi-LSTM [19] (without FL) | - | 0.7760 | 0.7762 | - | 0.7760 |
| DNN [24] (without FL) | 0.80 | 0.80 | 0.64 | - | - |
| GRU-CNN [25] (without FL) | 0.7352 | - | - | - | - |
| 1D CNN-BiLSTM + TBPTT [26] (without FL) | - | - | - | 0.988 | - |
| CAE-ELSTM on CHB-MIT Dataset (without FL) [27] | 0.9932 | - | 0.9929 | 0.9930 | - |
| Lightweight SE-EEGNet on CHB-MIT Dataset (without FL) [28] | 0.9451 | - | 0.9505 | - | - |
| Federated Learning Res1DCNN on EPILEPSIAE Dataset [15] | 0.8125 | 0.82 | |||
| FCEEG on UCI Seizure Dataset [29] | 0.8766 | 0.9995 | 0.7586 | 0.9996 | 0.8625 |
| Federated Learning TCN (FL-TCN) on UCI Seizure Dataset | 0.9698 | 0.9644 | 0.9768 | 0.9625 | 0.9706 |
| Federated Learning TCN (FL-TCN) on CHB-MIT Dataset | 0.8315 | 0.8626 | 0.8135 | 0.8 | 0.8373 |
| FDSTCN-EEG on UCI Seizure Dataset | 0.9696 | 0.9698 | 0.9706 | 0.9694 | 0.9702 |
| FDSTCN-EEG on CHB-MIT Dataset | 0.8591 | 0.9148 | 0.8242 | 0.8028 | 0.8672 |
| Predicted Positive | Predicted Negative | Total | |
|---|---|---|---|
| Actual Positive | TP = 248 | FN = 39 | 287 |
| Actual Negative | FP = 57 | TN = 230 | 287 |
| Total | 305 | 229 | 574 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Lim, Z.Y.; Pang, Y.H.; Ooi, S.Y.; Khoh, W.H.; Chew, Y.J. FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks for Decentralized EEG Seizure Detection. AI 2026, 7, 101. https://doi.org/10.3390/ai7030101
Lim ZY, Pang YH, Ooi SY, Khoh WH, Chew YJ. FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks for Decentralized EEG Seizure Detection. AI. 2026; 7(3):101. https://doi.org/10.3390/ai7030101
Chicago/Turabian StyleLim, Zheng You, Ying Han Pang, Shih Yin Ooi, Wee How Khoh, and Yee Jian Chew. 2026. "FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks for Decentralized EEG Seizure Detection" AI 7, no. 3: 101. https://doi.org/10.3390/ai7030101
APA StyleLim, Z. Y., Pang, Y. H., Ooi, S. Y., Khoh, W. H., & Chew, Y. J. (2026). FDSTCN-EEG: Federated Depthwise Separable Temporal Convolutional Networks for Decentralized EEG Seizure Detection. AI, 7(3), 101. https://doi.org/10.3390/ai7030101

