Brain Activity Classification using Retentive Networks with Explainable AI

Authors

  • Adeel Hashmi Department of Artificial Intelligence and Data Science, School of Engineering & Technology, Vivekananda Institute of Professional Studies-Technical Campus, Pitampura, New Delhi, India
  • Kunsh Sabharwal Department of Artificial Intelligence and Machine Learning, School of Engineering & Technology, Vivekananda Institute of Professional Studies-Technical Campus, Pitampura, New Delhi, India
  • Goyam Jain Department of Artificial Intelligence and Machine Learning, School of Engineering & Technology, Vivekananda Institute of Professional Studies-Technical Campus, Pitampura, New Delhi, India

DOI:

https://doi.org/10.24237/djes.2026.19208

Keywords:

Brain activity classification, convolution neural network, vision transformer, retnet, Explainable AI (XAI)

Abstract

Harmful brain activity can significantly impact an individual’s life, leading to debilitating seizures, epileptic episodes, and long-term cognitive impairments that affect daily functioning and overall quality of life. These abnormalities can be effectively detected using electroencephalography (EEG) image data, which captures the underlying neural activity of the brain in a non-invasive manner. In this study, Retentive Networks (RetNets) are employed to classify EEG spectrogram images for identifying different types of harmful brain activity. While deep learning architectures such as EfficientNet and Vision Transformers have demonstrated strong performance in image-based classification tasks, RetNets offer a compelling advantage in terms of reduced computational complexity and efficient sequence modelling. The dataset used in this work is a publicly available EEG dataset comprising approximately 17,000 spectrogram images derived from EEG recordings, ensuring sufficient diversity and representation for robust model training and evaluation. Experimental evaluation demonstrates that the proposed RetNet model achieved the highest overall performance, with a precision of 94%, recall of 100%, and an F1-score of 97%, indicating balanced and highly reliable classification capability. In comparison, EfficientNet achieved a precision of 91%, recall of 90%, and an F1-score of 96%, while the Vision Transformer achieved precision, recall, and F1-scores of 94%, 86%, and 90%, respectively. Furthermore, the proposed approach integrates model interpretability through Explainable Artificial Intelligence (XAI) techniques. The novelty of the proposed work lies in combining RetNet-based EEG spectrogram classification with XAI-driven interpretability for harmful brain activity detection.

Downloads

Download data is not yet available.

References

[1] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, May 2015, doi: 10.1038/nature14539.

[2] A. Mathew, P. Amudha, and S. Sivakumari, “Deep learning techniques: An overview,” in Advanced Machine Learning Technologies and Applications (AMLTA 2020), A. Hassanien, R. Bhatnagar, and A. Darwish, Eds. Singapore: Springer, 2021, pp. 599–608, doi: 10.1007/978-981-15-3383-9_55.

[3] S. Razavi, “Deep learning, explained: Fundamentals, explainability, and bridgeability to process-based modelling,” Environmental Modelling & Software, vol. 144, p. 105159, Oct. 2021, doi: 10.1016/j.envsoft.2021.105159.

[4] Z. Wang, Y. Wang, C. Hu, Z. Yin, and Y. Song, “Transformers for EEG-based emotion recognition: A hierarchical spatial information learning model,” IEEE Sensors Journal, vol. 22, no. 5, pp. 4359–4368, Mar. 2022, doi: 10.1109/JSEN.2021.3133313.

[5] G. Xu, X. Shen, S. Chen, Y. Zong, C. Zhang, H. Yue, et al., “A deep transfer convolutional neural network framework for EEG signal classification,” IEEE Access, vol. 7, pp. 112767–112776, Aug. 2019, doi: 10.1109/ACCESS.2019.2935945.

[6] M. Habijan, R. Šojo, I. H. Tolić, and I. Galić, “Harmful brain activity classification using ensemble deep learning,” in Proc. 2024 International Symposium ELMAR, Zadar, Croatia, Sept. 16–19, 2024. Piscataway, NJ, USA: IEEE, 2024, pp. 109–112, doi: 10.1109/ELMAR62776.2024.10722449.

[7] S. Rajwal and S. Aggarwal, “Convolutional neural network-based EEG signal analysis: A systematic review,” Archives of Computational Methods in Engineering, vol. 30, no. 6, pp. 3585–3615, Jun. 2023, doi: 10.1007/s11831-023-09915-z.

[8] B. Chakravarthi, S. C. Ng, M. R. Ezilarasan, and M. F. Leung, “EEG-based emotion recognition using hybrid CNN and LSTM classification,” Frontiers in Computational Neuroscience, vol. 16, p. 1019776, Nov. 2022, doi: 10.3389/fncom.2022.1019776.

[9] M. Gagliardi, D. Maurmo, T. Ruga, E. Vocaturo, and E. Zumpano, “BrAInVision: A hybrid explainable artificial intelligence framework for brain MRI analysis,” Image and Vision Computing, vol. 161, p. 105629, Feb. 2025, doi: 10.1016/j.imavis.2025.105629.

[10] Z. J. Wang, R. Turko, O. Shaikh, H. Park, N. Das, F. Hohman, et al., “CNN Explainer: Learning convolutional neural networks with interactive visualization,” IEEE Transactions on Visualization and Computer Graphics, vol. 27, no. 2, pp. 1396–1406, Feb. 2021, doi: 10.1109/TVCG.2020.3030418.

[11] R. Chauhan, K. K. Ghanshala, and R. C. Joshi, “Convolutional neural network (CNN) for image detection and recognition,” in Proc. 2018 First International Conference on Secure Cyber Computing and Communication (ICSCCC), Jalandhar, India, Dec. 15–17, 2018, pp. 278–282, doi: 10.1109/ICSCCC.2018.8703316.

[12] J. Tao, Y. Gu, J. Sun, Y. Bie, and H. Wang, “Research on VGG16 convolutional neural network feature classification algorithm based on transfer learning,” in Proc. 2021 2nd China International SAR Symposium (CISS), Shanghai, China, Nov. 3–5, 2021, pp. 1–3, doi: 10.1109/CISS52396.2021.9741235.

[13] T. Kaur and T. K. Gandhi, “Automated brain image classification based on VGG-16 and transfer learning,” in Proc. 2019 International Conference on Information Technology (ICIT), Bhubaneswar, India, Dec. 19–21, 2019, pp. 94–98, doi: 10.1109/ICIT48102.2019.00023.

[14] M. Rashid, M. Mustafa, N. Sulaiman, and M. N. Islam, “EEG and EMG-based multimodal driver drowsiness detection: A CWT and improved VGG-16 pipeline,” in Proceedings of the 2nd Human Engineering Symposium (HUMENS 2023), Singapore: Springer, 2024, pp. 337–349, doi: 10.1007/978-981-99-8259-9_28.

[15] L. Li, “Deep learning-based EEG signal identity recognition using VGGNet,” in Proc. 2024 4th International Conference on Neural Networks, Information and Communication Engineering (NNICE), Guangzhou, China, Jan. 19–21, 2024, pp. 1092–1095, doi: 10.1109/NNICE60191.2024.10467718.

[16] C. M. Michel, M. M. Murray, G. Lantz, S. Gonzalez, L. Spinelli, and R. G. de Peralta, “EEG source imaging,” Clinical Neurophysiology, vol. 115, no. 10, pp. 2195–2222, Oct. 2004, doi: 10.1016/j.clinph.2004.06.001.

[17] J. Wang, W. Hang, S. Liang, Q. Wang, B. Chen, and J. Qin, “Convolutional retentive network for EEG decoding,” in Proc. 2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Hyderabad, India, Apr. 6–11, 2025, pp. 1–5, doi: 10.1109/ICASSP49660.2025.10889246.

[18] M. X. Cohen, “Where does EEG come from and what does it mean?” Trends in Neurosciences, vol. 40, no. 4, pp. 208–218, Apr. 2017, doi: 10.1016/j.tins.2017.02.004.

[19] H. Altaheri, G. Muhammad, and M. Alsulaiman, “Deep learning techniques for classification of electroencephalogram (EEG) motor imagery (MI) signals: A review,” Neural Computing and Applications, vol. 35, no. 20, pp. 14681–14722, Oct. 2023, doi: 10.1007/s00521-022-07959-3.

[20] X. Deng, H. Huo, L. Ai, D. Xu, and C. Li, “A novel 3D approach with a CNN and Swin Transformer for decoding EEG-based motor imagery classification,” Sensors, vol. 25, no. 9, p. 2922, May 2025, doi: 10.3390/s25092922.

[21] L. Hallal, J. Rhinelander, R. Venkat, and A. Newman, “Efficient feature extraction for EEG-based classification: A comparative review of deep learning models,” AI, vol. 7, no. 2, p. 50, Feb. 2026, doi: 10.3390/ai7020050

[22] Z. Gao, W. Dang, X. Wang, X. Hong, L. Hou, K. Ma, et al., “Complex networks and deep learning for EEG signal analysis,” Cognitive Neurodynamics, vol. 15, no. 3, pp. 369–388, Jun. 2021, doi: 10.1007/s11571-020-09626-1.

[23] S. S. Bhatti, A. Yadav, M. Monga, and N. Kumar, “Comparative analysis of deep learning approaches for harmful brain activity detection using EEG,” in Proc. 2024 IEEE 8th International Conference on Information and Communication Technology (CICT), Prayagraj, UP, India, Feb. 16–18, 2024, pp. 1–6, doi: 10.1109/CICT62185.2024.10544356.

[24] S. Ganesan, Y. N. Kiran, and S. Ram, “Harmful brain activity classification of spectrograms with transfer deep learning,” Research Square, preprint, 2024, doi: 10.21203/rs.3.rs-5507813/v1.

[25] M. A. Li and D. Q. Xu, “A transfer learning method based on VGG-16 convolutional neural network for MI classification,” in Proc. 2021 33rd Chinese Control and Decision Conference (CCDC), Kunming, China, May 22–24, 2021, pp. 5430–5435, doi: 10.1109/CCDC52312.2021.9602105.

[26] T. Lin, Y. Wang, X. Liu, and X. Qiu, “A survey of transformers,” AI Open, vol. 3, pp. 111–132, Dec. 2022, doi: 10.1016/j.aiopen.2022.10.001.

[27] C. Chen, H. Wang, Y. Chen, Z. Yin, X. Yang, H. Ning, et al., “Understanding the brain with attention: A survey of transformers in brain sciences,” Brain-X, vol. 2, no. 2, p. e29, Jun. 2024, doi: 10.1002/brx2.29.

[28] H. Adeli, S. Minni, and N. Kriegeskorte, “Predicting brain activity using transformers,” bioRxiv, preprint, 2023, doi: 10.1101/2023.09.14.557711.

[29] J. Xie, J. Zhang, J. Sun, Z. Chen, Y. Yang, Y. Zhang, et al., “A transformer-based approach combining deep learning network and spatial-temporal information for raw EEG classification,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 30, pp. 2126–2136, Oct. 2022, doi: 10.1109/TNSRE.2022.3201937.

[30] Y. Wang, Y. Deng, Y. Zheng, P. Chattopadhyay, and L. Wang, “Vision transformers for image classification: A comparative survey,” Technologies, vol. 13, no. 1, p. 32, Jan. 2025, doi: 10.3390/technologies13010032.

[31] S. Dongre and S. Mehta, “RetViT: Retentive vision transformers,” in Proc. 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT), Kharagpur, India, Jun. 18–22, 2024, pp. 1–8, doi: 10.1109/ICCCNT61001.2024.10724924.

[32] M. M. Islam, M. A. Talukder, M. A. Uddin, A. Akhter, and M. Khalid, “BrainNet: Precision brain tumor classification with optimized EfficientNet architecture,” BioMed Research International, vol. 2024, p. 3583612, Feb. 2024, doi: 10.1155/2024/3583612.

[33] Y. A. Sadoon, M. Khalil, and D. Battikh, “Predicting epileptic seizures using EfficientNet-B0 and SVMs: A deep learning methodology for EEG analysis,” Bioengineering, vol. 12, no. 2, p. 109, Feb. 2025, doi: 10.3390/bioengineering12020109.

[34] M. U. K. Naik and S. R. Ahamed, “Wavelet-based autoencoder and EfficientNet for schizophrenia detection from EEG signals,” arXiv preprint, 2024, doi: 10.48550/arXiv.2405.15463.

[35] Y. Sun, L. Dong, S. Huang, S. Ma, Y. Xia, J. Xue, et al., “Retentive network: A successor to transformer for large language models,” arXiv preprint, 2023, doi: 10.48550/arXiv.2307.08621.

[36] G. K. Erabati and H. Araujo, “Retformer: Embracing point cloud transformer with retentive network,” IEEE Transactions on Intelligent Vehicles, 2024, doi: 10.1109/TIV.2024.3448057.

[37] H. Yang, Z. Li, Y. Chang, and Y. Wu, “A survey of retentive network,” arXiv preprint, 2024, doi: 10.48550/arXiv.2410.01201.

[38] D. Umamaheswari, N. Nachammai, and S. Anita, “Early diagnosis of diabetic retinopathy using retinal network,” Multimedia Tools and Applications, 2025, doi: 10.1007/s11042-025-20569-7.

[39] Z. Lin, R. Cui, L. Ning, and J. Peng, “Temporal features-fused vision retentive network for echocardiography image segmentation,” Sensors, vol. 25, no. 6, p. 1909, Mar. 2025, doi: 10.3390/s25061909.

[40] K. Subramaniam and A. Naganathan, “RetNet30: A novel stacked convolution neural network model for automated retinal disease diagnosis,” International Journal of Imaging Systems and Technology, vol. 34, no. 5, p. e23187, Sept. 2024, doi: 10.1002/ima.23187.

Downloads

Published

2026-06-15

How to Cite

[1]
“Brain Activity Classification using Retentive Networks with Explainable AI”, DJES, vol. 19, no. 2, pp. 117–128, Jun. 2026, doi: 10.24237/djes.2026.19208.

Similar Articles

11-20 of 331

You may also start an advanced similarity search for this article.