Large model depressive disorder diagnosis method based on other evaluation table
By constructing a doctor-patient dialogue dataset based on a peer-rating scale and item response theory, and combining supervised fine-tuning and preference dataset training, the large model achieves personalized and accurate assessment in the evaluation of depressive disorders, solving the problems of insufficient accuracy and safety in existing technologies, and providing transparent assessment results.
Patent Information
- Application Number
- CN202511837655.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-17
Smart Images

Figure CN121687448A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a large model depression disorder diagnosis method based on a self-evaluation scale. BACKGROUND
[0002] Mental illness has become an important problem affecting the health of people of different age groups worldwide. From children and adolescents to the elderly, the incidence of mental illness is showing a sustained upward trend. According to the statistics of the World Health Organization (WHO), about 1 billion people worldwide are troubled by mental illness, among which depression and anxiety are the most common psychological disorders. Mental illness is often accompanied by emotional out of control, cognitive decline and physical function damage, not only seriously affecting the quality of life of individuals, but also causing huge losses to social work productivity, so the prevention and evaluation of mental illness has become an important issue in the field of global public health. With the increasing attention of society to mental health problems, the promotion and popularization of mental health education have gradually deepened, and people's acceptance of psychological counseling has also gradually improved. This change helps to identify mental problems early and reduce the negative impact of mental illness on individuals and society through scientific intervention. In the clinical evaluation of mental illness, psychiatrists usually use a series of self-evaluation scales with good reliability and validity, such as the Hamilton Depression Scale (HAMD) and the Beck Anxiety Inventory (BAI), as professional evaluation tools to systematically evaluate patients. Compared with self-evaluation scales that rely on patients' subjective cognition and evaluation, self-evaluation scales can provide more objective and professional measurement to help physicians fully understand patients' psychological state, behavior patterns and symptom manifestations, and provide a scientific basis for mental disorder evaluation.
[0003] In recent years, artificial intelligence technology has developed rapidly, especially the rise of large language models (LLM) has had a transformative impact on various fields. Large language models are pre-trained on massive general domain corpus datasets, usually using the Transformer architecture and self-attention mechanism, which can better combine context for semantic understanding, feature extraction, etc., and have achieved excellent performance in natural language processing tasks. Large models have shown excellent performance in general fields and great potential in vertical fields. Multi-turn dialogue systems can simulate real-world interactions, which provides the possibility for the intelligent development of depression evaluation based on clinical interviews. In mental health evaluation, large models as dialogue agents can reduce the stress of patients' clinical interviews and alleviate patients' concealment and dishonesty in self-description. Patients can carry out online dialogue with agents in a relatively private and comfortable environment, which can effectively alleviate patients' stigma and provide a more convenient counseling method. During the interaction, the agent provides listening and emotional support, making patients feel comfortable and accepted, so that they can express themselves more freely and more truly show their psychological state and behavior patterns.
[0004] However, due to the scarcity of data sets and the particularity of tasks in the prior art, the application of large models in intelligent assessment of depressive disorders still faces challenges. First, due to the lack of fine training in specific fields, the large model performs poorly in handling specific tasks, lacks fine training on professional knowledge base, and the dynamic adjustment ability of the dialogue system is insufficient, resulting in that the accuracy and individualization of the assessment cannot meet the real demand. Second, in the construction of depressive assessment dialogue data set, the traditional method usually relies on artificial simulation dialogue or structured questionnaire survey, and it is difficult to fully utilize the unstructured text data accumulated in real medical scenarios, such as electronic medical records, diagnosis and treatment records, etc., resulting in insufficient diversity and authenticity of dialogue content. Third, when using the scale for depressive assessment, the traditional method usually follows a fixed question order and cannot adjust the problem priority according to the real-time feedback of the patient, which may lead to low efficiency of the assessment or omission of key information. In addition, the traditional method usually only relies on supervised fine-tuning, ignoring the model optimization stage based on human feedback reinforcement learning, which may lead to the generation of harmful, unprofessional or non-clinical demand replies by the model. Therefore, how to combine the scientificity of self-evaluation scale and the technical advantages of large model to construct an efficient and accurate intelligent assessment technology for depressive disorders has become a problem to be solved.
[0005] At present, no effective solution has been proposed for the problems in the related art. SUMMARY
[0006] In view of the deficiencies of the prior art, the present application provides a large model depressive disorder diagnosis method based on self-evaluation scale, which has the advantages of dynamic adjustment of evaluation strategy, efficient and accurate diagnosis and safe and interpretable output, thereby solving the problems of insufficient individualization of evaluation, limited data set quality and lack of security of model output in the prior art.
[0007] To achieve the above-mentioned advantages of dynamic adjustment of evaluation strategy, efficient and accurate diagnosis and safe and interpretable output, the specific technical solutions adopted by the present application are as follows:
[0008] In a first aspect, the present application provides a large model depressive disorder diagnosis method based on self-evaluation scale, which comprises:
[0009] S1, constructing a depressive assessment doctor-patient dialogue data set based on self-evaluation scale, labeling and structuring output; wherein the dialogue data set comprises intent recognition label and slot label, the intent recognition label is used to represent demand information, and the slot label is used to record key information in the dialogue;
[0010] S2, according to the depression evaluation doctor-patient conversation data set, combined with the item response theory, the scale item parameters are set to optimize the dialogue management; the scale item parameters include the discrimination and the difficulty parameters of each option, and the dialogue management includes the state space and the action space;
[0011] S3, based on supervised fine-tuning, the large model is adapted to the downstream depression evaluation task to automatically evaluate the performance of the large model; the supervised fine-tuning adopts a parameter efficient fine-tuning method to train the model, and minimizes the cross-entropy loss as the training target;
[0012] S4, the reward model is trained and the large model is optimized using the preference data set, the large model version is iterated according to the feedback, and the depression evaluation result and diagnosis explanation are output based on the large model after iteration.
[0013] Further, the construction of the depression evaluation doctor-patient conversation data set based on the self-evaluation scale includes: based on the obtained clinical evaluation conversation data, data desensitization and anonymization processing are performed, and a large model is used to perfect the text expression; according to the collected clinical depression evaluation records, a patient personal portrait is constructed by extracting information; through a few-shot learning method, combined with the multi-dimensional clinical interview framework of the self-evaluation scale, a large model is used to generate multiple rounds of conversations to obtain a conversation data set; the multiple rounds of conversations are through the simulation of the doctor and patient role conversation mode, and are based on the patient personal portrait to perform oral deduction; based on the conversation data set, through data enhancement technology, diversification processing is performed on the basis of preserving semantic information; the data enhancement technology includes synonym replacement and back-translation; the intent recognition label and the slot label are defined, and a large model is used for automatic annotation and calibration; the automatic annotation includes the text classification task of intent recognition and the sequence labeling task of slot filling; the annotated conversation data set is output in a standard format to obtain the depression evaluation doctor-patient conversation data set based on the self-evaluation scale.
[0014] Further, combined with the item response theory, the scale item parameters are set to include: constructing a scale item library and selecting a self-evaluation scale, determining the item discrimination of each item in the self-evaluation scale library in different subjects and the difficulty parameters of each category; the item discrimination represents the discrimination ability of the current item, and the difficulty parameter represents the difficulty of the current item in the current category; based on the background information or the self-evaluation scale screening result, the initial value of the user ability is set; the user ability is used to represent the severity of depression; the cumulative probability of the current item in the current category and the probability of each category are calculated, and the information amount of the item is determined based on the graded response model; the information amount is used to measure the contribution degree of the item to the user ability estimate value; based on the maximization of the log-likelihood function, the user ability estimate value is updated by using a numerical iteration algorithm, and the information amount and the standard error are calculated, and the item with the highest information amount is selected as the current question item.
[0015] Furthermore, optimizing dialogue management includes: defining a state space based on user status and dialogue history; user status includes the current user ability estimate, emotion embedding extracted through sentiment analysis, and symptom keywords extracted from the dialogue; dialogue history includes the encoded representation of multi-turn dialogues; designing an action space based on question-type actions, feedback-type actions, and termination-type actions; designing a multi-dimensional reward function and detecting slot filling, guiding users to supplement information when specific symptoms are involved; matching the symptom keywords recorded in the status with a depression symptom database and aligning them with scale scores, calculating similarity based on collected key information and scoring rules, and assigning scale scores; selecting to end the dialogue upon completion of the scale, and based on the total scale score and user key information, combined with international evaluation standards, introducing a thought chain to output evaluation results and explanations.
[0016] Further, the cumulative probability of the current item in the current category and the probability of each category are calculated, and the information content of the item is determined based on the graded response model, including: calculating the cumulative probability of the current item in the current category based on the graded response model of item response theory; the cumulative probability is calculated by a combination of exponential and logistic functions, with the item discrimination and difficulty parameters jointly determining the cumulative probability value; calculating the probability of each category by the difference of the cumulative probabilities, ensuring that the sum of the probabilities of all categories is 1; the probability of each category is used to represent the likelihood of the subject choosing that category under a specific user ability; calculating the information content of the item based on the probability of each category, which is obtained by weighted summation of the square of the discrimination and the product of each category probability and its complement probability, reflecting the degree of contribution of the item to the estimated user ability value of the subject; updating the user ability estimate using the Newton-Raphson numerical iteration method; the numerical iteration method iteratively corrects the ability estimate until convergence by calculating the first and second derivatives of the objective function; calculating the standard error based on the information content, which is the square root of the reciprocal of the information content; terminating the evaluation when the standard error is less than a preset threshold or the test length reaches the upper limit, otherwise selecting the item with the highest information content to continue asking questions.
[0017] Furthermore, based on supervised fine-tuning, the large model is adapted to downstream depression assessment tasks, including: selecting a pre-trained model with professional knowledge background as the base model, loading model weights and corresponding word segmenters through a deep learning framework; designing a dialogue management module to control the dialogue process, and dividing the depression assessment doctor-patient dialogue dataset into training and test sets; based on the training set, supervising fine-tuning of the base model using an efficient parameter fine-tuning method to enable the model to learn specific patterns and assessment logic of doctor-patient dialogue; evaluating the assessment accuracy and language generation quality of the base model on the test set, and saving the model version with the best performance; based on the test set, evaluating the assessment accuracy and language generation quality of the base model by plotting ROC curves, calculating the area under the curve as the assessment accuracy index, and saving the model with the highest assessment accuracy index as the large model.
[0018] Furthermore, supervised fine-tuning of the base model using a parameter-efficient fine-tuning method includes: loading the fine-tuning configuration based on the base model and identifying the weight matrix in the base model; introducing two low-dimensional matrices as decomposition factors for weight updates to reduce the number of parameters that need to be trained; freezing all original parameters of the base model and performing gradient updates only on the newly added low-dimensional matrix parameters, and applying the low-dimensional decomposition results to the weight matrix through matrix multiplication; representing multi-turn dialogues in the training set as a sequence of user input statements and model output statements; utilizing the base model to compute the loss of each model output statement in parallel, and aligning the model output with the labeled data by minimizing the objective function.
[0019] Furthermore, a reward model is trained and a large model is optimized using the preference dataset. The iteration of the large model version based on feedback includes: constructing the preference dataset in the form of triples; the triples include prompt text, expected response, and unexpected response; training the reward model to output a scalar reward value when the input question and answer are correct; adding a linear layer as the regression output head to the reward model based on the pre-trained model architecture; updating the large model parameters in the reinforcement learning loop using a proximal policy optimization algorithm and saving checkpoints; the proximal policy optimization algorithm improves training stability by limiting the policy update magnitude; and iteratively optimizing the large model version based on feedback.
[0020] Furthermore, constructing the preference dataset includes: selecting patient self-reported text as input and generating candidate responses using a large model; using few-shot cue learning for candidate responses; ranking candidate responses according to accuracy, safety, and fluency standards; the accuracy standard is used to examine whether the response content conforms to clinical standards and psychological principles, the safety standard is used to examine whether the response content can avoid generating harmful responses, and the fluency standard is used to examine whether the response language is natural and easy to read; based on the ranking results, a triplet preference dataset is formed; the triplet preference dataset includes cue text, expected responses, and unexpected responses.
[0021] Furthermore, the reward model outputs a scalar reward value for any question-answer pair to evaluate the quality of the response; the training objective of the reward model is to minimize the contrastive loss; wherein, the contrastive loss transforms the reward difference between the expected response and the unexpected response into a probability through a nonlinear transformation function; the optimization objective of the nonlinear transformation function is to maximize the likelihood that the expected response is selected.
[0022] Secondly, the present invention also provides a large-scale model diagnostic system for depressive disorders based on a self-rating scale, the system comprising:
[0023] The data construction unit is used to build a doctor-patient dialogue dataset for depression assessment based on the other rating scale, and to annotate and output it in a structured manner. The dialogue dataset includes intent recognition labels and slot labels. The intent recognition labels are used to represent demand information, and the slot labels are used to record key information in the dialogue.
[0024] The parameter optimization unit is used to set the parameters of the scale items based on the depression assessment doctor-patient dialogue dataset and combined with item response theory in order to optimize dialogue management. The scale item parameters include discrimination and difficulty parameters of each option. Dialogue management includes state space and action space.
[0025] The model adaptation unit is used to adapt a large model to a downstream depression assessment task based on supervised fine-tuning, so as to automatically evaluate the performance of the large model. The supervised fine-tuning uses a parameter-efficient fine-tuning method to train the model, and the training objective is to minimize the cross-entropy loss.
[0026] The evaluation optimization unit is used to train the reward model using the preference dataset and optimize the large model. It iterates the version of the large model based on feedback and outputs the depression assessment results and diagnostic interpretation based on the iterated large model.
[0027] Compared with existing technologies, this invention provides a large-scale model diagnostic method for depressive disorders based on other-rating scales, which has the following beneficial effects:
[0028] (1) This invention utilizes a large model as a doctor's agent to conduct proactive inquiries and dynamically adjusts the questioning order in conjunction with item response theory to achieve a personalized depression assessment process; based on the scientific framework of the other-rating scale, it collects key information and performs quantitative scoring. Through multiple rounds of interactive dialogue, the large model can collect and analyze the information provided by the user, quickly identify the psychological state, and provide corresponding assessments and explanations; similarly, this invention also provides users with a safe and convenient way to conduct timely risk assessments of depressive disorders, which helps to improve the efficiency and accuracy of clinical assessments of depressive disorders; the large model can keenly identify the emotions and psychological states revealed by the user in the dialogue to provide crisis identification and response.
[0029] (2) This invention constructs a doctor-patient dialogue dataset based on a peer-rating scale, and uses desensitization processing of real clinical data and patient profiling technology to provide high-quality professional data support for large-scale model training; combined with the item response theory of scale item parameter settings, the questioning strategy is dynamically optimized according to the user's ability estimate and the item information content to achieve personalization and efficiency of the assessment process; the parameter efficient fine-tuning technology is used to professionally adapt the pre-trained model, reducing training costs while ensuring the professional performance of the model on depression assessment tasks; and the transparent and interpretable assessment report is generated through the thought chain reasoning method, which enhances user trust.
[0030] (3) This invention generates diverse and realistic dialogue datasets by desensitizing real clinical depression assessment data and constructing patient profiles; it trains and optimizes large models by combining reward models based on human preferences, effectively avoiding the generation of harmful, unprofessional or clinically unsuitable responses; it limits the policy update range by using a proximal policy optimization algorithm, thereby improving training stability; it constructs a triplet preference dataset based on accuracy, safety and fluency standards, enabling the model to generate responses in accordance with clinical standards and psychological principles; and it improves the accuracy and efficiency of assessment information extraction through automatic labeling technology of intent recognition and slot filling, thereby realizing the effective identification and structured processing of key clinical information in doctor-patient dialogues. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a flowchart illustrating a large-scale depressive disorder diagnostic method based on a self-rating scale according to an embodiment of the present invention.
[0033] Figure 2 This is a flowchart illustrating the construction of a doctor-patient dialogue dataset for depression assessment in a large-scale depressive disorder diagnostic method based on a peer-rating scale, according to an embodiment of the present invention.
[0034] Figure 3 This is a flowchart of dynamic questioning optimization based on item response theory in the large-scale depressive disorder diagnosis method based on other rating scales according to an embodiment of the present invention.
[0035] Figure 4 This is a flowchart of supervised fine-tuning of a model based on a dialogue dataset in a large-scale depressive disorder diagnostic method based on a peer-rating scale according to an embodiment of the present invention.
[0036] Figure 5 This is a flowchart of reinforcement learning based on human feedback in a large-scale depressive disorder diagnostic method based on a self-rating scale according to an embodiment of the present invention.
[0037] Figure 6 This is a detailed implementation diagram of a large-scale model diagnostic method for depressive disorders based on a self-rating scale according to an embodiment of the present invention. Detailed Implementation
[0038] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0039] According to embodiments of the present invention, a large-scale model diagnostic method for depressive disorders based on a self-rating scale is provided.
[0040] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 and Figure 6 As shown, according to an embodiment of the present invention, a large-scale model diagnostic method for depressive disorders based on a self-rating scale is provided, comprising:
[0041] S1. Construct a doctor-patient dialogue dataset for depression assessment based on the other rating scale, label and output it in a structured manner; the dialogue dataset includes intent recognition labels and slot labels. Intent recognition labels are used to represent demand information, and slot labels are used to record key information in the dialogue.
[0042] S2. Based on the depression assessment doctor-patient dialogue dataset and combined with item response theory, set the scale item parameters to optimize dialogue management; the scale item parameters include discrimination and difficulty parameters of each option, and the dialogue management includes state space and action space.
[0043] S3. Based on supervised fine-tuning, a large model is adapted to downstream depression assessment tasks to automatically evaluate the performance of the large model; supervised fine-tuning uses a parameter-efficient fine-tuning method to train the model, with the goal of minimizing cross-entropy loss.
[0044] S4. Train the reward model using the preference dataset and optimize the large model. Iterate the version of the large model based on the feedback. Based on the iterated large model, output the depression assessment results and diagnostic interpretation.
[0045] Specifically, the present invention includes the following steps: Step 1: Construct a doctor-patient dialogue dataset for depression assessment based on a peer-rating scale, label and output it in a structured manner; Step 2: Set the scale item parameters in combination with item response theory and optimize the dialogue management module; Step 3: Adapt the large model to the downstream depression assessment task using supervised fine-tuning and automatically evaluate the model performance; Step 4: Introduce human preferences to train the reward model and optimize and fine-tune the model, iterating the version in combination with expert and user feedback.
[0046] Specifically, this invention addresses the problems of existing technologies by first constructing a doctor-patient dialogue dataset for depression assessment based on a peer-rating scale, labeling and structured the output. This step includes collecting real doctor-patient dialogue data and generating simulated dialogues using a large model based on patient profiles, and labeling the data, focusing on intent recognition and slot filling information. Intent recognition helps understand the patient's needs and emotional state in the dialogue, while slot filling is used to extract key information, such as symptom descriptions and durations. This labeled information provides a foundation for subsequent model training. Next, the scale item parameters are set using item response theory to optimize the dialogue management module. Item response theory helps determine the difficulty and discrimination of each scale item, thereby more accurately assessing the patient's depression level. By introducing these parameters into the dialogue state tracking module, the model's dynamic understanding of the patient's state can be improved, thereby optimizing the reinforcement learning strategy and enabling the model to adjust the dialogue strategy more accurately during the dialogue. Secondly, supervised fine-tuning is used to adapt the large model to downstream depression assessment tasks, automatically evaluating model performance. Supervised fine-tuning technology can significantly reduce the computational resources required for fine-tuning while maintaining the original performance of the large model. The accuracy and linguistic diversity of the automatically evaluated model are assessed to ensure its reliability in depression assessment tasks. Then, a reward model is trained using human preferences and fine-tuned, iterating through iterations based on expert and user feedback. Finally, the model is applied to real-world interactive scenarios, enabling it to assess and classify depressive disorders after a conversation and provide corresponding explanations to help physicians better understand the assessment results.
[0047] Specifically, traditional methods for constructing depression assessment dialogue datasets typically rely on manually simulated dialogues or structured questionnaires, making it difficult to fully utilize unstructured text data accumulated in real-world medical scenarios, such as electronic medical records and treatment notes. This results in insufficient diversity and authenticity of the dialogue content. To address this issue, this invention extracts key information such as symptom descriptions and medical history features from unstructured texts like electronic medical records and reconstructs them into dialogue formats that conform to real-world scenarios using a large-scale model. Based on template prompts, the large-scale model's contextual understanding and generation capabilities transform discrete text fragments into coherent doctor-patient dialogues, ensuring that the data closely reflects actual treatment processes while covering diverse expressions of depressive symptoms.
[0048] Specifically, traditional methods for assessing depression using scales typically follow a fixed questioning order, failing to adjust question priority based on real-time patient feedback, potentially leading to inefficient assessments or omissions of crucial information. To address this issue, this invention employs item response theory to dynamically adjust the questioning order of scale items. By quantifying the discrimination and difficulty parameters of each question, and combining this with the patient's current confidence level and information content, the next question that best reduces assessment uncertainty is selected in real time. For example, if a patient exhibits highly discriminative negative feedback on the "sleep quality" item, the system prioritizes the strongly correlated "depressed mood" question, thereby accurately pinpointing the degree of depression within a shorter dialogue round and improving the efficiency of the reinforcement learning strategy in the dialogue state tracking module.
[0049] Specifically, traditional methods, in adapting large-scale model fine-tuning tasks, neglect the contextual relationships and dynamic policy adjustments required in multi-turn dialogues, leading to insufficient evaluation logic. To address this issue, this invention designs a hierarchical dialogue management framework: a state tracking module explicitly records slot information and IRT parameters; a policy module drives reinforcement learning to optimize the questioning order; and a generation module generates responses based on dynamic prompts. By defining fine-tuning objectives and jointly training the response generation and policy-based dynamic adjustment tasks, the model ensures both efficiency and interpretability.
[0050] Specifically, traditional methods often rely solely on supervised fine-tuning, neglecting the model optimization phase of reinforcement learning based on human feedback. This can lead to models generating harmful, unprofessional, or clinically inadequate responses. To address this issue, this invention constructs an expert-annotated preference dataset and trains a reward model based on this data to quantify response quality. Furthermore, it incorporates the PPO algorithm to update the model within the reinforcement learning loop, iterating through versions based on expert and user feedback to ensure that the model output conforms to medical standards.
[0051] In one embodiment, constructing a doctor-patient dialogue dataset for depression assessment based on a peer-rating scale includes: desensitizing and anonymizing the acquired clinical assessment dialogue data, and refining the textual expressions using a large model; constructing a patient profile by extracting information from collected clinical depression assessment records; generating multi-turn dialogues using a few-shot learning method combined with the multi-dimensional clinical interview framework of the peer-rating scale, resulting in a dialogue dataset; performing spoken dialogues based on the patient profiles by simulating doctor-patient role-playing dialogue patterns; diversifying the data based on the dialogue dataset while preserving semantic information through data augmentation techniques, including synonym replacement and back-translation; defining intent recognition labels and slot labels, and automatically labeling and calibrating them using a large model; automatic labeling includes text classification tasks for intent recognition and sequence labeling tasks for slot filling; and outputting the labeled dialogue dataset in a standard format to obtain a doctor-patient dialogue dataset for depression assessment based on a peer-rating scale.
[0052] Specifically, in step one, firstly, adhering to the principles of informed consent and privacy protection, authentic clinical assessment dialogue data is obtained, and data anonymization and desensitization are performed. Further, clinical depression assessment records, such as electronic medical records, are collected. Next, through editing template prompts, a series of processes are performed using a large model. Based on the collected assessment record samples, patient profiles are constructed. Combining patient information and scale frameworks, the dialogue process is simulated to generate a multi-turn dialogue dataset, which is then diversified using data augmentation techniques. Labeling information, including intent and slot labels, is defined, and automatic labeling and manual calibration are performed. Finally, a high-quality dialogue dataset is output in a structured manner.
[0053] Specifically, the process of constructing patient profiles and generating multi-turn dialogue datasets includes the following steps: S11, acquiring a small amount of real doctor-patient dialogue data from clinical assessment scenarios of depressive disorders, performing data anonymization and desensitization, and using a large model to refine the textual descriptions. Data anonymization includes removing sensitive data such as patient names and identity information, and anonymization involves replacing personal identifiers with encoding methods; S12, collecting clinical depression assessment records, ensuring data balance, and extracting information to construct patient profiles, including demographic characteristics, medical history, clinical manifestations, and assessment results; S13, using a few-shot learning method combined with a multi-dimensional clinical interview framework based on other-rating scales, generating multi-turn dialogues using a large model, and simulating doctor-patient role-playing dialogue modes, based on the patient profiles for oral recitation. Among them, few-shot learning refers to machine learning techniques that train models using a small number of labeled samples, and conversational deduction refers to the process of converting formal medical terms into everyday conversational language; S14, data augmentation techniques such as synonym replacement or back translation are used to diversify processing while preserving semantic information; S15, the generated dialogue dataset is manually reviewed to detect dialogue quality and modify any inappropriate parts; S16, intent and slot labels are defined, and automatic annotation is performed using a large model, including text classification tasks for intent recognition and sequence labeling tasks for slot filling, and manual calibration is performed; S17, the labeled dialogue dataset is output in JSON format to construct a structured dataset adapted for model training; S18, the above operations are repeated to ensure the quality of the generated multi-round labeled dialogue dataset.
[0054] Specifically, in step one of this invention, a doctor-patient dialogue dataset for depression assessment based on a peer-rating scale is constructed, labeled, and output in a structured manner. For example... Figure 2As shown, firstly, textual information such as clinical depression assessment records, including electronic medical records, is collected and processed for privacy protection. Next, structured information is extracted from the assessment records as key information to be retained during the generative reconstruction process from raw text to dialogue format. Simultaneously, the static scale is dynamically transformed into an interactive dialogue state machine to simulate a real consultation process. Then, combining the assessment dialogue structure and extracted patient information, a multi-turn dialogue dataset is constructed using a large model. Finally, intent recognition and slot filling annotations are performed on the dataset.
[0055] Specifically, target information The structured information extracted from the evaluation record text is represented as follows: In the formula, Indicates a collection of symptoms. Indicates duration, Indicates the frequency of occurrence. Indicates that the event is triggered. Indicates emotional state. Expressing ideas, Indicates behavior, This indicates the evaluation results.
[0056] Specifically, the model is used to analyze the entire evaluation record text. Entity recognition, or entity recognition, is a natural language processing technique that automatically identifies and extracts specific types of information from unstructured text. Specifically, it is expressed as: In the formula, It is the j-th entity. for The entity label for each item in the list. It represents the total number of entities identified in the text.
[0057] Specifically, the assessment dialogue structure is built based on his rating scale. The formula is as follows: In the formula, This represents the standardized set of questions on his rating scale. This indicates a structured response domain that meets the criteria for depression assessment. Based on the dialogue states and branching logic defined in the treatment guidelines. This is a structured mapping function used to convert scale items into dialogue logic. It takes the original assessment dimensions of the scale as input and outputs an executable dialogue state machine. The key is the branch logic that dynamically selects the next question based on the patient's answer and maps the answer to the assessment association of the DSM-5 / ICD-10 standard.
[0058] Specifically, the extracted information is obtained using a large language model. According to the assessment dialogue structure Mapped to dialogue The process of generating a dialogue can be represented as: In the formula, The parameters representing the large language model. This represents the dialogue history of the previous t-1 rounds. Each round of dialogue... The generation depends on the extracted information and dialogue history .
[0059] Specifically, the annotated dialogue sequence is represented as follows: In the formula, Indicates the first The dialogue between the doctor and the patient and These represent the corresponding intent recognition tags and slot tag sets, respectively. The number of dialogue rounds is represented by the slot labels, which include categories such as asking about symptoms, providing emotional support, and collecting information. The slot labels include key information fields such as symptom name, duration, and severity. The intention identification labels are used to indicate providing information or seeking help; patients can describe symptoms, express emotions, or seek advice. The slot labels and values are used to record key information in the dialogue, providing a basis for scale scoring and assessment interpretation.
[0060] In one embodiment, combining item response theory, setting scale item parameters includes: constructing a scale item library and selecting other-rated scales; determining the item discrimination and category difficulty parameters for each item in the other-rated scale library among different subjects; item discrimination represents the discrimination ability of the current item j, and the difficulty parameter represents the difficulty of the current item j in the current category k; setting initial user ability values based on background information or preliminary screening results of self-rated scales; user ability is used to represent the severity of depression; calculating the cumulative probability and probability of each category of the current item j in the current category k, and determining the information content of the item based on the graded response model; information content is used to measure the contribution of the item to the estimated user ability value; updating the estimated user ability value using a numerical iterative algorithm based on maximizing the log-likelihood function, calculating the information content and standard error, and selecting the item with the highest information content as the current question item.
[0061] In one embodiment, optimizing dialogue management includes: defining a state space based on user status and dialogue history; user status includes the current user ability estimate, emotion embedding extracted through sentiment analysis, and symptom keywords extracted from the dialogue; dialogue history includes encoded representations of multi-turn dialogues; designing an action space based on question-type actions, feedback-type actions, and termination-type actions; designing a multi-dimensional reward function and detecting slot filling, guiding users to supplement information when specific symptoms are involved; matching the symptom keywords recorded in the status with a depression symptom database and aligning them with scale scores, calculating similarity based on collected key information and scoring rules, and assigning scale scores; selecting to end the dialogue when the scale is completed, and based on the total scale score and user key information, combined with international evaluation standards, introducing a thought chain to output evaluation results and explanations.
[0062] In one embodiment, calculating the cumulative probability and class probability of the current item j in the current category k, and determining the information content of the item based on the graded response model, includes: calculating the cumulative probability of the current item j in the current category k based on the graded response model of item response theory; the cumulative probability is calculated using a combination of exponential and logistic functions, with the item discrimination and difficulty parameters jointly determining the cumulative probability value; calculating the class probability using the difference in cumulative probabilities to ensure that the sum of all class probabilities is 1; each class probability represents the likelihood of a subject choosing that class given a specific user ability; calculating the item information content based on each class probability, which is obtained by weighted summation of the square of the discrimination and the product of each class probability and its complement probability, reflecting the contribution of the item to the estimated user ability; updating the user ability estimate using the Newton-Raphson numerical iteration method; the numerical iteration method iteratively corrects the ability estimate until convergence by calculating the first and second derivatives of the objective function; calculating the standard error based on the information content, where the standard error is the square root of the reciprocal of the information content; terminating the evaluation when the standard error is less than a preset threshold or the test length reaches the upper limit, otherwise selecting the item with the highest information content to continue questioning.
[0063] Specifically, the steps in step two are as follows: First, initialize the scale item parameters and user ability values using item response theory to dynamically adjust the question order and assess the current level of depression. Next, define the state space and action space of the dialogue management module, dynamically update the state space during the dialogue, introduce reinforcement learning to optimize the dialogue strategy, and provide action response support. Collect user information and assign scale scores according to scoring rules. Finally, introduce a thought chain to output the assessment results and interpretation.
[0064] Specifically, dynamically updating the state space and scale scoring includes the following steps: S21, setting the item parameters in the peer-rating scale library based on item response theory, including the discrimination of different items and the difficulty of each option, and setting the user's initial ability value based on background information such as age, gender, medical history, or the initial screening results of self-rating scales such as self-rating scores; S22, defining the state space of the dialogue management module, including the user's current mood, symptoms, and other states, as well as system parameters and scale alignment information, used to record key user information, system parameters, and perform scale alignment; defining the action space, including actions such as asking follow-up questions, switching items, and ending the dialogue; S23, based on historical data... The system maintains and updates the state space based on the dialogue and current user input, selecting the optimal action by adjusting the dialogue strategy; S24, it detects slot filling status and guides the user to further supplement information such as frequency, duration, and severity when specific symptoms are involved; S25, it calculates the amount of information in the items at a specific ability level, dynamically matches scale items, calculates the similarity between symptom keywords and the depression symptom database based on collected key information and scoring rules, and assigns scale scores; S26, when the scale is completed, it chooses to end the dialogue and enter the assessment and interpretation stage, based on the total scale score and user key information, combined with international assessment standards, and introduces thought chain to output assessment results and interpretations.
[0065] Specifically, in step two, this invention sets the scale item parameters based on item response theory and optimizes the dialogue management module; for example... Figure 3 As shown, the process begins by constructing a scale item library and determining the discrimination of each item and the difficulty parameters of each option, while simultaneously initializing user ability values. During the interaction, the ability estimates are dynamically updated, and the information content of each item at a specific ability level is calculated. Items with higher information content are prioritized, and this process is repeated until the standard error or test length meets the requirements. Next, reinforcement learning is combined with dialogue state tracking to establish a holistic framework encompassing state, action, reward, and strategy, dynamically learning the optimal dialogue strategy. Finally, a thought chain is introduced in the evaluation and interpretation section.
[0066] Specifically, the subject area of the scale item library was determined to be the psychological domain, and commonly used external rating scales with good reliability and validity in clinical practice, such as the Hamilton Depression Rating Scale (HAMD), were selected, mainly including Chinese and English versions. Each item in the scale is a single item.
[0067] Specifically, for item j, the cumulative probability of category k is: The probabilities of each category are In the formula, θ represents the subject's potential ability or trait, which can be used to indicate the severity of depression in depression assessment; α j Indicates the distinguishability of entry j; β jk Let represent the difficulty parameter of the k-th category of item j, which satisfies the condition for items with k categories. .
[0068] Specifically, the formula for maximizing the log-likelihood function is: In the formula, P jk (θ) represents the probability that a subject selects category k on the j-th item. The ability estimate is updated iteratively using the Newton-Raphson method. The formula is For the graded response model (GRM), the information content of item j is: The formula for calculating the standard error is: Select the item with the most information as the current question item.
[0069] Specifically, the state space S t It includes user state and conversation history, where user state includes sentiment embeddings extracted through sentiment analysis and symptom keywords extracted from the conversation, represented as: ;s t user Includes the user's current mood, symptoms, and other states, represented as: In the formula, θ is the currently estimated depressive capacity value, and e t For the emotion embedding extracted through sentiment analysis, k t These are symptom keywords extracted from the dialogue. t context Including multi-turn dialogue information, represented as: In the formula, u i This represents the encoded representation of the i-th round of dialogue. The current state is influenced by the previous state, system behavior, and current user behavior.
[0070] Specifically, action space a t Define the system's next response strategy, such as questioning actions, feedback actions, and termination actions. Questioning actions involve in-depth inquiry into symptoms, such as "How has your sleep quality been lately?", or changing the topic to reduce stress, such as "Let's talk about your recent hobbies." Feedback actions involve providing empathetic responses, such as "I understand how you feel," or offering temporary suggestions, such as "Try deep breathing to relax." Termination actions end the conversation and output an assessment report, including assessment results and explanations.
[0071] Specifically, a multi-dimensional reward function is designed, including dialogue quality, user engagement, and security, to balance the generation quality of the detection model and user experience, expressed as: R(s t ,a t )=λ1R quality +λ2R engagement +λ3R safety In the formula, λ1, λ2, and λ3 are weighting coefficients used to balance the importance of each part. Dialogue quality reward Rquality The model combines user feedback and dialogue coherence, where user feedback is optional and users rate the statements generated by the model. Dialogue coherence is calculated by determining the semantic coherence between the current response and historical dialogues, using cosine similarity calculations on their respective semantic vectors. The user engagement reward is R0. engagement This includes conversation turn rewards and user responsiveness incentives to encourage continued user engagement in the conversation. Conversation turn rewards are the ratio of the current conversation turn to the maximum conversation turn. User responsiveness incentives reflect changes in user mood, such as a shift from negative to positive emotions. Safety reward R... safety To avoid triggering negative emotions or sensitive topics in users, penalties are imposed when conversations involve sensitive words such as suicide or when an increase in negative emotions is detected in real time. Finally, the symptom keywords recorded in the status are matched with a database of depressive symptoms and aligned with scale scores to provide a reasonable inference and explanation.
[0072] In one embodiment, supervised fine-tuning and adapting a large model to the downstream depression assessment task includes: selecting a pre-trained model with professional knowledge as the base model; loading model weights and corresponding word segmenters through a deep learning framework; designing a dialogue management module to control the dialogue process and dividing the depression assessment doctor-patient dialogue dataset into a training set and a test set; supervising fine-tuning the base model based on the training set using a parameter-efficient fine-tuning method to enable the model to learn specific patterns and assessment logic of doctor-patient dialogue; evaluating the assessment accuracy and language generation quality of the base model on the test set and saving the best-performing model version; and evaluating the assessment accuracy and language generation quality of the base model by plotting ROC curves based on the test set, calculating the area under the curve as the assessment accuracy metric, and saving the model with the highest assessment accuracy metric as the large model.
[0073] In one embodiment, supervised fine-tuning of the base model using a parameter-efficient fine-tuning method includes: loading a fine-tuning configuration based on the base model and identifying the weight matrix in the base model; introducing two low-dimensional matrices as decomposition factors for weight updates to reduce the number of parameters that need to be trained; freezing all original parameters of the base model, performing gradient updates only on the newly added low-dimensional matrix parameters, and applying the low-dimensional decomposition results to the weight matrix through matrix multiplication; representing multi-turn dialogues in the training set as a sequence of user input statements and model output statements; utilizing the base model to compute the loss of each model output statement in parallel, and aligning the model output with the labeled data by minimizing the objective function.
[0074] Specifically, the steps in step three are as follows: First, select a pre-trained model with medical and psychological knowledge as the base model to ensure that the model has basic professional domain knowledge; second, design a dialogue management module to control the dialogue process, so that the model has the ability to dynamically adjust the questioning order and align the scale; then, use the constructed depression assessment doctor-patient dialogue dataset to supervise and fine-tune the model through an efficient parameter fine-tuning method, so that the model can deeply understand and learn the specific patterns and assessment logic of doctor-patient dialogue.
[0075] Specifically, supervised fine-tuning of a large model based on a depression assessment doctor-patient dialogue dataset includes the following steps: S31, selecting a suitable pre-trained language model and loading model weights and corresponding word segmenters through a deep learning framework; S32, designing a dialogue management module to control the dialogue flow, specifically designing the state space and action space; S33, dividing the depression assessment doctor-patient dialogue dataset and loading training and test sets; S34, setting hyperparameters such as learning rate and batch size, and configuring an optimizer to update model parameters; S35, training the model using an efficient parameter fine-tuning method, with minimizing cross-entropy loss as the training objective; S36, automatic evaluation, including the model's evaluation accuracy and linguistic diversity; S37, repeating the above steps and saving the best-performing model.
[0076] Specifically, in step three, this invention utilizes supervised fine-tuning to adapt the large model to the downstream depression assessment task and automatically evaluates the model's performance; such as Figure 4 As shown, firstly, a pre-trained model with rich professional domain knowledge is selected as the base model; secondly, the model is further optimized in terms of dialogue strategy, enabling it to dynamically adjust the question order and align scales, thereby improving the fluency of the dialogue and the user experience; then, the base model is fine-tuned and trained using a parameter-efficient fine-tuning method based on the dialogue dataset to learn the dialogue pattern.
[0077] Specifically, select the base model and load the fine-tuning configuration. Let the pre-trained model be... The original parameters are , This indicates the input of conversation history. Indicating targeting The generated target response. (Regarding the model weight matrix) Introducing a low-rank update: ΔW = A × B T Freeze the original parameters and train only low-rank matrices A and B.
[0078] Specifically, the multi-turn dialogues in the training set are represented as Where i is the dialogue turn, Enter a statement for the user. Output statements to the model. The model computes each statement in parallel during the SFT process. The loss is minimized during the supervised fine-tuning phase.
[0079] ;
[0080] In the formula, The incremental parameter set introduced for low-rank updates, logP(yi∣·), represents the log probability of the model generating the target response yi. Minimizing... Align the model output with the labeled data; this objective function is the cross-entropy loss function, which measures the difference between the model output probability distribution and the true label distribution.
[0081] Specifically, in the automatic evaluation phase, an ROC curve is plotted to reflect the accuracy of the evaluation. The area under the curve (AUC) represents the proportion of accurate evaluations out of the total, and the calculation formula is as follows: TPR is the true positive rate, and FER is the false positive rate. The classification threshold is defined as follows: True positive rate represents the proportion of correctly predicted positive samples out of all positive samples, and false positive rate represents the proportion of incorrectly predicted positive samples out of all negative samples. During the manual evaluation phase, expert evaluation metrics are set as evaluation accuracy and logical coherence of the dialogue, while user evaluation metrics are fluency, empathy, and helpfulness.
[0082] In one embodiment, training a reward model using a preference dataset and optimizing a large model, iterating the large model version based on feedback, includes: constructing the preference dataset in the form of triples; the triples include prompt text, expected response, and unexpected response; training the reward model to output a scalar reward value when the input question and answer are correct; adding a linear layer as a regression output head to the reward model based on a pre-trained model architecture; updating the large model parameters in the reinforcement learning loop using a proximal policy optimization algorithm and saving checkpoints; the proximal policy optimization algorithm improves training stability by limiting the policy update magnitude; and iteratively optimizing the large model version based on feedback.
[0083] In one embodiment, constructing a preference dataset includes: selecting patient self-reported text as input and generating candidate responses using a large model; learning candidate responses using few-shot prompts; ranking candidate responses according to accuracy, safety, and fluency standards; the accuracy standard is used to examine whether the response content conforms to clinical standards and psychological principles, the safety standard is used to examine whether the response content can avoid generating harmful responses, and the fluency standard is used to examine whether the response language is natural and easy to read; based on the ranking results, a triplet preference dataset is formed; the triplet preference dataset includes prompt text, expected responses, and unexpected responses.
[0084] In one embodiment, the reward model outputs a scalar reward value for any question-answer pair to evaluate the quality of the response; the training objective of the reward model is to minimize the contrastive loss; wherein, the contrastive loss transforms the reward difference between the expected response and the unexpected response into a probability through a nonlinear transformation function; the optimization objective of the nonlinear transformation function is to maximize the likelihood that the expected response is selected.
[0085] Specifically, the steps in step four are as follows: First, construct an expert-annotated preference dataset in the form of triples; then, train a reward model that can output a scalar reward value when the input question and answer are correct; then, update the model parameters in the reinforcement learning loop by combining the proximal policy optimization (PPO) algorithm and save the checkpoints; finally, iteratively optimize the version based on expert and user feedback.
[0086] Specifically, the process of constructing a preference dataset, training a reward model, and further optimizing and fine-tuning the model includes the following steps: S41, selecting patient self-report text as input, using the model to generate candidate responses, and having three experts label the preferences to form a triplet preference dataset; S42, training the reward model based on the pre-trained model, adding a linear layer as the regression output head, and minimizing the contrastive loss; S43, initializing the policy model, and optimizing the policy in the reinforcement learning loop using the PPO algorithm; S44, saving and validating the model, and optimizing it based on expert and user feedback.
[0087] Based on the experimental results of steps one, two, three, and four, the model is used for interaction. After the dialogue, depression assessment results and interpretations are obtained, realizing intelligent diagnosis of depressive disorders.
[0088] Specifically, in step four of this invention, a reward model is trained using human preferences and the model is optimized and fine-tuned, with iterative versions developed incorporating expert and user feedback; such as... Figure 5 As shown, firstly, an expert-annotated preference dataset is constructed in the form of triples; then, a reward model is trained to output a scalar reward value when the input question and answer are correct; next, the PPO algorithm is used to update the model parameters in the reinforcement learning loop and checkpoints are saved; finally, the version is iteratively optimized based on expert and user feedback.
[0089] Specifically, the input set {x} is composed of patient self-reports from single-turn dialogues in depression assessment. Few-shot cue learning is employed; it should be noted that few-shot cue learning is a technique that allows the model to adapt to a task based on a limited number of examples. It guides the model to generate appropriate responses by providing k example dialogue pairs as cues. The model generates a diverse set of candidate answers {y1, y2, ..., y k The model is based on the input x and the prompt. The autoregressive generation of the answer y, with the probability P(y) at each step. t∣·) Calculated by the model, the formula is:
[0090] ;
[0091] In the formula, x is the input from the patient's self-report, is the few-shot prompt, which contains k example dialogue pairs in the format of {(x1,y1),(x2,y2),...,(x k ,y k ),y T}, y is the answer to be generated, which is composed of the word sequence y1,y2,...,y is the parameter of the pre-trained language model.
[0092] Specifically, three human experts perform manual ranking according to the criteria of accuracy, safety, and fluency. The accuracy criterion examines whether the answer content meets clinical standards and psychological principles. The safety criterion examines whether the answer content can avoid generating harmful answers. The fluency criterion examines whether the answer language is natural and easy to read. The experts rank the candidate responses by comprehensively evaluating these three dimensions to ensure that the finally selected response can meet the professional and usability requirements at the same time. Finally, a preference dataset h ,y l is constructed in the triple form of {x,y} , where x is the prompt text, y h is the expected answer, and y l is the unexpected answer;
[0093] Specifically, use to train the reward model , and output a scalar reward value r∈[0,1] for any question-answer pair (x,y) to evaluate the answer quality. On the basis of the model architecture, add a linear layer as the regression output head. The training objective is to minimize the contrastive loss. The contrastive loss optimizes the model parameters by comparing the reward differences between the expected answer and the unexpected answer. The output feature is to output a scalar reward value r∈[0,1] for any question-answer pair (x,y). , and the loss function is as follows:
[0094] ;
[0095] In the formula, is the Sigmoid function, which is a commonly used non-linear transformation function that can map any real number to the interval (0,1), convert the difference into a probability, and the optimization objective is actually to maximize the likelihood of being selected, so that the trained can reliably distinguish the answer quality.
[0096] Specifically, a cue dataset was obtained by sampling from a corpus of depression assessment dialogues. ={x1,x2,...,x n}, As an initial strategy, for each cue x i Enter the current policy Generate answer y i and the question and answer pair {x i ,y i}enter Evaluate the quality of the completion and output a scalar reward value.
[0097] Specifically, the core of reinforcement learning lies in the agent optimizing its behavioral policy based on the current state through trial and error and environmental feedback, in order to maximize cumulative reward. Policy learning is the process of establishing a mapping relationship between the current state and the action space. In the fine-tuning of a large model, LLM (Low-Low Motion Modeling) is used as the policy. The model parameters are updated using the Proximal Policy Optimization (PPO) algorithm, while a penalty is introduced to ensure that the model does not deviate too much.
[0098] Specifically, policy optimization is performed based on a reinforcement learning framework to incorporate human experts' preferences for answers and optimize the model. The reinforcement learning algorithm used in this invention is the Proximal Policy Optimization (PPO) algorithm. The Proximal Policy Optimization (PPO) algorithm ensures training stability by limiting the differences between the new and old policies, as shown in the following formula:
[0099] ;
[0100] In the formula, This is the current strategy, i.e., the fine-tuned model. The advantage function measures how much action 'a' outperforms the average. The clip function is used to limit the magnitude of policy updates to improve training stability. Define the tolerance range for the update magnitude. Finally, save the current optimal model. Establish version control. Conduct manual evaluations, collecting feedback from users and experts to proceed to the next RLHF iteration.
[0101] To facilitate understanding of the above-mentioned technical solutions of the present invention, a specific description is given below using a certain intelligent diagnostic system for depressive disorders as an example:
[0102] This embodiment first constructs patient profiles based on approximately 200 clinical assessment dialogue records provided by the psychology department of a tertiary hospital after anonymization, and then generates diverse doctor-patient dialogues using a large-scale model. Building upon this, a standardized intent and slot labeling framework is employed to structure the dialogue data and incorporate the Hamilton Depression Rating Scale (HAMD) as the assessment standard. The system dynamically calculates the information content of scale items using item response theory and selects the optimal questioning order in real time, enabling an assessment to be completed with an average of only 12 questions. For the base model, efficient parameter fine-tuning techniques are applied, training only the newly added low-dimensional matrix parameters, which account for 0.5% of the total parameters. Furthermore, the system trains a reward model using a triplet preference dataset with 80 expert-annotated sets, enhancing the professionalism and safety of the model's output. Ultimately, the system can complete a depression assessment within 5 minutes and output a structured diagnostic report. Clinical validation shows that its assessment results have a high consistency with professional physician diagnoses, reaching approximately 85%.
[0103] According to another embodiment of the present invention, a large-scale model diagnostic system for depressive disorders based on a self-rating scale is also provided, comprising:
[0104] The data construction unit is used to build a doctor-patient dialogue dataset for depression assessment based on the other rating scale, and to annotate and output it in a structured manner. The dialogue dataset includes intent recognition labels and slot labels. The intent recognition labels are used to represent demand information, and the slot labels are used to record key information in the dialogue.
[0105] The parameter optimization unit is used to set the parameters of the scale items based on the depression assessment doctor-patient dialogue dataset and combined with item response theory in order to optimize dialogue management. The scale item parameters include discrimination and difficulty parameters of each option. Dialogue management includes state space and action space.
[0106] The model adaptation unit is used to adapt a large model to a downstream depression assessment task based on supervised fine-tuning, so as to automatically evaluate the performance of the large model. The supervised fine-tuning uses a parameter-efficient fine-tuning method to train the model, and the training objective is to minimize the cross-entropy loss.
[0107] The evaluation optimization unit is used to train the reward model using the preference dataset and optimize the large model. It iterates the version of the large model based on feedback and outputs the depression assessment results and diagnostic interpretation based on the iterated large model.
[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method of diagnosing a depressive disorder based on a large model of self-report scales, characterized by, The method comprises the following steps: S1. Constructing a depression evaluation doctor-patient conversation data set based on a self-evaluation scale, and labeling and structuring the output; wherein the conversation data set comprises an intent recognition label and a slot label, the intent recognition label is used to represent demand information, and the slot label is used to record key information in the conversation; S2. According to the depression evaluation doctor-patient conversation data set, combining the item response theory, setting the scale item parameters to optimize the conversation management; the scale item parameters comprise discrimination and difficulty parameters of each option, and the conversation management comprises a state space and an action space; S3. Based on supervised fine-tuning, using a large model to adapt to the downstream depression evaluation task to automatically evaluate the performance of the large model; the supervised fine-tuning adopts a parameter efficient fine-tuning method to train the model, and the training target is to minimize the cross-entropy loss; S4. Training a reward model using a preference data set and optimizing the large model, iterating the large model version according to the feedback, and outputting the depression evaluation result and diagnosis explanation based on the large model after iteration.
2. The rater-based scale large model depression disorder diagnosis method of claim 1, wherein, The method of constructing a depression evaluation doctor-patient conversation data set based on a self-evaluation scale comprises: Based on the obtained clinical evaluation conversation data, data desensitization and anonymization processing is performed, and a large model is used to perfect the text expression; According to the collected clinical depression evaluation records, a patient personal portrait is constructed by extracting information; Through a few-shot learning method, a large model is used to generate multiple rounds of conversations in combination with the multi-dimensional clinical interview framework of the self-evaluation scale, and a conversation data set is obtained; the multiple rounds of conversations are obtained through a simulated doctor-patient role conversation mode, and are based on the patient personal portrait to perform oral deduction; Based on the conversation data set, a large model is used to perform diversified processing on the basis of preserving semantic information through data enhancement techniques; the data enhancement techniques comprise synonym replacement and back-translation; Defining intent recognition labels and slot labels, using a large model to automatically label and calibrate; the automatic labeling comprises a text classification task of intent recognition and a sequence labeling task of slot filling; The labeled conversation data set is output in a standard format to obtain a depression evaluation doctor-patient conversation data set based on a self-evaluation scale.
3. The rater-based scale large model depression disorder diagnosis method of claim 1, wherein, The method of setting scale item parameters in combination with the item response theory comprises: Constructing a scale item library and selecting a self-evaluation scale, determining the item discrimination of each item in the self-evaluation scale library in different subjects and the difficulty parameters of each category; the item discrimination represents the discrimination ability of the current item, and the difficulty parameter represents the difficulty of the current item in the current category; Setting an initial value of user ability based on background information or self-evaluation scale screening results; the user ability is used to represent the severity of depression; Calculating the cumulative probability of the current item in the current category and the probability of each category, and determining the information amount of the item based on the graded response model; the information amount is used to measure the contribution degree of the item to the user ability estimate value; Based on the maximization of the log-likelihood function, the user ability estimate value is updated using a numerical iteration algorithm, and the information amount and the standard error are calculated, and the item with the highest information amount is selected as the current question item.
4. The rater-based scale large model depression disorder diagnosis method of claim 3, wherein, The method of optimizing the conversation management comprises: Defining a state space according to user states and dialogue history; the user states include a current user ability estimate value, an emotion embedding extracted through sentiment analysis, and symptom keywords extracted from the dialogue; the dialogue history includes an encoded representation of multiple rounds of dialogue; Designing an action space based on question-type actions, feedback-type actions, and termination-type actions; Designing a multi-dimensional reward function and detecting slot filling to guide the user to supplement information when specific symptoms are involved; Matching the symptom keywords recorded in the state with a depression symptom library and aligning them with scale scores; calculating the similarity and assigning scores according to the collected key information and scoring rules; Selecting an end-of-conversation when the scale is completed; based on the total score of the scale and the user's key information, combining international assessment standards, and introducing a thought chain to output the evaluation results and explanations.
5. The rater-based scale large model depression disorder diagnosis method of claim 3, wherein, The calculation of the cumulative probability of the current item in the current category and the probability of each category includes: Based on the graded response model of the item response theory, the cumulative probability of the current item in the current category is calculated; the cumulative probability is calculated by a combination of exponential and logistic functions, and the item discrimination and difficulty parameters jointly determine the cumulative probability value; The probability of each category is calculated by the difference of the cumulative probability, ensuring that the sum of all category probabilities is 1; the probability of each category is used to represent the likelihood of the subject selecting that category under a specific user ability; Based on the probability of each category, the item information quantity is calculated; the item information quantity is obtained by weighted summation of the square of the discrimination and the product of the probability of each category and its complementary probability; the item information quantity reflects the contribution of the item to the user ability estimate value of the subject; The user ability estimate value is updated using the Newton-Raphson numerical iteration method; the numerical iteration method iteratively corrects the ability estimate value by calculating the first and second derivatives of the objective function until convergence is achieved; Based on the information quantity, the standard error is calculated; the standard error is the square root of the inverse of the information quantity; when the standard error is less than a preset threshold or the test length reaches the upper limit, the evaluation is terminated, otherwise the item with the highest information quantity is selected to continue the question.
6. The rater-based scale large model depression disorder diagnosis method of claim 1, wherein, The adaptation of the large model to the downstream depression evaluation task based on supervised fine-tuning includes: Selecting a pre-trained model with professional knowledge background as the base model, loading the model weight and corresponding tokenizer through the deep learning framework; Designing a dialogue management module to control the dialogue process, and dividing the depression evaluation doctor-patient dialogue dataset to obtain the training set and the test set; Based on the training set, the base model is supervised fine-tuned through the parameter efficient fine-tuning method, so that the model learns the specific patterns and evaluation logic of doctor-patient dialogue; Evaluate the evaluation accuracy and language generation quality of the base model on the test set, and save the model version with the best performance; Based on the test set, evaluate the evaluation accuracy and language generation quality of the base model by drawing the ROC curve, calculate the area under the curve as the evaluation accuracy indicator, and save the model with the highest evaluation accuracy indicator as the large model.
7. The rater-based scale-based large model depression disorder diagnosis method of claim 6, wherein, The supervision fine-tuning of the base model through the parameter efficient fine-tuning method includes: Based on the base model, load the fine-tuning configuration and identify the weight matrix in the base model; Two low-dimensional matrices are introduced as decomposition factors for weight updates to reduce the number of parameters that need to be trained; All original parameters of the base model are frozen, and only the newly added low-dimensional matrix parameters are updated by gradient, and the low-dimensional decomposition result is applied to the weight matrix through matrix multiplication operation; The multiple rounds of dialogues in the training set are represented as a sequence of user input sentences and model output sentences; The base model is used to calculate the loss of each model output sentence in parallel, and the model output is aligned with the labeled data by minimizing the objective function.
8. The rater-based scale large model depression disorder diagnosis method of claim 1, wherein, Training the reward model using the preference dataset and optimizing the large model, according to the feedback, iterating the large model version includes: The preference dataset is constructed in the form of triplets; the triplets include prompt text, expected reply and unexpected reply; The reward model is trained to output a scalar reward value when an answer pair is input; the reward model is based on a pre-trained model architecture, and a linear layer is added as a regression output head; The proximal policy optimization algorithm is combined to update the large model parameters in the reinforcement learning loop, and a checkpoint is saved; the proximal policy optimization algorithm improves training stability by limiting the amplitude of policy updates; Based on the feedback, the large model version is iteratively optimized.
9. The rater-based scale-based large model depression disorder diagnosis method of claim 8, wherein, The preference dataset is constructed, including: Selecting patient self-reported text as input and using the large model to generate candidate replies; the candidate replies use few-shot prompt learning; According to the accuracy standard, the safety standard and the fluency standard, the candidate replies are sorted; the accuracy standard is used to examine whether the answer content meets the clinical standard and psychological principles, the safety standard is used to examine whether the answer content can avoid producing harmful answers, and the fluency standard is used to examine whether the answer language is natural and easy to read; Based on the sorting results, a triplet preference dataset is formed; the triplet preference dataset includes prompt text, expected reply and unexpected reply.
10. The rater-based scale-based large model depression disorder diagnosis method of claim 8, wherein, The reward model outputs a scalar reward value for any answer pair to evaluate the quality of the reply; the training goal of the reward model is to minimize the contrastive loss; Wherein, the contrastive loss converts the reward difference between the expected reply and the unexpected reply into a probability through a nonlinear transformation function; the optimization goal of the nonlinear transformation function is to maximize the likelihood of selecting the expected reply.
