Theme modeling-based depression dialogue text recognition system

Through a depression dialogue text recognition system based on topic modeling, combining the fine-tuned Sentence-Bert model and the DBSCAN algorithm for topic clustering, extracting emotional characteristics and using classification models, the problem of time-consuming and laborious and low recognition accuracy in the existing technology is solved, and more efficient depression dialogue text recognition is achieved.

CN119811628AActive Publication Date: 2025-04-11FUDAN UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411747535.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-11
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The existing depression screening methods rely on questionnaires and interviews, are time-consuming and labor-intensive and are greatly affected by subjective factors, and a single emotion analysis is not enough to fully reflect the complex theme structure in the dialogue between patients with depression.

Method used

A system of text recognition for depression dialogue based on topic modeling is proposed, including text data preprocessing, question text theme mining, answer text emotional feature extraction and depression dialogue text recognition module. Topic clustering is performed by fine-tuning the Sentence-Bert model and DBSCAN algorithm, emotional features are extracted in combination with the VaderSentiment tool, and feature filtering and classification are performed using XGBoost and logistic regression models.

Benefits of technology

It improves the recognition accuracy of the depression dialogue text and provides more efficient auxiliary means for early detection of depression, with higher automation and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119811628A_ABST
    Figure CN119811628A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of public health, and particularly relates to a depression dialogue text recognition system based on topic modeling. The system comprises a dialogue text data preprocessing module for generating a high-quality dialogue data set; the question part text topic mining module is used for extracting question sentence embedding representation by finely adjusting a pre-trained S-B model for a question text; a DBSCAN algorithm is used for clustering the problem sentence embedded vectors, and parameters of the DBSCAN are optimized; the answer text sentiment feature extraction module is used for extracting sentiment features from the answer part text by adopting a sentiment analysis tool and constructing a comprehensive feature matrix in combination with gender features; and the depression dialogue text recognition module is used for screening the feature matrix by using an XGBoost model, performing classification through a logistic regression model and recognizing dialogue texts of depression patients. The invention provides a more efficient auxiliary means for early detection of depression; and the automation degree and the accuracy are higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of public health, and in particular relates to a depression conversation text recognition system based on topic modeling. Background Art

[0002] In recent years, depression, as a common mental illness, has become a global public health problem. In order to identify and intervene in depression as early as possible, it is crucial to accurately detect the conversational characteristics of patients with depression. Traditional depression screening methods mainly rely on questionnaires and interviews, which are time-consuming and labor-intensive and are greatly affected by subjective factors. Studies have shown that a speaker's speech, tone, vocabulary selection, etc. may reflect his or her inner mental health status. The analysis of conversation text can assist in the diagnosis of depression. With the development of natural language processing technology, text-based depression detection methods have received widespread attention.

[0003] Current research focuses on sentiment analysis and classification models. Although these methods can identify negative emotions in depression conversations to a certain extent, they often ignore the underlying complex topic structure in the text. Conversations of patients with depression often involve multiple levels of psychological content, including emotional changes, inner pain, and cognitive responses to life events, which are crucial for accurately identifying depression. However, single sentiment analysis is often not enough to fully reflect this complex information, resulting in low model recognition accuracy.

[0004] Topic modeling technology provides an effective solution. It can automatically mine hidden topics in text, identify important psychological topics in depression conversations, and enrich conversation feature representation. In recent years, this type of technology has been applied to fields such as social media text analysis and sentiment prediction, and has shown good results. However, in terms of depression detection, the application of topic modeling is still in its infancy, and there are few related studies. Therefore, a depression conversation detection method that combines topic modeling technology with multi-dimensional features such as sentiment analysis may provide new ideas for early screening and intervention of depression. Summary of the invention

[0005] The present invention aims to propose a depression dialogue text recognition system based on topic modeling to improve the accuracy of identifying depression dialogue texts, wherein the dialogue text includes the text of the question part and the answer part.

[0006] The depression dialogue text recognition system based on topic modeling proposed in the present invention includes the following four modules: (i) a text data preprocessing module, (ii) a question text topic mining module, (iii) an answer text sentiment feature extraction module, and (iv) a depression dialogue text recognition module; wherein:

[0007] (1) The dialogue text data preprocessing module includes dialogue text data cleaning and dialogue text data standardization processing to generate a high-quality dialogue data set:

[0008] Conversation text data cleaning, that is, removing stop words, punctuation marks, modal particles and other noise information.

[0009] The conversation text data is standardized, all conversation texts are unified into lowercase, character encoding is standardized, and the consistency of input data is ensured.

[0010] (ii) the question text topic mining module comprises: extracting the embedding representation of the question sentence by fine-tuning the pre-trained Sentence-Bert model [1] (referred to as the SB model) for the question text; clustering the embedding vectors of the question sentence using the DBSCAN algorithm [2], automatically adjusting the parameters of DBSCAN, and determining the optimal parameters according to the density and distribution of the data set; wherein:

[0011] The method of extracting the embedding representation of the problem sentence by fine-tuning the pre-trained Sentence-Bert model is to use the feature data in the field of depression to fine-tune the Sentence-Bert model, adjust the weight parameters of the model, and better adapt to the language features related to depression, so that it can generate more accurate sentence embedding representation when processing depression dialogues;

[0012] Use the fine-tuned Sentence-Bert model to extract fine-tuned embedding representations of the question text, and use these embedding representations as input features for the subsequent clustering algorithm used to extract topic categories;

[0013] The method uses the DBSCAN algorithm to cluster the embedding vectors of the problem sentences. Specifically, the DBSCAN algorithm is used for clustering, and parameters such as the neighborhood radius (eps) and the minimum number of sample points (min_samples) are adjusted to adapt to changes in the density of the data. By evaluating the density of the embedding vectors, topic clusters are automatically identified to obtain topic distribution characteristics so as to adapt to the distribution density of different data sets, avoid interference from artificially set thresholds, ensure optimal clustering effects, and accurately identify potential problems related to depression.

[0014] (iii) the answer text sentiment feature extraction module comprises: extracting sentiment features from the answer text using the VaderSentiment sentiment analysis tool [3] according to the themes generated by clustering, and constructing a comprehensive feature matrix in combination with gender features; wherein:

[0015] The VaderSentiment sentiment analysis tool is used to extract sentiment features from the answer text, the sentiment features include positive, negative, and neutral sentiment, and generate a sentiment score for each answer, including positive, negative, neutral sentiment and a composite score;

[0016] The construction of the comprehensive feature matrix is ​​to combine the topic distribution features generated by the previous clustering, integrate the sentiment score and gender information, and construct a comprehensive feature matrix to fully describe the patient's conversation characteristics. The comprehensive feature matrix can provide a multi-dimensional perspective, not only considering the sentiment tendency, but also combining the conversation topic and the individual's gender information, thereby improving the accuracy and comprehensiveness of sentiment analysis.

[0017] (iv) The depression dialogue text recognition module includes using the XGBoost model [4] to screen the feature matrix, classifying through a logistic regression model, and identifying the dialogue text of the depression patient; specifically:

[0018] Use the XGBoost model to screen the constructed comprehensive feature matrix, select the most representative and relevant features, and improve classification performance;

[0019] The filtered features are input into the logistic regression model [5], and the filtered features are classified using linear discriminant ability. The classification accuracy of the model is further improved by optimizing the weights, and a model for identifying conversation texts of patients with depression is obtained.

[0020] Compared with the prior art, the present invention has the following advantages:

[0021] The present invention provides a more efficient auxiliary means for early detection of depression through the combination of embedded representation, clustering and classification models. Compared with traditional doctors' subjective judgment or simple keyword analysis methods, the system has a higher degree of automation and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the system of the present invention. DETAILED DESCRIPTION

[0023] Taking the Distress Analysis Interview Corpus (DAIC) [6] as an example, the database is an English conversation text library, which contains 186 test subject data, including 129 normal subjects and 57 depression patients. The specific implementation of the present invention includes the following steps:

[0024] Step 1: Text data preprocessing: Export the conversation texts in the DAIC database and convert them all to lowercase English, removing modal particles such as "uhh", "yeah", "mhm", and stop words such as "are", "ah", and "always".

[0025] Step 2: Extract sentence embeddings and cluster topics for the question part. Use the cleaned depression conversation text to fine-tune the pre-trained Sentence-Bert model to obtain the embedding representation of the question sentences in the conversation. Then, use the DBSCAN algorithm to cluster the sentence embedding vectors, and adaptively adjust the two parameters of DBSCAN, namely eps and min_samples. Among them, calculate the distance matrix and draw the k-distance graph, and take the eps value at the inflection point; adjust the min_samples value according to the clustering results and the performance indicators on the validation set to ensure that the clustering effect is consistent under different data densities and distributions, so as to extract the topic features of the text.

[0026] Step 3, emotional feature extraction and feature matrix construction of the answer part. Based on the topics generated by clustering in step 2, emotional features are extracted from the answer part of the conversation text. Specifically, the VaderSentiment sentiment analysis tool is used to process the answer text to extract positive, negative, neutral and other emotional scores. Combined with the patient's gender information, a gender feature vector is created and expressed in binary form to construct a comprehensive feature matrix for further training of the classification model.

[0027] Step 4, feature screening and classification model. The constructed feature matrix is ​​screened by the XGBoost model to select features that are highly correlated with depression prediction. Then, the screened features are input into the logistic regression model for classification training, and the samples are randomly divided into training set, validation set and test set in a ratio of 8:1:1. During the training process, the model parameters are adjusted to optimize the performance, including learning rate, regularization parameters, etc. The classification effect of the model is tested on the validation set to ensure its stability and generalization ability.

[0028] After the model training was completed, it was tested on the test set to obtain the recognition performance of this method for the text data of the conversation with depression, and compared with the three existing methods LIWC+BERT[7], W2V+TCN[8], and Trm semantic model[9]. In the classification, 0 represents normal and 1 represents depression. Accuracy, sensitivity, and specificity are used as evaluation indicators. The results are shown in Table 1. The results show that this method can effectively recognize the text of the conversation with depression with a high accuracy.

[0029] In addition, the method of the present invention is applicable to text databases in different languages. After the preprocessing step, the processing methods for different languages ​​are the same.

[0030] Table 1 Performance Comparison of Identifying Depression Dialogue Texts on the DAIC Database

[0031]

[0032] References

[0033] [1]Reimers, N., & Gurevych, I. (2019). Sentence-BERT: sentence embeddings using siamese BERT-networks. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing.

[0034] [2]Ester, M., Kriegel, H.-P., Sander, J., & Xu, X. (1996). A density-based algorithm for discovering clusters in large spatial databases with noise. Proceedings of the 2nd International Conference on Knowledge Discovery and Data Mining (KDD-96), 226-231. [3]Hutto, C. J., & Gilbert, E. (2014). VADER: A parsimonious rule-based model for sentiment analysis of social media text. Proceedings of the 8th International Conference on Weblogs and Social Media, ICWSM-14, 216-225.

[0035] [4]Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD'16), 785-794.

[0036] [5]Hosmer Jr DW,Lemeshow S.,Sturdivant RX(2013).Applied LogisticRegression[M].John Wiley&Sons,2013.

[0037] [6]Gratch,J.,Artstein,R.,Lucas,GM,et al(2014).The distress analysisinterview corpus of human and computer interviews.Proceedings of the NinthInternational Conference on Language Resources and Evaluation(LREC),3123-3128. [7] Xiao Jing (2022). Research on recognition of depression state based on acoustic and semantic features in the consultation environment[D]. Southeast University, 2022. [8]Haque A.,Guo M.,Miner AS,et al.(2018).Measuring depressionsymptom severity from spoken language and 3D facial expressions[J].arXivpreprint arXiv:1811.08592,2018.

[0038] [9]Lam G.,Dongyan H.,Lin W.(2019).Context-aware deep learning for multi-modal depression detection[C].Proceedings of the 2019IEEE International Conference on Acoustics,Speech and Signal Processing(ICASSP).3946-3950.

Claims

1. A depression dialogue text recognition system based on topic modeling, characterized in that: It includes the following four modules: text data preprocessing module, question text topic mining module, answer text sentiment feature extraction module, depression dialogue text recognition module; among them: The dialogue text data preprocessing module includes dialogue text data cleaning and dialogue text data standardization processing to generate a high-quality dialogue data set; The question part text topic mining module includes: extracting the embedding representation of the question sentence by fine-tuning the pre-trained Sentence-Bert model for the question part text; clustering the embedding vectors of the question sentence using the DBSCAN algorithm, automatically adjusting the parameters of DBSCAN, and determining the optimal parameters according to the density and distribution of the data set; The answer text sentiment feature extraction module includes: according to the topics generated by clustering, using the VaderSentiment sentiment analysis tool to extract sentiment features from the answer part text, and combining gender features to construct a comprehensive feature matrix; The depression dialogue text recognition module includes using an XGBoost model to screen a feature matrix, performing classification through a logistic regression model, and identifying the dialogue text of depression patients.

2. The depression dialogue text recognition system based on topic modeling according to claim 1 is characterized in that: In the dialogue text data preprocessing module: Cleaning of conversation text data, i.e. removing stop words, punctuation marks, modal particles and other noise information; The conversation text data is standardized, all conversation texts are unified into lowercase, character encoding is standardized, and the consistency of input data is ensured.

3. The depression dialogue text recognition system based on topic modeling according to claim 2 is characterized in that: In the question part text topic mining module: The method of extracting the embedding representation of the problem sentence by fine-tuning the pre-trained Sentence-Bert model is to fine-tune the Sentence-Bert model using feature data in the field of depression and adjust the weight parameters of the model so that it can generate more accurate sentence embedding representation when processing depression dialogues; Use the fine-tuned Sentence-Bert model to extract fine-tuned embedding representations of the question text, and use these embedding representations as input features for the subsequent clustering algorithm used to extract topic categories; The method of clustering the embedding vectors of the problem sentences using the DBSCAN algorithm is to cluster the problem sentences using the DBSCAN algorithm, adaptively adjust the parameters of the DBSCAN algorithm, dynamically identify sentence clusters of different topics, and obtain topic distribution features so as to adapt to the distribution density of different data sets and accurately identify potential problems related to depression.

4. The depression dialogue text recognition system based on topic modeling according to claim 3 is characterized in that: The answer text sentiment feature extraction module: The VaderSentiment sentiment analysis tool is used to extract sentiment features from the answer text, the sentiment features include positive, negative, and neutral sentiment, and generate a sentiment score for each answer, including positive, negative, neutral sentiment and a composite score; The construction of the comprehensive feature matrix is ​​to combine the topic distribution features generated by the previous clustering, integrate the sentiment score and the gender information, and construct a comprehensive feature matrix to fully describe the patient's conversation characteristics.

5. The depression dialogue text recognition system based on topic modeling according to claim 4 is characterized in that: In the depression dialogue text recognition module: Use the XGBoost model to screen the constructed comprehensive feature matrix, select the most representative and relevant features, and improve classification performance; The filtered features are input into the logistic regression model for classification training to obtain a model for identifying conversation texts of patients with depression.

Citation Information

Patent Citations

  • Depression interview dialogue generation method based on pre-training language model

    CN113780012A

  • User psychological portraying system and method based on knowledge graph and large language model

    CN116821287A

  • Motion analysis systems and methods of use thereof

    WO2024086537A1