A two-branch micro-event detection method based on weak supervision

By building a dual-branch micro-event detection network based on weak supervision and using sleep staging coarse-grained label training network, the problem of scarcity of data and inconsistent expert labeling in sleep micro-event detection is solved, and efficient and accurate detection of a variety of micro-events is achieved, supporting neuroscience and clinical diagnosis.

CN120277496BActive Publication Date: 2025-09-02ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510742025.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-02
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

Existing deep learning methods require a large amount of labeled data in sleep micro-event extraction, and there are subjective differences in expert labeling, resulting in inconsistent data quality and making it difficult to effectively identify multiple sleep micro-events.

Method used

A dual-branch micro-event detection method based on weak supervision is adopted, and a sleep staged coarse-grained label training network is used to train the network. Through feature extraction, branch network and clustering modules, a dual-branch network model is built, and a pseudo-label and composite loss function is trained to realize the automated detection of multiple micro-events.

Benefits of technology

It improves the efficiency and accuracy of sleep micro-event detection, reduces the impact of expert subjectivity, simplifies method design, and provides clinical diagnostic support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277496B_ABST
    Figure CN120277496B_ABST
Patent Text Reader

Abstract

The present invention discloses a two-branch micro-event detection method based on weak supervision, comprising: obtaining sleep EEG signals, constructing a data set and dividing it into a training set, a test set, and a validation set; preprocessing the data in the data set; constructing a two-branch micro-event detection network model based on weak supervision, the model comprising a feature extraction network, a first branch network, a clustering module, and a second branch network; training the network model using the data set and adjusting network parameters using an optimization method; inputting EEG signals into the trained network model to detect and extract micro-events. The two-branch micro-event detection method based on weak supervision of the present invention utilizes easily accessible coarse-grained labels for sleep staging for training, solving the problem of scarcity of high-quality micro-event annotation data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electroencephalogram (EEG) signal processing, and in particular relates to a two-branch micro-event detection method based on weak supervision. Background Art

[0002] Research has demonstrated a significant correlation between sleep microevents and neurocognitive function, garnering widespread attention from both academic and clinical researchers. For example, studies have shown that sleep spindles are closely associated with cognitive functions such as memory consolidation and learning ability, while K complexes are crucial for neural activity, including brain self-regulation and perceptual thresholds. Consequently, the extraction and analysis of sleep microevents, particularly sleep spindles and K complexes, has become a key research area in fields such as neuroscience, sleep medicine, and cognitive psychology.

[0003] However, in hospital settings, the extraction of sleep microevents primarily relies on manual annotation by experts, which is not only time-consuming and labor-intensive, but can also affect the accuracy of the results due to subjective differences between experts. Therefore, automated annotation of sleep microevents has become a key area of ​​sleep research. With the development of technologies such as deep learning, automated annotation not only improves efficiency but also reduces subjective errors, enhancing the consistency and accuracy of annotations, attracting increasing attention from experts.

[0004] However, the current use of deep learning methods for sleep micro-event extraction still has the following problems: 1) As a data-driven technology, deep learning usually requires a large amount of labeled data for training, but there is a lack of sufficient micro-event labeled data in hospital scenarios; 2) Existing micro-event labeling is greatly affected by expert subjectivity, resulting in significant inconsistency among experts, which affects the quality of data labels and limits the application effect of deep learning methods in micro-event extraction; 3) Existing micro-event extraction methods can only identify a single category of micro-events. Different identification strategies need to be adopted for different types of sleep micro-events, which not only increases the complexity of method design, but also makes its actual application in clinical practice more difficult. Summary of the Invention

[0005] The present invention provides a two-branch micro-event detection method based on weak supervision to solve the above-mentioned technical problems, specifically adopting the following technical solutions:

[0006] A two-branch micro-event detection method based on weak supervision includes the following steps:

[0007] Obtain sleep EEG signals, construct a data set and divide it into training set, test set and validation set;

[0008] Preprocess the data in the dataset;

[0009] Constructing a two-branch micro-event detection network model based on weak supervision, the model includes a feature extraction network, a first branch network, a clustering module and a second branch network;

[0010] Using the data set to train the network model, and using an optimization method to adjust the network parameters;

[0011] The EEG signals are input into the trained network model to detect and extract micro-events.

[0012] Furthermore, the specific method of obtaining sleep EEG signals, constructing a data set and dividing it into a training set, a test set and a validation set is:

[0013] Collect sleep EEG signals and divide them into a series of 30-second data segments;

[0014] The data is divided into training set, validation set and test set in a ratio of 8:1:1;

[0015] All data segments are coarse-grainedly labeled, and each segment is classified according to the sleep staging standards, namely wakefulness, N1, N2, N3, and REM. The data segments in the test set are fine-grainedly labeled, specifically marking the occurrence intervals of sleep micro-events, and constructing a sleep EEG signal database that includes coarse-grained sleep staging and fine-grained micro-event annotations.

[0016] Furthermore, the step of obtaining sleep EEG signal data and performing preprocessing includes:

[0017] De-noising is performed on the EEG signal to remove artifacts such as electrooculography and electromyography.

[0018] Furthermore, the feature extraction network comprises:

[0019] The candidate region generation module uses a sliding window method to generate candidate signal segments with a certain overlap from the input signal as candidate regions;

[0020] The feature extraction module is based on the DarkNet53 network structure of YOLOv3, and extracts deep features through multiple convolutional layers and residual modules and inputs them into the branch network one and the branch network two.

[0021] Furthermore, the branch network 1 converts the Euclidean distance between the deep features and the waveform prototype vector into a similarity score, generates a similarity score matrix and inputs it into the clustering module, and obtains the sleep stage prediction by using the fully connected network after summing the similarity scores of all candidate segments.

[0022] Furthermore, the clustering module calculates clusters through a similarity score matrix.

[0023] Furthermore, the specific method for the clustering module to calculate the clusters through the similarity score matrix is:

[0024] The clustering module clusters the similarity score matrix on the candidate region dimension to find the cluster center;

[0025] The candidate region clusters of micro-events existing in the input signal are obtained according to the cluster centers.

[0026] Furthermore, the second branch network converts the Euclidean distance between the deep feature and the waveform prototype vector into a similarity score to generate a similarity score matrix, and the second branch network and the first branch network share the same waveform prototype vector;

[0027] The second branch network calculates the detection pseudo labels and label weights of micro-events according to the clustering clusters, and trains the network through the similarity score matrix and the pseudo label calculation loss function.

[0028] Furthermore, the network model is trained using the Adam optimization method to dynamically adjust the learning rate.

[0029] Furthermore, the network model is trained using a composite loss function L, which is defined as follows:

[0030]

[0031] in are real number parameters, used to adjust The ratio between the functions, and The definitions are:

[0032]

[0033]

[0034]

[0035]

[0036]

[0037]

[0038] in, is the number of sleep stages, It is the label of EEG signal sleep stage, It means that the model predicts the sleep stage as The probability of is the prototype feature learned by the network, is the deep feature vector extracted from the feature extraction network, is the number of input EEG signals, is the number of prototype features in the network, is the weight parameter of the fully connected layer in branch network 1, is the pseudo label weight.

[0039] The benefits of this invention lie in the weakly supervised, two-branch microevent detection method it provides. This method utilizes readily available, coarse-grained sleep staging labels for training, addressing the scarcity of high-quality microevent annotated data. Through this weakly supervised learning approach, the impact of expert subjectivity on data labeling quality is reduced. This method also provides a two-branch network structure capable of simultaneously detecting multiple microevents, simplifying method design and improving detection efficiency and accuracy. This provides important technical support for neuroscience research and clinical diagnosis, contributing to a deeper understanding of the mechanisms of cognitive function and neurological diseases. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 The overall architecture of the weakly supervised dual-branch micro-event detection network of this application;

[0042] Figure 2 This is a structural diagram of the feature extraction module of this application;

[0043] Figure 3 This is a flowchart of the clustering module of this application. DETAILED DESCRIPTION

[0044] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0045] This application discloses a two-branch micro-event detection method based on weak supervision, comprising the following steps:

[0046] S1: Obtain sleep EEG signals, construct a dataset and divide it into training set, test set and validation set.

[0047] In the embodiment of the present application, the specific method of obtaining sleep EEG signals, constructing a data set and dividing it into a training set, a test set and a validation set is as follows:

[0048] First, the sleep EEG signal data was collected with a sampling rate of 100Hz and divided into a series of 30-second data segments. Subsequently, the data was divided into a training set, a validation set, and a test set, accounting for 80%, 10%, and 10%, respectively, and there was no overlap between the three. Then, clinical experts performed coarse-grained annotation on these 30-second data segments, that is, each segment was classified according to the sleep staging standards, namely, the awake period, N1 stage, N2 stage, N3 stage, and REM stage. In addition, clinical experts also performed fine-grained annotation on the data segments in the test set, specifically annotating the occurrence intervals of sleep micro-events, including characteristic events such as spindles and K complexes. Finally, a sleep EEG signal database containing coarse-grained sleep staging and fine-grained micro-event annotation was constructed. The number of sampling points of the signal samples in this data set is 3000 (30s ).

[0049] S2: Preprocess the data in the dataset.

[0050] Specifically, the EEG data is denoised to remove electrooculogram (EOG) noise and electromyography (EMG) noise.

[0051] S3: Construct a two-branch micro-event detection network model based on weak supervision.

[0052] In an embodiment of the present application, the network model includes a feature extraction network, a first branch network, a clustering module and a second branch network.

[0053] In an embodiment of the present application, the feature extraction network includes: a candidate region generation module and a feature extraction module.

[0054] The candidate region generation module uses a sliding window method to extract the input signal Generate candidate signal segments with certain overlapping parts Specifically, given an input signal of length T, the module gradually slides over the signal with a fixed window size of length L and a step size of S to split the signal into R time segments with a certain overlap. ,in Refers to the i-th candidate signal segment.

[0055] The feature extraction module is based on the DarkNet53 network structure of YOLOv3, which extracts deep features through multiple convolutional layers and residual modules. It can be input to branch network 1 and branch network 2. Specifically, the feature extraction module draws on the DarkNet53 network structure of YOLOv3. Figure 2As shown in Figure 1, the network contains one convolutional layer at the input and one at the output. The intermediate layers consist of four convolutional layers, four residual modules, and a downsampling layer in series. Each residual module consists of multiple repeatedly stacked convolutional layers and residual connections. The parameters of the one-dimensional convolutional layer are (16, 3, 1), indicating that the number of convolution channels is 16, the convolution kernel size is 3, and the stride is 1.

[0056] In an embodiment of the present application, branch network 1 converts the Euclidean distance between the deep feature and the waveform prototype vector into a similarity score, generates a similarity score matrix and inputs it into the clustering module, and obtains the sleep stage prediction using a fully connected network after summing the similarity scores of all candidate segments.

[0057] Specifically, the first branch network is a network with sleep stages as labels, which embeds M learnable waveform prototype vectors . The deep features learned by the feature extraction network Can be regarded as a set of R signal features The network calculates the Euclidean distance between each waveform prototype and the signal feature, converts it into a similarity score, and generates a similarity score matrix ,in Represents the similarity score between the i-th waveform prototype and the j-th candidate signal segment. After obtaining the similarity score matrix of each candidate segment After that, it is converted into a similarity score of the entire signal by summing all regions. Then, a fully connected layer is used to assign weights to the similarity scores and the output is processed by the Softmax function to obtain the predicted sleep stage. .

[0058] The clustering module calculates clusters using a similarity score matrix. Specifically, the clustering module clusters the similarity score matrix along the candidate region dimension and finds cluster centers. Based on the cluster centers, candidate region clusters of micro-events present in the input signal are obtained.

[0059] Specifically, the clustering module uses the similarity score matrix The clusters are calculated. The process is divided into two steps: the first step is to calculate the similarity score matrix Clustering is performed on the candidate region dimension and the cluster center is found; in the second step, the candidate region clustering clusters of the micro-events existing in the input signal are obtained according to the cluster center.

[0060] The whole process is as follows Figure 3 In the first step, from the similarity score matrix Find the element with the largest score and find its corresponding waveform prototype , where k is calculated as follows:

[0061]

[0062] The candidate signal segment corresponding to this element mainly contains waveform prototypes Then, calculate the R candidate regions and Similarity score of . Then, the KMeans clustering algorithm is used to score the similarity Perform clustering (number of clusters k=5) and select the cluster with the largest similarity score , the corresponding candidate signal fragment in the cluster may contain a waveform prototype Then, According to the original The adjacent similarity scores are grouped together, and the similarity score with the largest median value in each group is defined as the cluster center. , whose index set is , where n represents the number of cluster centers. The candidate segments represented by the cluster centers are , representing the multiple waveform prototypes present in the input signal At this point, the network has completed clustering the candidate regions and found the cluster centers. In the second step, for each cluster center, the distance to the left and right is The elements together form clusters with different cluster centers , each cluster contains waveform prototypes The corresponding sleep micro-events are expressed as follows:

[0063]

[0064] In the implementation of the present application, branch network 2 converts the Euclidean distance between deep features and waveform prototype vectors into a similarity score, generating a similarity score matrix. Branch network 2 and branch network 1 share the same waveform prototype vector. Next, branch network 2 calculates pseudo-labels and label weights for micro-events based on clusters, and trains the network by calculating the loss function using the similarity score matrix and pseudo-labels.

[0065] Specifically, the branch network 2 processes the deep features s learned by the feature extraction network in the same way as the branch network 1 to obtain the similarity score matrix Among them, branch network 2 and branch network 1 share the same waveform prototype vector. For the clustering cluster input to branch network 2 , first find its similarity score matrix The index position in gets the index matrix , which is expressed as follows:

[0066] According to the index matrix , we can get the pseudo labels of micro-event extraction , set the label of the corresponding position in the index matrix to 1, and set the labels of other positions to 0. The specific formula is as follows:

[0067]

[0068] In this process, the candidate segments contained in this cluster are marked as waveform prototypes. Then, according to the similarity score matrix With pseudo labels Calculating the loss function Train the network.

[0069] S4: Use the dataset to train the network model and use optimization methods to adjust the network parameters.

[0070] In the implementation of the present application, the network model is trained using the Adam optimization method to dynamically adjust the learning rate.

[0071] Specifically, the number of samples used in each model training is 32, and the training traverses the samples 1000 times. If the optimal result is not updated within 50 times, the training is terminated early. The learning rate of the training is 5e-4. The network model training uses a composite loss function L, which is defined as follows:

[0072]

[0073] in are real number parameters, used to adjust The ratio between the functions, and The definitions are:

[0074]

[0075]

[0076]

[0077]

[0078]

[0079]

[0080] in, is the number of sleep stages, It is the label of EEG signal sleep stage, It means that the model predicts the sleep stage as The probability of is the prototype feature learned by the network, is the deep feature vector extracted from the feature extraction network, is the number of input EEG signals, is the number of prototype features in the network, is the weight parameter of the fully connected layer in branch network 1, is the pseudo label weight.

[0081] S5: Input the EEG signal into the trained network model to detect and extract micro-events.

[0082] In the embodiment of the present application, given an EEG signal , input it into the trained micro-event detection network model to obtain R candidate signal segments And the similarity score matrix From the similarity score matrix Find R candidate regions and Similarity score of Then, refer to the process in the clustering module and use the similarity score Clustering to obtain spindle clusters and its index matrix The spindle cluster is considered to be the scoring set with the highest similarity to the spindle, and the candidate signal segment corresponding to its index matrix is ​​the spindle candidate signal After the model is tested, the researchers will screen the test results based on the known frequency characteristics of the micro-events. Taking spindle waves as an example, the common frequency range is 12-14Hz. By calculating the candidate signals of spindle waves The relative power ratio within the frequency band and set the threshold Only when the relative power ratio of the candidate signal reaches this threshold can it be considered as a valid spindle event.

[0083] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solutions obtained by equivalent replacement or equivalent transformation fall within the scope of protection of the present invention.

Claims

1. A two-branch micro-event detection method based on weak supervision, characterized in that: The following steps are involved: Obtain sleep EEG signals, construct a data set and divide it into training set, test set and validation set; Preprocess the data in the dataset; Constructing a two-branch micro-event detection network model based on weak supervision, wherein the network model includes a feature extraction network, a first branch network, a clustering module and a second branch network; Using the data set to train the network model, and using an optimization method to adjust the network parameters; Input EEG signals into the trained network model to detect and extract micro-events; The first branch network converts the Euclidean distance between the deep features and the waveform prototype vector into a similarity score, generates a similarity score matrix and inputs it into the clustering module, and obtains the sleep stage prediction by summing the similarity scores of all candidate segments using a fully connected network; The clustering module calculates clusters through similarity score matrix; The specific method for the clustering module to calculate the clusters through the similarity score matrix is: The clustering module clusters the similarity score matrix on the candidate region dimension to find the cluster center; Obtain candidate region clusters of micro-events present in the input signal according to the cluster centers; The second branch network converts the Euclidean distance between the deep feature and the waveform prototype vector into a similarity score to generate a similarity score matrix. The second branch network and the first branch network share the same waveform prototype vector. The second branch network calculates the detection pseudo labels and label weights of micro-events according to the clustering clusters, and trains the network through the similarity score matrix and the pseudo label calculation loss function.

2. The weakly supervised dual-branch micro-event detection method according to claim 1, characterized in that: The specific method of obtaining sleep EEG signals, constructing a data set and dividing it into a training set, a test set and a validation set is as follows: Collect sleep EEG signals and divide them into a series of 30-second data segments; The data is divided into training set, validation set and test set in a ratio of 8:1:1; All data segments are coarse-grainedly labeled, and each segment is classified according to the sleep staging standards, namely wakefulness, N1, N2, N3, and REM. The data segments in the test set are fine-grainedly labeled, specifically marking the occurrence intervals of sleep micro-events, and constructing a sleep EEG signal database that includes coarse-grained sleep staging and fine-grained micro-event annotations.

3. The weakly supervised dual-branch micro-event detection method according to claim 1, characterized in that: The steps of obtaining sleep EEG signal data and performing preprocessing include: De-noise the EEG signal and remove electrooculogram and electromyography.

4. The weakly supervised dual-branch micro-event detection method according to claim 1, characterized in that: The feature extraction network comprises: The candidate region generation module uses a sliding window method to generate candidate signal segments with a certain overlap from the input signal as candidate regions; The feature extraction module is based on the DarkNet53 network structure of YOLOv3, and extracts deep features through multiple convolutional layers and residual modules and inputs them into the branch network one and the branch network two.

5. The weakly supervised dual-branch micro-event detection method according to claim 1, characterized in that: The network model is trained using the Adam optimization method, with the learning rate dynamically adjusted.

6. The weakly supervised dual-branch micro-event detection method according to claim 1, characterized in that: The network model is trained using a composite loss function L, which is defined as follows: L=λ sleep L sleep +λ dist L dist +λ R1 L R1 +λ R2 L R2 +λ W L W +λ event L event where λ sleep ,λ dist ,λ R1 ,λ R2 ,λ W ,λ event are real number parameters, used to adjust L sleep ,L dist ,L R1 ,L R2 ,L W ,L event The ratio between the functions, and L sleep ,L dist ,L R1 ,L R2 ,L W ,L event The definitions are: Among them, N C is the number of sleep stages, y i It is the label of EEG signal sleep stage, It represents the probability that the model predicts the sleep stage to be c, w is the prototype feature learned by the network, s is the deep feature vector extracted from the feature extraction network, n is the number of input EEG signals, M is the number of prototype features in the network, and W is the weight parameter of the fully connected layer in the branch network. is the pseudo label weight.

Citation Information

Patent Citations

  • Automatic sleep staging method and device and computer readable storage medium

    CN116458900A

  • Method to Identify Patterns in Brain Activity

    US20240282460A1