Sleep stage pattern recognition method based on deep convolutional autoencoder

Through the method based on the deep convolutional automatic encoder, sleep data is preprocessed and feature extraction, combined with multi-scale coding and layer-by-layer jump connection, the problem of cumbersome and insufficient accuracy of sleep stage recognition in the prior art is solved, and higher recognition accuracy and microstructure detection capabilities are achieved.

CN118141324BActive Publication Date: 2025-04-29NANTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410168485.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2025-04-29
Estimated Expiration
2044-02-06

AI Technical Summary

Technical Problem

The existing sleep staging recognition methods rely on human expert scores, are cumbersome, time-consuming and prone to human errors, and cannot effectively detect the microstructure of sleep, such as cyclic alternating mode (CAP), which affects the accurate diagnosis of sleep disorders.

Method used

The method based on deep convolutional automatic encoder is adopted to preprocess and standardize the original signal of the polysomnography (PSG), and generate a multi-scale encoder and decoder, combining layer-by-layer jump connection and multi-scale feature fusion to improve the accuracy of recognition of sleep staging patterns.

Benefits of technology

It achieves higher accuracy in sleep stage recognition and can effectively detect the microstructure of sleep, such as cyclic alternating mode (CAP), improving the accurate diagnosis ability of sleep disorders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118141324B_ABST
    Figure CN118141324B_ABST
Patent Text Reader

Abstract

The present invention provides a method for sleep staging pattern recognition based on a deep convolutional autoencoder, and belongs to the field of deep learning technology. It solves the technical problems of low efficiency in identifying human sleep stages and sleep abnormalities, and high identification costs. Its technical solution is: it includes the following steps: Step 1: data preprocessing; Step 2: multi-scale autoencoder; Step 3: layer-by-layer skip connection; Step 4: multi-scale decoder; Step 5: loss function. The beneficial effects of the present invention are: the present invention improves its performance by adding multi-scale coding combined with a multi-layer convolutional network, new layer-by-layer skip connection and multi-scale feature fusion of the decoder, and has better recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a method for sleep staging pattern recognition based on a deep convolutional autoencoder. Background Art

[0002] Polysomnography (PSG), including EEG, ECG, EOG, EMG etc., is the gold standard for non-invasive diagnosis of different types of sleep disorders, such as sleep apnea, insomnia, narcolepsy, restless legs syndrome and sleep disorders. Sleep disorder detection technology based on polysomnography (PSG) is a method to analyze and evaluate sleep quality and sleep disorders by measuring multiple physiological parameters. PSG can simultaneously record multiple physiological responses during sleep, including electroencephalogram (EEG), electrocardiogram (ECG), electrooculogram (EOG), respiratory airflow, chest and abdominal respiratory movements, and electromyography. Sleep disorder detection technology usually analyzes sleep disorders and sleep quality problems based on the above-mentioned multiple physiological responses by identifying sleep lesions, apnea, muscle movements, behavioral disorders during sleep, etc.

[0003] Visual sleep stage scoring by human experts is the current gold standard for sleep analysis. However, this method is cumbersome, time-consuming, prone to human error, and fails to detect the microstructure of sleep, such as the cyclic alternating pattern (CAP), which is an important diagnostic factor in detecting sleep disorders such as insomnia and obstructive sleep apnea (OSA). CAP is observed only as subtle changes in electroencephalogram (EEG) signals during non-rapid eye movement (NREM) sleep, making it difficult for human experts to discern. Therefore, it is important to develop an automated system using deep learning algorithms and techniques for accurate and robust detection of CAP and sleep stage classification.

[0004] Sleep pattern analysis is the process of classifying and identifying sleep data using deep learning algorithms. Some deep learning algorithms and models have been widely used, including: Convolutional Neural Network (CNN): CNN is a neural network model that can automatically extract features from sleep data, which can avoid the complexity and subjectivity of manually selecting features. CNN can use multiple convolution kernels to convolve the original signal, extract hierarchical features, and reduce the feature dimensions to a smaller size through maximum pooling, and finally classify through a fully connected layer. Long Short-Term Memory Network (LSTM): LSTM is a deep learning algorithm suitable for classification and identification in time series data. LSTM can adaptively learn and extract temporal dependencies in sequence data, and can capture subtle changes between different sleep stages. At the same time, LSTM can also process time series data of unequal length, thereby improving the classification effect of sleep data. Signal Autoencoder (SAE): SAE can achieve unsupervised feature learning by learning high-level representations in sleep signals. It can learn the hierarchical features of the signal and convert it into a compressed representation form for classification through layer-by-layer training and reconstruction without human intervention. Sparse Autoencoder (SSAE): SSAE is similar to SAE, but by encouraging activation sparsity, it can learn more discriminative feature representations, thereby improving classification accuracy.

[0005] These deep learning algorithms usually need to be trained on large sleep datasets and adjusted and tested through cross-validation. The development of these technologies provides an efficient and accurate way to analyze and assess sleep quality and sleep disorders.

[0006] Sleep is vital for humans. Various abnormal conditions during sleep seriously affect human health, such as insomnia and apnea during sleep. In the past few decades of research, it has been found that the identification of sleep stages is crucial. In short, the human sleep process is divided into the following stages: ① Wake (W), ② Rapid eye movement (REM), ③ None Rapid eye movement (NREM), including stage 1 (N1) refers to the transition period from wakefulness to sleep, stage 2 (N2) refers to light sleep, and stage 3 (N3) refers to the deep sleep process. Human sleep is actually a cycle from W->N1->N2->N3->REM. The existing identification of sleep stages mainly relies on polysomnography (PSG), including electroencephalogram (EEG), electrooculogram (EOG), electromyogram (EMG), and electrocardiogram (ECG). The acquisition of PSG signals requires a long period of sleep in a professional sleep research center, so the acquisition cost of PSG signals is very high. Summary of the invention

[0007] The purpose of the present invention is to provide a method for sleep stage pattern recognition based on deep convolutional autoencoder.

[0008] The inventive concept of the present invention is: the present invention adopts the preprocessing of the PSG original signal, the standardization of the signal, the preprocessing of the signal, the generation of the multi-scale encoder (Multi-scale Encoder), the generation of the multi-scale decoder (Multi-scale Decoder), the realization of the sleep stage discriminator, the evaluation of the recognition result, etc., and improves its performance by adding multi-scale encoding combined with a multi-layer convolutional network, a new layer-by-layer skip connection and multi-scale feature fusion of the decoder. Compared with some existing deep learning methods, it has better recognition accuracy.

[0009] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a method for sleep stage pattern recognition based on a deep convolutional autoencoder, comprising the following steps:

[0010] Step 1: Data preprocessing.

[0011] The original ECG signal is segmented and denoised, and then the ECG signal is transformed into 1 minute, 2 minutes and 3 minutes of time-frequency images by wavelet transform. Wavelet transform is a time-frequency analysis technology that can extract the local characteristics of the signal in the time-frequency domain. Two wavelet transform technologies are used, Morlet Wave (Morl) and complex Morlet Wave (CMorl). Morl is a single-frequency sine function under a Gaussian envelope, which can effectively avoid phase distortion in image processing. Its formula is as follows:

[0012]

[0013] Cmorl is a complex continuous wavelet extended from the Morlet wavelet. It has good resolution in both time domain and frequency domain. Its formula is as follows:

[0014]

[0015] Step 2: Multi-scale Autoencoder:

[0016] The converted ECG signal is input into a multi-scale autoencoder-decoder network for classification and recognition. The autoencoder network adopts a multi-layer convolutional network structure, and its structure is as follows: Figure 1 As shown:

[0017] Step 3: Skip connections layer by layer

[0018] Skip connections can improve image segmentation performance by utilizing horizontal connections that fuse image features. The U-shaped structure in U-Net is directly used for the encoder and decoder, and a channel for information transmission is added between them by using skip connections. Establishing only one path for the encoder and decoder can only transmit information of the corresponding layers. Since the transmission span is too large, the difference between the information will also reduce the effect of information fusion.

[0019] In order to reduce the differences in the connection process and further improve the segmentation results, an upward reverse decoding process is added after each encoding to merge the features with similar semantics and smaller spans to obtain more image feature information. Its structure is as follows:

[0020] Step 4: multi-scale Decoder

[0021] Since good image segmentation performance cannot be achieved, we use multi-scale feature fusion to replace the 3×3 convolution layer for decoding. The multi-scale feature fusion of decoding uses convolution kernels of different sizes to segment the target area as accurately as possible. The improved multi-scale decoder is as follows Figure 3 shown.

[0022] Step 5: The overall network architecture is as follows Figure 4 As shown: This step is to combine the methods described in steps one to four above to build the overall model of the network, as shown Figure 4 shown.

[0023] Step 6: Loss Function

[0024] The loss function is used to measure the difference between the actual value and the predicted value of the network. The dice Loss function is used in the present invention, and its formula is as follows:

[0025]

[0026] Among them, y in is the ground truth of category i at the nth pixel, N is the total number of pixels, Yes in The probability prediction value of

[0027] is the weight of each category.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. Combination of multi-scale autoencoder method and deep convolutional network; this encoding method uses convolutions of different scales to extract the output of the previous layer, and then aggregates several extracted feature information through different convolutional layers; in addition, the convolution module is used to reduce the dimension of each convolution operation through 1×1 convolution to reduce the computational complexity. Through the proposed encoding method, more comprehensive feature information can be obtained and better segmentation performance can be achieved.

[0030] 2. A new layer-by-layer skip connection mode is proposed to address the problem that the traditional skip connection between single corresponding layers can only provide part of the feature information extracted by the encoding layer during the decoding process, wasting the rest of the feature information; deconvolution is used to obtain the result after each encoding step, and a layer-by-layer skip connection is added to return to the previous layer, and the information returned after each encoding is connected with the final decoding to save each information generated by the encoding layer. In this way, all the information obtained by the encoding layer can be fully transmitted back to the decoding layer to retain all the extracted feature information, thereby obtaining better segmentation results.

[0031] 3. Combination of multi-scale automatic decoder (multi-scale Decoding) method with deep convolutional network Although as much information as possible has been retained through the proposed layer-by-layer skip connection and multi-scale coding combined with deep convolution, this information cannot be fully utilized in decoding. Inspired by the improvement of the network encoder proposed by us, a multi-scale method is used to improve the decoder. Referring to the idea of ​​multi-scale coding, we perform similar operations on the decoder to restore the features more completely. By making full use of multi-scale decoding and layer-by-layer skip connection, all feature information is extracted and retained, and a clearer segmented image is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0033] Figure 1 Schematic diagram of the convolution module of the multi-scale encoder in the present invention.

[0034] Figure 2 It is a schematic diagram of the improved connection structure in the present invention.

[0035] Figure 3 Schematic diagram of the deconvolution block of the multi-scale decoder in the present invention.

[0036] Figure 4 Schematic diagram of the overall architecture of the neural network in the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0038] This embodiment provides a technical solution for sleep stage pattern recognition based on deep convolutional autoencoder. The experiment in the embodiment is carried out on pytorch, and the network training and testing are carried out on NVIDIA 3050Ti GPU. During the experiment, the model is trained and evaluated on the SleepEDF-20, Physionet-2018 public datasets. This dataset is used for comparison with other methods.

[0039] The specific information of the dataset is as follows:

[0040] Table 1. Specific parameter information of experimental data set

[0041]

[0042] The implementation of deep learning models requires a training data set of a certain scale. This method uses two open source data sets listed in Table 1. Table 1 gives the specific information of the two data sets.

[0043] According to the above steps one to six, this embodiment is based on the existing open source experimental data sets PhysioNet and SleepEDF, obtains the original ECG signal data, and preprocesses the data according to the above steps, including data filtering, wavelet conversion, and segmentation; the converted results are input into the deep convolutional network for classification and recognition.

[0044] The sleep dataset was divided into training, validation, and test sets in a ratio of 70:15:15, respectively. The proposed model was trained for 50 epochs with the training set, and the “best model” was saved when the highest validation accuracy was obtained during the model training process. The test set was unknown to the proposed model and was used to evaluate the performance of the “best model”. The validation accuracy of the “best model” was 95.34%.

[0045] Table 2. Classification confusion matrix after testing the SleepEDF-20 dataset in Example 1

[0046] stage W N1 N2 N3 REM Accuracy% W 95.2% 2.6% 1.5% 0.5% 0.2% 95.2 N1 5.1% 90.2% 3.2% 1.2% 0.3% 90.2 N2 0.26% 3.2% 95.34% 1.2% 0% 95.34 N3 0.5% 0.6% 2.1% 95.6% 1.2% 95.6 REM 0.3% 1.2% 2.1% 3.2% 93.2% 93.2

[0047] Table 2 shows the recognition results based on Example 1. The experimental results show that the recognition accuracy of this method for each sleep stage is above 90%, among which the recognition accuracy for stage N3 is as high as 95.6%, and the recognition accuracy for stage N1 is the lowest, but can also reach 90.2%.

[0048] Table 3. Classification confusion matrix after testing the physionet dataset in Example 2

[0049]

[0050]

[0051] Table 3 shows the recognition results based on Example 2. The experimental results show that the recognition accuracy of this method for each sleep stage is above 88%, among which the recognition accuracy for stage N2 is as high as 93.1%, and the recognition accuracy for stage N1 is the lowest, but can also reach 88.9%.

[0052] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for sleep stage pattern recognition based on deep convolutional autoencoder, characterized in that: The following steps are involved: Step 1: Data preprocessing; The original ECG signal is segmented and denoised, and then the ECG signal is transformed into 1 minute, 2 minutes and 3 minutes of time-frequency images by wavelet transform. Wavelet transform is a time-frequency analysis technology that extracts the local characteristics of the signal in the time-frequency domain. Two wavelet transform technologies are used, Morlet Wave and complex Morlet Wave. Morl is a single-frequency sine function under a Gaussian envelope to avoid phase distortion in image processing. The formula is as follows: Cmorl is a complex continuous wavelet extended from the Morlet wavelet. It has good resolution in both time domain and frequency domain. Its formula is as follows: Step 2: Multi-scale Autoencoder: The converted ECG signal is input into a multi-scale autoencoder network for classification and recognition. The autoencoder network adopts a multi-layer convolutional network structure: Step 3: Skip connection layer by layer; The jump connection uses the horizontal connection of the fused image features to improve the image segmentation performance. The U-shaped structure in U-Net is directly used for the encoder and decoder, and a channel for information transmission is added between them by using the jump connection, so as to establish a path for the encoder and decoder to transmit the information of the corresponding layers; after each encoding, an upward reverse decoding process is added to fuse the semantically similar and smaller span features together to obtain more image feature information; Step 4: Multi-scale decoder Since good image segmentation performance cannot be obtained, multi-scale feature fusion is used to replace the 3×3 convolution layer for decoding. The multi-scale feature fusion of decoding uses convolution kernels of different sizes to accurately segment the target area; Step 5: Loss Function The loss function is used to measure the difference between the actual value and the predicted value of the network. The dice Loss function is used, and its formula is as follows: Among them, y in is the ground truth of category i at the nth pixel, N is the total number of pixels, Yes in The probability prediction value of is the weight of each category.

Citation Information

Patent Citations

  • Sleep staging method based on electroencephalogram feature fusion

    CN113925459A

  • Sleep staging result determination method and device, equipment and medium

    CN116421152A