Optimized CNN–transformer model for motor imagery EEG decoding: a Gray Wolf optimization approach
摘要
Brain–computer interfaces (BCIs) that use motor imagery (MI) present a viable avenue for applications involving direct neural control. However, because of their complicated spatiotemporal patterns and low signal-to-noise ratio, EEG signals continue to present a barrier for high classification accuracy. In this work, a novel convolution neural network–transformer hybrid architecture is proposed to enhance MI EEG classification. The CNN layers collect local temporal and spatial characteristics, whereas the transformer encoder captures global temporal relationships. A channel attention mechanism and gray wolf optimization (GWO) are integrated to further refine feature extraction and hyperparameter tuning. The proposed framework performs better than a number of cutting-edge baselines, as evidenced by experimental validation on the datasets for BCI Competition IV 2a and 2b, which shows considerable gains in accuracy, F1-score, and kappa coefficient. The findings validate the model’s capacity for reliable and broadly applicable MI decoding.