A Brain-Computer Interface Four-class Classification Algorithm Integrating a Custom Spiking Neural Network with Attention Mechanisms
This paper addresses the challenges of feature extraction and classification accuracy in brain-computer interface (BCI) systems based on motor imagery tasks. We propose the SAMPN-Network model, which integrates a custom spiking neural network with a soft attention mechanism (SoftAttentionLayer), alo...
Saved in:
| Published in | IAENG international journal of computer science Vol. 52; no. 7; p. 2381 |
|---|---|
| Main Authors | , , , |
| Format | Journal Article |
| Language | English |
| Published |
Hong Kong
International Association of Engineers
01.07.2025
|
| Subjects | |
| Online Access | Get full text |
| ISSN | 1819-656X 1819-9224 |
Cover
| Summary: | This paper addresses the challenges of feature extraction and classification accuracy in brain-computer interface (BCI) systems based on motor imagery tasks. We propose the SAMPN-Network model, which integrates a custom spiking neural network with a soft attention mechanism (SoftAttentionLayer), alongside the Simplicityformer classifier that incorporates a multi-head attention mechanism (MHA). The resulting classification algorithm, named Custom Spiking Neural Network Layer with Soft Attention Mechanism and Multi-Head Attention for Classification (SNA-MHC), is specifically designed to optimize classification accuracy in BCI systems. In our approach, raw EEG signals corresponding to motor imagery (MI) tasks are first normalized and then transformed into discrete spike trains using threshold encoding to make them suitable for processing by Spiking Neural Networks (SNN). These spike signals are subsequently processed by the SAMPN-Network model, which performs feature extraction by integrating a soft attention mechanism with the SNN module. The SNN module utilizes pulse neurons to encode and enhance the temporal information in EEG signals. Concurrently, the soft attention mechanism calculates attention weights to automatically focus on critical segments of the EEG signals associated with MI tasks while suppressing background noise and irrelevant temporal information, thereby extracting more precise time-series features. Following timesequence feature extraction, a Multi-Head Attention Mechanism performs parallel attention computation across time domain, frequency domain, and more abstract feature spaces. This approach captures interdependencies between features across different dimensions and enhances the discriminative power of the classifier. Finally, the integrated features are processed by a Softmax classifier to perform four-class classification of MI tasks. Experimental results demonstrate that the proposed SNA-MHC model outperforms existing state-of-the-art models in terms of classification accuracy on both the TechBrain and BCI Competition IV2a datasets. Specifically, SNA-MHC achieves an average classification accuracy improvement of 13.02%, 4.41%, 8.46%, 15.05%, and 15.88%, respectively, when compared to other algorithmic models. Furthermore, when compared to traditional CNN and SNN models, SNA-MHC exhibits superior energy efficiency while maintaining classification accuracy, further validating its robust performance. |
|---|---|
| Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ISSN: | 1819-656X 1819-9224 |