journal article·2025-07-18Open access

Uncertainty-Aware Deep Learning for Robust and Interpretable MI EEG Using Channel Dropout and LayerCAM Integration

Óscar Wladimir Gómez-Morales, Sofia Escalante-Escobar, Diego Fabian Collazos-Huertas, Andrés Marino Álvarez-Meza, German Castellanos-Dominguez

Applied Sciences· Volume 15· Issue 14

Abstract

Motor Imagery (MI) classification plays a crucial role in enhancing the performance of brain–computer interface (BCI) systems, thereby enabling advanced neurorehabilitation and the development of intuitive brain-controlled technologies. However, MI classification using electroencephalography (EEG) is hindered by spatiotemporal variability and the limited interpretability of deep learning (DL) models. To mitigate these challenges, dropout techniques are employed as regularization strategies. Nevertheless, the removal of critical EEG channels, particularly those from the sensorimotor cortex, can result in substantial spatial information loss, especially under limited training data conditions. This issue, compounded by high EEG variability in subjects with poor performance, hinders generalization and reduces the interpretability and clinical trust in MI-based BCI systems. This study proposes a novel framework integrating channel dropout—a variant of Monte Carlo dropout (MCD)—with class activation maps (CAMs) to enhance robustness and interpretability in MI classification. This integration represents a significant step forward by offering, for the first time, a dedicated solution to concurrently mitigate spatiotemporal uncertainty and provide fine-grained neurophysiologically relevant interpretability in motor imagery classification, particularly demonstrating refined spatial attention in challenging low-performing subjects. We evaluate three DL architectures (ShallowConvNet, EEGNet, TCNet Fusion) on a 52-subject MI-EEG dataset, applying channel dropout to simulate structural variability and LayerCAM to visualize spatiotemporal patterns. Results demonstrate that among the three evaluated deep learning models for MI-EEG classification, TCNet Fusion achieved the highest peak accuracy of 74.4% using 32 EEG channels. At the same time, ShallowConvNet recorded the lowest peak at 72.7%, indicating TCNet Fusion’s robustness in moderate-density montages. Incorporating MCD notably improved model consistency and classification accuracy, especially in low-performing subjects where baseline accuracies were below 70%; EEGNet and TCNet Fusion showed accuracy improvements of up to 10% compared to their non-MCD versions. Furthermore, LayerCAM visualizations enhanced with MCD transformed diffuse spatial activation patterns into more focused and interpretable topographies, aligning more closely with known motor-related brain regions and thereby boosting both interpretability and classification reliability across varying subject performance levels. Our approach offers a unified solution for uncertainty-aware, and interpretable MI classification.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: EEG and Brain-Computer Interfaces · Functional Brain Connectivity Studies · Optical Imaging and Spectroscopy Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Systems and Telecommunications, Universidad Estatal Península de Santa Elena, La Libertad 240204, Ecuador

Signal Processing and Recognition Group, Universidad Nacional de Colombia sede Manizales, Km 7 vía al Magdalena, Manizales 170003, Colombia

Funding

Universidad Estatal Península de Santa Elena, Ecuador · Minciencias

References (84)

Show source-provided references
1. A high-performance brain–computer interface10.1038/nature04968 ↗
2. EEG-based Brain-Computer Interfaces: An Overview of Basic Concepts and Clinical Applications in Neurorehabilitation10.1515/REVNEURO.2010.21.6.451 ↗
3. Instant neural control of a movement signal10.1038/416141a ↗
4. Carmena, J.M., Lebedev, M.A., Crist, R.E., O’Doherty, J.E., Santucci, D.M., Dimitrov, D.F., Patil, P.G., Henriquez, C.S., and Nicolelis, M.A.L. (2003). Learning to Control a Brain–Machine Interface for Reaching and Grasping by Primates. PLoS Biol., 1.10.1371/journal.pbio.0000042 ↗
5. Decoding Continuous and Discrete Motor Behaviors Using Motor and Premotor Cortical Ensembles10.1152/jn.01245.2003 ↗
6. Progress towards restoring upper limb movement and sensation through intracortical brain-computer interfaces10.1016/j.cobme.2018.11.005 ↗
7. Padfield, N., Zabalza, J., Zhao, H., Masero, V., and Ren, J. (2019). EEG-Based Brain-Computer Interfaces Using Motor-Imagery: Techniques and Challenges. Sensors, 19.10.3390/s19061423 ↗
8. Glaser, J.I., Benjamin, A.S., Chowdhury, R.H., Perich, M.G., Miller, L.E., and Kording, K.P. (2020). Machine Learning for Neural Decoding. eNeuro, 7.10.1523/ENEURO.0506-19.2020 ↗
9. Brain–computer interface boosts motor imagery practice during stroke recovery10.1002/ana.24390 ↗
10. Brain Computer Interfaces, a Review10.3390/s120201211 ↗
11. Brain-computer interfaces for post-stroke motor rehabilitation: A meta-analysis10.1002/acn3.544 ↗
12. Shen, Y.W., and Lin, Y.P. (2019). Challenge for Affective Brain-Computer Interfaces: Non-stationary Spatio-spectral EEG Oscillations of Emotional Responses. Front. Hum. Neurosci., 13.10.3389/fnhum.2019.00366 ↗
13. Motor decoding from the posterior parietal cortex using deep neural networks10.1088/1741-2552/acd1b6 ↗
14. Deep learning for neural decoding in motor cortex10.1088/1741-2552/ac8fb5 ↗
15. A frequency-domain pattern recognition model for motor imagery-based brain-computer interface10.58496/ADSA/2024/008 ↗
16. de Melo, G.C., Castellano, G., and Forner-Cordero, A. (2024). A procedure to minimize EEG variability for BCI applications. Biomed. Signal Process. Control, 89.10.1016/j.bspc.2023.105745 ↗
17. Deep learning techniques for classification of electroencephalogram (EEG) motor imagery (MI) signals: A review10.1007/s00521-021-06352-5 ↗
18. Zhou, S., Geng, S., Li, J., Zhang, D., Xie, Z., Cheng, C., and Hong, S. (2023, January 1–4). Less is More: Reducing Overfitting in Deep Learning for EEG Classification. Proceedings of the 2023 Computing in Cardiology (CinC), Atlanta, GA, USA.10.22489/CinC.2023.183 ↗
19. Rithwik, P., Benzy, V., and Vinod, A. (2022). High accuracy decoding of motor imagery directions from EEG-based brain computer interface using filter bank spatially regularised common spatial pattern method. Biomed. Signal Process. Control, 72.10.1016/j.bspc.2021.103241 ↗
20. STNDT: Modeling Neural Population Activity with Spatiotemporal Transformers
21. Spatio-temporal transformers for decoding neural movement control10.1088/1741-2552/adaef0 ↗
22. Vafaei, E., and Hosseini, M. (2025). Transformers in EEG Analysis: A Review of Architectures and Applications in Motor Imagery, Seizure, and Emotion Classification. Sensors, 25.10.3390/s25051293 ↗
23. Milanés-Hermosilla, D., Trujillo Codorniú, R., López-Baracaldo, R., Sagaró-Zamora, R., Delisle-Rodriguez, D., Villarejo-Mayor, J.J., and Núñez-Álvarez, J.R. (2021). Monte Carlo Dropout for Uncertainty Estimation and Motor Imagery Classification. Sensors, 21.10.3390/s21217241 ↗
24. A 1D CNN for high accuracy classification and transfer learning in motor imagery EEG-based brain-computer interface10.1088/1741-2552/ac4430 ↗
25. Xiao, X., Shi, Y., and Chen, J. (2024, January 2–7). Towards Better Evaluations of Class Activation Mapping and Interpretability of CNNs. Proceedings of the Neural Information Processing, Singapore.
26. Xie, X., Zhang, D., Yu, T., Duan, Y., Daly, I., and He, S. (2023). Editorial: Explainable and advanced intelligent processing in the brain-machine interaction. Front. Hum. Neurosci., 17.10.3389/fnhum.2023.1280281 ↗
27. Xu, Z., Cui, W., and Li, Y. (2024, January 15–17). Temporal-Spectral Generative Adversarial Network based Multi-Level Consistency Learning for Epileptic Seizure Prediction. Proceedings of the 2024 4th International Conference on Industrial Automation, Robotics and Control Engineering (IARCE), Chengdu, China.10.1109/IARCE64300.2024.00071 ↗
28. Bian, S., Kang, P., Moosmann, J., Liu, M., Bonazzi, P., Rosipal, R., and Magno, M. (2024, January 5–9). On-device Learning of EEGNet-based Network For Wearable Motor Imagery Brain-Computer Interface. Proceedings of the ISWC ’24 2024 ACM International Symposium on Wearable Computers, New York, NY, USA.10.1145/3675095.3676607 ↗
29. LayerCAM: Exploring Hierarchical Class Activation Maps for Localization10.1109/TIP.2021.3089943 ↗
30. Kabir, M.H., Mahmood, S., Al Shiam, A., Musa Miah, A.S., Shin, J., and Molla, M.K.I. (2023). Investigating Feature Selection Techniques to Enhance the Performance of EEG-Based Motor Imagery Tasks Classification. Mathematics, 11.10.3390/math11081921 ↗
31. Astrand, E., Plantin, J., Palmcrantz, S., and Tidare, J. (2021, January 4–6). EEG non-stationarity across multiple sessions during a Motor Imagery-BCI intervention: Two post stroke case series. Proceedings of the 2021 10th International IEEE/EMBS Conference on Neural Engineering (NER), IEEE, Virtual Event.10.1109/NER49283.2021.9441076 ↗
32. Cognitive Imagery Classification of EEG Signals using CSP-based Feature Selection Method10.1080/02564602.2019.1620138 ↗
33. Pérez-Velasco, S., Marcos-Martínez, D., Santamaría-Vázquez, E., Martínez-Cagigal, V., Moreno-Calderón, S., and Hornero, R. (2024). Unraveling motor imagery brain patterns using explainable artificial intelligence based on Shapley values. Comput. Methods Programs Biomed., 246.10.1016/j.cmpb.2024.108048 ↗
34. Regularization effects in deep learning architecture10.46481/jnsps.2024.1911 ↗
35. A review of classification algorithms for EEG-based brain–computer interfaces: A 10 year update10.1088/1741-2552/aab2f2 ↗
36. Deep learning in motor imagery EEG signal decoding: A Systematic Review10.1016/j.neucom.2024.128577 ↗
37. Deep learning with convolutional neural networks for EEG decoding and visualization10.1002/hbm.23730 ↗
38. EEGNet: A compact convolutional neural network for EEG-based brain–computer interfaces10.1088/1741-2552/aace8c ↗
39. Musallam, Y.K., AlFassam, N.I., Muhammad, G., Amin, S.U., Alsulaiman, M., Abdul, W., Altaheri, H., Bencherif, M.A., and Algabri, M. (2021). Electroencephalography-based motor imagery classification using temporal convolutional network fusion. Biomed. Signal Process. Control, 69.10.1016/j.bspc.2021.102826 ↗
40. Tayeb, Z., Fedjaev, J., Ghaboosi, N., Richter, C., Everding, L., Qu, X., Wu, Y., Cheng, G., and Conradt, J. (2019). Validating Deep Neural Networks for Online Decoding of Motor Imagery Movements from EEG Signals. Sensors, 19.10.3390/s19010210 ↗
41. Sequence-to-sequence deep neural network with spatio-spectro and temporal features for motor imagery classification10.1016/j.bbe.2020.12.004 ↗
42. Motor Imagery Classification via Temporal Attention Cues of Graph Embedded EEG Signals10.1109/JBHI.2020.2967128 ↗
43. Zhao, W., Jiang, X., Zhang, B., Xiao, S., and Weng, S. (2024). CTNet: A convolutional transformer network for EEG-based motor imagery classification. Sci. Rep., 14.10.1038/s41598-024-71118-7 ↗
44. Yang, Q., Yang, M., Liu, K., and Deng, X. (2022, January 3–5). Enhancing EEG Motor Imagery Decoding Performance via Deep Temporal-domain Information Extraction. Proceedings of the 2022 IEEE 11th Data Driven Control and Learning Systems Conference (DDCLS), Chengdu, China.10.1109/DDCLS55054.2022.9858575 ↗
45. A Transformer-Based Approach Combining Deep Learning Network and Spatial-Temporal Information for Raw EEG Classification10.1109/TNSRE.2022.3194600 ↗
46. Classification based on sparse representations of attributes derived from empirical mode decomposition in a multiclass problem of motor imagery in EEG signals10.1007/s12553-023-00770-2 ↗
47. A Wearable Brain-Computer Interface With Fewer EEG Channels for Online Motor Imagery Detection10.1109/TNSRE.2024.3502135 ↗
48. Shiam, A.A., Hassan, K.M., Islam, M.R., Almassri, A.M.M., Wagatsuma, H., and Molla, M.K.I. (2024). Motor Imagery Classification Using Effective Channel Selection of Multichannel EEG. Brain Sci., 14.10.3390/brainsci14050462 ↗
49. CLCC-FS (OBWOA): An efficient hybrid evolutionary algorithm for motor imagery electroencephalograph classification10.1007/s11042-024-18365-y ↗
50. A comprehensive survey of evolutionary algorithms and metaheuristics in brain EEG-based applications10.1088/1741-2552/ad7f8e ↗
51. EEG source imaging of hand movement-related areas: An evaluation of the reconstruction and classification accuracy with optimized channels10.1186/s40708-024-00224-z ↗
52. A Survey on Explainable Artificial Intelligence (XAI): Toward Medical XAI10.1109/TNNLS.2020.3027314 ↗
53. Explainable artificial intelligence approaches for brain–computer interfaces: A review and design space10.1088/1741-2552/ad6593 ↗
54. Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13–16). “Why Should I Trust You?”: Explaining the Predictions of Any Classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’16, New York, NY, USA.10.1145/2939672.2939778 ↗
55. Simonyan, K., Vedaldi, A., and Zisserman, A. (2013). Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv.
56. Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., and Batra, D. (2017, January 22–29). Grad-CAM: Visual Explanations From Deep Networks via Gradient-Based Localization. Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy.10.1109/ICCV.2017.74 ↗
57. On the interpretation of weight vectors of linear models in multivariate neuroimaging10.1016/j.neuroimage.2013.10.067 ↗
58. Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (2017). What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?. Advances in Neural Information Processing Systems, Curran Associates, Inc.
59. Jiahao, H., Ur Rahman, M.M., Al-Naffouri, T., and Laleg-Kirati, T.M. (2024, January 15–19). Uncertainty Estimation and Model Calibration in EEG Signal Classification for Epileptic Seizures Detection. Proceedings of the 2024 46th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA.10.1109/EMBC53108.2024.10782858 ↗
60. Balcan, M.F., and Weinberger, K.Q. (2016, January 20–22). Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA. Volume 48—Proceedings of Machine Learning Research, 2016; Eds.
61. Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (2017). Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. Advances in Neural Information Processing Systems, Curran Associates, Inc.
62. Advancing EEG prediction with deep learning and uncertainty estimation10.1186/s40708-024-00239-6 ↗
63. Optimal spatial filtering of single trial EEG during imagined hand movement10.1109/86.895946 ↗
64. Optimizing Spatial filters for Robust EEG Single-Trial Analysis10.1109/MSP.2008.4408441 ↗
65. Ang, K.K., Chin, Z.Y., Zhang, H., and Guan, C. (2008, January 1–8). Filter Bank Common Spatial Pattern (FBCSP) in Brain-Computer Interface. Proceedings of the 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), Hong Kong, China.
66. Bai, S., Kolter, J.Z., and Koltun, V. (2018). An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv.
67. Deep Learning for EEG motor imagery classification based on multi-layer CNNs feature fusion10.1016/j.future.2019.06.027 ↗
68. Proverbio, A.M., and Pischedda, F. (2023). Measuring brain potentials of imagination linked to physiological needs and motivational states. Front. Hum. Neurosci., 17.10.3389/fnhum.2023.1146789 ↗
69. Confidence-Based Framework Using Deep Learning for Automated Sleep Stage Scoring10.2147/NSS.S333566 ↗
70. Wong, S., Simmons, A., Villicana, J.R., and Barnett, S. (2023). Estimating Patient-Level Uncertainty in Seizure Detection Using Group-Specific Out-of-Distribution Detection Technique. Sensors, 23.10.3390/s23208375 ↗
71. Cho, H., Ahn, M., Ahn, S., Kwon, M., and Jun, S.C. (2024, December 01). Supporting Data for “EEG Datasets for Motor Imagery Brain Computer Interface”. Available online: https://gigadb.org/dataset/100295.
72. Kim, H., Luo, J., Chu, S., Cannard, C., Hoffmann, S., and Miyakoshi, M. (2023). ICA’s bug: How ghost ICs emerge from effective rank deficiency caused by EEG electrode interpolation and incorrect re-referencing. Front. Signal Process., 3.10.3389/frsip.2023.1064138 ↗
73. Li, C., Qin, C., and Fang, J. (2021). Motor-imagery classification model for brain-computer interface: A sparse group filter bank representation model. arXiv.
74. EEG rhythm based emotion recognition using multivariate decomposition and ensemble machine learning classifier10.1016/j.jneumeth.2023.109879 ↗
75. Exploring Deep Learning Features for Automatic Classification of Human Emotion Using EEG Rhythms10.1109/JSEN.2021.3070373 ↗
76. García-Murillo, D.G., Álvarez Meza, A.M., and Castellanos-Dominguez, C.G. (2023). KCS-FCnet: Kernel Cross-Spectral Functional Connectivity Network for EEG-Based Motor Imagery Classification. Diagnostics, 13.10.3390/diagnostics13061122 ↗
77. Rethinking CNN Architecture for Enhancing Decoding Performance of Motor Imagery-Based EEG Signals10.1109/ACCESS.2022.3204758 ↗
78. Non-Invasive Brain-Computer Interfaces: State of the Art and Trends10.1109/RBME.2024.3449790 ↗
79. Cui, J., Yuan, L., Wang, Z., Li, R., and Jiang, T. (2023). Towards best practice of interpreting deep learning models for EEG-based brain computer interfaces. Front. Comput. Neurosci., 17.10.3389/fncom.2023.1232925 ↗
80. Monte Carlo-Based Strategy for Assessing the Impact of EEG Data Uncertainty on Confidence in Convolutional Neural Network Classification10.1109/ACCESS.2025.3570134 ↗
81. OoD-Control: Generalizing Control in Unseen Environments10.1109/TPAMI.2024.3395484 ↗
82. Ye, N., Li, K., Bai, H., Yu, R., Hong, L., Zhou, F., Li, Z., and Zhu, J. (2022, January 18–24). OoD-Bench: Quantifying and Understanding Two Dimensions of Out-of-Distribution Generalization. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA.10.1109/CVPR52688.2022.00779 ↗
83. Transfer Learning for Brain–Computer Interfaces: A Euclidean Space Data Alignment Approach10.1109/TBME.2019.2913914 ↗
84. Multi-kernel extreme learning machine for EEG classification in brain-computer interfaces10.1016/j.eswa.2017.12.015 ↗