A magnetoencephalogram background suppression method, system and readable storage medium
The MAE self-supervised deep learning network model performs background suppression on magnetoencephalography data, solving the problems of background noise and system errors in magnetoencephalography signals, improving the signal-to-noise ratio and analysis efficiency, and achieving more accurate magnetoencephalography analysis. .
Patent Information
- Application Number
- CN202410846779.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Magnetoencephalography signals are often interfered by background noise and system errors in target signal analysis, resulting in a low signal-to-noise ratio, which increases the workload of doctors and the complexity of analysis. Existing noise reduction technology has limited processing of brain electrophysiological activities and sensor errors. insufficient.
The MAE self-supervised deep learning network model is used to train resting-state magnetoencephalography data to learn normal physiological activities and sensor error characteristics, and apply it to task-state data for background suppression to output brain magnetoencephalography that meets physiological expectations. The graph is stacked in segments to subtract the background signal and improve the signal-to-noise ratio.
It significantly improves the signal-to-noise ratio of magnetoencephalography signals and the prominence of target signals, improves the accuracy and efficiency of magnetoencephalography analysis, and has stronger robustness and applicability.
Smart Images

Figure CN118402794B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a magnetoencephalogram background suppression method, system and readable storage medium. Background Art
[0002] Magnetoencephalography (MEG) is a non-invasive functional neuroimaging technology that can indirectly measure electrophysiological activity in the brain. The formation of a monitorable MEG signal requires the superposition of a large number of neuronal discharges. Based on the neural computational model and empirical data, about 10,000-50,000 neurons arranged in a consistent manner can produce an electromagnetic signal that can be monitored macroscopically. In the human cerebral cortex, there are about 100,000 neuronal pyramidal cells per square millimeter. The intensity of the typical brain magnetic field outside the scalp is between 10-100fT (1fT=10-15T), which is about one billionth of the earth's magnetic field. Although the MEG needs to be placed in a magnetic field shielding room, some background noise interference is still detected by the sensor. In addition, due to the limitation of the sensor's measurement accuracy, there will be some systematic errors in the actual observed signal.
[0003] When performing some brain science tasks, such as spike wave detection in epileptic patients, analysis of visual stimulus responses, and research on auditory stimulation effects, the target signal recorded by the task-state MEG is mixed with a large number of background waveforms. The presence of these background waveforms significantly reduces the waveform recognition of the target signal, making the analysis of MEG more complicated and difficult. This not only increases the difficulty for doctors to judge MEG, but may also cause visual fatigue in doctors during long-term analysis, thus affecting the smooth progress of doctors' daily work. Therefore, in response to this problem, it is necessary to find effective signal processing methods to improve the signal-to-noise ratio of the target signal, reduce the workload of doctors, and thus improve the accuracy and efficiency of MEG in clinical research and diagnosis.
[0004] In dealing with the problem of denoising time series signals, various methods have been developed in different fields. For example, in audio processing, traditional techniques such as OM-LSA (Optimally-modified log-spectral amplitude) and supervised neural network methods such as UNet and WaveNet are widely used. These methods usually include two steps: noise estimation and noise separation from the original signal. There are also related studies in magnetoencephalography and electroencephalography signal processing. For example, the article "Noise Reduction and Feature Extraction of EEG Signals Based on Wavelet Packet Transform" clearly points out that wavelet packet transform can effectively solve the shortcomings of wavelet transform in processing high-frequency EEG signals above 35Hz. By performing denoising on signals in different frequency bands, the extraction of task-advantage spectral features is achieved. At the same time, the "EEMD Threshold Processing-based EEG Signal Denoising Method" uses ensemble empirical mode decomposition (EEMD) and translation invariant algorithm to denoise EEG signals, overcoming the limitations of the wavelet threshold method in wavelet basis selection and suppressing the modal aliasing problem in empirical mode decomposition (EMD), thereby significantly improving the signal-to-noise ratio of the signal. However, these denoising techniques mainly target external noise interference, and often ignore the impact of brain electrophysiological activity signals and sensor system errors on the signal. Therefore, the prominence of the target signal in the denoised waveform is limited. In addition, the generalization ability of traditional algorithms is limited, and they need to manually adjust parameters in different task scenarios, which is particularly inconvenient in practical applications. For supervised deep learning methods, they require clean target signals as labels, which is often difficult to achieve in the field of magnetoencephalography. Therefore, denoising for magnetoencephalography and electroencephalography signals is still a challenge that needs to be further studied and explored. Summary of the invention
[0005] Based on the technical problems existing in the background technology, the present invention proposes a magnetoencephalogram background suppression method, system and readable storage medium, which effectively suppress the background signal in the patient's magnetoencephalogram data, significantly improving the signal-to-noise ratio and the prominence of the target signal.
[0006] The present invention provides a method, system and readable storage medium for suppressing background in magnetoencephalography, including:
[0007] Preprocessing the task-state MEG data to obtain the task-state MEG segmented stacking vectors;
[0008] The task-state magnetoencephalogram segmented stacked vectors are fed into the trained MAE self-supervised deep learning network model to output magnetoencephalogram segmented stacked vectors that meet physiological expectations.
[0009] Based on the task-state magnetoencephalogram segmented stacking vector minus the magnetoencephalogram segmented stacking vector that meets physiological expectations, the non-zero segments in the obtained vector are the target segments after background suppression;
[0010] The training process of the MAE self-supervised deep learning network model:
[0011] S1, obtaining and preprocessing resting-state magnetoencephalogram data, and using the resting-state magnetoencephalogram segmented stacked vectors after preprocessing as a training data set used in the training phase;
[0012] S2, performing mask processing on the abnormal data segments in the EEG segment stacking vector in the training data set to obtain a plurality of training mask segment stacking vectors, performing feature extraction on the plurality of training mask segment stacking vectors, and sequentially splicing the plurality of low-dimensional feature maps after feature extraction to obtain a low-dimensional feature map vector;
[0013] S3, using a self-attention mechanism and based on the dynamic position encoding vector of Transformer Encoder, performing global feature perception on the low-dimensional feature map vector to obtain attention features, and then using a feedforward neural network to process the attention features to extract effective information, and outputting a brain magnetoencephalogram feature map vector that meets physiological expectations;
[0014] S4. Use a deep convolutional neural network to reconstruct the time slice of the brain magnetometry feature map vector that meets physiological expectations, so as to output a brain magnetometry segmented stacking vector that meets normal physiological expectations;
[0015] S5. Based on the segmented magnetoencephalogram stacking vectors in the training data set and the segmented magnetoencephalogram stacking vectors output by the MAE self-supervised deep learning network model that meet normal physiological expectations, calculate the loss function, and use the gradient descent method to train the MAE self-supervised deep learning network model.
[0016] Furthermore, in the iterative training process of the MAE self-supervised deep learning network model based on the training data set, the loss function and the model parameters after iteration are as follows:
[0017]
[0018]
[0019] in, Respectively The model parameters before and after iterations, is the learning rate, is the parameter update function of the MAE self-supervised deep learning network model, is the total number of brain magnetic segment stacking vectors in the training data set, is a regularization term, is the regularization coefficient, represents the loss function, is the learning rate constant, Indicates Magnetoencephalography data, Represents the segmented stacked vector of brain magnetometry output by the MAE self-supervised deep learning network model that meets normal physiological expectations. Indicates the training data set The segmented stacked vector of brain magnetometry corresponding to the strip magnetograph data.
[0020] Furthermore, in step S1, the preprocessing process of the resting magnetoencephalogram data is as follows:
[0021] The resting-state MEG data were processed in sequence through signal space separation in the time domain, removal of bad channels, independent component analysis and filtering to obtain the pre-processed resting-state MEG data;
[0022] The resting-state magnetoencephalogram data after preprocessing were segmented using the specified time length, and the obtained segmented data were initially screened using the Z-Score threshold. The segmented data greater than or equal to the threshold were set as abnormal data, and the resting-state magnetoencephalogram segmented data after preprocessing were stacked to obtain the resting-state magnetoencephalogram segmented stacking vector.
[0023] Furthermore, after the training of the MAE self-supervised deep learning network model is completed, reasoning verification is performed as follows:
[0024] Obtaining and preprocessing the task-state magnetoencephalogram data, and using the preprocessed task-state magnetoencephalogram segmented stacked vectors as the inference data set used in the inference stage;
[0025] The task-state magnetoencephalogram segmented stacked vectors are input into the trained MAE self-supervised deep learning network model, and the magnetoencephalogram segmented stacked vectors that meet physiological expectations are output;
[0026] The MEG segmented stacking vector that meets physiological expectations is subtracted from the MEG segmented stacking vector of the task state to obtain the task target segment of the MEG data of the reasoning task after background suppression.
[0027] Furthermore, in step S2, when masking the MEG segmented stacked vectors, the abnormal data after Z-Score threshold screening is masked so that the number of masked segments of the MEG segmented stacked vectors in the training data set is consistent with the number of task target segments in the MEG segmented stacked vectors in the reasoning verification phase, as follows:
[0028]
[0029]
[0030] in, For the The training mask segment vector generated by the stripe magnetic map data, Indicates the training data set The brain magnetic segmentation stacking vector corresponding to the strip magnetic image data, is used to mask The position mask vector of some segmented data in the stripe magnetic map data, In Indicates The segmented data at this position in the stripe magnetic map data is masked. Indicates The segment data at this position in the stripe map data is not masked.
[0031] Furthermore, in step S3, the low-dimensional feature map vector is processed hierarchically based on the self-attention mechanism until the set maximum number of layers is reached. Then the brain magnetic characteristic map of normal brain physiological activity is output, where the output of the previous layer is used as the input of the current layer. In the sub-layer, , the generation of low-dimensional brain magnetoencephalogram vector is as follows:
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038] in, For the The layer is the feature embedding after Transformer Encoder position encoding, is the corresponding position encoding vector, For the Three different mapping matrices for the layer, For the Layer pair feature vector The three different embedding vectors generated by the mapping are is the activation function, for The length of the characteristic dimension, For the Layers of deep feedforward neural network, Indicates Attention features at the layer level, As the The low-dimensional brain magnetoencephalogram feature map vector output by the layer, As the The low-dimensional magnetoencephalogram feature map vector output by the layer.
[0039] Furthermore, when the MAE self-supervised deep learning network model is verified by reasoning through the inference dataset, the generation process of the task-state MEG segmented stacked vector is as follows:
[0040] The task-state MEG data were processed in sequence through time-domain signal space separation, bad channel removal, independent component analysis and filtering to obtain the pre-processed task-state MEG data;
[0041] The preprocessed task-state MEG data are segmented using a specified duration, and the obtained segmented data are preliminarily screened using a Z-Score threshold, and the segmented data exceeding the threshold are set as abnormal data, and the preprocessed task-state MEG data are stacked to obtain the task-state MEG segmented stacking vector;
[0042] The formula for generating the predicted MEG segment stack vector is as follows:
[0043]
[0044]
[0045] in, Indicates Items of data, is the task MEG segment stacking vector, is with vectors of equal length to the position mask vector, The segmented stacked vector of the predicted task MEG, represents the MAE self-supervised deep learning network model, represents the dot product, Represents the model parameters of the trained MAE self-supervised deep learning network model.
[0046] A magnetoencephalogram background suppression system, comprising a preprocessing module, a mask processing module, an input module and an output module;
[0047] The preprocessing module is used to preprocess the task magnetoencephalogram data to obtain the task state magnetoencephalogram segmented stacking vector;
[0048] The mask processing module is used to transmit the task-state magnetoencephalogram segmented stacked vectors to the trained MAE self-supervised deep learning network model to output magnetoencephalogram segmented stacked vectors that meet physiological expectations;
[0049] The input module is used to transmit the task-state magnetoencephalogram segmented stacked vectors to the trained MAE self-supervised deep learning network model to output the predicted magnetoencephalogram segmented stacked vectors that meet physiological expectations;
[0050] The output module is used to subtract the magnetoencephalogram segmented stacked vector that meets physiological expectations from the magnetoencephalogram segmented stacked vector of the task state, and the non-zero segments in the obtained vector are the target segments after background suppression;
[0051] The training process of the MAE self-supervised deep learning network model:
[0052] Acquire and preprocess resting magnetoencephalogram data, and use the resting magnetoencephalogram segmented stacked vectors after preprocessing as a training data set used in the training phase;
[0053] Masking the abnormal data segments in the EEG segment stacking vectors in the training data set to obtain a plurality of training mask segment stacking vectors, performing feature extraction on the plurality of training mask segment stacking vectors, and sequentially splicing the plurality of low-dimensional feature maps after feature extraction to obtain a low-dimensional feature map vector;
[0054] Using a self-attention mechanism and based on the dynamic position encoding vector of the Transformer Encoder, the low-dimensional feature map vector is globally perceived to obtain an attention feature, and then the attention feature is processed using a feedforward neural network to extract effective information, and an EEG feature map vector that meets physiological expectations is output;
[0055] A deep convolutional neural network is used to reconstruct the time slices of the brain magnetometry feature map vector that meets physiological expectations, thereby outputting a brain magnetometry segmented stacking vector that meets normal physiological expectations;
[0056] Based on the segmented magnetoencephalogram stacking vectors in the training data set and the segmented magnetoencephalogram stacking vectors output by the MAE self-supervised deep learning network model that meet normal physiological expectations, the loss function is calculated, and the MAE self-supervised deep learning network model is trained using the gradient descent method.
[0057] A computer-readable storage medium stores a plurality of classification programs, wherein the plurality of classification programs are used to be called by a processor and execute the magnetoencephalogram background suppression method as described above.
[0058] The advantages of a method, system and readable storage medium for suppressing background in magnetoencephalography provided by the present invention are: a method, system and readable storage medium for suppressing background in magnetoencephalography provided in the structure of the present invention, a MAE self-supervised deep learning network model uses unlabeled resting-state magnetoencephalography data for training, so that it learns the characteristics of normal physiological EEG activity and the inherent system error characteristics of the sensor. This process enables the MAE self-supervised deep learning network model to effectively predict and suppress background signals in task magnetoencephalography data, significantly improving the signal-to-noise ratio and prominence of the target signal. Compared with traditional time series signal denoising technology, this method is not only more efficient, but also shows stronger robustness, providing strong support for the accurate analysis of magnetoencephalography signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of the process of the present invention;
[0060] Figure 2 This is a schematic diagram of the structure of the MAE self-supervised deep learning network model;
[0061] Figure 3 This is a functional diagram of each module included in the entire algorithm process. DETAILED DESCRIPTION
[0062] Below, the technical solution of the present invention is described in detail through specific embodiments. Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific implementation disclosed below.
[0063] like Figures 1 to 3 As shown, a method for suppressing background in magnetoencephalography proposed by the present invention comprises the following steps S100 to S300:
[0064] S100: Preprocessing the task-state MEG data to obtain the task-state MEG segmented stacking vectors, wherein the task-state MEG data is generally the patient's MEG data (also referred to as abnormal MEG data);
[0065] Among them, the task-state MEG data corresponds to the data used in this task, and the task-state MEG data is preprocessed to obtain the task-state MEG segmentation, and the abnormal data segments in the task-state MEG segmentation are masked and then stacked to obtain the task-state MEG segmentation stacking vector; taking epilepsy spike detection as an example, even if it is the patient's MEG data, not all data are abnormal data, and there will be normal data. That is to say, the abnormal data segments in the task-state MEG segmentation (the abnormal data is the target data of the task and is also the masked data part in the input model) are marked by the Z-Score threshold initial screening in step S12, and the MAE self-supervised deep learning network model masks the marked abnormal data segments, and the model outputs the predicted data segments that correspond to the position of the abnormal data segments and meet the normal physiological expectations. The task target segment is obtained based on the difference between the abnormal data segment and the predicted data segment, which can improve the signal-to-noise ratio of the task target segment (i.e., the corresponding abnormal data segment), so as to facilitate the doctor's review, reduce the doctor's workload, and thus improve the accuracy and efficiency of MEG in clinical research and diagnosis.
[0066] MAE refers to masked autoencoders. In the MAE self-supervised deep learning network model training, the resting-state magnetoencephalogram data (non-task-state magnetoencephalogram data) used for model training is normal, unlabeled data under the same data collection environment, or unlabeled data collected by other devices.
[0067] S200: The task-state magnetoencephalogram segmented stacked vectors are transmitted to the trained MAE self-supervised deep learning network model to output magnetoencephalogram segmented stacked vectors that meet physiological expectations;
[0068] S300: Subtracting the MEG segmented stacking vector that meets physiological expectations from the MEG segmented stacking vector in the task state, and the non-zero segments in the obtained vector are the target segments after background suppression, and the target segments are the target segments corresponding to the masked parts in the MEG segmentation in the task state.
[0069] Among them, the MEG segmentation with abnormal data in the MEG segmentation stacking vector of the task state is masked to obtain an MEG segmentation stacking vector in which some segments in the MEG segmentation vector are all zero (i.e., masked). Then, the MEG segmentation stacking vector is input into the MAE self-supervised deep learning network model as the MEG segmentation stacking vector of the task state to obtain a prediction result of the masked abnormal data segment that meets normal physiological expectations, so as to output the MEG segmentation stacking vector under normal physiological expectations. Therefore, the MEG prediction segment does not include abnormal data. The MEG segmentation stacking vector constructed by the input data is subtracted from the MEG segmentation stacking vector output by the model to obtain a target data segmentation with higher signal-to-noise ratio and prominence, thereby achieving background waveform suppression of the target MEG data.
[0070] That is to say, the MAE self-supervised deep learning network model predicts the masked data, and based on the subtraction operation of step S300, obtains the task target segment corresponding to the masked data, thereby improving the signal-to-noise ratio of the task target segment. The purpose of background suppression is essentially to suppress the abnormal data segment to obtain the task target segment after background suppression, and improve the signal-to-noise ratio of the task target segment data. Its main purpose is to improve the signal-to-noise ratio of the abnormal labeled data, but it can also improve the signal-to-noise ratio of the normal labeled data; the source of noise: the system error of the sampling equipment (magnetoencephalography), the noise of the sampling environment.
[0071] If a complete MEG is required, it is necessary to use the target segment and the MEG segmented stacking vector output by the MAE self-supervised deep learning network model, and perform the inverse process of the slice segmentation in the preprocessing algorithm, that is, the inverse process of step S12.
[0072] The training and reasoning process of the MAE self-supervised deep learning network model is as follows:
[0073] S1. Obtain and preprocess resting magnetoencephalogram data, and use the resting magnetoencephalogram segmented stacked vectors after preprocessing as the training data set used in the model training stage;
[0074] In step S100, the task-state MEG data are preprocessed, wherein the processing methods for preprocessing the resting-state MEG data and the task-state MEG data are consistent, and the resting-state MEG data are used as an example for explanation, and the preprocessing of the task-state MEG data can be directly replaced.
[0075] The preprocessing is as follows:
[0076] S11, the resting-state magnetoencephalogram data is sequentially subjected to signal space separation in the time domain, bad channel removal, independent component analysis and filtering to obtain the pre-processed resting-state magnetoencephalogram data;
[0077] S12, segmenting the preprocessed resting magnetoencephalogram data using a specified time length, and using Z-Score to perform a threshold initial screening on the obtained segmented data, setting the segmented data greater than or equal to the threshold as abnormal data, and stacking the resting state segmented data to obtain a resting state magnetoencephalogram segmented stacking vector;
[0078] The preprocessed resting-state MEG data are segmented using the specified duration. Adjacent segments have a certain overlap period, and the overlap duration is the length of a single segment. The time interval corresponding to each segment is:
[0079]
[0080]
[0081] in, is the time when the segment starts. The moment when the segment ends, For the duration of each segment, is the length of the period of overlap between adjacent segments, is the index value of the segment, The timestamp corresponding to the first sampling point of the magnetoencephalogram.
[0082] Take the spike wave detection task of epilepsy patients as an example. In this embodiment, the pre-processed MEG data (resting MEG data or task-state MEG data) is segmented on the time axis. Specifically, MEG data of multiple people are obtained. Each person's MEG data has A piece of data is taken from each piece of data, and the piece of data is segmented to obtain segmented data, and the segmented data is a plurality of segments. As an embodiment: each person's magnetoencephalogram data exists =5 pieces of data, the corresponding time in each piece of data can be the same or different. For one piece of data with a duration of 500s, a data segment with a duration of 20s is taken out, and then the 20s is segmented. The duration of each segmented data is equal (200ms) and is greater than the duration of a general spike wave (>150ms). The overlap between adjacent segments is The duration (100ms) is obtained. Segment data.
[0083] Then, yes The segmented data are screened by Z-Score for threshold, and the segmented data exceeding the threshold are set as abnormal data, and then The segmented data are stacked in sequence to obtain the EEG segmented stacking vector.
[0084] In addition, Z-Score is used for initial threshold screening, and the segmented data exceeding the threshold is set as abnormal data. For each segmented data:
[0085]
[0086]
[0087] in, is the time segment number, is the channel number of the MEG, for The number of sampling points in the time segment, for The sampling point number in the time segment, for Time channel Magnetoencephalography data, For Channel The mean value of magnetoencephalogram, is the variance of the MEG of channel C, is the maximum value among all channels, express The z-score value of the channel in the T segment, express The maximum value of the z-score in the channels at time T.
[0088] By setting the Z-Score threshold, the results calculated for each segment are The segmented fragments with a Z-Score greater than or equal to the Z-Score threshold are compared with each other and marked as abnormal data to serve as the basis for the subsequent mask.
[0089] S2, performing mask processing on the abnormal data segments in the EEG segment stacking vector in the training data set to obtain a plurality of training mask segment stacking vectors, performing feature extraction on the plurality of training mask segment stacking vectors, and sequentially splicing the plurality of low-dimensional feature maps after feature extraction to obtain a low-dimensional feature map vector;
[0090] When masking the MEG segmented stacked vectors, the abnormal data after Z-Score threshold screening is masked, and the number of masked segments of the MEG segmented stacked vectors in the training data set is made consistent with the number of task target segments in the inference data set in the model inference verification. The number of masked segments is generally 1 / 2 of the total number of segments. , as follows:
[0091]
[0092]
[0093] Among them, the subscript Indicates Magnetoencephalography data, For the training data set The EEG segmented stacking vector corresponding to the data, ,in For the Segment data, is the total number of segmented data obtained after dividing a magnetoencephalogram data into time periods in the training dataset, for example, Specifically, from the above =Take out a piece of data from 5 pieces of data, segment the data, and get the total number of segmented data. For the The training mask segment vector generated by the stripe magnetic map data, , Represents segmented data The trained mask fragment vector after masking, is used to mask The position mask vector of some segmented data in the stripe magnetic map data. The length of the position mask vector is , In Indicates The segmented data at this position in the stripe magnetic map data is masked. Indicates The segment data at this position in the stripe map data is not masked.
[0094] The segmented segments that are greater than or equal to the Z-Score threshold obtained in step S12 are marked as abnormal data, and the location of the abnormal data is Mask processing, data at other locations Mask processing.
[0095] In this embodiment, in view of the characteristics of the single-label segment of the patient's MEG data, in order to enable the MAE self-supervised deep learning network model to fully learn the characteristics of normal brain electrophysiological activities, a threshold single mask method is used to generate a mask segment vector for the MEG data of normal people. ,Right now is a certain position ,other Position 1 dimensional vector, where the position at 0 corresponds to the position of the maximum z-score value that exceeds the threshold.
[0096] It should be noted that a deep convolutional neural network is used as an encoder to extract features from the multiple training mask fragments obtained to obtain a low-dimensional feature map, and then multiple low-dimensional feature maps are concatenated to obtain a low-dimensional feature map vector, as follows:
[0097]
[0098]
[0099] in, represents a deep convolutional neural network, represents the parameters required for training, Indicates the corresponding mask time segment The generated low-dimensional feature map, Represents a low-dimensional feature map vector formed by concatenating all generated low-dimensional feature maps.
[0100] S3, using the self-attention mechanism and based on the dynamic position encoding vector of Transformer Encoder, performing global feature perception on the low-dimensional feature map vector to obtain attention features, and then using a feedforward neural network to process the attention features to extract effective information, and outputting a brain magnetoencephalogram feature map vector that meets normal physiological expectations;
[0101] The MAE self-supervised deep learning network model uses a sample data from a resting magnetoencephalogram data as a training process. The magnetoencephalogram segmented stacking vector is input into the MAE self-supervised deep learning network model. In fact, it is input into the CNN in sequence according to the segments in the stacking vector, such as Figure 2 As shown. Then, each segment will get a feature map. Then, these feature maps are sequentially concatenated into a feature map vector. The self-attention mechanism is performed on the feature map vector, not a specific feature map.
[0102] In the In the layer, , the generation of low-dimensional brain magnetoencephalogram vector is as follows:
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109] in, For the The layer is the feature embedding after Transformer Encoder position encoding, is the position encoding vector, For the Three different mapping matrices for the layer, For the Layer pair feature vector The three different embedding vectors generated by the mapping are is the activation function, for The length of the characteristic dimension, For the Layers of deep feedforward neural network, Indicates The attention features of the layer, For the first The low-dimensional brain magnetoencephalogram feature map vector output by the layer, As the The low-dimensional brain magnetoencephalogram feature map vector output by the layer. When the number of layers reaches When , the output of the model is the brain magnetometry feature map vector that meets physiological expectations, such as Figure 2 As shown, the number of layers Determined by a large number of experimental results.
[0110] S4. Use a deep convolutional neural network to reconstruct the time slices of the EEG feature map vector that meets physiological expectations, thereby outputting a segmented EEG stacking vector that meets normal physiological expectations.
[0111] The reconstructed data is also stacked EEG segmented data. If you need to obtain non-overlapping task data, you need to process the segmented data again according to the inverse process of the segmentation operation in data preprocessing. If you only get the abnormal task target fragment, you only need to subtract and take the non-zero segment.
[0112] S5: Based on the segmented MNE stacking vectors in the training data set and the segmented MNE stacking vectors output by the MAE self-supervised deep learning network model that meet normal physiological expectations, a loss function is calculated, and the MAE self-supervised deep learning network model is trained using a gradient descent method;
[0113] Through the MAE self-supervised deep learning network model, the mask fragments in the resting-state magnetoencephalography data are predicted, and based on the self-supervised reconstruction loss, the MAE self-supervised deep learning network model updates the parameters in the resting-state magnetoencephalography data (magnetoencephalography data of normal people), and finally learns the normal electrophysiological activity characteristics in the magnetoencephalography data and the distribution characteristics of the sensor system errors.
[0114]
[0115]
[0116] Among them, the subscript Indicates Magnetoencephalography data, It is the reconstructed segmented stacked vector of the deep convolutional neural network output that meets normal physiological expectations. Each fragment of Each fragment corresponds to each other. is a deep convolutional neural network, which is used here to reconstruct time segments. represents the parameters required for training, yes and The mean square error between .
[0117] Based on the loss function, the gradient descent method is used to iteratively update the parameters of the MAE self-supervised deep learning network model until the loss function converges to a certain threshold , that is, completing the training of the MAE self-supervised deep learning network model;
[0118] No. Iterations:
[0119]
[0120]
[0121] Among them, the subscript Indicates Magnetoencephalography data, Respectively The model parameters before and after iterations, is the learning rate, is the parameter update function of the MAE self-supervised deep learning network model, Express Find the gradient, is the total number of brain magnetic segment stacking vectors in the training data set, Indicates the training data set The brain magnetic segmentation stacking vector corresponding to the strip magnetic image data; It is the MAE self-supervised deep learning network model. Equivalent to , Represents the segmented stacked vector of EEG output that meets normal physiological expectations, is a regularization term, is the regularization coefficient, represents the loss function, is the learning rate constant and Usually set to a constant, Usually set to .when for When , the parameter update formula of the entire model is as follows:
[0122]
[0123] when When , stop the iteration.
[0124] When the MAE self-supervised deep learning network model is verified through the inference set, the generation process of the inference MEG prediction fragment is as follows:
[0125] (1) Obtaining and preprocessing the task-state MEG data, and using the preprocessed task-state MEG segmented stacked vectors as the inference data set used in the inference stage;
[0126] The generation process of the task-state segmented stacked vector of EEG is as follows:
[0127] The task-state MEG data were processed in sequence through time-domain signal space separation, bad channel removal, independent component analysis and filtering to obtain the pre-processed task-state MEG data;
[0128] The preprocessed task-state MEG data are segmented using a specified duration, and the obtained segmented data are pre-screened using a Z-Score, the segmented data exceeding the threshold are set as abnormal data, and the preprocessed task-state MEG data are stacked to obtain a task-state MEG segmented stacking vector. That is, the series of preprocessing processes for the patient's MEG data can directly refer to the preprocessing process of the resting-state MEG data (MEG data of normal people) in step S1.
[0129] The formula for generating the predicted MEG segment stack vector is as follows:
[0130]
[0131]
[0132] Among them, the subscript Indicates Items of data, is the patient's brain magnetic segmentation stacking vector, is with vectors of equal length to the position mask vector, is the generated predicted EEG segment stack vector that meets normal physiological expectations, represents the MAE self-supervised deep learning network model, represents the dot product, Represents the model parameters of the trained MAE self-supervised deep learning network model.
[0133] (2) Input the task-state magnetoencephalogram segmented stacking vectors into the trained MAE self-supervised deep learning network model, and output magnetoencephalogram segmented stacking vectors that meet physiological expectations by masking, feature extraction, global perception, and extraction processing of the patient's abnormal data fragments. The magnetoencephalogram segmented stacking vectors that meet physiological expectations are the data of abnormal data under normal physiological activities;
[0134] (3) Subtract the MEG segmented stacking vector that meets physiological expectations from the MEG segmented stacking vector of the task state to obtain the task target segment of the MEG data of the reasoning task after background suppression.
[0135]
[0136] Among them, the subscript Represents the first Strip magnetic map data, is the vector after background suppression, is the segmented stacked vector of the task state of the input MAE self-supervised deep learning network model, To be consistent with physiological expectations, the segmented stacking vector of MEG, Represents taking the non-zero fragments of a vector.
[0137] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for suppressing background in magnetoencephalography, characterized in that: include: Preprocessing the task-state MEG data to obtain the task-state MEG segmented stacking vectors; The task-state magnetoencephalogram segmented stacked vectors are fed into the trained MAE self-supervised deep learning network model to output magnetoencephalogram segmented stacked vectors that meet physiological expectations. Based on the task-state magnetoencephalogram segmented stacking vector minus the magnetoencephalogram segmented stacking vector that meets physiological expectations, the non-zero segments in the obtained vector are the target segments after background suppression; The training process of the MAE self-supervised deep learning network model: S1, obtaining and preprocessing resting-state magnetoencephalogram data, and using the resting-state magnetoencephalogram segmented stacked vectors after preprocessing as a training data set used in the training phase; S2, performing mask processing on the abnormal data segments in the EEG segment stacking vector in the training data set to obtain a plurality of training mask segment stacking vectors, performing feature extraction on the plurality of training mask segment stacking vectors, and sequentially splicing the plurality of low-dimensional feature maps after feature extraction to obtain a low-dimensional feature map vector; S3, using a self-attention mechanism and based on the dynamic position encoding vector of Transformer Encoder, performing global feature perception on the low-dimensional feature map vector to obtain attention features, and then using a feedforward neural network to process the attention features to extract effective information, and outputting a brain magnetoencephalogram feature map vector that meets physiological expectations; S4. Use a deep convolutional neural network to reconstruct the time slice of the brain magnetometry feature map vector that meets physiological expectations, so as to output a brain magnetometry segmented stacking vector that meets normal physiological expectations; S5. Based on the segmented magnetoencephalogram stacking vectors in the training data set and the segmented magnetoencephalogram stacking vectors output by the MAE self-supervised deep learning network model that meet normal physiological expectations, calculate the loss function, and use the gradient descent method to train the MAE self-supervised deep learning network model.
2. The method for suppressing background of magnetoencephalogram according to claim 1, characterized in that: In the MAE self-supervised deep learning network model, the training process is iterative based on the training data set. The loss function and the model parameters after iteration are as follows: in, Respectively The model parameters before and after iterations, is the learning rate, is the parameter update function of the MAE self-supervised deep learning network model, is the total number of brain magnetic segment stacking vectors in the training data set, is a regularization term, is the regularization coefficient, represents the loss function, is the learning rate constant, Indicates Magnetoencephalography data, Represents the segmented stacked vector of brain magnetometry output by the MAE self-supervised deep learning network model that meets normal physiological expectations. Indicates the training data set The segmented stacked vector of brain magnetometry corresponding to the strip magnetograph data.
3. The method for suppressing background of magnetoencephalogram according to claim 1, characterized in that: In step S1, the preprocessing process of the resting magnetoencephalogram data is as follows: The resting-state MEG data were processed in sequence through signal space separation in the time domain, removal of bad channels, independent component analysis and filtering to obtain the pre-processed resting-state MEG data; The resting-state magnetoencephalogram data after preprocessing were segmented using the specified time length, and the obtained segmented data were initially screened using the Z-Score threshold. The segmented data greater than or equal to the threshold were set as abnormal data, and the resting-state magnetoencephalogram segmented data after preprocessing were stacked to obtain the resting-state magnetoencephalogram segmented stacking vector.
4. The method for suppressing background of magnetoencephalogram according to claim 1, characterized in that: After the training of the MAE self-supervised deep learning network model is completed, the reasoning verification is performed as follows: Obtaining and preprocessing the task-state magnetoencephalogram data, and using the preprocessed task-state magnetoencephalogram segmented stacked vectors as the inference data set used in the inference stage; The task-state magnetoencephalogram segmented stacked vectors are input into the trained MAE self-supervised deep learning network model, and the magnetoencephalogram segmented stacked vectors that meet physiological expectations are output; The MEG segmented stacking vector that meets physiological expectations is subtracted from the MEG segmented stacking vector of the task state to obtain the task target segment of the MEG data of the reasoning task after background suppression.
5. The method for suppressing background of magnetoencephalogram according to claim 3, characterized in that: In step S2, when masking the MEG segmented stacked vectors, the abnormal data after Z-Score threshold screening is masked so that the number of masked segments of the MEG segmented stacked vectors in the training data set is consistent with the number of task target segments in the MEG segmented stacked vectors in the reasoning verification phase, as follows: in, For the The training mask segment vector generated by the stripe magnetic map data, Indicates the training data set The brain magnetic segmentation stacking vector corresponding to the strip magnetic image data, is used to mask The position mask vector of some segmented data in the stripe magnetic map data, In Expressing the The segmented data at this position in the stripe magnetic map data is masked. Expressing the The segment data at this position in the stripe map data is not masked.
6. The method for suppressing background of magnetoencephalogram according to claim 1, characterized in that: In step S3, the low-dimensional feature map vector is processed hierarchically based on the self-attention mechanism until the maximum number of layers is reached. Then the brain magnetic characteristic map of normal brain physiological activity is output, where the output of the previous layer is used as the input of the current layer. In the sub-layer, , the generation of low-dimensional brain magnetoencephalogram vector is as follows: in, For the The layer is the feature embedding after Transformer Encoder position encoding, is the corresponding position encoding vector, For the Three different mapping matrices for the layer, For the Layer pair feature vector The three different embedding vectors generated by the mapping are is the activation function, for The length of the characteristic dimension, For the Layers of deep feedforward neural network, Indicates Attention features at the layer level, As the The low-dimensional brain magnetoencephalogram feature map vector output by the layer, As the The low-dimensional magnetoencephalogram feature map vector output by the layer.
7. The method for suppressing background of magnetoencephalogram according to claim 4, characterized in that: When the MAE self-supervised deep learning network model is verified by reasoning through the inference dataset, the generation process of the task-state EEG segmented stacking vector is as follows: The task-state MEG data were processed in sequence through time-domain signal space separation, bad channel removal, independent component analysis and filtering to obtain the pre-processed task-state MEG data; The preprocessed task-state MEG data are segmented using a specified duration, and the obtained segmented data are preliminarily screened using a Z-Score threshold, and the segmented data exceeding the threshold are set as abnormal data, and the preprocessed task-state MEG data are stacked to obtain the task-state MEG segmented stacking vector; The formula for generating the predicted MEG segment stack vector is as follows: in, Indicates Items of data, is the task MEG segment stacking vector, The segmented stacked vector of the predicted task MEG is generated. represents the MAE self-supervised deep learning network model, represents the dot product, Represents the model parameters of the trained MAE self-supervised deep learning network model.
8. A magnetoencephalogram background suppression system, characterized in that: It includes a pre-processing module, a mask processing module, an input module and an output module; The preprocessing module is used to preprocess the task magnetoencephalogram data to obtain the task state magnetoencephalogram segmented stacking vector; The mask processing module is used to transmit the task-state magnetoencephalogram segmented stacked vectors to the trained MAE self-supervised deep learning network model to output magnetoencephalogram segmented stacked vectors that meet physiological expectations; The input module is used to transmit the task-state magnetoencephalogram segmented stacked vectors to the trained MAE self-supervised deep learning network model to output the predicted magnetoencephalogram segmented stacked vectors that meet physiological expectations; The output module is used to subtract the magnetoencephalogram segmented stacked vector that meets physiological expectations from the magnetoencephalogram segmented stacked vector of the task state, and the non-zero segments in the obtained vector are the target segments after background suppression; The training process of the MAE self-supervised deep learning network model: Acquire and preprocess resting magnetoencephalogram data, and use the resting magnetoencephalogram segmented stacked vectors after preprocessing as a training data set used in the training phase; Masking the abnormal data segments in the EEG segment stacking vectors in the training data set to obtain a plurality of training mask segment stacking vectors, performing feature extraction on the plurality of training mask segment stacking vectors, and sequentially splicing the plurality of low-dimensional feature maps after feature extraction to obtain a low-dimensional feature map vector; Using a self-attention mechanism and based on the dynamic position encoding vector of the Transformer Encoder, the low-dimensional feature map vector is globally perceived to obtain an attention feature, and then the attention feature is processed using a feedforward neural network to extract effective information, and an EEG feature map vector that meets physiological expectations is output; Use a deep convolutional neural network to reconstruct the time slice of the brain magnetometry feature map vector that meets physiological expectations, so as to output a brain magnetometry segmented stacking vector that meets normal physiological expectations; Based on the segmented magnetoencephalogram stacking vectors in the training data set and the segmented magnetoencephalogram stacking vectors output by the MAE self-supervised deep learning network model that meet normal physiological expectations, the loss function is calculated, and the MAE self-supervised deep learning network model is trained using the gradient descent method.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of classification programs, and the plurality of classification programs are used to be called by a processor and execute the magnetoencephalogram background suppression method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Magnetoencephalogram MEG source positioning method based on attention mechanism
CN117653124A
Magnetoencephalogram magnetic source positioning method based on deep learning, electronic equipment and storage medium
CN118230911A
Diagnosis support system, diagnosis support device, diagnosis support method, and support program for providing information on schizophrenia spectrum disorder
JP2024003782A
Feature selection of neural activity using hierarchical clustering with stochastic search
US11361219B1
Working memory task magnetoencephalography classification system based on machine learning
WO2024083059A1
