Depression screening method and system based on sleep electroencephalogram and multi-task combined fine tuning

By employing a multi-task joint fine-tuning method based on sleep EEG, a cross-task joint model is constructed, which solves the problem of strong dependence on specific label data in existing technologies. This achieves high accuracy and strong generalization ability in depression screening, reduces data requirements and diagnostic costs, and provides automated early screening support.

CN120913883APending Publication Date: 2025-11-07HANGZHOU SEVENTH PEOPLES HOSPITAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511067989.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing methods for screening depression rely heavily on specific label data, have insufficient model generalization ability, and cannot effectively utilize the knowledge of large-scale pre-trained models, resulting in highly subjective, low-accurate, and costly diagnostic results.

Method used

We employ a multi-task joint fine-tuning method based on sleep EEG, utilizing a pre-trained model combined with a differentiated learning rate strategy and cross-task joint fine-tuning to construct a joint model for sleep staging and depression classification. By transferring learning, we reduce the dependence on specific label data and enhance the model's generalization ability.

Benefits of technology

It achieves highly accurate and generalizable depression screening, reduces the need for costly labeled data, provides an objective and automated early screening method, and improves diagnostic efficiency and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120913883A_ABST
    Figure CN120913883A_ABST
Patent Text Reader

Abstract

The invention discloses a depression screening method based on sleep electroencephalogram and multi-task combined fine tuning. The depression screening method comprises the following steps: firstly, obtaining a deep learning basic model which is pre-trained on a large-scale and multi-center PSG data set and has a strong sleep staging capability; and then, on a target data set containing a depression label and a sleep staging label, a cross-task joint learning strategy is adopted to carry out fine tuning on the basic model, so that two tasks of sleep staging and depression classification are optimized at the same time. The invention also provides a depression screening system. The method provided by the invention can provide powerful technical support for early, objective and automatic screening of depression.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of artificial intelligence medicine, and particularly relates to a depression screening method and system based on sleep electroencephalogram and multi-task joint fine-tuning. BACKGROUND

[0002] Depression is a common mental disorder and has become a major global public health problem. Currently, the diagnosis of depression in clinical practice mainly relies on the clinical interview of doctors and the self-rating scale of patients, such as the Hamilton Depression Scale (HAMD) or the Beck Depression Self-Rating Questionnaire (BDI). These methods have strong subjectivity, and the diagnosis results are easily affected by the experience of doctors and the subjective statements of patients, leading to delayed diagnosis and misdiagnosis. Therefore, it is of great clinical significance to develop objective and accurate biological markers for the auxiliary diagnosis of depression.

[0003] A large number of studies have shown that depression is closely related to sleep disorders, and patients with depression often show sleep structure disorders, such as difficulty falling asleep, early awakening, reduced slow wave sleep, and rapid eye movement (REM) sleep abnormalities. Polysomnography (PSG) is the "gold standard" for evaluating sleep structure, which can objectively and comprehensively record various physiological signals such as electroencephalogram (EEG), electrooculogram (EOG), and electromyogram (EMG) during sleep.

[0004] The existing patent CN117530689A discloses a depression disorder identification system based on sleep physiological data, and its principle is as follows: physiological data during human sleep is obtained, and the sleep data is preprocessed to obtain target sleep data; the target sleep data is divided into multiple segment data through a fixed time window, and the sleep data feature set is constructed after extracting the time domain, frequency domain and nonlinear features of the segment data; the sleep data feature set is input into a sleep staging model to obtain the sleep staging of the segment data, and a sleep staging curve of the whole night target sleep data is generated based on the sleep staging; health quantitative indicators are extracted according to the sleep staging curve, and a depression disorder identification model is used to identify the health quantitative indicators to output the identification result. Although this method uses the information of sleep structure, it loses a large amount of subtle and dynamic physiological information contained in the original PSG signal in the feature extraction process.

[0005] The existing patent CN119700114A discloses a depression screening system based on sleep physiological signals, which adopts a CNNBiLSTM hybrid architecture algorithm to process and analyze sleep electroencephalogram data. The algorithm combines the advantages of CNN and BiLSTM, and can realize high-precision division of sleep stages. The DepNet2D model is introduced, a two-dimensional network for spectral information is constructed, and the correlation and influence between different frequency bands are analyzed in depth, so as to accurately extract the characteristic electroencephalogram spectral information of patients with depression. Although this method can better utilize the original signal, it usually needs to start from zero training, and has strong dependence on large-scale PSG data sets with accurate depression labels. However, obtaining such high-quality labeled data is costly and difficult, which leads to insufficient model training and limited generalization ability. SUMMARY

[0006] The present application aims to provide a depression screening method and system based on sleep electroencephalogram and multi-task joint fine-tuning, which overcomes the defects of the prior art depression screening method, such as strong dependence on specific label data, insufficient model generalization ability, and inability to effectively utilize large-scale pre-training model knowledge.

[0007] In order to achieve the first purpose of the present application, the following technical solution is provided: a depression screening method based on sleep electroencephalogram and multi-task joint fine-tuning, comprising the following steps: Obtain a first data set, which includes a plurality of sleep segments and corresponding PSG signals for each sleep segment; According to the standard of five-class sleep stage, the interval signal of each sleep segment and the corresponding PSG signal is first labeled, and the interval signal of the PSG signal and the corresponding first label are combined to form an initial training set; The initial model is trained using the initial training set to obtain a first model for dividing the sleep stage in the input PSG signal graph, the first model includes a segment encoder for extracting input data features, a sequence encoder for self-attention operation, and a sleep stage classifier for predicting results; Obtain a second data set, which includes whole-night PSG signals of healthy patients and patients with depression; According to the standard of five-class sleep stage and depression category, the signal interval in the whole-night PSG signal is secondly labeled, and the interval signal of the whole-night PSG signal and the corresponding second label are combined to form a second training set; Adjust the structure of the first model, and train the adjusted first model using the second training set to obtain a second model for identifying depression categories.

[0008] The application develops a depression screening model with high accuracy and strong generalization ability in a data-efficient manner by cross-task joint fine-tuning on a powerful sleep staging base model, thereby providing strong technical support for early, objective and automated screening of depression.

[0009] Specifically, the segment encoder is constructed by adopting a double-branch convolutional neural network structure, which includes a first branch and a second branch. The first branch adopts a small-size convolution kernel to capture high-frequency components in the signal. The second branch adopts a large-size convolution kernel to capture low-frequency components in the signal.

[0010] Specifically, the segment encoder further includes a feature fusion operation, and the specific process of the feature fusion operation is as follows: The feature data output by the first branch and the second branch are fused into a high-dimensional feature vector every 30 seconds, and input into the sequence encoder.

[0011] Specifically, the sequence encoder is constructed by adopting a transformer architecture.

[0012] Specifically, the sequence encoder includes a learnable embedding layer and a padding and masking mechanism. The learnable embedding layer is used to splice the channel identifier and the time sequence position code corresponding to each feature vector before inputting into the sequence encoder, so that the model can understand which channel and which time point each feature comes from, thereby uniformly processing heterogeneous data. The padding and masking mechanism is used to uniformly process the sequence length of the data input into the sequence encoder, so as to ensure the effectiveness and accuracy of the calculation.

[0013] Specifically, the adjustment of the first model is based on the output features of the sequence encoder, and two independent classifier heads are connected in parallel. The classifier head includes a sleep stage classifier and a depression classifier.

[0014] Specifically, when the adjusted first model is trained by using the second training set, the weight parameters are updated according to a differentiated learning rate strategy and by using a back propagation algorithm to minimize the joint loss function.

[0015] Specifically, the joint loss function includes a sleep staging task loss and a depression classification task loss.

[0016] Specifically, the differentiated learning rate strategy refers to setting different learning rates for different parts of the model during training, that is, setting a very low initial learning rate (for example, 1e-5) for the main part of the first model, and setting a relatively high initial learning rate (for example, 1e-3) for the newly added depression classifier in the second model, so that it can quickly learn and adapt to the new classification task from the state of random initialization, thereby allowing the parameters to make only slight adjustments, with the aim of preserving the strong and general sleep physiological feature extraction ability learned on a large amount of data to the greatest extent while adapting to the new task, effectively preventing "catastrophic forgetting".

[0017] In order to realize the second object of the application, the technical scheme is provided as follows: a depression screening system for performing the steps of the depression screening method based on sleep electroencephalogram and multi-task joint fine-tuning.

[0018] Compared with the prior art, the application has the following beneficial effects: High accuracy and strong generalization ability: By using a pre-trained base model on a large and diverse data set, the model inherits its deep understanding of human sleep physiology, and compared with a model trained from scratch, the model has a higher starting point and can achieve extremely high screening accuracy after fine-tuning on a small target data set.

[0019] Data efficiency: Due to the use of transfer learning and fine-tuning strategies, the amount of specific data with depression labels required during model training is greatly reduced.

[0020] Task coordination promotes and enhances model interpretability: The cross-task joint fine-tuning strategy forces the model to learn feature representations that are effective for both sleep staging and depression classification tasks; this not only improves the performance of depression screening, but also reveals the deep relationship between sleep microstructure and depression pathophysiology; by analyzing the model's prediction behavior in different sleep stages, clues can be provided for the neural mechanism research of depression, enhancing the model's interpretability.

[0021] Clinical application value: An objective, automatic and efficient depression auxiliary screening method is provided, which can be integrated into the existing sleep monitoring workflow, automatically outputting depression risk prompts while performing routine sleep evaluation, which helps to realize early detection and intervention of depression, reduce the diagnostic burden of clinicians, and improve the accessibility and efficiency of mental health services. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 The flowchart of the depression screening method based on sleep electroencephalogram and multi-task joint fine-tuning provided for the present embodiment is shown in the figure; Figure 2 The structure diagram of the first model provided for the present embodiment is shown in the figure; Figure 3 A multi-task joint fine-tuning process schematic diagram provided for the embodiment. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings in the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0024] As shown in Figure 1 A depression screening method based on sleep EEG and multi-task joint fine-tuning provided for the embodiment, and the steps are specifically as follows: A pre-trained first model is obtained, which is trained by an initial training set. In the embodiment, the initial training set selects a large-scale, multi-center PSG data set covering tens of thousands of records, which can accurately perform five-class sleep staging (W, N1, N2, N3, R) on the input PSG signal.

[0025] As shown in Figure 2 The architecture schematic diagram of the first model 200 provided for the embodiment, which includes the following: S101, Epoch Encoder: This module is responsible for extracting deep features within a single sleep epoch. It adopts a convolutional neural network (CNN) architecture, specifically a dual-branch CNN. The input is a single-channel PSG signal segment blocked in 30 seconds. Branch one adopts a small-size convolution kernel, focusing on capturing high-frequency components in the EEG signal, such as spindle waves; Branch two adopts a large-size convolution kernel to capture low-frequency components, such as slow wave activity. This design enables the model to focus on physiological information in different frequency ranges simultaneously. The output features of the two branches are fused, and finally a high-dimensional feature vector is generated for each 30-second segment.

[0026] Sequence Encoder: This module is used to model the temporal dependency between sleep segments. It adopts a Transformer architecture, whose core is multi-head self-attention mechanism. This mechanism can effectively capture long-range dependencies in sleep sequences (e.g., the transition rules of sleep cycles). To adapt to heterogeneous PSG data from different clinical centers with different channel configurations (e.g., different numbers of channels and electrode positions), this module is highly flexible in design: (i) Learnable embedding layer: A learnable channel encoding and temporal encoding are introduced at the input end. Each feature vector is concatenated with its corresponding channel identifier and temporal position encoding before inputting into the Transformer. This allows the model to understand which channel and time point each feature comes from, enabling unified processing of heterogeneous data.

[0027] (ii) Padding and masking mechanism: For sequences of different lengths within a batch (caused by different numbers of channels), padding is used to unify them to the same length, and a masking mechanism is used to ignore the padded part in self-attention calculation and loss function calculation, ensuring the effectiveness and accuracy of the calculation.

[0028] Sleep stage classifier 203: This module is responsible for mapping the features corresponding to each 30-second signal segment to five sleep stages. It adopts a multi-layer perceptron (MLP) architecture, consisting of a fully connected layer and a Softmax activation function.

[0029] S102, Obtain a second training set for fine-tuning. This dataset is relatively small in size but high in annotation quality, containing overnight PSG records of several subjects (including depressed patients and healthy controls). Each record must have two labels: one is the expert-labeled sleep staging label in 30-second units; the other is the subject's explicit clinical diagnosis result, i.e., the depression label.

[0030] S103, Perform task-agnostic fine-tuning: Adjust the structure and strategically fine-tune the first model 200, so that it evolves from a single-task model (sleep staging) to a multi-task model (sleep staging + depression classification) Model structure adjustment: Connect two independent classifier heads in parallel on top of the output features of the base model sequence encoder 202.

[0031] (i) Sleep staging classifier 302: Retain the five-classifier for sleep stages from the base model, and reuse the weight parameters of the base model.

[0032] (ii) Depression classifier 303: A binary classifier is added for depression diagnosis. This classifier takes the global feature representation aggregated (e.g. output for CLS token or average pooling for sequence features) by the sequence encoder as input to make a judgment for the whole sequence.

[0033] Joint loss function 304: The goal of training is to minimize the error of both tasks simultaneously. To this end, a joint loss function is defined as the weighted sum of the sleep staging task loss and the depression classification task loss : ; where is a hyperparameter between 0 and 1 that balances the relative importance of the two tasks. A weighted cross-entropy loss is adopted to deal with the imbalance of samples in each class (e.g. N1 stage) in sleep staging.

[0034] A standard cross-entropy loss is adopted.

[0035] By minimizing this joint loss, the model is forced to learn a shared feature representation that can serve both tasks, thus uncovering the underlying physiological connection between sleep patterns and depression.

[0036] Differentiated learning rate strategy: This is a key strategy for successful fine-tuning. Different learning rates are set for different parts of the model during training. A relatively high initial learning rate (e.g. 1e-3) is set for the newly added depression classifier 303, allowing it to quickly learn and adapt to the new classification task from a randomly initialized state. A very low initial learning rate (e.g. 1e-5) is set for the main part of the first model 200 (i.e. the pre-trained segment encoder, sequence encoder, and sleep stage classifier). This allows the parameters of these layers to make only minor adjustments, aiming to preserve the strong and general sleep physiological feature extraction capabilities learned on massive data to the greatest extent while adapting to the new task, effectively preventing "catastrophic forgetting".

[0037] S105, Perform screening process: The trained second model is used for actual screening.

[0038] Input and prediction: Input the all-night PSG signal of the user to be screened.

[0039] Sample-level diagnosis: The model processes the signal in a sliding window manner for segment-by-segment sequence, and outputs the prediction probability of each 30-second segment belonging to "depression" by the depression classifier 303.

[0040] Subject level diagnosis: To get the final diagnosis of a single individual, the prediction results of all the night need to be integrated. The strategy of Majority Voting is adopted. For example, count the prediction labels of all the valid sleep segments of the night, if more than half of the segments are predicted as “depression”, the final screening result of this user is “depression positive”, otherwise “negative”. This method can effectively smooth the prediction noise of individual segments, making the final diagnosis result more reliable and clinically meaningful.

[0041] Model training: using the target dataset, minimizing the joint loss function through the back propagation algorithm , so as to update the parameters of the whole model, generate the second model finally used for identifying the depression category.

[0042] The embodiment also provides a depression screening system for executing the steps of the depression screening method based on sleep EEG and multi-task joint fine-tuning provided by the above-mentioned embodiment.

[0043] In order to prove the technical effects of the scheme provided by the embodiment, the following specific test results are provided.

[0044] The experimental test contains 20 depression patients and 24 healthy controls, a total of 44 people, and the test results are shown in Table 1 below.

[0045] .

[0046] The five-fold cross-validation is performed on the target data, and the experimental results show that the model trained by the method reaches 100% accuracy, sensitivity and specificity in the detection task of major depressive disorder (MDD), proving the effectiveness and superiority of the method.

[0047] In addition, the terms “upper”, “lower”, “inner”, “outer”, “front”, “back” are only used for description purposes, and cannot be understood as indicating or implying relative importance. Unless otherwise specified, the relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present application.

[0048] Of course, the above only describes specific embodiments of the present application, and does not limit the scope of the present application. Any equivalent changes or modifications made to the structure, features and principles described in the patent application of the present application shall be included in the patent application of the present application.

[0049] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that any person skilled in the art can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features, within the technical scope disclosed by the present application. The modifications, changes or replacements do not cause the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A depression screening method based on sleep EEG and multi-task joint fine-tuning, characterized in that, The method comprises the following steps: obtaining a first data set comprising a plurality of sleep segments and corresponding PSG signals of each sleep segment; performing first label annotation on each sleep segment and interval signals of the corresponding PSG signals according to the standard of five-class sleep stage, and grouping interval signals of the PSG signals and corresponding first labels to form an initial training set; training an initial model by using the initial training set to obtain a first model for dividing sleep stages in an input PSG signal graph, the first model comprising a segment encoder for extracting input data features, a sequence encoder for self-attention operation, and a sleep stage classifier for predicting results; obtaining a second data set comprising whole-night PSG signals of healthy patients and patients with depression; performing second label annotation on signal intervals in the whole-night PSG signals according to the standard of five-class sleep stage and depression categories, and grouping interval signals of the whole-night PSG signals and corresponding second labels to form a second training set; adjusting the structure of the first model and training the adjusted first model by using the second training set to obtain a second model for identifying depression categories.

2. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 1, characterized in that, The segment encoder is constructed in a double-branch convolutional neural network structure, comprising a first branch and a second branch; The first branch adopts a small-size convolution kernel to capture high-frequency components in the signals; The second branch adopts a large-size convolution kernel to capture low-frequency components in the signals.

3. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 2, characterized in that, The segment encoder further comprises a feature fusion operation, and the specific process of the feature fusion operation is as follows: The feature data output by the first branch and the second branch are fused into a high-dimensional feature vector every 30 seconds and input into the sequence encoder.

4. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 1, characterized in that, The sequence encoder is constructed in a transformer architecture.

5. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 1 or 4, characterized in that, The sequence encoder comprises a learnable embedding layer and a padding and masking mechanism; The learnable embedding layer is used to splice the channel identifier and the timing position code corresponding to each feature vector before inputting the feature vector into the sequence encoder; The padding and masking mechanism is used to perform sequence length uniform processing on the data input into the sequence encoder.

6. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 1, characterized in that, The adjustment of the first model is based on the output features of the sequence encoder, and two independent classifier heads are connected in parallel; The classifier head comprises a sleep stage classifier and a depression classifier.

7. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 1, characterized in that, When the second training set is used to train the adjusted first model, the weight parameters are updated in a way of minimizing a joint loss function according to a differentiated learning rate strategy and by using a back propagation algorithm.

8. The depression screening method based on sleep EEG and multi-task combined fine-tuning according to claim 7, characterized in that, The joint loss function comprises a sleep staging task loss and a depression classification task loss.

9. A depression screening system, comprising: A step for performing a depression screening method based on sleep electroencephalogram and multi-task joint fine-tuning according to any one of claims 1-8.