A brain-computer interface visual target detection method based on graph attention channel aggregation
Patent Information
- Application Number
- CN202410741640.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-10
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-06-10
AI Technical Summary
[0004]为解决现有基于快速序列视觉呈现视觉目标检测方法存在的问题,本发明提出了一种基于图注意力通道聚合的脑机接口视觉目标检测方法
[0020]1.为通过端到端方式降低脑电信号中噪声影响,本发明设计了基于图注意力机制的通道聚合网络,通过对多通道脑电时空特征进行注意力加权聚合,降低时空特征的噪声冗余信息;
Smart Images

Figure CN118747791B_ABST
Abstract
Description
Technical Field
[0001] This invention provides a brain-computer interface visual target detection method based on graph attention channel aggregation. Background Technology
[0002] Brain-computer interface (BCI) technology is a technology that directly allows human brain activity to interact with external devices, typically by detecting and interpreting brain signals. In the field of BCI, visual target detection is an important task, aiming to achieve target recognition or peripheral device control by utilizing the electroencephalogram (EEG) generated when a subject observes a visual image target. Studies have shown that the accuracy of EEG-based target detection typically decreases significantly when the image presentation frequency exceeds 10 Hz. This is mainly because the brain's response signal weakens under high-speed visual stimulation, resulting in a lower signal-to-noise ratio (SNR) for the EEG signal. Furthermore, the shorter visual image presentation time places higher demands on the computational efficiency of visual target detection models. Therefore, it is necessary to explore an efficient feature extraction method for low SNR EEG signals to meet the application requirements of high-speed visual target detection.
[0003] In recent years, numerous deep learning-based methods for fast sequence visual representation and visual target detection have been proposed. Among these existing methods, spatial filtering techniques such as xDAWN are commonly used to spatially filter EEG signals to improve the signal-to-noise ratio. However, these methods require additional preprocessing steps, which is not conducive to achieving high-speed end-to-end visual target detection. In terms of spatiotemporal feature extraction from EEG signals, attention-based methods typically achieve better performance than convolutional neural network-based methods due to their stronger global information modeling capabilities.
[108] However, traditional attention mechanisms also have greater computational complexity, making it difficult to meet the computational efficiency requirements of high-speed visual object detection methods. Furthermore, in high-speed visual object detection tasks, target and non-target samples are severely imbalanced. Many existing methods use Generative Adversarial Networks (GANs) to generate a large amount of target sample data to balance the training samples. While these methods can improve the classification accuracy of fast sequence visual object detection to some extent, the generated target samples usually still differ from the real samples, making it difficult to further improve detection accuracy. Summary of the Invention
[0004] To address the shortcomings of existing visual target detection methods based on rapid sequence visual presentation, this invention proposes a brain-computer interface visual target detection method based on graph attention channel aggregation. Through four steps—experimental paradigm design and data acquisition and processing, model construction, model training, and model testing—high-accuracy recognition of visual targets based on rapid sequence visual presentation is achieved. Effectiveness is validated on two different EEG datasets with varying visual target presentation frequencies. The balanced accuracy for target detection in a single subject reaches 88.57%, outperforming other existing state-of-the-art methods.
[0005] A brain-computer interface visual target detection method based on graph attention channel aggregation according to an embodiment of the present invention includes the following steps:
[0006] Step 1: Design two different experimental paradigms for high-speed sequence visual presentation, collect EEG data under high-speed presentation of visual stimuli, and perform data preprocessing, dividing the processed data into training set and test set;
[0007] Step 2: Use the PyTorch deep learning framework to build the model structure of a graph attention channel aggregation neural network;
[0008] Step 3: Input the preprocessed training set data from Step 1 into the model for model training;
[0009] Step 4: Input the preprocessed test set data from Step 1 into the finally trained model to obtain the EEG visual target recognition performance indicators under high-speed visual stimulation.
[0010] in:
[0011] In step S1, the presentation frequencies of the two different fast sequence visual presentation experimental paradigms are 12.5 Hz (i.e., each image is presented for 80 ms) and 16.7 Hz (i.e., each image is presented for 60 ms), respectively.
[0012] EEG data acquisition was performed using a 64-lead NeuroScan SynAmp2 EEG acquisition device at a sampling rate of 1000Hz.
[0013] Data preprocessing includes bandpass filtering of EEG signals and EEG signal sample segmentation;
[0014] In step S2, the constructed graph attention channel aggregation neural network includes: a graph attention channel aggregation module, a global guided attention spatiotemporal feature extraction module, and a multi-level representation contrastive learning module. These modules are connected sequentially. The graph attention channel aggregation module aggregates multi-channel EEG data, reducing noise interference and information redundancy. The global guided attention spatiotemporal feature extraction module captures the global and local dependencies of EEG spatiotemporal features, reducing time complexity while fully exploring key spatiotemporal features of EEG signals. The multi-level representation contrastive learning strategy compares and constrains features at different levels of the feature extraction network, improving the model's ability to detect target EEG signals.
[0015] In step S3:
[0016] The two preprocessed training sets from step S1 are input into the graph attention channel aggregation neural network, respectively. Five-fold cross-validation is used to experiment on both datasets, and the Adam optimizer is used to optimize all models. The initial learning rate and batch size are set to 10. -3 and 64;
[0017] In step S4:
[0018] When calculating the performance indicators of EEG visual target recognition under high-speed visual stimulation, the Balanced Accuracy (BA), True Positive Rate (TPR), and Area Under the ROC Curve (AUC) are used to evaluate the target detection performance of the model.
[0019] The main advantages of the brain-computer interface visual target detection method based on graph attention channel aggregation proposed in this invention include:
[0020] 1. To reduce the impact of noise in EEG signals through an end-to-end approach, this invention designs a channel aggregation network based on graph attention mechanism. By performing attention-weighted aggregation on spatiotemporal features of multi-channel EEG, the noise redundancy information of spatiotemporal features is reduced.
[0021] 2. To reduce the computational complexity of traditional multi-head attention mechanisms, this invention develops a spatiotemporal feature extraction network based on global guided attention, which effectively captures discriminative high-order spatiotemporal features and improves the model's recognition accuracy.
[0022] 3. To address the problem of imbalanced class samples, this invention proposes a multi-level representation contrastive learning strategy. By comparing and constraining the representations of different levels of the model in the feature space, this strategy overcomes the problem that the model tends to learn the features of the majority of sample classes, thereby enhancing the model's generalization performance. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of a fast sequence visual presentation EEG experimental paradigm according to an embodiment of the present invention.
[0024] Figure 2 This is a schematic diagram of the structure of a graph attention channel aggregation neural network according to an embodiment of the present invention.
[0025] Figure 3 This is a schematic diagram of a global guided attention spatiotemporal feature extraction structure according to an embodiment of the present invention. Detailed Implementation
[0026] In a brain-computer interface visual target detection method based on graph attention channel aggregation according to an embodiment of the present invention, multi-channel EEG data is aggregated through a graph attention channel aggregation module to reduce noise interference and information redundancy. Then, a global guided attention module models the global and local dependencies of EEG spatiotemporal features, reducing time complexity while fully mining key spatiotemporal features of the EEG signal. Finally, a multi-level representation contrastive learning strategy is employed to compare and constrain features at different levels of the feature extraction network, improving the model's ability to detect target EEG signals.
[0027] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, illustrates a brain-computer interface visual target detection method based on graph attention channel aggregation proposed in this invention.
[0028] A brain-computer interface visual target detection method based on graph attention channel aggregation according to an embodiment of the present invention includes:
[0029] Step S1, the specific steps in designing two different fast sequence visual presentation experimental paradigms include:
[0030] Step S1.1: Visual image collection, including: collecting 15,000 SAR images from the MSTAR and AIR-SARShip datasets. The MSTAR dataset, collected and released by Sandia National Laboratories in the United States, contains SAR images of various military targets, such as tanks, armored vehicles, and trucks. The MSTAR dataset provides SAR images with different target types, azimuth angles, viewing angles, and noise levels to simulate real radar imaging environments. The AIR-SARShip dataset, collected and released by the Chinese Academy of Sciences, contains SAR images acquired by the Gaofen-3 multi-polarization high-resolution synthetic aperture radar satellite. The images mainly cover nearly a thousand ships of more than ten categories, including transport ships, oil tankers, and fishing boats, and provide corresponding location annotation information.
[0031] Step S1.2: Experimental paradigm design, including:
[0032] The experimental paradigm for high-speed presentation of visual stimuli includes two experimental phases at 12.5 Hz and 16.7 Hz, and its paradigm is as follows: Figure 1As shown. In the two experimental phases, each image appeared at a presentation speed of 80ms and 60ms, respectively, with a 5% probability of the target image appearing. In the paradigm design, to reduce the influence of eye movements during the experiment, a fixed crosshair was added in the middle of the visual stimulus image as a fixation point. Participants pressed the space bar on the keyboard to start viewing the image sequence. Each experimental phase consisted of 5 trials. In each trial, participants viewed 10 sequences, each containing 200 images. The interval between two sequences was controlled by the participants, who pressed the space bar to start the presentation of the next sequence of images. In the first phase, each sequence of images was presented for approximately 16 seconds; in the second phase, each sequence of images was presented for approximately 12 seconds.
[0033] In step S1, the EEG signals are acquired using a 64-lead NeuroScan SynAmp2 EEG acquisition device at a sampling rate of 1000Hz. The EEG leads are positioned according to the international 10-20 system standard, with the forehead as ground and the top of the head as the electrode reference. Conductive gel is applied to reduce the impedance of the leads to below 10kΩ to ensure the quality of the EEG signal acquisition.
[0034] Ten participants were recruited for EEG data collection in this experiment. The average age of the participants was 26.05 ± 1.88 years. All participants had normal and corrected vision and none had any mental illnesses (such as epilepsy). All participants were informed of the experimental content and procedures before the experiment and signed an informed consent form.
[0035] In step S1, data preprocessing is performed using the Python EEG toolkit MNE, including:
[0036] First, the EEG signal is passed through a [0.130] Hz bandpass filter to remove low-frequency and high-frequency noise interference;
[0037] Then, the EEG signal samples were segmented according to signal labels. Each EEG sample took signal data from 0.1 seconds before labeling to 0.9 seconds after labeling, i.e., an EEG signal with a duration of 1 second. After sample segmentation, each subject could obtain 10,000 EEG samples with a presentation frequency of 12.5 Hz and 10,000 EEG samples with a presentation frequency of 16.7 Hz. Since the image presentation durations corresponding to the presentation frequencies of 12.5 Hz and 16.7 Hz are 80 ms and 60 ms respectively, the two EEG datasets were denoted as Fast Sequence Visual Presentation 80 and Fast Sequence Visual Presentation 60, respectively.
[0038] Finally, to reduce the complexity of the model, the sampling frequency of each EEG sample was reduced to 100Hz.
[0039] Step S2, the constructed graph attention channel aggregation neural network has the following structure: Figure 2As shown, it specifically includes:
[0040] (a) Graph attention channel aggregation module, used for
[0041] The graph attention channel aggregation module aggregates multi-channel EEG data to reduce noise interference and information redundancy.
[0042] First, an average EEG signal with a higher signal-to-noise ratio is obtained by averaging batch EEG data.
[0043] Secondly, calculate the variance of the channels D = {D1, D2, ..., D...} C}, where C represents the number of channels, providing a basis for evaluating the signal response of the channels;
[0044] Next, after normalizing the channel variance, the weights of each channel are automatically learned through two fully connected layers, and the input EEG signals are processed accordingly. The weighted average is calculated using the following formula:
[0045]
[0046] In the formula, This is the channel-weighted EEG signal. Sigmoid(·) and Relu(·) represent the sigmoid and ReLU activation functions, respectively. Norm(·) is the normalization layer. W1 and W2 are the learnable weight matrices of the fully connected layer. × represents matrix multiplication, and ⊙ represents vector dot product.
[0047] Furthermore, spatiotemporal features of EEG signals are extracted using spatiotemporal convolutional units. Each spatiotemporal convolutional unit consists of two temporal convolutional layers and one spatial convolutional layer. Each convolutional layer is followed by a batch normalization layer and an ELU activation layer. The spatiotemporal convolution can be represented as:
[0048]
[0049] In the formula, Conv st (·) represents a spatiotemporal convolution unit. These are spatiotemporal characteristics of brainwaves.
[0050] Furthermore, to reduce information redundancy in spatiotemporal features, a graph attention mechanism is employed to aggregate these features. Graph attention networks, by learning attention weights between nodes, can adaptively fuse node features, thereby better capturing the representations of nodes in the graph. This includes:
[0051] The first step is to study the spatiotemporal characteristics of brainwaves. After linear transformation, the graph node features N are obtained. st ;
[0052] The second step involves using learnable edge attention weights E.st The process involves capturing the relationships between graph node features to obtain the dynamic attention coefficient A between nodes. The calculation formula for this process is as follows:
[0053]
[0054] In the formula, W G Let LReLU be a learnable linear transformation matrix, and LReLU be the Leaky ReLU activation function.
[0055] Finally, after obtaining the attention coefficients between nodes, the graph node features are aggregated. The calculation formula for the spatiotemporal aggregated features finally output by the graph attention channel aggregation module is as follows:
[0056]
[0057] In the formula, M st These are the spatiotemporal features after channel aggregation.
[0058] (a) The global guided attention spatiotemporal feature extraction module has the following structure: Figure 3 As shown, for
[0059] Modeling the global and local dependencies of EEG spatiotemporal features reduces time complexity while fully exploring key spatiotemporal features of EEG signals, specifically including:
[0060] First, input feature M st Transformed into embedded features via linear projection E represents the embedding dimension;
[0061] Secondly, M e Divided into sizes The non-overlapping windows are defined, with S being the window size. Local self-attention is calculated within each window using the following formula:
[0062]
[0063] In the formula, M local Represents local self-attention features, Attention(·) represents the attention scoring function, Softmax(·) represents the normalization exponential function, and M represents the local self-attention feature. q M k M v The embedded features M are respectively e With the learnable transformation matrix Q l K l V l Multiplying them together, we get For M k The transpose of . By calculating local window attention, the original computational complexity is reduced from T. 2Reduced to (T×S). Meanwhile, local window attention can efficiently model local dependencies within a window, but lacks the ability to model global dependencies;
[0064] Furthermore, to obtain global dependencies of features in a lightweight manner, a global attention mechanism is employed to aggregate valuable global dependencies into a smaller representation space, and these global representations guide the modeling of local dependencies. In the global attention mechanism, the learnable global embedding representation G and the local embedding representation are simultaneously computed to learn the global dependencies of the input feature map. The computation process can be represented as follows:
[0065]
[0066] In the formula, The low-dimensional global representation obtained by the global attention mechanism is represented by Attentlon(·), which represents the attention scoring function.
[0067] Then, to overcome the lack of global information in local window attention, global information is transferred to local window attention, resulting in a global representation. Linearly transformed into a key vector Sum value vector Modeling global information and local representation M using a self-attention mechanism q The process of determining the dependencies and fusing local and global feature information can be represented as follows:
[0068]
[0069] In the formula, M global For global attention features, Attention(·) represents the spatiotemporal representation of global attention output, and represents the attention scoring function.
[0070] (b) A multi-level representation contrastive learning module, including:
[0071] A multi-level representation contrastive learning strategy is employed to impose contrastive constraints on features at different levels of the feature extraction network, thereby improving the model's ability to detect target EEG signals. This includes:
[0072] First, EEG features from different levels of the model were analyzed. and The representation vector is encoded by the feature encoding unit. L represents the dimension of the representation vector. To ensure that the distance between target and non-target features is large while the distance between features of the same class is small, center contrast loss is used to constrain the feature space. The center contrast loss function is defined as:
[0073]
[0074] In the formula, The center-contrast loss is used, where m represents the batch size and y represents the number of samples. i It is the representation vector z i Category tags, For y i The category representation vector is centered, J represents the number of categories, δ is a constant to prevent the denominator from being zero, and is set to 1 by default. j Let be the center of the class j representation vector, and ‖﹒‖2 be the L2 norm operation. To constrain simultaneously at three levels, the multi-level contrastive loss function is expressed as follows:
[0075]
[0076] Then, the three representation vectors from different levels are concatenated and passed through a classifier to obtain the predicted class label. Where Concat(·) is the concatenation function, f cls This is a classifier consisting of fully connected layers and a softmax function. To overcome the extreme imbalance between target and non-target class samples, a class-balanced loss is used to assign penalty weights to the classification errors of different classes. The class-balanced loss function is defined as follows:
[0077]
[0078] In the formula, It is the j-th element in the actual class label of the i-th sample. It is the predicted probability that the i-th sample belongs to the j-th class, β∈[0,1) is the class balance coefficient, and n j This represents the sample size of class j. Class-balanced loss allows setting appropriate loss weights based on the proportion of samples from each class.
[0079] Finally, a joint loss function composed of a class-balanced loss function and a multi-level contrastive loss function is used. To constrain the parameter optimization of the model during the training phase:
[0080]
[0081] In the formula, λ hcl The weights for the multi-level contrastive loss function are set to 1 by default.
[0082] In one embodiment of the present invention,
[0083] In step S3, the training set data established in step S1 is input into the model, and 5-fold cross-validation is used to experiment on both datasets. The Adam optimizer is then used to optimize all models. The initial learning rate and batch size are set to 10. -3And 64. Due to the imbalanced class characteristics of the data in the fast sequence visual representation paradigm, an oversampling strategy is used to balance the data classes in the training set.
[0084] In one embodiment of the present invention,
[0085] In step S4, the model parameters saved in step S3 are loaded to obtain the trained EEG visual target detection model. The preprocessed continuous EEG data from step S1 is input into the model to obtain the performance indicators of EEG visual target recognition under high-speed visual stimulation, including:
[0086] The target detection performance of the model is evaluated by balancing accuracy (BA), true positive rate (TPR), and area under the ROC curve (AUC). BA is defined as the average of TPR and true negative rate (TNR), reflecting the average accuracy in identifying both target and non-target samples. TPR is also known as recall or sensitivity.
[0087] To verify the effectiveness of the brain-computer interface visual target detection method based on graph attention channel aggregation proposed in this invention, the visual target detection performance was compared with the baseline model on two datasets: Fast Sequence Visual Representation 80 and Fast Sequence Visual Representation 60. The experimental results are listed in Table 1 and Table 2, respectively.
[0088] Table 1 lists the detailed classification results of the comparative methods for each subject on the Fast Sequence Visual Presentation 80 dataset. As can be seen from the table, the model proposed in this invention achieved the highest BA (Balance of Classification) score on most subjects, with an average BA of 83.45%. Compared with SCN, MSFBCNN, and EEGComformer, the average BA is improved by 2.29%, 2.11%, and 1.41%, respectively. In terms of AUC (Average Acceptance Rate), the model proposed in this invention achieved 0.9035, higher than the other comparative models.
[0089] Table 2 lists the detailed classification results of the comparative model for each subject on the Fast Sequence Visual Presentation 60 dataset. From this table, it can be observed that compared with SCN, MSFBCNN, and EEGComformer, the proposed model achieves the highest average results in BA, TPR, and AUC metrics, reaching 82.93%, 0.7929, and 0.8948, respectively. In terms of BA, it improves by 2.38%, 2.18%, and 1.43% compared to SCN, MSFBCNN, and EEGComformer, respectively. This indicates that the proposed GGANet model has stronger feature extraction capabilities, fully leveraging the most discriminative spatiotemporal features of EEG, thus achieving better classification performance.
[0090] By comparing the model's results on the Fast Sequence Visual Presentation 80 and Fast Sequence Visual Presentation 60 datasets, it can be found that when the visual image presentation frequency increases from 12.5Hz to 16.7Hz, the average BA index of the GGANet model decreases from 83.45% to 82.93%. This is because the faster the image presentation frequency, the shorter the time subjects spend viewing each image, and the greater the difficulty in correctly identifying the target. Despite the visual image presentation frequency reaching 16.7Hz, the proposed GGANet model still achieves a balanced classification accuracy of nearly 83%, demonstrating that the model proposed in this invention can meet the practical needs of high-speed visual target detection.
[0091] Table 1 shows the experimental results of the comparison methods on the Fast Sequence Visual Rendering 80 dataset.
[0092]
[0093] Note: Bold text indicates the best result.
[0094] Table 2 shows the experimental results of the comparison methods on the Fast Sequence Visual Rendering 60 dataset.
[0095]
[0096] Note: Bold text indicates the best result.
Claims
1. A method for constructing a graph attention channel aggregation neural network for visual target detection in brain-computer interfaces, characterized in that... include: A) The graph attention channel aggregation step is used to aggregate multi-channel EEG data, reducing noise interference and information redundancy, including: A1) A higher signal-to-noise ratio averaged EEG signal is obtained by averaging batch EEG data; A2) Calculate channel variance Where C represents the number of channels, providing a basis for evaluating the signal response of the channels; A3) After normalizing the channel variance, the weights of each channel are automatically learned through two fully connected layers, and the input EEG signals are processed accordingly. The weighted average is calculated using the following formula: (1), In the formula, It is a channel-weighted EEG signal. and These represent the sigmoid and modified linear unit activation functions, respectively. For the normalization layer, and The learnable weight matrix of the fully connected layer. Represents matrix multiplication. Represents the dot product of vectors. A4) Spatiotemporal features of EEG signals are extracted using spatiotemporal convolutional units, each consisting of two temporal convolutional layers and one spatial convolutional layer. Each convolutional layer is followed by a batch normalization layer and an ELU activation function. The spatiotemporal convolution is represented as follows: (2), In the formula, Represents a spatiotemporal convolutional unit. Spatiotemporal characteristics of brainwaves B) A graph attention mechanism is used to aggregate spatiotemporal features, reducing information redundancy. Specifically, the graph attention network learns attention weights between nodes and adaptively fuses node features to better capture the representations of nodes in the graph, including: B1) Spatiotemporal characteristics of brainwaves Linear transformation into graph node features ; B2) Through learnable side attention weights Capture the relationships between graph node features to obtain dynamic attention coefficients between nodes. The relevant formulas for steps B1 and B2 are as follows: (3), (4), In the formula, It is a learnable linear transformation matrix. The Leaky ReLU activation function; B3) Aggregate the graph node features to obtain and output the spatiotemporal aggregated features. The calculation formula is as follows: (5), (6), In the formula, The spatiotemporal features after channel aggregation C) A global attention-guided spatiotemporal feature extraction step is used to model the global and local dependencies of EEG spatiotemporal features. This reduces time complexity while fully exploring key spatiotemporal features of EEG signals, specifically including: C1) Input features Transformed into embedded features via linear projection , For the embedded dimension; C2) Divided into sizes of ( , , () non-overlapping windows, Let the window size be [size], and calculate local self-attention within each window using the following formula: (7), In the formula, Represents local self-attention features. Represents the attention scoring function. Represents the normalized exponential function, , , Embedded features With learnable transformation matrix , , The product obtained by multiplying for transpose, C3) To obtain global dependencies of features in a lightweight manner, a global attention mechanism is employed to aggregate valuable global dependencies into a smaller representation space. These global representations then guide the modeling of local dependencies. Specifically, in the global attention mechanism, the learnable global embedding representation G and the local embedding representation are simultaneously computed to learn the global dependencies of the input feature map. The computation process is represented as follows: (8), In the formula, The low-dimensional global representation obtained by the global attention mechanism; C4) To overcome the lack of global information in local window attention, global information is transferred to local window attention, where low-dimensional global representation... Linearly transformed into a key vector Sum value vector Modeling global information and local representations through self-attention mechanism The dependencies are determined, and local and global feature information is fused, that is: (9), (10), In the formula, For global attention features, For the spatiotemporal representation of global attention output, For attention scoring function, D) Multi-level representation contrastive learning step, used to employ a multi-level representation contrastive learning strategy to compare and constrain features at different levels of the feature extraction network, improving the model's ability to detect target EEG signals, including: D1) EEG features from different levels of the model , and The representation vector is encoded by the feature coding unit. L represents the dimension of the representation vector. To maximize the distance between target and non-target features while minimizing the distance between features of the same class, center contrast loss is used to constrain the feature space. The center contrast loss function is defined as: (11), In the formula, To compare losses with the center, ∑ is the summation operation. This represents the batch sample size. Let be the representation vector of the samples in the i-th batch. Representation vector Category tags, for The category represents the center of the vector. The center of the class j characterization vector, For the number of categories, For L2 norm operations, To prevent constants with a denominator of 0 from being used, the default value is set to 1. To constrain at all three levels simultaneously, the multi-level contrastive loss function is expressed as follows: (12), D2) After concatenating the representation vectors from three different levels, the predicted class label is obtained through a classifier. ,in For concatenation functions, This is a classifier consisting of fully connected layers and a Softmax function. To overcome the extreme imbalance between target and non-target class samples, a class-balanced loss is used to assign penalty weights to the classification errors of different classes. The definition of the class-balanced loss function is: (13), In the formula, It is the j-th element in the actual class label of the i-th sample. It is the predicted probability that the i-th sample belongs to the j-th class. For class balance coefficients, yes Sample size of class samples D3) A joint loss function composed of a class-balanced loss function and a multi-level contrastive loss function. To constrain the parameter optimization of the model during the training phase: (14), In the formula, The weights for the multi-level contrastive loss function are set to 1 by default.
2. The method for constructing a graph attention channel aggregation neural network according to claim 1, characterized in that: The construction method described above is performed using the PyTorch deep learning framework.
3. A brain-computer interface visual target detection method based on graph attention channel aggregation, characterized in that... include: Step S1: Two different fast sequence visual presentation experimental paradigms were used to collect EEG data under high-speed visual stimulation and perform data preprocessing, dividing the processed data into training set and test set; Step S2: Execute the method for constructing the graph attention channel aggregation neural network according to claim 1 or 2. Step S3: Input the preprocessed training data of the two datasets into the graph attention channel aggregation neural network to train the graph attention channel aggregation neural network.
4. The brain-computer interface visual target detection method based on graph attention channel aggregation as described in claim 3, characterized in that... Further includes: Step S4: Input the preprocessed test set data from Step 1 into the finally trained model to obtain the EEG visual target recognition performance index under high-speed visual stimulation.
5. The brain-computer interface visual target detection method based on graph attention channel aggregation as described in claim 3 or 4, characterized in that: In step S1, the presentation frequencies of the two different fast sequence visual presentation experimental paradigms are 12.5Hz and 16.7Hz, respectively, where 12.5Hz represents 80ms per image and 16.7Hz represents 60ms per image. EEG data acquisition was performed using a 64-lead NeuroScan SynAmp2 EEG acquisition device at a sampling rate of 1000Hz. Data preprocessing includes bandpass filtering of EEG signals and EEG signal sample segmentation.
6. The brain-computer interface visual target detection method based on graph attention channel aggregation as described in claim 3 or 4, characterized in that: In step S3: The two preprocessed training sets from step S1 are input into the graph attention channel aggregation neural network, respectively. Five-fold cross-validation is used to experiment on both datasets, and the Adam optimizer is used to optimize all models. The initial learning rate and batch size are set to 10. -3 And 64.
7. The brain-computer interface visual target detection method based on graph attention channel aggregation as described in claim 3 or 4, characterized in that: Step S1 includes: Step S1.1: Collect visual images, including 15,000 SAR images from the MSTAR and AIR-SARShip datasets. Step S1.2: High-speed presentation of visual stimuli, including two experimental phases at 12.5Hz and 16.7Hz. In the two experimental phases, each image appears at a presentation speed of 80ms and 60ms respectively, and the probability of the target image appearing is 5%. To minimize the impact of eye movements on participants during the experiment, a fixed crosshair was added to the center of the visual stimulus image as a fixation point. Participants pressed the space bar on the keyboard to begin viewing image sequences. Each experimental phase consisted of 5 trials. In each trial, participants viewed 10 sequences, each containing 200 images. The interval between sequences was controlled by the participant. Pressing the space bar began the presentation of the next sequence of images. In the first stage, each sequence of images was presented for 16 seconds; in the second stage, each sequence of images was presented for 12 seconds. In step S1, the EEG signals are acquired using a 64-lead NeuroScan SynAmp2 EEG acquisition device at a sampling rate of 1000Hz. In step S1, data preprocessing includes: First, the EEG signal is passed through a [0.1 30] Hz bandpass filter to remove low-frequency and high-frequency noise interference; Then, the EEG signal samples were segmented according to the signal labels. Each EEG sample consisted of signal data from 0.1 seconds before labeling to 0.9 seconds after labeling, i.e., EEG signals with a duration of 1 second. After sample segmentation, each subject received an EEG sample with a presentation frequency of 12.5 Hz and an EEG sample with a presentation frequency of 16.7 Hz. The two EEG datasets were designated as Fast Sequence Visual Presentation 80 and Fast Sequence Visual Presentation 60, respectively. Finally, to reduce the complexity of the model, the sampling frequency of each EEG sample was reduced to 100Hz.
8. The brain-computer interface visual target detection method based on graph attention channel aggregation as described in claim 4, characterized in that: In step S4, the model parameters saved in step S3 are loaded to obtain the trained graph attention channel aggregation neural network. The preprocessed continuous EEG data from step S1 is input into the model to obtain the EEG visual target recognition performance indicators under high-speed visual stimulation, including: The target detection performance of the graph attention channel aggregation neural network was evaluated by balancing accuracy (BA), true positive rate (TPR), and area under the ROC curve (AUC). BA is defined as the average of TPR and TNR, reflecting the average recognition accuracy of target and non-target samples.
9. A computer-readable storage medium storing a computer-executable program that enables a processor to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Resting-state multi-channel electroencephalogram signal recognition method based on graph attention network and sparse coding
CN116211319A
Space-time frequency domain effective channel attention motor imagery electroencephalogram decoding method based on comparative learning
CN117009780A