Depression detection algorithm based on emotion anchor guidance
Through the EAG framework, combining emotion anchor generator and depression representation generator in depression detection, the problem of insufficient utilization of emotion information in the existing methods is solved, achieving higher detection accuracy and stability, and is suitable for depression detection in multiple languages and data sets.
Patent Information
- Application Number
- CN202510843736.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-08-12
AI Technical Summary
The existing depression detection methods fail to make full use of emotional information in speech signals, resulting in insufficient detection accuracy and generalization ability, especially inadequate fusion of emotional models and depression models trained on different data sets.
A depression detection framework EAG based on speech signals is designed, including an emotion anchor generator and a depression representation generator. Emotional and depression characteristics are extracted on the same data set through joint training, and emotional anchor loss function is introduced to enhance feature distinction. NetVLAD, 1D-CNN, BiLSTM and other technologies are used for feature extraction and classification.
It significantly improves the accuracy and stability of depression detection, improves the detection accuracy and generalization ability of the model, and can be effectively applied in different languages and data sets.
Smart Images

Figure CN120472945A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of health information systems and relates to an automatic depression detection method, in particular to a depression detection method based on speech features and emotion features.
[0002] (Unlike papers, according to the strict requirements for patent document writing, the title of an invention should not contain innovative technical features; in addition, the diagnosis and treatment of diseases cannot be patented. Although we believe that this patented method is different from the diagnosis and treatment of common diseases, we still avoid suspicion in the name.) Background Art
[0003] Depression is a common mental health disorder characterized by persistent low mood, loss of interest, and lack of energy. According to the World Health Organization (WHO), approximately 4.4% of the global population suffers from depression, making it a major threat to global health, severely impacting physical health and imposing a significant social and economic burden. Although depression can be effectively alleviated through medication, psychological support, and other methods, the global diagnosis rate for depression remains low. This is primarily due to two factors: first, patients may conceal their true feelings due to social prejudice or stigma against depression, misleading clinicians; second, the accuracy of diagnosis relies heavily on the professional skills of clinicians. To address these issues, automated depression detection systems have emerged, designed to help individuals privately assess their mental state and assist clinicians in improving diagnostic accuracy.
[0004] Automatic depression detection methods can be broadly divided into two categories: those based on traditional machine learning and those based on deep learning techniques. Traditional methods assess depression based on a set of depression-related questions. The effectiveness of these methods relies on sufficient prior knowledge and typically involves the involvement of a professional physician. However, if the subject refuses to answer some questions, the feature set becomes incomplete, compromising the effectiveness of the diagnosis. This reliance on domain knowledge limits the widespread application of these traditional methods.
[0005] Deep learning methods assess individual depression by extracting universal features related to depression, independent of domain-specific knowledge, and thus improving the generalizability and effectiveness of diagnosis. Representative heuristic algorithms include: Acharya et al., in "Computer-Aided Diagnosis of Depression Using EEG Signals," proposed using electroencephalogram (EEG) signal analysis to assist in depression diagnosis. Results showed that EEG frequency features can effectively distinguish patients with depression, but the complexity of acquisition limits its widespread application. Pampouchidou et al., in "Designing a Framework for Assisting Depression Severity Assessment from Facial Image Analysis," designed a depression assessment framework based on facial image analysis. This framework uses facial expression features to detect depression severity, but facial expressions are easily influenced by external factors and are less effective in patients with severe depression, affecting the stability of the results. Huang et al., in "Investigation of Speech Landmark Patterns for Depression Detection," detected depression based on speech landmarks in speech signals, predicting depressive status through speech features. Although effective, this method is significantly affected by noise and pronunciation differences, and its generalization ability remains to be verified. While the aforementioned deep learning model approaches utilize simple speech signal sources, they overlook the valuable information implicit in emotional expressions, such as emotional features. Psychological research has shown that depression directly impacts an individual's emotional expression and perception. Therefore, emotional expression patterns can serve as indicators for depression. Experimental results further demonstrate that the extracted emotional features do indeed improve model performance in depression detection tasks. However, the emotional features employed by existing methods are directly generated from pre-trained models designed for common tasks. These features may not be adequate for depression detection and may introduce additional noise. Therefore, further research is needed to explore how to extract effective emotional information from speech signals for automatic depression detection. Summary of the Invention
[0006] This paper aims to design a speech-based automatic depression detection framework to predict the presence of depression from speech signals. By targeting the emotional expression patterns closely associated with depression, we propose an emotion anchor generator to characterize the effective emotional information in speech signals, significantly improving the accuracy of the detection model.
[0007] To achieve the above object, the solution of the present invention is:
[0008] The automatic detection algorithm for depression is characterized by comprising the following steps:
[0009] (1) Mel spectrum features are extracted from the audio of the interviewee, and the dimensions of the extracted Mel spectrum features are unified using NetVLAD as the input feature X;
[0010] (2) Use the sentiment anchor generator to calculate the sentiment anchor embedding Z on the input features obtained in step (1) ea ;
[0011] (3) Use the audio depression representation generator on the input features obtained in step (1) to calculate the high-dimensional representation embedding Z related to depression dep ;
[0012] (4) The emotional anchor embedding and the depression-related representation embedding are concatenated and input into the linear layer network to obtain the final binary classification label, i.e., whether depressed or not.
[0013] In step (1), extracting mel spectrum features from the audio of the visitor's interview includes the following steps:
[0014] (1-1) During the preprocessing process, the speech signal needs to be pre-emphasized, framed, and windowed in sequence to divide the speech signal into several different speech signal frames. For each speech signal frame obtained, the fast Fourier transform is applied to transform the speech signal from the time domain to the frequency domain. The mathematical formula of the fast Fourier transform is as follows:
[0015]
[0016] where s i (n) and s i (k) represents the i-th speech signal frame in the time domain and frequency domain respectively, and then the speech signal power spectrum is calculated using the equation Get the power spectrum P i (k), where k is the frequency index.
[0017] (1-2)P i (k) is input into the triangular Mel filter bank for Mel filtering, and the logarithm of each filter output is taken to obtain the Mel spectrum feature. The mathematical formula of the Mel filter bank is as follows:
[0018]
[0019] In the step (1), the extracted Mel spectrum features are dimensionally unified using NetVLAD, which includes the following steps:
[0020] (1-3) Mel spectrum feature x extracted in step (1-2) mel_spec ∈R T×MApply the convolution layer conv, where M is the number of Mel filter groups, to obtain the feature matrix S∈R after convolution processing T×N , where N is the number of features output by the convolutional layer.
[0021] (1-4) Use the K-Means method to cluster all T×N dimensional features of the feature matrix S in step (1-3) to obtain K cluster centers, which are recorded as {c1, c2, ..., c k}.
[0022] (1-5) Using the mathematical formula with VALD as the core, S∈R T×N The local features in are transformed into corresponding global features V∈R K×N , the mathematical formula is as follows:
[0023]
[0024] Among them, w k and b k is the parameter to be learned, x t ∈R 1×N represents the tth local feature, c k ∈R 1×N Represents the kth cluster center. The first term of the formula is actually a Soft-Max function, which means x t Is it c k The weight coefficient of , the value range is (0,1).
[0025] (1-6) The global description vector V∈R obtained in step (1-5) K×N Perform two-step regularization operations to obtain the unified input feature X∈R of the depression detection module K×N
[0026] The step (2) uses the sentiment anchor generator to calculate the sentiment anchor embedding Z on the input features obtained in step (1) ea The following steps are involved:
[0027] (2-1) The input feature X of step (1) is first input into a 1D-CNN network. The network has three different convolution kernels ω pos ,ω neu and ω neg , each convolution kernel will produce a channel output based on X, which means it will produce a three-channel output Z pos , Z neu , Z neg :
[0028] Z pos =X*ω pos
[0029] Z neu =X*ω neu
[0030] Z neg =X*ω neg
[0031] Where * represents the convolution operation, Z pos , Z neu , Z neg They represent the emotional features corresponding to positive emotions, neutral emotions, and negative emotions, respectively.
[0032] (2-2) The emotion anchor generator uses an attention block to calculate the weight of each emotion feature, thereby emphasizing the dominant emotion among the three categories of emotions and weakening the influence of other emotions. The weights α corresponding to the three categories of emotion features pos , α neu , α neg The calculation formula is as follows:
[0033] α pos =ρ(W pos Z pos +b pos )
[0034] α neu =ρ(W neu Z neu +b neu )
[0035] α neg =ρ(W neg Z neg +b neg )
[0036]
[0037] Among them, ρ represents the Sigmoid activation function, W pos , W neu and W neg represents the weight matrix of the fully connected layer, b pos , b neu and b neg Represents the bias vector of the fully connected layer.
[0038] (2-3) Based on the emotion feature weights obtained in step (2-2), the three types of emotion features and the corresponding weights are multiplied to obtain the attention-weighted emotion embedding Z att , the formula is as follows:
[0039]
[0040] in Finally, a fully connected layer with ReLU activation function is used to transform Z att Mapped to a feature space with a fixed dimension, the final emotion anchor Z is obtained ea :
[0041] Z ea =ReLU(WZ att +b)
[0042] ReLU(z)=max(z,0)
[0043] Among them, W represents the weight matrix of the fully connected layer, and b represents the bias vector of the fully connected layer.
[0044] The step (3) uses the audio depression representation generator to calculate the high-dimensional representation embedding Z related to depression on the input features obtained in step (1) dep The following steps are involved:
[0045] (3-1) The input feature X of step (1) is first input into a 1D-CNN layer with a convolution kernel size of 3 to capture the short-term feature X st , then, in X st Apply batch normalization to generate new regularized short-term features X that follow the standard normal distribution. bn , the formula is as follows:
[0046] X st =CNN(X)
[0047] X bn =BN (γ,β) (X st )
[0048] Here, β and β are learnable parameter vectors determined by the mean and mean square error of the input batch data.
[0049] (3-2) Based on the short-term feature X generated in step (3-1) bn , apply the ReLU activation function and input the result into a maximum pooling layer and a Dropout layer, the maximum pooling layer is responsible for capturing the mid-term features X mid And reduce the resolution of the feature map, the formula is expressed as follows:
[0050]
[0051] (3-3) Based on the mid-term feature X captured in step (3-2) mid A two-layer stacked BiLSTM network is used to capture the long-term dependencies of features and generate depression-related representation embeddings, namely:
[0052] Zdep =BiLSTM(X mid )
[0053] The step (4) embeds the emotional anchor into Z ea and depression-related representation embedding Z dep After connection, inputting the linear layer network for binary classification includes the following steps:
[0054] (4-1) Embedding the emotional anchor into Z ea and depression-related representation embedding Z dep Directly splice them together to obtain an embedding vector [Z dep |Z ea ].
[0055] (4-2) Construct a prediction layer consisting of a fully connected layer with a Sigmoid function as the activation function, based on the embedding vector [Z dep |Z ea Output the probability of depression presence and the possibility of depression absence Where N is the number of samples in a batch of data, the above process can be expressed as
[0056] [P dp ,P da ]=ρ(W′[Z dep |Z ea ]+b′)
[0057] Among them, W ′ represents the weight matrix of the fully connected layer, b ′ Represents the bias vector of the fully connected layer.
[0058] (4-3) Predicting a binary label representing whether the sample is a depression sample based on the possibility predicted in step (4-3) if is 1, which means that the i-th sample is a depression sample. If If it is 0, it means that the i-th sample is a healthy sample. The formula is as follows:
[0059]
[0060] (4-4) Calculate the loss of the predicted result of the characterization sample and update the network weight. The loss consists of two parts:
[0061] (a) Classification loss to evaluate sample prediction accuracy
[0062] (b) Emotion anchor loss for constrained emotion anchor representation generation
[0063] The model loss function is:
[0064]
[0065] in, is the classification loss for evaluating the accuracy of depression detection, It is the emotional anchor loss used to constrain the similarity of three different emotional features in high-dimensional space features. λ is a hyperparameter determined by experience and is used to adjust The proportion of the network training phase.
[0066] (4-4-1) Classification loss classifies the depression detection problem into a binary classification problem and uses binary cross entropy loss to define The mathematical formula is as follows:
[0067]
[0068] in, represents the true label of the sample.
[0069] (4-4-2) Emotional Anchor Loss is used to constrain the emotion feature Z in step (2-1) pos , Z neu and Z neg The distribution of features in high-dimensional space is defined as follows:
[0070]
[0071] in represents the Frobenuis norm, (·,·> represents the inner product of the vector, and minimizing the loss can ensure and Separable in high-dimensional feature space.
[0072] Due to the adoption of the above solution, the beneficial effects of the present invention are:
[0073] A novel depression detection framework, the EAG framework, is proposed. This framework comprises an emotional anchor generator with an attention mechanism and a depression representation generator. These modules can simultaneously extract emotional information and depression features from audio signals, enabling accurate estimation of depressive states. Both modules are jointly trained on the same depression dataset to ensure feature correlation, improving detection accuracy and generalization. Furthermore, the depression representation generator is flexible and can be replaced with other audio feature-based depression estimation methods. Therefore, the EAG framework is a universal depression detection framework that combines emotional anchor embedding with existing depression detection methods.
[0074] The detailed analysis is as follows: First, some depression detection methods often ignore the correlation between emotional information and depression features, or train emotion models and depression models separately on different datasets, resulting in insufficient feature fusion. The EAG framework in this paper jointly trains an emotion anchor generator and a depression representation generator on the same depression dataset, enabling the emotional and depression features to mutually reinforce each other and improve the model's detection performance. The emotion anchor is an effective depression-related emotion embedding extracted from the audio signal and contains a combination of three types of emotional features: positive, neutral, and negative, concisely reflecting the emotional tendency of the signal. Second, this paper proposes a new loss function, the emotion anchor loss, as the optimization objective for the emotion anchor generator. This loss function attempts to maximize the directional differences between the three emotional features in the emotion anchor, preventing them from degenerating into similar directions, thereby ensuring the effectiveness of the emotion feature representation and emotional distinguishability. This design enhances the model's sensitivity to different emotional states, facilitating more accurate detection of depressive symptoms. Experiments demonstrate that this invention, through its innovative framework design and loss function, improves the accuracy and stability of depression detection, demonstrating strong generalization and practical application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is a schematic diagram of the workflow of the depression detection algorithm based on speech features of the present invention. DETAILED DESCRIPTION
[0076] In response to the shortcomings of current automatic depression detection algorithms that do not fully consider the emotional expression information of visitors, the present invention proposes a novel depression detection framework - the EAG framework. Through the synergy of the emotional anchor generator and the depression representation generator, this framework can extract emotional information and depression features from audio signals and predict whether the visitor suffers from depression. In addition, the EAG framework is flexible. The depression representation generator can be replaced with other depression detection methods based on audio features, which is applicable to a variety of detection scenarios. By jointly training the two modules on the same depression dataset, the correlation of features and detection accuracy are ensured, providing an efficient, economical and universal auxiliary depression assessment tool, which helps to improve the accuracy of clinical and self-assessment.
[0077] The specific work process is as follows Figure 1 As shown:
[0078] (1) Mel spectrum features are extracted from the audio of the interview with the visitor, and the dimensions of the extracted Mel spectrum features are unified using NetVLAD as the input feature X:
[0079] (1-1) During the preprocessing process, the speech signal needs to be pre-emphasized, framed, and windowed in sequence to divide the speech signal into several different speech signal frames. For each speech signal frame obtained, the fast Fourier transform is applied to transform the speech signal from the time domain to the frequency domain. The mathematical formula of the fast Fourier transform is as follows:
[0080]
[0081] where s i (n) and s i (k) represents the i-th speech signal frame in the time domain and frequency domain respectively, and then the speech signal power spectrum is calculated using the equation Get the power spectrum P i (k), where k is the frequency index.
[0082] (1-2)P i (k) Input to the triangular Mel filter bank for Mel filtering, and take the logarithm of each filter output to obtain the Mel spectrum feature x mel_spec ∈R T×M The mathematical formula of the Mel filter bank is as follows:
[0083]
[0084] (1-3) Extracted Mel spectrum feature x mel_spec ∈R T×M Apply the convolution layer conv, where M is the number of Mel filter groups, to obtain the feature matrix S∈R after convolution processing T×N , where N is the number of features output by the convolutional layer.
[0085] (1-4) Use the K-Means method to cluster all T×N dimensional features of the feature matrix S in step (1-3) to obtain K cluster centers, which are recorded as {c1, c2, ..., c k}.
[0086] (1-5) Using the mathematical formula with VALD as the core, S∈R T×N The local features in are transformed into corresponding global features V∈R K×N , the mathematical formula is as follows:
[0087]
[0088] Among them, w k and b k is the parameter to be learned, x t ∈R 1×N represents the tth local feature, c k ∈R 1×NRepresents the kth cluster center. The first term of the formula is actually a Soft-Max function, which means x t Is it c k The weight coefficient of , the value range is (0,1).
[0089] (1-6) The global description vector V∈R obtained in step (1-5) K×N Perform two-step regularization operations to obtain the unified input feature X∈R of the depression detection module K×N , where K is set to 256 in the specific experiment.
[0090] (2) Use the sentiment anchor generator to calculate the sentiment anchor embedding Z on the input feature X obtained in step (1) ea :
[0091] (2-1) The input feature X is first input into a 1D-CNN network. The network has three different convolution kernels ω pos ,ω neu and ω neg , the convolution kernel size is 8, the step size is 1, and Relu is used as the activation function. Each convolution kernel will produce a channel output based on X, which means it will produce three channels of output Z pos , Z neu and Z neg . They correspond to the emotional characteristics of positive emotions, neutral emotions and negative emotions respectively;
[0092] (2-2) The emotion anchor generator uses an attention block to calculate the weight α of each emotion feature pos , α neu and α neg The attention block consists of three fully connected layers (Linear×3) to calculate the weight of each emotion feature. First, after three layers of linear transformation, the output feature dimension is 1, and the Sigmoid activation function is used for nonlinear transformation to ensure that the weight value is between 0 and 1. This weight is used to emphasize the dominant emotion among the three categories of emotions while weakening the influence of other emotions. Then, the output feature is projected into a 128-dimensional feature space through a linear layer, and finally the Sigmoid activation function is used again to obtain the final emotion anchor embedding Z ea ;
[0093] (3) Use the audio depression representation generator on the input features obtained in step (1) to calculate the high-dimensional representation embedding Z related to depression dep :
[0094] (3-1) The input feature X is first input into a 1D-CNN layer with a convolution kernel size of 3 to capture the short-term feature X st , then, in Xst Apply batch normalization to generate new regularized short-term features X that follow the standard normal distribution. bn , the formula is as follows:
[0095] X st =CNN(X)
[0096] X bn =BN (γ,β) (X st )
[0097] Among them, γ and β are learnable parameter vectors determined by the mean and mean square error of the input batch data;
[0098] (3-2) For the short-term feature X bn Apply the ReLU activation function and input the result into a maximum pooling layer and a Dropout layer. The maximum pooling layer is responsible for capturing the mid-term features X mid And reduce the resolution of the feature map, the formula is expressed as follows:
[0099]
[0100] (3-3) Based on the mid-term feature X captured in step (3-2) mid A two-layer stacked BiLSTM network is used to capture the long-term feature time dependency, with the number of hidden units in each layer being 128. Finally, the depression representation embedding Z is generated dep .
[0101] (4) Embed the emotional anchor into Z ea and depression-related representation embedding Z dep After connection, input linear layer network for binary classification:
[0102] (4-1) Embedding the emotional anchor into Z ea and depression-related representation embedding Z dep Directly splice them together to obtain an embedding vector [Z dep |Z ea ];
[0103] (4-2) Construct a prediction layer consisting of a fully connected layer with a Sigmoid function as the activation function to obtain the estimated probability of the presence or absence of depression, and predict a binary label representing whether the sample is a depression sample based on the probability;
[0104] (4-3) Calculate the loss and update the network weights. The loss consists of two parts:
[0105]
[0106] in, is the classification loss for evaluating the accuracy of depression detection, It is the emotional anchor loss used to constrain the similarity of three different emotional features in high-dimensional space features. λ is a hyperparameter determined by experience and is set to 0.01 in the specific implementation to adjust The proportion of network training phase. In addition, in the process of optimizing network weights, the optimizer used is Adam, and the learning rate is 0.001.
[0107] (4-3-1) Classification loss classifies the depression detection problem into a binary classification problem and uses binary cross entropy loss to define The mathematical formula is as follows:
[0108]
[0109] in, represents the true label of the sample.
[0110] (4-3-2) Emotional Anchor Loss is used to constrain the sentiment feature Z pos , Z neu and Z neg The distribution of features in high-dimensional space is defined as follows:
[0111]
[0112] in represents the Frobenuis norm, and <·,·> represents the inner product of vectors.
[0113] The following further illustrates the depression detection framework based on emotion anchor guidance shown in the present invention in combination with specific experimental data.
[0114] Experimental conditions and scoring criteria:
[0115] Dataset Introduction: This paper uses two publicly available depression datasets. The first dataset (DAIC-WOZ) is a foreign-language depression detection dataset, comprising clinical psychological interview data from 189 volunteers in various formats, including audio, video, and text. The second dataset (EATD-Corpus) is a Chinese-language depression detection dataset, comprising speech information from 162 volunteers, including 30 individuals with depression and 132 healthy individuals.
[0116] In this paper, the accuracy of depression detection is a key indicator. In order to evaluate the performance of the proposed EAG framework on the binary classification task of depression detection, this paper uses precision (PRE), recall (REC), and F1 score as evaluation indicators of the model. The calculation formulas of the above three indicators are as follows:
[0117]
[0118] Among them, TP represents the number of samples predicted to be depressed and actually are depressed, FP represents the number of samples predicted to be depressed but actually are healthy, TN represents the number of samples predicted to be healthy and actually are healthy, and FN represents the number of samples predicted to be healthy but actually are depressed.
[0119] Experimental results:
[0120] The experimental results in Table 1 demonstrate the performance of the proposed emotion anchor-guided depression detection framework (EAG) against five comparison models on the DAIC-WOZ dataset. Deep learning-based models such as DepAudioNet, Multi-modal LSTM, and CNN generally outperform traditional machine learning methods such as SVM and Decision Tree. Specifically, the Multi-modal LSTM achieves an F1 score of 0.59, slightly higher than the CNN's 0.56, while the SVM and Decision Tree achieve F1 scores of 0.41 and 0.52, respectively, significantly lower. This demonstrates that deep neural network-based models are better able to capture depression-related information in audio. In contrast, our proposed EAG framework performs exceptionally well, achieving an F1 score of 0.65. It also performs well on PRE and REC, reaching 0.60 and 0.72, respectively. Among all the compared methods, EAG achieves the best overall performance, particularly on Recall, demonstrating its superior stability and robustness in depression detection. Especially in the depression detection task, high Recall is particularly important because it reflects the sensitivity of the model in detecting patients with depression.
[0121] In addition, Table 1 also shows the performance changes of the EAG framework after removing different modules, further verifying the importance of each module in the EAG framework. Among them, Wo.EA is the removal of the emotion anchor module, and Wo.Attention is the removal of the attention mechanism in the emotion anchor module. The first is to remove the emotion anchor constraint from the loss function. Ablation experiment results show that the emotion anchor module plays a key role in the EAG framework. After removing this module, the F1 score of the model dropped significantly from 0.65 to 0.49, demonstrating its effectiveness in emotion feature extraction. After removing the attention mechanism and emotion anchor-related loss functions, the model performance also declined. Although the magnitude is relatively small, it still shows that these components make an important contribution to the overall performance of the model. The emotion anchor-related loss function enhances the discriminability of emotion features by constraining the directional differences of emotion features. Overall, the synergistic effect of these modules ensures that the EAG framework can more accurately capture and distinguish depression-related emotional states, improving the accuracy and robustness of depression detection.
[0122]
[0123]
[0124] Table 1. Experimental results of the proposed method and other methods on the DAIC-WOZ dataset
[0125] The experimental results in Table 2 demonstrate the performance of the proposed Emotion Anchor-Guided Depression Detection Framework (EAG) against five comparison models on the EATD-Corpus dataset. Compared to the English dataset, DAIC-WOZ, the EAG model also demonstrated excellent performance on the Chinese dataset, achieving an F1 score of 0.65, Precision and Recall of 0.68 and 0.65, respectively, maintaining its leading position among the comparison methods. This demonstrates that the EAG framework is not only effective on English datasets but also exhibits good generalization capabilities on Chinese datasets, successfully adapting to depression detection tasks across different languages and data types.
[0126]
[0127] Table 2. Experimental results of the proposed method and other methods on the EATD-Corpus dataset
[0128] It should be noted that although the present invention is related to depression, it is essentially an information processing method. The "detection" mentioned in the text is different from "diagnosis" and is just an expression that is easy for technical personnel in this field to understand.
[0129] The above description of the embodiments is intended to facilitate understanding and use of the present invention by those skilled in the art. It will be apparent that those skilled in the art can readily make various modifications to these embodiments and apply the general principles described herein to other embodiments without requiring inventive effort. Therefore, the present invention is not limited to the above-described embodiments. Improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the scope of protection of the present invention.
Claims
1. A depression detection algorithm based on emotion anchor guidance, characterized by: The following steps are involved: (1) Extract mel-spectrogram features from the audio of the interviewee and use NetVLAD to unify the dimensions of the extracted mel-spectrogram features as input features X; (2) Use the sentiment anchor generator to calculate the sentiment anchor embedding Z on the input features ea ; (3) Use the audio depression representation generator on the input features to calculate the high-dimensional representation embedding Z related to depression dep ; (4) The emotional anchor embedding and the depression-related representation embedding are concatenated and input into the linear layer network to obtain the final binary classification label, i.e., whether depressed or not.
2. The depression detection algorithm based on emotion anchor guidance according to claim 1 is characterized by: In step (1), extracting Mel spectrum features from the audio of the interview with the visitor includes the following steps: (1-1) The speech signal is pre-emphasized, framed, and windowed in sequence to divide the speech signal into several different speech signal frames. Fast Fourier transform is applied to each of the obtained speech signal frames to transform the speech signal from the time domain to the frequency domain. The mathematical formula of fast Fourier transform is as follows: where s i (n) and s i (k) represents the i-th speech signal frame in the time domain and frequency domain respectively, and then the speech signal power spectrum is calculated using the equation Get the power spectrum P i (k), where k is the frequency index; (1-2)P i (k) Input to the triangular Mel filter bank for Mel filtering, and take the logarithm of each filter output to obtain the Mel spectrum feature; the mathematical formula of the Mel filter bank is as follows:
3. The depression detection algorithm based on emotion anchor guidance according to claim 1 is characterized by: In the step (1), the extracted Mel spectrum features are dimensionally unified using NetVLAD, which includes the following steps: (1-3) Extracted Mel spectrum feature x mel_spec ∈R T×M Apply the convolution layer conv, where M is the number of Mel filter groups, to obtain the feature matrix S∈R after convolution processing T×N , where N is the number of features output by the convolutional layer; (1-4) Use the K-Means method to cluster all T×N dimensional features of the feature matrix S in step (1-3) to obtain K cluster centers, which are recorded as {c1, c2, ..., c k }; (1-5) Using the mathematical formula with VALD as the core, S∈R T×N The local features in are transformed into corresponding global features V∈R K×N , the mathematical formula is as follows: Among them, w k and b k is the parameter to be learned, x t ∈R 1×N represents the tth local feature, c k ∈R 1×N Represents the kth cluster center. The first term of the formula is actually a Soft-Max function, which means x t Is it c k The weight coefficient of is in the range of (0,1); (1-6) The global description vector V∈R obtained in step (1-5) K×N Perform two-step regularization operations to obtain the unified input feature X∈R of the depression detection module K×N .
4. The depression detection algorithm based on emotion anchor guidance according to claim 1 is characterized in that: In step (2), the sentiment anchor generator is used to calculate the sentiment anchor embedding Z on the input features ea , which includes the following steps: (2-1) The input feature X of step (1) is first input into a 1D-CNN network, which has three different convolution kernels ω pos ,ω neu and ω neg , each convolution kernel will produce a channel output based on X, which means it will produce a three-channel output Z pos , Z neu , Z neg : Z pos =X*ω pos Z neu =X*ω neu Z neg =X*ω neg Where * represents the convolution operation, Z pos , Z neu , Z neg represent the emotional features corresponding to positive emotions, neutral emotions, and negative emotions, respectively; ( 2-2) The emotion anchor generator uses an attention block to calculate the weight of each emotion feature, thereby emphasizing the dominant emotion among the three categories of emotions and weakening the influence of other emotions; the weights α corresponding to the three categories of emotion features pos , α neu , α neg The calculation formula is as follows: a pos =ρ(W pos Z pos +b pos ) a neu =ρ(W neu Z neu +b neu ) a neg =ρ(W neg Z neg +b neg ) Among them, ρ represents the Sigmoid activation function, W pos , W neu and W neg represents the weight matrix of the fully connected layer, b pos , b neu and b neg Represents the bias vector of the fully connected layer; (2-3) Based on the emotion feature weights obtained in step (2-2), the three types of emotion features and the corresponding weights are multiplied to obtain the attention-weighted emotion embedding Z att , the formula is as follows: in Represents the dot product operation; Finally, a fully connected layer with a ReLU activation function is used to transform Z att Mapped to a feature space with a fixed dimension, the final emotion anchor Z is obtained ea : WITH ea =ReLU(WZ att +b) ReLU(z)=max(z,0) Among them, W represents the weight matrix of the fully connected layer, and b represents the bias vector of the fully connected layer.
5. The depression detection algorithm based on emotion anchor guidance according to claim 1 is characterized in that: In step (3), the audio depression representation generator is used on the input features to calculate the high-dimensional representation embedding Z related to depression dep , which includes the following steps: (3-1) The input feature X of step (1) is first input into a 1D-CNN layer with a convolution kernel size of 3 to capture the short-term feature X st , then, in X st Apply batch normalization to generate new regularized short-term features X that follow the standard normal distribution. bn , the formula is as follows: X st =CNN(X) X bn =BN (γ,β) (X st ) Among them, γ and β are learnable parameter vectors determined by the mean and mean square error of the input batch data; (3-2) Based on the short-term feature X generated in step (3-1) bn , apply the ReLU activation function and input the result into a maximum pooling layer and a Dropout layer, the maximum pooling layer is responsible for capturing the mid-term features X mid And reduce the resolution of the feature map, the formula is expressed as follows: (3-3) Based on the mid-term feature X captured in step (3-2) mid A two-layer stacked BiLSTM network is used to capture the long-term dependencies of features and generate depression-related representation embeddings, namely: Z dep =BiLSTM(x mid )。 6. The depression detection algorithm based on emotion anchor guidance according to claim 1 is characterized by: In step (4), the emotional anchor embedding and the depression-related representation embedding are concatenated and then input into the linear layer network to obtain the final binary classification label, which includes the following steps: (4-1) Embedding the emotional anchor into Z ea and depression-related representation embedding Z dep Directly splice them together to obtain an embedding vector [Z dep |Z ea ]; (4-2) Construct a prediction layer with a fully connected layer using the Sigmoid function as the activation function (4-3) Predicting a binary label representing whether the sample is a depression sample based on the possibility predicted in step (4-2) (4-4) Calculate the loss of the predicted result of the characterization sample and update the network weight. The loss consists of two parts: (a) Classification loss to evaluate sample prediction accuracy; (b) Emotion anchor loss for constrained emotion anchor representation generation.
7. The depression detection algorithm based on emotion anchor guidance according to claim 6 is characterized in that: In step (4-2), the prediction layer can be expressed as: [P dp ,P da ]=ρ(W′[Z dep |Z ea ]+b′) in and represent the possibility of depression existing and not existing, W ′ represents the weight matrix of the fully connected layer, b ′ Represents the bias vector of the fully connected layer.
8. The depression detection algorithm based on emotion anchor guidance according to claim 6, characterized in that: In step (4-3), the formula for predicting the binary label representing whether the sample is a depression sample based on the predicted probability is as follows: if is 1, which means that the i-th sample is a depression sample. If If it is 0, it means that the i-th sample is a healthy sample.
9. The depression detection algorithm based on emotion anchor guidance according to claim 6, characterized in that: In the step (4-4), the loss function used by the network model is: in, is the classification loss for evaluating the accuracy of depression detection, It is the emotional anchor loss used to constrain the similarity of three different emotional features in high-dimensional space features. λ is a hyperparameter determined by experience and is used to adjust The proportion of the network training phase; The classification loss classifies the depression detection problem into a binary classification problem and uses binary cross entropy loss to define The mathematical formula is as follows: in, represents the true label of the sample.
10. The emotional anchor loss according to claim 8, characterized in that: Emotional Anchor Loss is used to constrain the emotion feature Z in step (2-1) of claim 4 pos , Z neu and Z neg The distribution of features in high-dimensional space is defined as follows: in represents the Frobenuis norm, (·,·> represents the inner product of the vector, and minimizing the loss can ensure and Separable in high-dimensional feature space.