An interpretable depression detection method and system based on retrieval enhancement generation
Patent Information
- Application Number
- CN202611226316.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
该方案具有较强灵活性,但存在三个明显问题:一是原始表格特征多且存在冗余,大模型难以稳定关注关键生理维度;二是提示词长度随样本增加迅速变长,推理成本较高;三是若缺少相似病例检索、投票和置信度控制,模型输出容易受到提示词顺序和单次生成随机性的影响
[0017]本发明方法及系统的有益效果是:本发明通过获取目标对象及历史样本对象的表格化数据并进行数据预处理,得到规范化样本数据;进而将规范化样本数据与预设的标注样本数据输入至大语言模型进行特征选择与特征权重生成,得到筛选后的特征集合及对应的权重向量,在数据清洗后,通过大语言模型辅助生成“特征-权重”,并强制保留静息SDNN、静息 RMSSD 等核心 HRV 指标,再基于权重归一后的关键特征进行相似病例检索,使筛查过程既能保留生理领域关键指标,又能利用历史样本中的相似病例证据,从而提高小样本场景下抑郁风险辅助筛查的稳定性和可复核性;基于筛选后的特征集合及对应的权重向量进行加权相似病例检索,得到排序后的Top-K相似病例集合;进一步的,基于目标对象和排序后的Top-K相似病例集合构造链式表格提示词;最后,基于大语言模型对链式表格提示词进行推理,得到目标对象的抑郁症风险辅助筛查结果,将目标对象关键指标、相似病例投票结果、相似病例逐项对比和结构化输出要求组织为链式表格提示词,使大语言模型基于明确的表格化证据进行投票输出与可解释性分析。能够输出风险类别、相似病例投票摘要、关键特征证据和简要解释,使筛查结果更加透明,便于心理健康辅助筛查和人工复核,同时避免将大模型输出直接作为临床诊断结论。
Smart Images

Figure CN123017538A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of depression detection technology, and in particular to an interpretable depression detection method and system based on retrieval enhancement generation. Background Technology
[0002] With the development of wearable sensors, ECG acquisition devices, and mobile health platforms, physiological signals such as heart rate, heart interval, and heart rate variability can be continuously and cost-effectively collected. Heart rate variability can reflect changes in an individual's stress state, sleep state, and psychological load from the perspective of autonomic nervous system regulation, thus having application value in auxiliary screening for mental health risks, community follow-up, and outpatient health management. Compared with relying solely on subjective questionnaires, auxiliary screening methods based on physiological signals can provide professionals with relatively objective quantitative information; compared with traditional manual interpretation, automated models can process batch data faster and provide repeatable risk assessment results.
[0003] Related technologies include mental health screening methods based on scales or manual rules. These methods typically involve participants completing scales such as the PHQ-9 or CES-D, or professionals making judgments based on score thresholds. While the process is simple, it relies on subjective completion by the participants and human interpretation, making it susceptible to influences from emotional expression, comprehension biases, and motivation. Furthermore, physiological signals beyond scale scores are difficult to fully utilize.
[0004] Alternatively, traditional machine learning-based table-based classification methods may be used. These methods typically take HRV features, age, gender, and other variables as input, and use classification models such as logistic regression, random forest, gradient boosting tree, and multilayer perceptron to train a depression risk classifier. While these approaches can automatically learn the statistical relationships between some features and labels, they are prone to overfitting, undergeneralization, or weak model interpretability when the sample size is small, the feature dimensions are high, or the data distribution varies with age or device differences.
[0005] Alternatively, there are physiological signal modeling methods based on deep learning or time series models. These approaches can directly model continuous ECG, PPG, or other time series data, or extract HRV indicators before classification. However, high-quality annotation of continuous physiological signals is costly, and there are significant distributional differences across devices and populations; directly using deep models often requires large training samples and complex model parameter tuning.
[0006] There are also methods that directly use large language models for few-sample table classification. This approach concatenates training samples and samples to be judged into prompt words, allowing the large language model to directly output the category. This approach offers high flexibility, but it suffers from three significant problems: First, the original table features are numerous and redundant, making it difficult for the large model to consistently focus on key physiological dimensions; second, the length of the prompt words increases rapidly with the number of samples, resulting in high inference costs; and third, without similar case retrieval, voting, and confidence control, the model output is easily affected by the order of the prompt words and the randomness of a single generation. Summary of the Invention
[0007] To address the aforementioned technical problems, the present invention aims to provide an interpretable depression detection method and system based on retrieval enhancement generation, which can improve the stability of auxiliary screening for depression risk in small sample scenarios.
[0008] The first technical solution adopted in this invention is: an interpretable depression detection method based on retrieval enhancement generation, comprising the following steps: Obtain tabular data of the target object and historical sample objects and perform data preprocessing to obtain normalized sample data; The standardized sample data and the pre-defined labeled sample data are input into the large language model for feature selection and feature weight generation, resulting in a filtered feature set and corresponding weight vector. Based on the filtered feature set and the corresponding weight vector, a weighted similar case retrieval is performed to obtain the ranked Top-K similar case set; Construct a chained table of prompt words based on the target object and the sorted Top-K similar case set; Based on the large language model, reasoning is performed on the chain table prompts to obtain the auxiliary screening results for depression risk of the target subjects.
[0009] Furthermore, the step of obtaining tabular data of the target object and historical sample objects and performing data preprocessing to obtain standardized sample data specifically includes: Obtain tabular data of the target object and historical sample objects, and perform cleaning operations, delete the number column, filter label column, raw scale score and grading field, and retain the physiological characteristics and demographic characteristics columns to obtain the target sample data; Numerical encoding is performed on the non-numeric category fields in the target sample data to obtain the encoded target sample data; The encoded target sample data is then subjected to data filtering and binary labeling processes to obtain normalized sample data.
[0010] Furthermore, the step of inputting standardized sample data and preset labeled sample data into a large language model for feature selection and feature weight generation to obtain a filtered feature set and corresponding weight vector specifically includes: Input the normalized sample data and the pre-defined labeled sample data into the large language model, and return feature name-weight key-value pairs in JSON format; Name matching and field validity verification are performed on the feature name-weight key-value pairs. The resting-SDNN and resting-RMSSD HRV features are retained to obtain the filtered feature set. The filtered feature set is then subjected to weight normalization to obtain a weight vector.
[0011] Furthermore, the step of performing weight normalization on the filtered feature set to obtain a weight vector specifically includes: Calculate the initial importance scores of the filtered feature set and normalize them to obtain the normalized weights corresponding to the features; Based on the normalized weights corresponding to the features, the key feature sequences are preserved, a summary of key indicators of the target object is generated, and a weight vector is output.
[0012] Furthermore, the step of performing weighted similar case retrieval based on the filtered feature set and corresponding weight vectors to obtain the ranked Top-K similar case set specifically includes: The filtered feature set is standardized by standard deviation to obtain the standardized feature set. Based on the standardized feature set and the corresponding weight vector, the weighted distance between the target object and each historical case is calculated. Based on the weighted distance, the standardized feature set is sorted from smallest to largest, and the top K historical samples are selected to obtain the sorted Top-K similar case set.
[0013] Furthermore, the step of constructing a chained table of prompts based on the target object and the sorted Top-K similar case set specifically includes: Based on the sorted Top-K similar case set, the number of samples in the low-risk reference class and the depression risk reference class is counted, and the voting count results are generated. Based on the voting count results, construct category pattern strings and arrange them in descending order of similarity to form a D / H pattern sequence; Based on the D / H pattern sequence, key feature differences and similarity are given for several most similar cases, and a chain table of prompt words is constructed.
[0014] Furthermore, the chained table prompts are organized in the following order: target object key indicators - similar case voting - similar case item-by-item comparison - structured output requirements.
[0015] Furthermore, the step of reasoning based on chained table prompts using a large language model to obtain the auxiliary screening results for the target object's depression risk specifically includes: The chained table prompts are input into the large language model. Based on the distribution of low-risk reference class and depression risk reference class in similar cases, and combined with the similarity and key feature differences between each similar case and the target object, the auxiliary screening results of depression risk for the target object are output.
[0016] The second technical solution adopted in this invention is: an interpretable depression detection system based on retrieval enhancement generation, comprising: The first module is used to acquire tabular data of the target object and historical sample objects and perform data preprocessing to obtain standardized sample data. The second module is used to input standardized sample data and preset labeled sample data into the large language model for feature selection and feature weight generation, so as to obtain the filtered feature set and the corresponding weight vector. The third module is used to perform weighted similar case retrieval based on the filtered feature set and the corresponding weight vector to obtain the sorted Top-K similar case set. The fourth module is used to construct a chained table of prompts based on the target object and the sorted Top-K similar case set; The fifth module is used to reason about the chained table prompts based on a large language model to obtain auxiliary screening results for the target object's depression risk.
[0017] The beneficial effects of the method and system of this invention are as follows: This invention obtains standardized sample data by acquiring tabular data of the target object and historical sample objects and performing data preprocessing; then, the standardized sample data and preset labeled sample data are input into a large language model for feature selection and feature weight generation, resulting in a filtered feature set and corresponding weight vectors. After data cleaning, the large language model is used to generate "feature-weight" pairs, and core HRVs such as resting SDNN and resting RMSSD are forcibly retained. The system uses indicators, and then performs similar case retrieval based on key features after weight normalization. This ensures that the screening process retains key physiological indicators while utilizing similar case evidence from historical samples, thereby improving the stability and verifiability of depression risk auxiliary screening in small sample scenarios. Based on the screened feature set and corresponding weight vectors, a weighted similar case retrieval is performed to obtain a ranked Top-K similar case set. Further, a chained table of prompts is constructed based on the target object and the ranked Top-K similar case set. Finally, a large language model is used to infer the chained table of prompts to obtain the depression risk auxiliary screening results for the target object. The key indicators of the target object, similar case voting results, item-by-item comparison of similar cases, and structured output requirements are organized into chained table of prompts, enabling the large language model to perform voting output and interpretability analysis based on clear tabular evidence. It can output risk categories, similar case voting summaries, key feature evidence, and brief explanations, making the screening results more transparent, facilitating mental health auxiliary screening and manual review, while avoiding directly using the large model output as a clinical diagnostic conclusion. Attached Figure Description
[0018] Figure 1 This is a flowchart of the steps of an interpretable depression detection method based on retrieval enhancement generation according to the present invention; Figure 2 This is a structural block diagram of an interpretable depression detection system based on retrieval enhancement generation according to the present invention; Figure 3 This is a schematic diagram of the process for physiological signal-assisted screening of depression risk provided in a specific embodiment of the present invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
[0020] First, it should be noted that the existing technology has the following technical problems, such as: 1) Lack of stable constraints on key physiological features. Traditional machine learning methods typically input all available features directly into the model or rely on human experience to select a small number of indicators, which cannot stably reflect the importance of core HRV indicators such as SDNN and RMSSD across different datasets. When using large language models directly, although the model can select features based on prompts, without setting constraints, it may miss key indicators or generate inconsistent feature weights.
[0021] 2) Traditional classifiers lack interpretability. Methods such as logistic regression, random forest, gradient boosting tree, and multilayer perceptron can output categories or probabilities, but they usually do not use similar historical cases and are difficult to explain naturally "which historical samples the target object is similar to" or "which HRV indicators cause the risk to increase or decrease", making it difficult to support professional review.
[0022] 3) It is difficult to balance accuracy, interpretability, and deployability in small sample scenarios. Mental health screening data often have limited sample sizes, and there are distributional differences among different age groups, different collection devices, or different populations. A single fixed model is difficult to adapt to different data subgroups such as youth groups and middle-aged and elderly groups at the same time.
[0023] Based on this, the embodiments of the present invention achieve the following effects through data cleaning, large model feature selection constrained by core HRV indicators, similar case retrieval, tabular inference prompt word construction, and multi-round fusion decision-making: without directly replacing medical diagnosis, it improves the stability, interpretability, and generalization ability of physiological signal-assisted screening for depression risk, so that the output results can include risk category, similar case evidence, key feature contribution, and brief explanation, which is convenient for professional review.
[0024] Reference Figure 1 This invention provides an interpretable depression detection method based on retrieval enhancement, the method comprising the following steps: S100. Obtain tabular data of the target object and historical sample objects and perform data preprocessing to obtain standardized sample data; Specifically, tabular data of the target object and historical sample objects are obtained, and cleaning operations are performed, including deleting the number column, filter label column, raw scale scores and grading fields, while retaining the physiological and demographic characteristic columns to obtain the target sample data; the non-numerical category fields in the target sample data are numerically encoded to obtain the encoded target sample data; the encoded target sample data is then filtered and assigned binary labels to obtain the normalized sample data.
[0025] In this embodiment, the system receives tabular data of the target object and historical sample objects. Each sample includes demographic variables and HRV-related variables. The HRV-related variables include, but are not limited to, SDNN, RMSSD, HF power, LF / HF, total spectral power, SD1, SD2, SD1 / SD2, SampEn, pNN50, and HRV triangular index at rest. The system performs data cleaning on the input data, including deleting numbers, filtering tags, scale classifications, and non-compliant data; encoding non-numerical fields such as gender; filtering abnormal samples; and unifying the target labels to 0 and 1, where 0 represents low-risk or healthy reference class, and 1 represents depression risk reference class.
[0026] S200. Input the standardized sample data and the preset labeled sample data into the large language model to perform feature selection and feature weight generation, and obtain the filtered feature set and the corresponding weight vector. Specifically, the normalized sample data and the preset labeled sample data are input into the large language model, which returns feature name-weight key-value pairs in JSON format; name matching and field validity verification are performed on the feature name-weight key-value pairs, and two HRV features, resting-SDNN and resting-RMSSD, are retained to obtain the filtered feature set; the filtered feature set is then subjected to weight normalization processing to obtain the weight vector.
[0027] Furthermore, the initial importance scores of the filtered feature set are calculated and normalized to obtain the normalized weights corresponding to the features; based on the normalized weights corresponding to the features, the key feature sequences are retained, a summary of key indicators of the target object is generated, and a weight vector is output.
[0028] In this embodiment, the system inputs the cleaned training set field names and a small number of labeled samples into the large language model, which then returns structured feature weights. To avoid parsing difficulties caused by the model outputting free text, the model is required to return only "feature name-weight" key-value pairs in JSON format, using column names identical to those in the data table. The system performs name matching, field validity verification, and weight normalization on the returned fields. In the free selection mode, the large language model selects 7 to 9 physiological features with strong discriminative power based on the field list and several health / risk samples, and provides initial importance scores. The system normalizes it into weights. : in Indicates the selected feature.
[0029] In the constraint selection mode, the system mandates the inclusion of two core HRV features: "resting-SDNN" and "resting-RMSSD," and sets the following weight constraints: Based on the constraints mentioned above, the large language model selects 5 to 7 additional features from the candidate features, such as resting total spectral power, HF power, LF / HF, SD1, SD2, SD1 / SD2, and SampEn. This design preserves physiological domain priors while allowing the model to adaptively discover supplementary discriminative dimensions in the dataset based on training samples.
[0030] S300. Based on the filtered feature set and the corresponding weight vector, perform weighted similar case retrieval to obtain the ranked Top-K similar case set; Specifically, the selected feature set is standardized by standard deviation to obtain a standardized feature set; based on the standardized feature set and the corresponding weight vector, the weighted distance between the target object and each historical case is calculated; according to the weighted distance, the standardized feature set is sorted from smallest to largest, and the top K historical samples are selected to obtain the sorted Top-K similar case set.
[0031] In this embodiment, for the target object to be screened, the system retrieves the most similar sample from the historical sample database based on the selected feature set and weights to assist in the judgment. Let the target object be... , No. One historical case is The feature set is , No. The weights of each feature are The subjects to be screened were on the The value of each feature is... Historical cases In the The value of each feature is... The weighted distance is defined as: in To prevent extremely small constants with a denominator of zero, the system follows... Select the top K historical samples from smallest to largest to form a set of similar cases. It also records the label, ranking, distance, and key feature differences of each similar sample.
[0032] S400: Construct a chained table of prompt words based on the target object and the sorted Top-K similar case set; Specifically, based on the sorted Top-K similar case set, the number of samples in the low-risk reference class and the depression risk reference class is counted to generate voting count results; based on the voting count results, category pattern strings are constructed and arranged in descending order of similarity to form D / H pattern sequences; based on the D / H pattern sequences, key feature differences and similarities are given for the most closely related cases, and chained table prompt words are constructed.
[0033] In this embodiment, the system constructs a chained table of prompts based on the target object and a set of similar cases. This is not a simple concatenation of the original table, but rather an organization following the sequence of "key indicators of the target object—voting for similar cases—item-by-item comparison of similar cases—structured output requirements." Specifically, the system first lists the highest-weighted HRV indicators of the target object and their weights; then it counts the number of high-risk and low-risk cases among the K similar cases to form a voting result; further, it constructs a pattern string based on the similar cases' ranking, for example, D represents the high-risk reference class and H represents the low-risk reference class, forming a "D / H pattern"; finally, it provides key feature differences and similarity scores for the closest similar cases.
[0034] S500 uses a large language model to infer the chained table prompts and obtains the auxiliary screening results for the target object's depression risk.
[0035] Specifically, the chained table prompts are input into the large language model. Based on the distribution of low-risk reference classes and depression risk reference classes in similar cases, and combined with the similarity and key feature differences between each similar case and the target object, the auxiliary screening results of depression risk for the target object are output.
[0036] In this embodiment, after completing the similar case retrieval, the system inputs chained table prompts into the large language model. Based on the distribution of low-risk and depression-risk reference classes among the similar cases, and considering the similarity between each similar case and the target object, the large language model outputs the risk-assisted screening results for the target object. The output includes the risk category, a summary of similar case voting, key supporting evidence, and a brief explanation. The risk category can include a low-risk reference class and a depression-risk reference class; the explanation describes which key physiological indicators, similar case evidence, and characteristic differences primarily support the result.
[0037] Finally, the embodiments of the present invention will be described in conjunction with the accompanying drawings, such as... Figure 3As shown, this embodiment uses tabular physiological signal data of the target object and a historical sample database as input. First, it performs data cleaning and field normalization on demographic variables and physiological characteristics such as heart rate variability (HRV). Then, it uses a large language model to assist in the selection of core features and weight generation, and combines these feature weights to perform a weighted similar case retrieval of the target object. Based on this, the system organizes the target object's key indicators, similar case voting results, item-by-item comparison of similar cases, and structured output requirements into a chained table of prompts, which is then input into the large language model for voting output and interpretability analysis. Finally, it generates the auxiliary screening results for depression risk and corresponding explanations of key features. This method can improve the interpretability and verifiability of risk screening results in scenarios with small sample physiological signal data. The output results are used for auxiliary screening and do not directly constitute a clinical diagnostic conclusion.
[0038] In summary, the embodiments of the present invention differ from the prior art in the following technical features: 1) Core Physiological Feature Constraint Selection Based on a Large Language Model: In physiological signal-assisted screening for depression risk, traditional methods typically use all table features directly or rely on manual experience to select a small number of indicators, which is easily affected by redundant fields, leaked fields, and irrelevant features. This invention proposes a feature selection and weight generation method based on a large language model, allowing the large language model to output "feature-weight" results based on field meaning, a small number of samples, and the screening task objective. Simultaneously, the system forcibly retains core HRV features such as resting-state SDNN and resting-state RMSSD, and normalizes the output weights, thus balancing the model's adaptive selection capability with the stability of physiological indicator constraints.
[0039] 2) Weighted Normalized Distance-Based Similar Case Retrieval: In small-sample mental health screening scenarios, relying solely on classification models can easily lead to insufficient generalization and weak interpretability. This invention proposes a weighted similar case retrieval method. Based on feature weights generated by a large language model, it calculates the standardized distance between the target object and historical samples, and retrieves the most similar cases from the historical sample database. By analyzing the labels, similarity, and key feature differences of similar cases, it provides traceable case evidence for subsequent risk assessment, ensuring that the screening results are supported not only by classification output but also by similar samples.
[0040] 3) Large-scale model voting output and interpretability analysis based on chained table cue words: While traditional machine learning methods can output risk categories or probabilities, they struggle to naturally explain which historical samples the target object is similar to, or which HRV indicators support the current judgment. This invention proposes a chained table cue word construction method. It organizes key indicators of the target object, voting results of similar cases, item-by-item comparisons of similar cases, and structured output requirements, then inputs them into a large language model. Based on the voting situation of similar cases and differences in key features, the large language model outputs a risk category, voting summary, main supporting evidence, and a brief explanation, thereby improving the transparency and interpretability of physiological signal-assisted screening results for depression risk.
[0041] Therefore, the embodiments of the present invention have the following advantages compared with the prior art: 1) Enhancing the stability of small-sample screening by constraining core physiological features and using weighted similar case retrieval: Traditional depression risk screening methods typically input all table features directly into the classification model or rely on manual experience to select a small number of indicators, which is easily affected by redundant fields, scale leakage fields, and differences in sample distribution. This invention, after data cleaning, uses a large language model to generate "feature-weights" and forcibly retains core HRV indicators such as resting SDNN and resting RMSSD. Then, it performs similar case retrieval based on the key features after weight normalization. This allows the screening process to retain key physiological indicators while utilizing similar case evidence from historical samples, thereby improving the stability and verifiability of depression risk-assisted screening in small-sample scenarios.
[0042] 2) Chained Table Prompts Enhance the Interpretability of Large-Scale Model Output: While traditional machine learning models can output risk categories or probabilities, they often struggle to clearly explain which historical samples the target subject is similar to, which HRV indicators play a major role in the results, and they are also difficult to support professional review. This invention organizes key indicators of the target subject, voting results of similar cases, item-by-item comparison of similar cases, and structured output requirements into chained table prompts, enabling large language models to perform voting output and interpretability analysis based on clear tabular evidence. This method can output risk categories, similar case voting summaries, key feature evidence, and brief explanations, making screening results more transparent, facilitating mental health-assisted screening and manual review, while avoiding directly using large-scale model outputs as clinical diagnostic conclusions.
[0043] Reference Figure 2 An interpretable depression detection system based on retrieval enhancement includes: The first module 201 is used to acquire tabular data of the target object and historical sample objects and perform data preprocessing to obtain standardized sample data. The second module 202 is used to input the standardized sample data and the preset labeled sample data into the large language model for feature selection and feature weight generation, so as to obtain the filtered feature set and the corresponding weight vector. The third module 203 is used to perform weighted similar case retrieval based on the filtered feature set and the corresponding weight vector to obtain the sorted Top-K similar case set. Module 4, 204, is used to construct a chained table of prompts based on the target object and the sorted Top-K similar case set; Module 5, 205, is used to infer the chained table prompts based on a large language model to obtain auxiliary screening results for the target object's depression risk.
[0044] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0045] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this is not intended to limit the scope of the embodiments of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for detecting interpretable depression based on retrieval enhancement, characterized in that, Includes the following steps: Obtain tabular data of the target object and historical sample objects and perform data preprocessing to obtain normalized sample data; The standardized sample data and the pre-defined labeled sample data are input into the large language model for feature selection and feature weight generation, resulting in a filtered feature set and corresponding weight vector. Based on the filtered feature set and the corresponding weight vector, a weighted similar case retrieval is performed to obtain the ranked Top-K similar case set; Construct a chained table of prompt words based on the target object and the sorted Top-K similar case set; Based on the large language model, reasoning is performed on the chain table prompts to obtain the auxiliary screening results for depression risk of the target subjects.
2. The interpretable depression detection method based on retrieval enhancement generation according to claim 1, characterized in that, The step of obtaining tabular data of the target object and historical sample objects and performing data preprocessing to obtain normalized sample data specifically includes: Obtain tabular data of the target object and historical sample objects, and perform cleaning operations, delete the number column, filter label column, raw scale score and grading field, and retain the physiological characteristics and demographic characteristics columns to obtain the target sample data; Numerical encoding is performed on the non-numeric category fields in the target sample data to obtain the encoded target sample data; The encoded target sample data is then subjected to data filtering and binary labeling processes to obtain normalized sample data.
3. The interpretable depression detection method based on retrieval enhancement generation according to claim 2, characterized in that, The step of inputting standardized sample data and preset labeled sample data into a large language model for feature selection and feature weight generation to obtain a filtered feature set and corresponding weight vector specifically includes: Input the normalized sample data and the pre-defined labeled sample data into the large language model, and return feature name-weight key-value pairs in JSON format; Name matching and field validity verification are performed on the feature name-weight key-value pairs. The resting-SDNN and resting-RMSSD HRV features are retained to obtain the filtered feature set. The filtered feature set is then subjected to weight normalization to obtain a weight vector.
4. The interpretable depression detection method based on retrieval enhancement generation according to claim 3, characterized in that, The step of performing weight normalization on the filtered feature set to obtain a weight vector specifically includes: Calculate the initial importance scores of the filtered feature set and normalize them to obtain the normalized weights corresponding to the features; Based on the normalized weights corresponding to the features, the key feature sequences are preserved, a summary of key indicators of the target object is generated, and a weight vector is output.
5. The interpretable depression detection method based on retrieval enhancement generation according to claim 4, characterized in that, The step of performing weighted similarity case retrieval based on the filtered feature set and corresponding weight vector to obtain the ranked Top-K similar case set specifically includes: The filtered feature set is standardized by standard deviation to obtain the standardized feature set. Based on the standardized feature set and the corresponding weight vector, the weighted distance between the target object and each historical case is calculated. Based on the weighted distance, the standardized feature set is sorted from smallest to largest, and the top K historical samples are selected to obtain the sorted Top-K similar case set.
6. The interpretable depression detection method based on retrieval enhancement generation according to claim 5, characterized in that, The step of constructing a chained table of prompts based on the target object and the sorted Top-K similar case set specifically includes: Based on the sorted Top-K similar case set, the number of samples in the low-risk reference class and the depression risk reference class is counted, and the voting count results are generated. Based on the voting count results, construct category pattern strings and arrange them in descending order of similarity to form a D / H pattern sequence; Based on the D / H pattern sequence, key feature differences and similarity are given for several most similar cases, and a chain table of prompt words is constructed.
7. The interpretable depression detection method based on retrieval enhancement generation according to claim 6, characterized in that, The chained table prompts are organized in the following order: target object key indicators - similar case voting - similar case item-by-item comparison - structured output requirements.
8. The interpretable depression detection method based on retrieval enhancement generation according to claim 7, characterized in that, The step of reasoning based on chained table prompts using a large language model to obtain the auxiliary screening results for depression risk of the target object specifically includes: The chained table prompts are input into the large language model. Based on the distribution of low-risk reference class and depression risk reference class in similar cases, and combined with the similarity and key feature differences between each similar case and the target object, the auxiliary screening results of depression risk for the target object are output.
9. An interpretable depression detection system based on retrieval enhancement generation, characterized in that, Includes the following modules: The first module is used to acquire tabular data of the target object and historical sample objects and perform data preprocessing to obtain standardized sample data. The second module is used to input standardized sample data and preset labeled sample data into the large language model for feature selection and feature weight generation, so as to obtain the filtered feature set and the corresponding weight vector. The third module is used to perform weighted similar case retrieval based on the filtered feature set and the corresponding weight vector to obtain the sorted Top-K similar case set. The fourth module is used to construct a chained table of prompts based on the target object and the sorted Top-K similar case set; The fifth module is used to reason about the chained table prompts based on a large language model to obtain auxiliary screening results for the target object's depression risk.
