EEG-Based Cognitive Monitoring During Driving and Postural Control Using Machine Learning and Deep Learning
Abstract
Electroencephalography (EEG) has emerged as a powerful non-invasive technique for monitoring cognitive, attentional, and performance-related states during complex motor behaviors. In particular, tasks such as driving and postural control require the continuous integration of sensory information, attention, and motor coordination. Reductions in attentional engagement, delayed responses, or altered balance regulation can negatively affect safety, performance, and independence. However, existing EEG-based approaches often rely on handcrafted features, simplified representations, or models that may not fully capture the temporal and spectro-temporal dynamics of neural activity. This work presents an EEG-based framework for analyzing cognitive and sensorimotor states across simulated driving and standing postural control tasks. First, EEG signals recorded from 21 participants during simulated driving were used to classify focused and mind-wandering states. The proposed methodology combined EEG preprocessing, artifact removal, perturbation-based segmentation, power spectral density (PSD) feature extraction, and machine learning classification. Classical machine learning models were compared with deep learning architectures, including a hybrid convolutional neural network and long short-term memory (CNN-LSTM) model and a Transformer-based model. The Transformer achieved the best performance, reaching 88.8\% accuracy and 94.9\% area under the receiver operating characteristic curve (ROC-AUC), demonstrating the importance of preserving temporal EEG dynamics for attention-state detection. Second, driving performance was predicted using reaction-time-based labels derived from lateral perturbation responses. These segments are subsequently transformed into event-related desynchronization/synchronization (ERDS) spectrograms using short-time Fourier transform (STFT) analysis. These spectrograms were further enhanced using image preprocessing techniques and classified using a Vision Transformer (ViT). The proposed processed-ERDS ViT model achieved 81.8\% accuracy and 89.8\% ROC-AUC, outperforming both handcrafted PSD-based models and raw EEG deep learning baselines. These results show that event-related time-frequency representations provide a more informative framework for predicting transient driving performance than conventional feature-based approaches. Finally, EEG activity was analyzed during standing balance tasks performed by younger and older adults under quiet standing, cognitive dual-tasking, internal focus, and external focus conditions. The postural control analysis combined preprocessing, independent component analysis (ICA)-based artifact removal, source localization, independent component clustering, PSD estimation, spectral parameterization, statistical testing, Transformer-based classification, and Captum-based interpretability. Source-level spectral analysis revealed condition and age-related differences across bilateral posterior/occipital and left-lateral source clusters, with the clearest effects involving theta and alpha activity among older adults. Overall, the results demonstrate that EEG signals contain meaningful information about cognitive, attentional, and performance-related states during complex motor behaviors. The findings highlight the importance of selecting EEG representations that align with the target task: raw EEG time series are useful for modeling temporal attention dynamics, ERDS spectrograms improve event-related driving performance prediction, and source-level PSD features support physiological interpretation during postural control. This work contributes toward the development of EEG-based cognitive monitoring systems with potential applications in intelligent transportation, brain-computer interfaces, rehabilitation, and fall-risk assessment.