MEG data bad segment detection method based on variational auto-encoder and clustering
By combining variational autoencoders and clustering algorithms, the time domain and frequency domain features of MEG data are extracted and low-dimensional latent variable analysis is performed, which solves the problems of insufficient accuracy and automation in bad segment identification of MEG data, and achieves efficient and accurate bad segment detection and reconstruction.
Patent Information
- Application Number
- CN202510739578.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-16
AI Technical Summary
Existing MEG data processing methods have problems with low recognition accuracy, poor robustness and low automation when identifying and removing bad segments, especially in complex, high-dimensional and nonlinear data environments.
A variational autoencoder (VAE) combined with a clustering algorithm is used to extract the time domain and frequency domain features of MEG data and convert them into low-dimensional latent variables. The clustering algorithm is used to distinguish bad segments from good segments, and the signal is reconstructed through a decoder.
The method achieves efficient, accurate and automated identification and reconstruction of bad segments in MEG data, improves the accuracy and robustness of detection, adapts to different types of MEG data and various noise environments, and reduces reliance on manual intervention and parameter adjustment.
Smart Images

Figure CN120654006A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of magnetoencephalography (MEG) data processing, and in particular relates to a method for detecting bad segments in MEG data based on variational autoencoder (VAE) and clustering. Background Art
[0002] Magnetoencephalography (MEG) is a non-invasive functional brain imaging technique widely used in neuroscience research and clinical diagnosis. MEG can accurately record the magnetic field signals generated by brain activity. However, during actual data acquisition, MEG data is often interfered with by various factors, such as eye movements, myoelectric activity, and environmental noise. The resulting MEG data corruption can severely impact subsequent data analysis and interpretation, reducing the accuracy of research and clinical diagnosis. Traditional methods for removing corrupted MEG data primarily rely on statistical analysis, such as the Z-score method, boxplot analysis, and the local outlier factor (LOF). While these methods can identify and remove corrupted MEG data to a certain extent, they suffer from low accuracy, poor robustness, and limited automation when dealing with complex, high-dimensional, and nonlinear data. Furthermore, as the size and complexity of MEG data increase, these traditional methods face challenges in computational efficiency and processing power.
[0003] In recent years, deep learning techniques have demonstrated remarkable performance in data feature extraction and dimensionality reduction. Variational autoencoders, in particular, have demonstrated significant advantages in capturing the underlying structure of data. Furthermore, advanced clustering algorithms can effectively identify complex cluster structures and outliers in high-dimensional data spaces. Therefore, developing a method based on a variational autoencoder combined with cluster analysis not only overcomes the limitations of traditional methods but also enables efficient and accurate automatic detection and reconstruction of bad segments in MEG data in complex and noisy environments. This approach holds significant practical value and broad application prospects. Summary of the Invention
[0004] To address the above technical issues, the present invention provides a method for detecting bad segments in MEG data based on a variational autoencoder and clustering. By combining deep learning with advanced clustering algorithms, this method achieves efficient, accurate, and automated identification and reconstruction of bad segments in MEG data. The method involves identifying and extracting time-domain and frequency-domain information from MEG data, projecting the source signal into a low-dimensional subspace of a VAE (Variable Autoencoder) and converting it into a low-dimensional latent variable. The low-dimensional latent space of the VAE is then extracted and a clustering algorithm is used to distinguish good and bad segments. The clustering algorithm is trained using traditional bad segment removal methods (such as the Z-score method, boxplot method, and local outlier factor (LOF)). Finally, the bad segment signals obtained from clustering are decoded from the low-dimensional latent variable space back into the original feature space through a decoder to generate a reconstructed signal.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for detecting bad segments in MEG data based on variational autoencoders and clustering, the method comprising:
[0007] Step S1: Collect raw brain neural activity data and perform preprocessing;
[0008] Step S2: extracting time domain features and frequency domain features from the preprocessed raw brain neural activity data, normalizing the extracted time domain features and frequency domain features, and inputting them into the variational autoencoder to convert them into low-dimensional latent variables;
[0009] Step S3: In the variational autoencoder, the sum of the reconstruction loss and the KL divergence is used as the total loss function, the total loss function is minimized by the back propagation algorithm, and the encoder and decoder parameters of the variational autoencoder are gradually updated;
[0010] Step S4: Process the MEG public dataset and use the processed results as the training dataset for the clustering algorithm; extract the low-dimensional latent variables in the variational autoencoder and use the trained clustering algorithm to perform cluster analysis on the low-dimensional latent variables to distinguish between bad segments and good segments;
[0011] Step S5: The MEG bad segment data identified by the trained clustering algorithm is decoded from the low-dimensional latent variable space back to the original feature space through a decoder to generate a reconstructed signal.
[0012] In a second aspect, the present invention provides a device for detecting bad segments in MEG data based on a variational autoencoder and clustering, comprising:
[0013] Acquisition module, used to collect raw data of brain nerve activity and perform preprocessing;
[0014] The conversion module is used to extract time domain features and frequency domain features from the preprocessed raw brain neural activity data, standardize the extracted time domain features and frequency domain features, input them into the variational autoencoder, and convert them into low-dimensional latent variables;
[0015] A calculation module is used to use the sum of the reconstruction loss and the KL divergence as the total loss function in the variational autoencoder, minimize the total loss function through a backpropagation algorithm, and gradually update the encoder and decoder parameters of the variational autoencoder;
[0016] The discrimination module processes the MEG public dataset and uses the processed results as a training dataset for the clustering algorithm. It extracts low-dimensional latent variables from the variational autoencoder and uses the trained clustering algorithm to perform cluster analysis on the low-dimensional latent variables to distinguish between good and bad segments.
[0017] The reconstruction module is used to decode the MEG bad segment data identified by the trained clustering algorithm from the low-dimensional latent variable space back to the original feature space through the decoder to generate the reconstructed signal.
[0018] In a third aspect, the present invention provides an electronic device comprising: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for detecting bad segments of MEG data based on variational autoencoders and clustering.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the aforementioned method for detecting bad segments of MEG data based on variational autoencoders and clustering.
[0020] The beneficial effects of the present invention are:
[0021] This paper significantly improves the accuracy of bad segment detection by combining deep learning with advanced clustering algorithms. VAE effectively extracts and reduces the time and frequency domain features in MEG data, capturing the underlying structure of the data. Cluster analysis accurately distinguishes bad segments from normal data in the low-dimensional latent space, reducing both false positives and false negatives.
[0022] Secondly, VAE-CA possesses excellent adaptability and is capable of handling complex and diverse data distributions. Using deep learning techniques, VAE is able to capture the nonlinear and complex characteristics of MEG data. The HDBSCAN algorithm employed in cluster analysis automatically identifies the most appropriate cluster structure without requiring a predefined number of clusters. This not only simplifies parameter selection but also enhances the method's robustness across diverse datasets and application scenarios.
[0023] Furthermore, the VAE-CA method fully automates the bad segment detection process, reducing reliance on manual intervention and parameter adjustment. This not only reduces operational complexity but also mitigates the risk of human error, improving overall workflow efficiency and consistency. This automated processing capability broadens the application prospects of this method in large-scale and real-time data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flow chart of a method for automatically detecting bad segments in MEG data based on variational autoencoder and cluster analysis;
[0025] Figure 2 This is an architecture diagram of the method for automatically detecting bad segments in MEG data based on variational autoencoders and cluster analysis. DETAILED DESCRIPTION
[0026] The present invention will be further described below with reference to the accompanying drawings and examples.
[0027] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Obviously, the embodiments described herein represent only a portion of the present invention, not all of it. All other embodiments derived by persons of ordinary skill in the art based on the embodiments herein without inventive effort are intended to fall within the scope of protection of the present invention.
[0028] In order to solve the problem of bad segments caused by eye movements, environmental noise, etc. in existing MEG data processing, researchers have proposed various methods for automatically identifying and removing bad segments. Most existing methods perform poorly in bad segment detection and are susceptible to noise interference, unstable data acquisition systems, and complex brain activity patterns. Some studies have shown that efficient and accurate bad segment detection methods benefit from combining deep learning technology. The present invention discloses a method for detecting bad segments of MEG data based on variational autoencoders and clustering, which can have robust performance in low signal-to-noise ratio, large source and multi-source environments, and is evaluated in an open source dataset and a magnetoencephalography system based on an optically pumped magnetometer. The VAE-CA method can accurately identify and reconstruct bad segment data in a complex signal environment, significantly improving the effect of MEG data processing and laying a solid foundation for the subsequent clinical application of MEG data. Specifically comprising the following steps:
[0029] Step S1: Use sensors to collect brain nerve activity data; perform basic preprocessing on the collected raw data, including but not limited to filtering, denoising and time locking, to reduce noise and enhance signal quality.
[0030] In particular, the data can be collected from brain neural activity data and sensor data when the subjects perform specific tasks. Expressed as ,in It is a signal of brain nerve activity. represents the guidance field matrix, For noise;
[0031] Step S2: extracting time domain features and frequency domain features from the preprocessed raw brain neural activity data, normalizing the extracted time domain features and frequency domain features, and inputting them into a variational autoencoder to convert them into low-dimensional latent variables;
[0032] In particular, frequency domain features are extracted from pre-processed MEG data through frequency domain analysis methods such as Fast Fourier Transform (FFT), which reveals the energy distribution and periodic characteristics of the signal at different frequencies, helping to identify frequency patterns and abnormal fluctuations in the signal. Time domain features include features such as mean, variance, peak, and zero crossing. These features reflect the statistical and dynamic characteristics of the signal on the time axis and help capture the overall trend and fluctuation of the signal. The extracted frequency domain features and time domain features are standardized to ensure that the dimensions and value ranges of different features are consistent. The frequency domain features are then input into the Convolutional Neural Network (CNN) layer, and local frequency patterns are extracted through multiple convolutional layers to capture the spectral characteristics of the signal, which is expressed as follows:
[0033] ,
[0034] Where, represents the frequency domain features after normalization, represents the convolutional neural network layer, Represents the spectral characteristics extracted by convolutional neural network;
[0035] The normalized time domain features are input into the recurrent neural network layer to capture the temporal dynamic characteristics of the signal and extract the temporal dependencies:
[0036] ,
[0037] Where, represents the time domain features after normalization, represents a recurrent neural network layer, represents the temporal dynamic characteristics extracted by the recurrent neural network;
[0038] The outputs of the convolutional neural network layer and the recurrent neural network layer are fused through the merging layer to form a comprehensive feature representation :
[0039] ,
[0040] Where, Represents feature splicing;
[0041] The integrated features after fusion Represents the input to the variational autoencoder, which maps the high-dimensional features to a low-dimensional latent space through the encoder to generate a low-dimensional latent variable representation :
[0042] ,
[0043] In the formula, Encoder represents the encoder of the variational self-encoder, which is used to transform the comprehensive features of the input Compress or map into a low-dimensional latent space;
[0044] The specific generation process is expressed as:
[0045] ,
[0046] in, and are the mean and standard deviation generated by the encoder, is a noise vector sampled from a standard normal distribution, Represented as element-wise multiplication.
[0047] In order to support cluster analysis of latent variables, this method adopts Gaussian mixture model (GMM) as latent variable Prior distribution of , which can be specifically expressed as:
[0048] ,
[0049] in, represents the latent variables modeled by the Gaussian mixture model, represents the parameters of the Gaussian components, represents the number of Gaussian components in the Gaussian mixture model, It is The weight coefficients of Gaussian components (initialized to uniform distribution) satisfy and , It is The probability density function of the Gaussian components is defined as:
[0050] ,
[0051] in, Indicates the The parameters of the Gaussian components, and are the mean and variance respectively. Here, and The initial value of is calculated by the following formula:
[0052] ,
[0053] ,
[0054] ,
[0055] ,
[0056] in, is a category In the The mean of the dimension, It is The data point in The latent variable value of the dimension; is a category In the The variance of the dimension, is a very small regularization term to prevent the variance from being too small.
[0057] Through the Gaussian mixture model, the latent variable Z is constrained to have two types of clustered distribution structures;
[0058] In order to further optimize the distribution of latent variables and enhance their discriminability, the calculation of Gaussian entropy is introduced. The total Gaussian entropy can be divided into two parts. The weighted entropy measures the distribution complexity of the weights of each Gaussian component, which is specifically expressed as:
[0059] ,
[0060] Component entropy measures the distribution complexity of each Gaussian component and is expressed as:
[0061] ,
[0062] in, , so the total Gaussian entropy is expressed as:
[0063] ,
[0064] Step S3: In the variational autoencoder, the sum of the reconstruction loss and the KL divergence is used as the total loss function, the total loss function is minimized by the backpropagation algorithm, and the encoder and decoder parameters of the variational autoencoder are gradually updated.
[0065] Specifically, the encoder maps the high-dimensional feature vector to a low-dimensional latent space and generates the distribution parameters (mean and logarithmic variance) of the latent variable. The decoder samples the latent variable from the latent space and reconstructs the original feature vector. The encoder uses a multi-layer neural network structure to represent the comprehensive features of the input. Mapping to latent variables The decoder uses a multi-layer neural network structure to transform the latent variables Reconstruct back to the high-dimensional feature space and obtain the reconstructed feature representation:
[0066] ,
[0067] Where, Denotes the decoder of the variational autoencoder, which is used to reduce the latent variables to high-dimensional features. In the initial stage of training, it is assumed that all signals follow a Gaussian distribution and the initial pseudo labels are generated by Z-score. The Z-score is defined as:
[0068] ,
[0069] The initial pseudo-label division is performed based on the absolute value of the Z score, where is marked as a good segment (pseudo label 0), is marked as a bad segment (pseudo label 1).
[0070] VAE is optimized by EM algorithm, where the pseudo label is updated in E step according to the current potential variables. And model parameters, calculate the posterior probability of the signal segment being a good segment or a bad segment:
[0071] ,
[0072] in, Indicates a good segment or a bad segment, It is The probability density function of Gaussian components, It is The weight of each component. Update the pseudo label according to the posterior probability. If , it is marked as a good segment, otherwise it is marked as a bad segment.
[0073] Update the model parameters in the M step and re-optimize the VAE parameters using the updated pseudo labels, where the parameters of the encoder and decoder are optimized by minimizing the total loss function renew:
[0074] ,
[0075] in, are parameters including mean, variance and weight, and Gaussian entropy is introduced as an additional regularization term to the total loss function to regularize the complexity of the potential distribution, where and are hyperparameters that control the collinearity of KL divergence and Gaussian entropy to the total loss, represents the reconstruction error, is the KL divergence between the latent variable distribution and the prior distribution, represents the potential distribution generated by the Gaussian mixture model, H represents the Gaussian entropy, represents the prior distribution of the latent variable, represents the probability score of the latent variable generated by the variational autoencoder, Denote the latent variables:
[0076] ,
[0077] ,
[0078] Where D represents the total dimension of the feature, represents the dth dimension of the comprehensive feature, Denotes the dth dimension of the feature reconstructed by the decoder, which represents the Perform mathematical expectation calculations.
[0079] During the training process, by dynamically adjusting the hyperparameters and , the model achieves dual constraints on the latent variable distribution: It forces the latent variable distribution to approach a bimodal Gaussian prior through KL divergence, while simultaneously controlling the complexity of the distribution through Gaussian entropy. After the above optimization process, the generated latent variable Z forms a clustered distribution with bimodal characteristics in the latent space. The parameters of the Gaussian mixture model (GMM) are updated based on the pseudo-labels: the mean, variance, and weight of each component:
[0080] ,
[0081] ,
[0082] ,
[0083] Repeat the E-step and M-step until the pseudo-labels converge or the preset maximum number of iterations is reached. Finally, through the combination of the EM algorithm and the self-supervision mechanism, the optimized latent space can form a structured distribution of good and bad segments, providing support for subsequent signal repair and classification.
[0084] Step S4: Use traditional MEG bad segment removal methods (such as Z-score method, box plot method, local outlier factor (LOF)), etc.) to process the known MEG public dataset, and use the processed results as the training dataset for the clustering algorithm; extract the low-dimensional latent variable representation in the VAE, and use the clustering algorithm to perform cluster analysis on the latent variables to distinguish bad segments from good segments.
[0085] Specifically, a hierarchical density-based clustering algorithm (HDBSCAN) was used to perform cluster analysis on the extracted low-dimensional latent variables. First, all data points were connected through a minimum spanning tree (MST) to construct the topological structure of the data. The core distance and reachable distance of each point were calculated, and the density reachability between points was determined. Based on the density reachability, clusters with similar density were gradually merged to generate a clustering hierarchy. The stability of each cluster under different density thresholds was evaluated, and the cluster with the highest stability was selected as the final clustering result.
[0086] Step S5: Decode the MEG bad segment data identified by the clustering algorithm from the low-dimensional latent variable space back to the original feature space through a decoder to generate a reconstructed signal; analyze the reconstructed signal and verify the effectiveness of the method by comparing it with traditional methods and manual labeling results.
[0087] The present invention discloses a method for detecting bad segments in MEG data based on variational autoencoders and clustering. This method achieves efficient, accurate and automatic identification and reconstruction of bad segments in MEG data by combining deep learning with advanced clustering algorithms. The VAE-CA algorithm extracts and reduces the time and frequency domain features of MEG data through variational autoencoders, and clusters low-dimensional latent variables using hierarchical density clustering analysis, thereby achieving accurate distinction between bad segments and normal data. Figure 2 As shown in the figure. The flexibility of VAE-CA enables this method to adapt to different types of MEG data and a variety of noise environments, significantly improving the accuracy and robustness of bad segment detection. Simulation and real data experiments show that VAE-CA performs well in low signal-to-noise ratio, large source and multi-source environments, especially in complex signal environments, where its detection performance is more stable. This method can effectively identify various types of bad segments caused by environmental noise, sensor interference and complex brain activity. In addition, VAE-CA realizes a fully automated bad segment detection process, reducing dependence on manual intervention and parameter adjustment. In summary, the VAE-CA method has significant technical advantages in improving the quality and reliability of MEG data processing.
[0088] In a second aspect, the present invention provides a device for detecting bad segments in MEG data based on a variational autoencoder and clustering, wherein the modules included in the device can implement the steps of the aforementioned method, including:
[0089] Acquisition module, used to collect raw data of brain nerve activity and perform preprocessing;
[0090] The conversion module is used to extract time domain features and frequency domain features from the preprocessed raw brain neural activity data, standardize the extracted time domain features and frequency domain features, input them into the variational autoencoder, and convert them into low-dimensional latent variables;
[0091] A calculation module is used to use the sum of the reconstruction loss and the KL divergence as the total loss function in the variational autoencoder, minimize the total loss function through a backpropagation algorithm, and gradually update the encoder and decoder parameters of the variational autoencoder;
[0092] The discrimination module processes the MEG public dataset and uses the processed results as a training dataset for the clustering algorithm. It extracts low-dimensional latent variables from the variational autoencoder and uses the trained clustering algorithm to perform cluster analysis on the low-dimensional latent variables to distinguish between good and bad segments.
[0093] The reconstruction module is used to decode the MEG bad segment data identified by the trained clustering algorithm from the low-dimensional latent variable space back to the original feature space through the decoder to generate the reconstructed signal.
[0094] In a third aspect, the present invention provides an electronic device comprising: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for detecting bad segments of MEG data based on variational autoencoders and clustering.
[0095] In a fourth aspect, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the aforementioned method for detecting bad segments of MEG data based on variational autoencoders and clustering.
[0096] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting bad segments in MEG data based on variational autoencoders and clustering, characterized in that: The method comprises: Step S1: Collect raw brain neural activity data and perform preprocessing; Step S2: extracting time domain features and frequency domain features from the preprocessed raw brain neural activity data, normalizing the extracted time domain features and frequency domain features, and inputting them into the variational autoencoder to convert them into low-dimensional latent variables; Step S3: In the variational autoencoder, the sum of the reconstruction loss and the KL divergence is used as the total loss function, the total loss function is minimized by the back propagation algorithm, and the encoder and decoder parameters of the variational autoencoder are gradually updated; Step S4: Process the MEG public dataset and use the processed results as the training dataset for the clustering algorithm; extract the low-dimensional latent variables in the variational autoencoder and use the trained clustering algorithm to perform cluster analysis on the low-dimensional latent variables to distinguish between bad segments and good segments; Step S5: The MEG bad segment data identified by the trained clustering algorithm is decoded from the low-dimensional latent variable space back to the original feature space through a decoder to generate a reconstructed signal.
2. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 1, characterized in that: The raw data of brain nerve activity collected by the sensor in step S1 Expressed as ,in It is a signal of brain nerve activity. represents the guidance field matrix, The preprocessing includes filtering, denoising and time locking.
3. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 1, characterized in that: In step S2, the frequency domain features include energy distribution and periodicity features of the signal at different frequencies, and the time domain features include mean, variance, peak, and zero-crossing features.
4. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 3, characterized in that: In step S2, the extracted time domain features and frequency domain features are normalized and input into the variational autoencoder to be converted into low-dimensional latent variables, including: The normalized frequency domain features are input into the convolutional neural network layer, and the local frequency patterns are extracted through multiple convolutional layers to capture the spectral characteristics of the signal: , Where, represents the frequency domain features after normalization, represents the convolutional neural network layer, Represents the spectral characteristics extracted by convolutional neural network; The normalized time domain features are input into the recurrent neural network layer to capture the temporal dynamic characteristics of the signal and extract the temporal dependencies: , Where, represents the time domain features after normalization, RNN represents the recurrent neural network layer, represents the temporal dynamic characteristics extracted by the recurrent neural network; The outputs of the convolutional neural network layer and the recurrent neural network layer are fused through the merging layer to form a comprehensive feature representation : , Where, Represents feature splicing; The fused comprehensive features are represented as Input to the variational autoencoder, which maps the high-dimensional features to a low-dimensional latent space to generate a low-dimensional latent variable representation : , In the formula, Encoder represents the encoder of the variational self-encoder, which is used to represent the comprehensive features of the input Compress or map into a low-dimensional latent space.
5. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 4, characterized in that: The encoder of the variational autoencoder Generate low-dimensional latent variable representations Proceed as follows: , in, and are the mean and standard deviation generated by the encoder, is a noise vector sampled from a standard normal distribution, Represented as element-wise multiplication.
6. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 5, characterized in that: In step S3, the total loss function Expressed as: , in, represents the reconstruction loss, are parameters including mean, variance and weight, and are hyperparameters that control the contribution of KL divergence and Gaussian entropy to the total loss, is the KL divergence between the latent variable distribution and the prior distribution, represents the potential distribution generated by the Gaussian mixture model, H represents the Gaussian entropy, represents the prior distribution of the latent variable, represents the probability distribution of the latent variables generated by the variational autoencoder, represents the latent variable; where , , Where, represents the total dimension of the feature, The first one represents the comprehensive characteristics dimension, The first dimension, Express Perform mathematical expectation calculations.
7. The method for detecting bad segments in MEG data based on variational autoencoder and clustering according to claim 1, characterized in that: In step S4, a hierarchical density clustering algorithm is used to perform cluster analysis on the extracted low-dimensional latent variables. First, all data points are connected by a minimum spanning tree to construct a topological structure of the data, and the core distance and reachable distance of each point are calculated to determine the density reachability between the points. Based on the density reachability, clusters with similar densities are gradually merged, and the stability of each cluster under different density thresholds is evaluated to obtain the final clustering result.
8. A device for detecting bad segments in MEG data based on variational autoencoders and clustering, characterized in that: include: Acquisition module, used to collect raw data of brain nerve activity and perform preprocessing; The conversion module is used to extract time domain features and frequency domain features from the preprocessed raw brain neural activity data, standardize the extracted time domain features and frequency domain features, input them into the variational autoencoder, and convert them into low-dimensional latent variables; A calculation module is used to use the sum of the reconstruction loss and the KL divergence as the total loss function in the variational autoencoder, minimize the total loss function through a backpropagation algorithm, and gradually update the encoder and decoder parameters of the variational autoencoder; The differentiation module is used to process the MEG public dataset and use the processed results as the training dataset for the clustering algorithm; Extract low-dimensional latent variables from the variational autoencoder and use the trained clustering algorithm to perform cluster analysis on the low-dimensional latent variables to distinguish between bad segments and good segments; The reconstruction module is used to decode the MEG bad segment data identified by the trained clustering algorithm from the low-dimensional latent variable space back to the original feature space through the decoder to generate the reconstructed signal.
9. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting bad segments of MEG data based on variational autoencoder and clustering as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Executable instructions are stored thereon, which, when executed by a processor, enable the processor to implement a method for detecting bad segments of MEG data based on variational autoencoder and clustering as described in any one of claims 1 to 7.
Citation Information
Cited By
Humanoid robot trajectory enhancement method and system for multi-stage continuous tasks
CN121061910A
