Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction
Abstract
:1. Introduction
- We introduce a dual-stream architecture that simultaneously analyzes both raw EEG signals and their visual representations. The raw signals preserve detailed temporal patterns, while the visual representations capture broader activity patterns.
- We develop a novel integration mechanism (SYNI) that intelligently combines information from both streams, allowing our model to capture complex seizure patterns that might be missed when analyzing either stream alone.
- Our approach demonstrates superior accuracy (98.7% on CHB-MIT and 99.2% on Bonn datasets) while maintaining computational efficiency, making it practical for clinical applications.
2. Related Work
3. Methodology
3.1. Dual-Stream Feature Extraction
3.1.1. Time Series Stream
3.1.2. Image Stream
3.2. Synergistic Modal Integration
3.2.1. Cross-Modal Feature Enhancement
3.2.2. Dynamic Feature Calibration
3.2.3. Adaptive Feature Fusion
4. Experiments
4.1. Experimental Settings
4.1.1. Dataset Description
- Training set: 80% of the data, used for model training and parameter optimization;
- Validation set: 10% of the data, used for hyperparameter tuning and early stopping;
- Test set: 10% of the data, used exclusively for final performance evaluation.
4.1.2. Implementation Details
4.2. Ablation Studies
4.3. Cross-Dataset Validation
4.4. Computational Efficiency
4.5. Comparison with State-of-the-Art Methods
5. Results and Discussion
5.1. Performance Analysis of Proposed Method
5.2. Ablation Study Analysis
5.3. Cross-Dataset Validation
5.4. Clinical Implications and Practical Considerations
5.5. Advantages over Existing Methods
5.6. Future Directions
6. Limitations and Future Work
6.1. Current Limitations
6.2. Future Research Directions
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
ADML (Adaptive Dual-Modal Learning) | Novel approach combining different types of analysis methods to improve seizure prediction |
CHB-MIT Dataset | A publicly available collection of EEG recordings from pediatric subjects with epilepsy, collected at Boston Children’s Hospital |
EEG (Electroencephalography) | A method of recording electrical activity of the brain using sensors placed on the scalp |
MTF (Markov Transition Field) | A technique for converting time-based signals into image representations |
SYNI (Synergistic Modal Integration) | Our proposed method for combining different types of information from EEG signals |
Time Series Imaging | The process of converting time-based signals (like EEG) into visual representations for analysis |
Transformer | A type of artificial intelligence model that can learn patterns in sequential data |
ViT (Vision Transformer) | A specialized type of Transformer model designed to analyze image data |
References
- Asadi-Pooya, A.A.; Brigo, F.; Lattanzi, S.; Blumcke, I. Adult epilepsy. Lancet 2023, 402, 412–424. [Google Scholar] [CrossRef] [PubMed]
- Smith, P.E. Initial Management of Seizure in Adults. N. Engl. J. Med. 2021, 385, 251–263. [Google Scholar] [CrossRef] [PubMed]
- Devinsky, O.; Vezzani, A.; O’Brien, T.J.; Jette, N.; Scheffer, I.E.; de Curtis, M.; Perucca, P. Epilepsy. Nat. Rev. Dis. Prim. 2018, 4, 18025. [Google Scholar] [CrossRef] [PubMed]
- Ding, D.; Zhou, D.; Sander, J.W.; Wang, W.; Li, S.; Hong, Z. Epilepsy in China: Major progress in the past two decades. Lancet Neurol. 2021, 20, 316–326. [Google Scholar] [CrossRef]
- Pellinen, J.; Foster, E.C.; Wilmshurst, J.M.; Zuberi, S.M.; French, J. Improving epilepsy diagnosis across the lifespan: Approaches and innovations. Lancet Neurol. 2024, 23, 511–521. [Google Scholar] [CrossRef]
- Tasci, I.; Tasci, B.; Barua, P.D.; Dogan, S.; Tuncer, T.; Palmer, E.E.; Fujita, H.; Acharya, U.R. Epilepsy detection in 121 patient populations using hypercube pattern from EEG signals. Inf. Fusion 2023, 96, 252–268. [Google Scholar] [CrossRef]
- Xin, Q.; Hu, S.; Liu, S.; Zhao, L.; Zhang, Y.D. An Attention-Based Wavelet Convolution Neural Network for Epilepsy EEG Classification. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 957–966. [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, 1–12. [Google Scholar] [CrossRef]
- He, S.; Li, Y.; Le, X.; Han, X.; Lin, J.; Peng, X.; Li, M.; Yang, R.; Yao, D.; Valdes-Sosa, P.A.; et al. Assessment of Multivariate Information Transmission in Space-Time-Frequency Domain: A Case Study for EEG Signals. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 1764–1775. [Google Scholar] [CrossRef]
- Boonyakitanont, P.; Lek-uthai, A.; Chomtho, K.; Songsiri, J. A review of feature extraction and performance evaluation in epileptic seizure detection using EEG. Biomed. Signal Process. Control 2020, 57, 101702. [Google Scholar] [CrossRef]
- Cura, O.K.; Ozdemir, M.A.; Akan, A. Epileptic EEG Classification Using Synchrosqueezing Transform with Machine and Deep Learning Techniques. In Proceedings of the 2020 28th European Signal Processing Conference (EUSIPCO), Amsterdam, The Netherlands, 18–21 January 2021; pp. 1210–1214. [Google Scholar] [CrossRef]
- Qiu, X.; Yan, F.; Liu, H. A difference attention ResNet-LSTM network for epileptic seizure detection using EEG signal. Biomed. Signal Process. Control 2023, 83, 104652. [Google Scholar] [CrossRef]
- Mumtaz, W.; Rasheed, S.; Irfan, A. Review of challenges associated with the EEG artifact removal methods. Biomed. Signal Process. Control 2021, 68, 102741. [Google Scholar] [CrossRef]
- Manarikkal, I.; Elasha, F.; Mba, D. Diagnostics and prognostics of planetary gearbox using CWT, auto regression (AR) and K-means algorithm. Appl. Acoust. 2021, 184, 108314. [Google Scholar] [CrossRef]
- Reichert, R.; Kaifler, N.; Kaifler, B. Limitations in wavelet analysis of non-stationary atmospheric gravity wave signatures in temperature profiles. Atmos. Meas. Tech. 2024, 17, 4659–4673. [Google Scholar] [CrossRef]
- Konar, P.; Saha, M.; Sil, J.; Chattopadhyay, P. Fault diagnosis of induction motor using CWT and rough-set theory. In Proceedings of the 2013 IEEE Symposium on Computational Intelligence in Control and Automation (CICA). IEEE, Singapore, 16–19 April 2013; pp. 17–23. [Google Scholar]
- Hu, Y.; Li, F.; Li, H.; Liu, C. An enhanced empirical wavelet transform for noisy and non-stationary signal processing. Digit. Signal Process. 2017, 60, 220–229. [Google Scholar] [CrossRef]
- Chuang, C.H.; Chang, K.Y.; Huang, C.S.; Jung, T.P. IC-U-Net: A U-Net-based Denoising Autoencoder Using Mixtures of Independent Components for Automatic EEG Artifact Removal. NeuroImage 2022, 263, 119586. [Google Scholar] [CrossRef]
- Ranjan, R.; Sahana, B.C.; Bhandari, A.K. Motion Artifacts Suppression From EEG Signals Using an Adaptive Signal Denoising Method. IEEE Trans. Instrum. Meas. 2022, 71, 3142037. [Google Scholar] [CrossRef]
- Kucukler, O.F.; Amira, A.; Malekmohamadi, H. EEG channel selection using Gramian Angular Fields and spectrograms for energy data visualization. Eng. Appl. Artif. Intell. 2024, 133, 108305. [Google Scholar] [CrossRef]
- Bore, J.C.; Li, P.; Jiang, L.; Ayedh, W.M.A.; Chen, C.; Harmah, D.J.; Yao, D.; Cao, Z.; Xu, P. A Long Short-Term Memory Network for Sparse Spatiotemporal EEG Source Imaging. IEEE Trans. Med Imaging 2021, 40, 3787–3800. [Google Scholar] [CrossRef]
- Shen, F.; Liu, J.; Wu, K. Multivariate Time Series Forecasting Based on Elastic Net and High-Order Fuzzy Cognitive Maps: A Case Study on Human Action Prediction Through EEG Signals. IEEE Trans. Fuzzy Syst. 2021, 29, 2336–2348. [Google Scholar] [CrossRef]
- Li, X.; Kang, Y.; Li, F. Forecasting with time series imaging. Expert Syst. Appl. 2020, 160, 113680. [Google Scholar] [CrossRef]
- Lu, L.; Zhiguang, W. Encoding temporal markov dynamics in graph for visualizing and mining time series. In Proceedings of the Workshops at the Thirty-Second AAAI Conference on Artificial Intelligence, New Orleans, LA, USA, 2–7 February 2018. [Google Scholar]
- Jiang, J.R.; Yen, C.T. Markov Transition Field and Convolutional Long Short-Term Memory Neural Network for Manufacturing Quality Prediction. In Proceedings of the 2020 IEEE International Conference on Consumer Electronics—Taiwan (ICCE-Taiwan), Taoyuan, Taiwan, 28–30 September 2020; pp. 1–2. [Google Scholar] [CrossRef]
- Wang, Z.; Oates, T. Imaging time-series to improve classification and imputation. arXiv 2015, arXiv:1506.00327. [Google Scholar]
- Shankar, A.; Dandapat, S.; Barma, S. Discrimination of Types of Seizure Using Brain Rhythms Based on Markov Transition Field and Deep Learning. IEEE Open J. Instrum. Meas. 2022, 1, 3202555. [Google Scholar] [CrossRef]
- Li, R.; Wu, Y.; Wu, Q.; Dey, N.; Crespo, R.G.; Shi, F. Emotion stimuli-based surface electromyography signal classification employing Markov transition field and deep neural networks. Measurement 2022, 189, 110470. [Google Scholar] [CrossRef]
- Duque-Muñoz, L.; Espinosa-Oviedo, J.J.; Castellanos-Dominguez, C.G. Identification and monitoring of brain activity based on stochastic relevance analysis of short–time EEG rhythms. Biomed. Eng. Online 2014, 13, 1–20. [Google Scholar] [CrossRef]
- Chen, D.; Wan, S.; Xiang, J.; Bao, F.S. A high-performance seizure detection algorithm based on Discrete Wavelet Transform (DWT) and EEG. PLoS ONE 2017, 12, e0173138. [Google Scholar] [CrossRef]
- Oweis, R.J.; Abdulhay, E.W. Seizure classification in EEG signals utilizing Hilbert-Huang transform. Biomed. Eng. Online 2011, 10, 1–15. [Google Scholar] [CrossRef]
- Riaz, F.; Hassan, A.; Rehman, S.; Niazi, I.K.; Dremstrup, K. EMD-based temporal and spectral features for the classification of EEG signals using supervised learning. IEEE Trans. Neural Syst. Rehabil. Eng. 2015, 24, 28–35. [Google Scholar] [CrossRef]
- Jindal, K.; Upadhyay, R.; Singh, H.S. Application of tunable-Q wavelet transform based nonlinear features in epileptic seizure detection. Analog Integr. Circuits Signal Process. 2019, 100, 437–452. [Google Scholar] [CrossRef]
- Hu, W.; Cao, J.; Lai, X.; Liu, J. Mean amplitude spectrum based epileptic state classification for seizure prediction using convolutional neural networks. J. Ambient Intell. Humaniz. Comput. 2023, 14, 15485–15495. [Google Scholar] [CrossRef]
- Li, C.; Liang, M. A generalized synchrosqueezing transform for enhancing signal time–frequency representation. Signal Process. 2012, 92, 2264–2274. [Google Scholar] [CrossRef]
- Khare, S.K.; Bajaj, V. Time–Frequency Representation and Convolutional Neural Network-Based Emotion Recognition. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 2901–2909. [Google Scholar] [CrossRef] [PubMed]
- Zhang, R.; Jia, J.; Zhang, R. EEG analysis of Parkinson’s disease using time–frequency analysis and deep learning. Biomed. Signal Process. Control 2022, 78, 103883. [Google Scholar] [CrossRef]
- Ghaderyan, P.; Abbasi, A.; Sedaaghi, M.H. An efficient seizure prediction method using KNN-based undersampling and linear frequency measures. J. Neurosci. Methods 2014, 232, 134–142. [Google Scholar] [CrossRef]
- Omidvar, M.; Zahedi, A.; Bakhshi, H. EEG signal processing for epilepsy seizure detection using 5-level Db4 discrete wavelet transform, GA-based feature selection and ANN/SVM classifiers. J. Ambient Intell. Humaniz. Comput. 2021, 12, 10395–10403. [Google Scholar] [CrossRef]
- Acharya, U.R.; Molinari, F.; Sree, S.V.; Chattopadhyay, S.; Ng, K.H.; Suri, J.S. Automated diagnosis of epileptic EEG using entropies. Biomed. Signal Process. Control 2012, 7, 401–408. [Google Scholar] [CrossRef]
- 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]
- Gelenbe, E. Random neural networks with negative and positive signals and product form solution. Neural Comput. 1989, 1, 502–510. [Google Scholar] [CrossRef]
- Şeker, A.; Diri, B.; Balık, H.H. A review about deep learning methods and applications. Gazi J. Eng. Sci. 2017, 3, 47–64. [Google Scholar]
- Wang, X.; Wang, Y.; Liu, D.; Wang, Y.; Wang, Z. Automated recognition of epilepsy from EEG signals using a combining space–time algorithm of CNN-LSTM. Sci. Rep. 2023, 13, 14876. [Google Scholar] [CrossRef]
- Najafi, T.; Jaafar, R.; Remli, R.; Wan Zaidi, W.A. A classification model of EEG signals based on rnn-lstm for diagnosing focal and generalized epilepsy. Sensors 2022, 22, 7269. [Google Scholar] [CrossRef] [PubMed]
- Velasco-Gallego, C.; Lazakis, I. Analysis of Time Series Imaging Approaches for the Application of Fault Classification of Marine Systems. In Proceedings of the 32nd European Safety and Reliability Conference, Dublin, Ireland, 28 August–1 September 2022; pp. 1353–1362. [Google Scholar]
- Wang, Z.; Oates, T. Encoding time series as images for visual inspection and classification using tiled convolutional neural networks. In Proceedings of the Workshops at the Twenty-Ninth AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015. [Google Scholar]
- Ko, D.W.; Yang, J.J. EEG-Based schizophrenia diagnosis through time series image conversion and deep learning. Electronics 2022, 11, 2265. [Google Scholar] [CrossRef]
- Zhao, D.D.; Zhao, Q. EEG-Based Cross-Subject Emotion Recognition Using GADF and CADAN. In Proceedings of the 2023 China Automation Congress (CAC), Chongqing, China, 17–19 November 2023; pp. 381–386. [Google Scholar] [CrossRef]
- Shankar, A.; Khaing, H.K.; Dandapat, S.; Barma, S. Epileptic seizure classification based on Gramian angular field transformation and deep learning. In Proceedings of the 2020 IEEE Applied Signal Processing Conference (ASPCON). IEEE, Kolkata, India, 7–9 October 2020; pp. 147–151. [Google Scholar]
- Xu, G.; Ren, T.; Chen, Y.; Che, W. A One-Dimensional CNN-LSTM Model for Epileptic Seizure Recognition Using EEG Signal Analysis. Front. Neurosci. 2020, 14, 578126. [Google Scholar] [CrossRef] [PubMed]
- Zhu, R.; Pan, W.x.; Liu, J.x.; Shang, J.l. Epileptic seizure prediction via multidimensional transformer and recurrent neural network fusion. J. Transl. Med. 2024, 22, 895. [Google Scholar] [CrossRef]
- Hu, S.; Liu, J.; Yang, R.; Wang, Y.; Wang, A.; Li, K.; Liu, W.; Yang, C. Exploring the Applicability of Transfer Learning and Feature Engineering in Epilepsy Prediction Using Hybrid Transformer Model. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 1321–1332. [Google Scholar] [CrossRef]
- Deng, Z.; Li, C.; Song, R.; Liu, X.; Qian, R.; Chen, X. EEG-based seizure prediction via hybrid vision transformer and data uncertainty learning. Eng. Appl. Artif. Intell. 2023, 123, 106401. [Google Scholar] [CrossRef]
- Thuwajit, P.; Rangpong, P.; Sawangjai, P.; Autthasan, P.; Chaisaen, R.; Banluesombatkul, N.; Boonchit, P.; Tatsaringkansakul, N.; Sudhawiyangkul, T.; Wilaiprasitporn, T. EEGWaveNet: Multiscale CNN-Based Spatiotemporal Feature Extraction for EEG Seizure Detection. IEEE Trans. Ind. Inform. 2022, 18, 5547–5557. [Google Scholar] [CrossRef]
- Abdulwahhab, A.H.; Abdulaal, A.H.; Thary Al-Ghrairi, A.H.; Mohammed, A.A.; Valizadeh, M. Detection of epileptic seizure using EEG signals analysis based on deep learning techniques. Chaos Solitons Fractals 2024, 181, 114700. [Google Scholar] [CrossRef]
Dataset | Method | Accuracy (%) | Sensitivity (%) | Specificity (%) | AUC (%) |
---|---|---|---|---|---|
CHB-MIT | Conv1D+LSTM [51] | 91.2 | 90.8 | 91.5 | 91.3 |
Transformer [52] | 93.4 | 92.9 | 93.8 | 93.5 | |
FedTransformer [53] | 94.1 | 93.7 | 94.4 | 94.2 | |
HViT-DUL [54] | 94.0 | 93.8 | 94.0 | 93.6 | |
TGCNN [55] | 92.8 | 92.2 | 93.7 | 93.5 | |
EEGWaveNet [55] | 98.3 | 91.2 | 98.0 | 98.6 | |
PCNN-RNN [56] | 96.9 | 92.2 | 97.6 | 97.1 | |
ADML (Ours) | 98.7 | 98.3 | 99.0 | 98.8 | |
Bonn | Conv1D+LSTM [51] | 92.5 | 91.8 | 93.1 | 92.7 |
Transformer [52] | 94.8 | 94.2 | 95.3 | 94.9 | |
FedTransformer [53] | 95.6 | 95.1 | 96.0 | 95.7 | |
HViT-DUL [54] | 94.9 | 94.1 | 94.3 | 95.1 | |
TGCNN [55] | 94.5 | 93.3 | 92.0 | 94.9 | |
EEGWaveNet [55] | 97.9 | 92.9 | 96.0 | 97.7 | |
PCNN-RNN [56] | 99.0 | 95.2 | 96.6 | 98.9 | |
ADML (Ours) | 99.7 | 98.9 | 99.4 | 99.3 |
Model Variant | Accuracy (%) | Sensitivity (%) | AUC (%) |
---|---|---|---|
ADML (EEG time-series only) | 93.5 | 92.8 | 93.4 |
ADML (MTF image only) | 92.9 | 92.6 | 92.2 |
ADML (Dual-modal) | 98.7 | 98.3 | 98.8 |
ADML (Cross-attention fusion) | 97.2 | 96.8 | 97.1 |
ADML (Gated fusion) | 95.7 | 95.1 | 95.6 |
Student Model (EEG time-series) | 94.2 | 93.8 | 94.1 |
Student Model (MTF image) | 96.8 | 96.5 | 96.7 |
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. |
© 2025 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Qin, J.; Liu, Z.; Zhuang, J.; Liu, F. Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction. Appl. Sci. 2025, 15, 1538. https://doi.org/10.3390/app15031538
Qin J, Liu Z, Zhuang J, Liu F. Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction. Applied Sciences. 2025; 15(3):1538. https://doi.org/10.3390/app15031538
Chicago/Turabian StyleQin, Jiahao, Zijia Liu, Jihong Zhuang, and Feng Liu. 2025. "Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction" Applied Sciences 15, no. 3: 1538. https://doi.org/10.3390/app15031538
APA StyleQin, J., Liu, Z., Zhuang, J., & Liu, F. (2025). Dual-Modality Transformer with Time Series Imaging for Robust Epileptic Seizure Prediction. Applied Sciences, 15(3), 1538. https://doi.org/10.3390/app15031538