Machine learning based depression and anxiety comorbidity risk identification system and method

CN122696348APending Publication Date: 2026-09-04SUN YAT SEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610864810.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

一方面,现有方式普遍依赖较多的问卷条目或人工访谈内容,数据采集负担较重,实施过程耗时较长,不利于在学校、社区或其他大规模人群场景中进行高频筛查

Benefits of technology

本发明构建了一套完整的青少年抑郁与焦虑共病风险自动化识别技术体系。通过多源数据采集获取能够反映青少年心理状态的多维信息,经标准化预处理消除数据异质性;在保证识别精度的前提下大幅压缩特征维度;利用梯度提升决策树模型对非线性、高交互性的心理特征进行建模,实现共病风险的精准预测;最终通过可解释性算法将黑箱模型的决策过程转化为可理解的特征贡献信息,形成从数据输入到结果输出的全流程自动化处理闭环。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122696348A_ABST
    Figure CN122696348A_ABST
Patent Text Reader

Abstract

The application relates to the field of mental health recognition, and particularly discloses a depression and anxiety comorbidity risk identification system and method based on machine learning, which comprises the following modules: a data acquisition module for acquiring multi-dimensional behavior and psychological related data of a to-be-identified adolescent individual; a data preprocessing module for uniformly processing the collected original data to generate a standardized data set with unified structure and stable values; and a feature screening module for screening a fixed number of core features from full-quantity features based on a preset performance loss threshold through a combination of feature importance evaluation and recursive feature elimination to form a simplified feature set. The technical scheme can be applied to large-scale population screening, can automatically run in a computer environment, and can realize depression and anxiety comorbidity risk identification based on limited key data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mental health identification, and in particular to a machine learning-based system for identifying the risk of comorbid depression and anxiety. Background Technology

[0002] With the informatization of school health management, public health monitoring, and mental health screening, the early identification of mental health problems in adolescents is gradually shifting from traditional manual assessment methods to automated screening methods based on data processing. Depression and anxiety are relatively common mental health problems among adolescents, and they often occur together in the general population, forming a comorbid state of depression and anxiety. Compared with single mental health problems, comorbid states usually exhibit more complex symptom combinations, higher risk levels, and stronger persistence. Therefore, early identification of such risks is of great significance for subsequent stratified intervention, resource allocation, and health management.

[0003] In existing technologies, the identification of depression or anxiety is typically achieved through methods such as scale assessments, questionnaires, or professional interviews. For example, individuals are first assessed using depression and anxiety scales separately, and then the results are comprehensively evaluated by a human expert; alternatively, professionals make subjective assessments based on interview records, past experiences, and behavioral performance. While these methods can reflect an individual's psychological state to some extent, they still have the following problems: On the one hand, existing methods generally rely on a large number of questionnaires or human interviews, resulting in a heavy data collection burden and a long implementation time, which is not conducive to high-frequency screening in schools, communities, or other large-scale population scenarios. On the other hand, traditional methods are heavily reliant on the experience of the assessors, and the judgment standards among different personnel are prone to differences, leading to poor consistency in identification results and making it difficult to form a stable and unified screening process.

[0004] Furthermore, most existing technologies focus on identifying single symptoms of depression or anxiety, lacking automated identification solutions for comorbid depression and anxiety. Since comorbidity often involves multiple dimensions such as emotional experience, sleep patterns, daytime functioning, academic stress, and social support, relying solely on a single indicator or simple statistical analysis is insufficient to comprehensively reflect an individual's true risk level, nor can it accurately identify high-risk individuals within a comorbid population.

[0005] Meanwhile, although school health management or related monitoring systems have accumulated a large amount of multidimensional data related to the mental state of adolescents, existing technologies typically only perform simple statistics, threshold judgments, or single-indicator analyses on this data. A unified preprocessing solution for multi-source data, automatic screening of key indicators, construction of identification models, and output of comorbidity risk results in a computer environment has not yet been developed. Especially in practical applications, relying on a large number of raw data entries not only increases collection costs but also reduces the feasibility of system deployment and its practical application value.

[0006] Therefore, there is an urgent need for existing technologies that can be applied to large-scale population screening, can run automatically in a computer environment, and can identify the risk of comorbid depression and anxiety based on limited key data, in order to solve the problems of low data collection efficiency, strong reliance on manual labor, difficulty in identifying comorbid states, and unfavorable conditions for large-scale application of existing methods. Summary of the Invention

[0007] This invention provides a machine learning-based system for identifying the risk of comorbid depression and anxiety, which is applicable to large-scale population screening, can run automatically in a computer environment, and can identify the risk of comorbid depression and anxiety based on limited key data.

[0008] To solve the above-mentioned technical problems, this application provides the following technical solution: A machine learning-based system for identifying the risk of comorbid depression and anxiety includes: The data acquisition module is used to acquire multidimensional behavioral and psychological data of the adolescent individuals to be identified; The data preprocessing module is used to process the collected raw data in a unified manner to generate a standardized dataset with a uniform structure and stable values. The feature selection module is used to select a fixed number of core features from the full set of features based on a preset performance loss threshold, through a combination of feature importance evaluation and recursive feature elimination, to form a concise feature set. The risk identification module has a built-in pre-trained comorbidity risk identification model based on gradient boosting decision tree architecture. It is used to input the simplified feature set into the model, and the computer automatically calculates and outputs the individual's comorbidity risk probability of depression and anxiety. The interpretability visualization module is used to introduce the SHAP algorithm to calculate the contribution of each core feature to the current individual prediction result and generate interpretable output results.

[0009] Furthermore, the data preprocessing module is also used to map textual and categorical data from different collection terminals into numerical codes, and to convert data from different scales or questionnaires into a unified numerical range. Identify outliers that exceed the reasonable range or deviate significantly from the overall distribution, and correct, truncate, or mark them according to preset rules; To ensure data integrity, methods such as statistical imputation, missing status coding, or sample removal are used depending on the type of missing data. Each indicator is standardized to ensure that all features meet the model input requirements.

[0010] Furthermore, the feature selection module is also used to train the preprocessed full set of features based on the LightGBM algorithm and calculate the initial importance score of each feature. Using the performance of the benchmark model trained with all features as a reference, we gradually construct different feature subsets and retrain the model. When removing a feature causes the model performance to drop beyond a preset performance loss threshold, we retain that feature. Combining the results of feature importance ranking and feature penalty weight evaluation, redundant features that are highly relevant or have low contribution are eliminated through a recursive feature elimination process; While ensuring the basic stability of the model's predictive performance, a simplified feature set containing a fixed number of core features is determined.

[0011] Furthermore, the comorbidity risk identification model in the risk identification module is trained through the following steps: Data partitioning: The adolescent sample data labeled with comorbidity status were divided into training set and test set in a ratio of 8:2; For model construction, the LightGBM algorithm based on gradient boosting decision tree architecture is used to build a binary classification recognition model. The log loss function is adopted, and a regularization term containing the number of leaf nodes and L2 weights is added to the objective function. Hyperparameter optimization employs 5-fold cross-validation combined with grid search to optimize the learning rate, number of leaf nodes, and feature random selection ratio. To terminate the iteration, an early stopping mechanism is introduced, which automatically stops training when the validation set loss no longer decreases within 10 consecutive iterations.

[0012] Furthermore, the interpretability visualization module calculates the contribution of each core feature to the prediction result of a specific individual based on the SHAP algorithm. The contribution is used to quantify the direction and magnitude of the influence of each feature in the model decision-making process. For a single individual sample, it generates an individual-level explanation output to indicate which factors play a major role in predicting the comorbidity risk of the individual. At the same time, it generates an individual risk waterfall chart to intuitively display the contribution of features.

[0013] Furthermore, the comorbidity risk identification model includes several regression decision trees, each of which is iteratively optimized based on the prediction residual of the previous tree; a histogram-based decision tree algorithm and a leaf growth strategy with depth restrictions are adopted. The input of the comorbidity risk identification model performs feature combination and nonlinear segmentation processing on 14 core features: mapping continuous indicators into continuous vectors, calculating the L2 regularized information gain of each feature at different segmentation points when splitting nodes, and capturing the interaction between features; The logarithmic loss function used in the comorbidity risk identification model is: ; in, These are actual observed values; 0 indicates no comorbidity, and 1 indicates comorbidity. Predict probabilities for the model; Regularization term added to the objective function It includes a leaf node number penalty and an L2 weight penalty to prevent the model from overfitting; During the hyperparameter optimization process, the learning rate was set between 0.01 and 0.1, while the number of leaf nodes and the proportion of features randomly selected in each iteration were optimized. The data acquisition module obtains data through an electronic questionnaire system, a campus information management system, or other information acquisition terminals. The data includes one or more of the following: data related to emotional experience and emotional regulation; data related to sleep duration and quality and daytime functioning; data related to academic burden and daily routines and environmental stress; and data related to perceived social support and peer relationships and family support.

[0014] Furthermore, the feature filtering module is also used to automatically construct an undirected weighted social network topology graph of all teenagers in the school based on class allocation, dormitory arrangement, classroom attendance, and club member data in the campus information management system, wherein the weight of the edges is dynamically calculated according to the frequency and duration of common activities; Using each adolescent as the central node, the average comorbidity risk probability of their first- to third-order social neighbors is calculated as the initial clustering risk coefficient; The clustering risk coefficient of each node is updated iteratively. The iteration rule is as follows: if the proportion of high-risk individuals in the first-order neighbors of a node exceeds 30%, the clustering risk coefficient of the node is multiplied by a magnification factor of 1.5; if the proportion of high-risk individuals in the second-order neighbors exceeds 20%, it is multiplied by a magnification factor of 1.2; the iteration continues until the change in the clustering risk coefficient of all nodes is less than 0.01. Traverse all connected subgraphs and calculate the density of high-risk individuals in each subgraph. When the density of high-risk individuals in a subgraph exceeds 15%, it is marked as a local risk cluster. Further iteratively determine whether the cluster has a cross-class or cross-grade diffusion trend. If it does, it is upgraded to a school-wide risk warning area. The calculated individual clustering risk coefficient was added to the simplified feature set as the 15th dynamic feature. At the same time, the weight coefficients of peer relationships and social support-related features in the original 14 core features were adjusted according to different clustering risk levels.

[0015] Furthermore, the interpretability visualization module is also used to construct a backpropagation path graph with the individual as the endpoint, based on the social network topology graph, for each high-risk individual. Starting from the high-risk individual, trace back all their first- to third-order social connections, calculate the risk propagation probability of each connection, and determine the propagation probability based on connection strength, contact duration, and the risk level of upstream nodes; filter out weak connection paths with a propagation probability lower than 0.1 in a loop. For each retained propagation path, calculate the cumulative propagation strength of the path and determine whether the path is a major propagation path; further iterate to determine whether there are key propagation nodes in the major propagation paths, that is, nodes that appear in 3 or more major propagation paths at the same time; Distinguish between causal propagation and related propagation in each propagation path. If the risk at the upstream node occurs earlier than that at the downstream node and the time difference is between 1 and 6 months, it is determined to be causal propagation; otherwise, it is determined to be related propagation. Generate a three-tiered interpretable report that includes an individual's own risk contribution, direct social influence contribution, and indirect social influence contribution, and visualize the complete risk transmission path network.

[0016] Furthermore, it also includes: Edge computing nodes are deployed on local servers or smart terminals in schools to perform the functions of data acquisition, data preprocessing, feature filtering and risk identification modules. Sensitive personal data is processed only on edge computing nodes. The cloud computing center is used to complete the centralized training, updating and global data analysis of the model, and only receives anonymized feature data and risk statistics results uploaded by edge nodes; The data synchronization unit is used to automatically synchronize model parameters and statistical data between edge computing nodes and the cloud computing center when the network recovers.

[0017] The principles and beneficial effects of the scheme are as follows: This invention constructs a complete automated identification technology system for the comorbidity risk of depression and anxiety in adolescents. It acquires multi-dimensional information reflecting the psychological state of adolescents through multi-source data collection, and eliminates data heterogeneity through standardized preprocessing; it significantly compresses feature dimensions while ensuring identification accuracy; it uses a gradient boosting decision tree model to model nonlinear, highly interactive psychological features, achieving accurate prediction of comorbidity risk; and finally, it transforms the black-box model's decision-making process into understandable feature contribution information through interpretable algorithms, forming a closed-loop automated processing system from data input to result output.

[0018] The entire process, from data collection, preprocessing, and feature screening to risk identification and result output, requires no human intervention. The system can synchronize the latest data from the campus information management system, automatically complete risk identification, and generate screening reports. This fully automated operation mode not only significantly reduces labor costs and implementation difficulty but also eliminates subjective biases in the manual assessment process, ensuring the consistency and comparability of screening results across different times and locations.

[0019] This invention employs a feature selection mechanism based on a preset performance loss threshold. By combining feature importance assessment with recursive feature elimination, it can accurately select the core feature set that contributes most to comorbidity identification from dozens or even hundreds of original features. This mechanism reduces the amount of data required while ensuring that the model's predictive performance is largely unaffected, greatly reducing the data collection burden. Simultaneously, the comorbidity risk identification model based on a gradient boosting decision tree architecture can effectively capture the complex nonlinear relationships and interactions between psychological features. Compared to traditional linear models, it exhibits higher identification accuracy and stronger robustness for comorbidities of depression and anxiety, which have complex clinical manifestations.

[0020] Thanks to its streamlined feature set and efficient gradient boosting decision tree algorithm, this system exhibits a short response time for risk identification of a single individual, enabling near real-time risk warnings. When the system detects a high-risk individual, it immediately triggers the warning mechanism, notifying relevant management personnel promptly and allowing valuable time for early intervention.

[0021] The feature selection mechanism effectively reduces model complexity and significantly improves its generalization ability by eliminating redundant features and noisy data. It maintains stable recognition performance across adolescent groups in different regions, age groups, and school types, without requiring large-scale retraining for specific populations.

[0022] The data preprocessing module can uniformly process data from different sources and in different formats, supporting seamless integration with existing campus information management systems, health monitoring systems, and electronic questionnaire systems. The system adopts a modular design with low coupling between functional modules, allowing for flexible expansion to include new data sources and functional modules as needed, facilitating future upgrades and maintenance.

[0023] The interpretability visualization module, by calculating the contribution of each core feature to the prediction results, can clearly identify the main factors influencing an individual's comorbidity risk. This interpretable output not only improves the system's credibility and acceptability but also provides a scientific and objective basis for subsequently developing personalized psychological intervention programs, helping to improve the targeting and effectiveness of interventions. Attached Figure Description

[0024] Figure 1 This is a logic block diagram of an embodiment of a machine learning-based system for identifying the risk of comorbid depression and anxiety. Detailed Implementation

[0025] The following detailed description illustrates the specific implementation method: Machine learning-based systems for identifying the risk of comorbid depression and anxiety (e.g.) Figure 1 (as shown), including: The data acquisition module is used to acquire multidimensional behavioral and psychological data of the adolescent individuals to be identified; The data preprocessing module is used to process the collected raw data in a unified manner to generate a standardized dataset with a uniform structure and stable values. The feature selection module is used to select a fixed number of core features from the full set of features based on a preset performance loss threshold, through a combination of feature importance evaluation and recursive feature elimination, to form a concise feature set. The risk identification module has a built-in pre-trained comorbidity risk identification model based on gradient boosting decision tree architecture. It is used to input the simplified feature set into the model, and the computer automatically calculates and outputs the individual's comorbidity risk probability of depression and anxiety. The interpretability visualization module is used to introduce the SHAP algorithm to calculate the contribution of each core feature to the current individual prediction result and generate interpretable output results.

[0026] Specifically, the data acquisition module automatically acquires multidimensional behavioral and psychological data of students through multi-source heterogeneous interfaces. In this embodiment, it connects to the school's existing electronic questionnaire system for mental health via API to collect subjective psychological data filled in by students. The questionnaire system adopts a B / S architecture, and students log in after unified campus authentication to fill it out. The questionnaire includes 56 items in 5 dimensions: emotional experience, emotion regulation, sleep quality, academic pressure, and social support, using a 1-5 Likert scale for scoring. Then, through the school's academic affairs management system, objective academic data such as students' exam rankings, homework completion rates, attendance records, and awards and punishments are collected; and through the student management system, data such as students' class assignments, dormitory arrangements, club members, and class teacher evaluations are collected. It also connects to the campus card system to collect behavioral data such as students' cafeteria consumption records, library borrowing records, and access control records, used to analyze students' daily routines and social activities. The data collection granularity is per transaction / each card swipe record. Objective sleep data such as students' daily sleep time, wake-up time, and number of nighttime outings are collected through smart wearable devices (smart bracelets used in this embodiment).

[0027] All raw data is stored in an encrypted database on the edge nodes. Students' personal identification information, such as names, student IDs, and national ID numbers, is stored separately from psychological data. Raw sensitive data is not uploaded to the cloud. The edge computing nodes are deployed in the school's information center computer room.

[0028] The data preprocessing module performs four steps of standardization on the collected raw data to generate a standardized dataset with uniform structure and stable values.

[0029] The specific operations are as follows: For text-based categorical data (such as sleep quality: good / good / average / poor / poor), ordinal encoding is used to map it to a numerical encoding of 1-5; for nominal categorical data (such as gender: male / female), it is converted into a binary vector. For numerical data from different sources, interval normalization is performed to convert all rating data into a uniform numerical range of 0-100, eliminating the dimensional differences between different scales. The conversion formula is as follows: ; in, These are the original values. and These are the minimum and maximum values ​​of the feature in the entire sample, respectively.

[0030] Outliers are identified using a combination of the 3σ principle and the interquartile range (IQR) method. For features that follow a normal distribution (such as sleep duration), the 3σ principle is used to identify outliers. Values ​​outside the specified range are considered outliers; for features that do not follow a normal distribution (such as task completion rate), the IQR method is used to identify outliers. The values ​​within the range are considered outliers.

[0031] For identified outliers, if they exceed a reasonable physical range (e.g., sleep duration <3 hours or >12 hours), they are truncated; if they are extreme values ​​but within a reasonable range, they are marked, their original values ​​are retained, and they are assigned lower weights in subsequent model training.

[0032] Calculate the missing rate for each feature and each sample, and then employ a stratified processing strategy. Features with a missing rate higher than 20% are directly removed; samples with a missing rate higher than 30% are directly removed; for features with a missing rate between 5% and 20%, K-Nearest Neighbor (KNN) imputation is used, and the mean of the 5 nearest samples is used for imputation; for features with a missing rate lower than 5%, the median of the feature is used for imputation; for missing values ​​of categorical features, the mode is used for imputation.

[0033] Then, Z-score standardization is applied to all numerical features to ensure that the mean of each feature is 0 and the standard deviation is 1, thus meeting the input requirements of the LightGBM model. The transformation formula is as follows: ; in, The mean of this feature. This represents the standard deviation of the feature.

[0034] The feature selection module employs a performance-efficiency balance algorithm to select core features from the preprocessed 56 full features. First, the full features are trained using the LightGBM algorithm, and the gain importance score of each feature is calculated. A higher score indicates a greater contribution of the feature to comorbidity identification. In this embodiment, the initial importance scores of features such as emotion problem score, subjective social support, daytime dysfunction, and ADHD are ranked in the top four.

[0035] Using a baseline model trained with all features (AUC=0.938) as a reference, a performance loss threshold was set where the AUC decreased by no more than 0.01. A recursive feature elimination method was employed, progressively removing features according to their importance scores from low to high. After each removal, the model was retrained and the AUC was recalculated. If removing a feature caused the model's AUC to drop below 0.928, that feature was retained.

[0036] Calculate the Pearson correlation coefficient between features. For feature pairs with a correlation coefficient greater than 0.8, retain the feature with the higher importance score and discard the other. For example, the correlation coefficient between sleep onset time and sleep duration is 0.87, so retain the sleep duration feature, which contributes more to the model.

[0037] The final set of features included 14 core features, which in this embodiment are: emotional problems, subjective social support, hyperactivity problems, daytime dysfunction, sleep quality, academic stress, family support, peer relationships, irritability, emotion regulation ability, attendance error rate, homework completion rate, and loneliness score.

[0038] The feature filtering module is also built-in to construct an undirected weighted social network topology graph of all students (e.g., N students) based on class, dormitory, class attendance, and club member data, generating an N×N adjacency matrix, where the weight of the edges is calculated based on the frequency of common activities: students in the same dormitory have a weight of 0.9, classmates have a weight of 0.6, members in the same club have a weight of 0.5, and other relationships have a weight of 0.2. Using each student as the central node, calculate the average co-disease risk probability of their first- to third-order social neighbors, and use it as the initial clustering risk coefficient; If the proportion of high-risk individuals (risk probability ≥ 0.7) among a node's first-order neighbors exceeds 30%, the clustering risk coefficient of that node is multiplied by a factor of 1.5; if the proportion of high-risk individuals among a node's second-order neighbors exceeds 20%, it is multiplied by a factor of 1.2. This process is iterated until the change in the clustering risk coefficient of all nodes is less than 0.01. In this embodiment, convergence occurs after 7 iterations. Traverse all connected subgraphs and calculate the density of high-risk individuals in each subgraph. For example, if a class in the second year of junior high school has a high density of high-risk individuals (more than 20% higher than the set value), it is marked as a local risk cluster area. Further analysis shows that the cluster area has a tendency to spread to two adjacent classes, and it is upgraded to a grade-level risk warning area. The individual clustering risk coefficient is added as the 15th dynamic feature to the simplified feature set. At the same time, the weights of the peer relationships and social support features of students in the warning zone are automatically increased by 20% (the specific value can be determined according to the actual situation).

[0039] The comorbidity risk identification model was trained using the publicly available dataset from the Adolescent Health Survey. All samples were labeled with clinical diagnoses by at least three licensed psychiatrists.

[0040] The labeled samples were randomly divided into training and test sets in an 8:2 ratio: the training set was used for model parameter learning, and the test set was used for model performance evaluation. To address the class imbalance problem, the SMOTE oversampling method was used to augment the data of the co-problematic samples in the training set. The nearest neighbor number K=5 was set to generate synthetic samples so that the ratio of positive to negative samples in the training set reached 1:1.

[0041] A binary classification model is constructed using the LightGBM algorithm based on gradient boosting decision tree architecture. The core parameters are set as follows: base learner type: regression decision tree (GBDT); number of decision trees: 100-200; growth strategy: leaf-wise growth strategy with depth constraints; maximum tree depth: 8; maximum number of leaf nodes: 31; number of histogram bins: 256. Loss function: Binary log loss function, specifically in the form of: ; in, These are actual observed values ​​(0 indicates no comorbidity, 1 indicates comorbidity). Predict probabilities for the model; Regularization terms: L1 and L2 regularization are added to the objective function to prevent overfitting. The complete form of the objective function is: ; in, The number of leaf nodes. The weight of the leaf node. The penalty coefficient for the number of leaf nodes. is the L2 regularization coefficient.

[0042] Five-fold cross-validation combined with a grid search method was used to dynamically optimize the key hyperparameters of the model. The hyperparameter search space is shown in the table below:

[0043] The training set was then divided into five mutually exclusive subsets. Four subsets were used as the training set and one subset as the validation set in each iteration, repeating this process five times. The average validation set AUC was calculated. By iterating through all hyperparameter combinations, the optimal hyperparameter combination was determined to be: learning_rate=0.05, num_leaves=31, feature_fraction=0.8, gamma=0.1, lambda_l2=0.1.

[0044] An early stopping mechanism is introduced to prevent overfitting by monitoring the validation set loss in real time during training. The early stopping rounds are set to 10; training automatically stops and the current optimal model parameters are saved when the validation set loss no longer decreases within 10 consecutive iterations. In this embodiment, the early stopping mechanism is triggered at the 127th iteration, resulting in a model with 127 regression decision trees.

[0045] The performance of the trained model was evaluated using an independent test set. The results show that the model has a very high discriminative power for adolescents with comorbid depression and anxiety using only 14 core features, effectively capturing high-risk individuals and meeting the practical needs of large-scale population screening.

[0046] The risk identification module inputs the above 15 features (14 core features + 1 dynamic clustered risk feature) into the trained LightGBM model, and the computer automatically calculates and outputs the probability of each student's comorbid depression and anxiety.

[0047] In this embodiment, the interpretability visualization module calculates the contribution of each core feature to the prediction result of each student based on the SHAP (SHapley Additive Explanations) algorithm, quantifying the direction and magnitude of the influence of each feature in the model decision-making process. The SHAP value is calculated using the TreeExplainer method, optimized for the LightGBM model.

[0048] For a single individual sample, generate an interpretable report containing the following: individual comorbidity risk probability and risk level; SHAP value and contribution ranking of each core feature; individual risk waterfall chart, which intuitively shows the positive or negative contribution of each feature to the risk prediction results; and comparative analysis with the average level of the same grade.

[0049] The interpretability visualization module is also used to construct a backpropagation path graph with each high-risk student as the endpoint, based on the social network topology graph; it traces back all their first- to third-order social connections, and calculates the risk propagation probability of each connection based on connection strength, contact duration, and the risk level of upstream nodes. The calculation formula is as follows: ; in, Let be the connection weight between node i and node j. Let i be the probability of comorbidity risk for node i; Weak connection paths with a propagation probability lower than 0.1 are filtered out in a loop; the cumulative propagation strength of the remaining paths is calculated, and paths with a cumulative propagation strength ≥ 0.3 are identified as the main propagation paths; a student who appears in all 5 main propagation paths is identified and marked as a key propagation node. To distinguish between causal propagation and related propagation, if the risk at the upstream node appears earlier than that at the downstream node with a time difference of 1-6 months, it is determined to be causal propagation; otherwise, it is determined to be related propagation. For example, if a key propagation node was identified as high-risk 6 months ago, and the risks of the three downstream high-risk students all appeared later than that node with a time difference of 2-4 months, it is determined to be causal propagation. Generate a three-tiered interpretable report that includes an individual's own risk contribution, direct social influence contribution, and indirect social influence contribution, and visualize the complete risk transmission path network.

[0050] An edge-cloud collaborative computing architecture is adopted, achieving a balance between data security and computing efficiency. Edge computing nodes independently complete all local data processing and risk identification tasks, ensuring that sensitive personal data does not leave the campus and effectively protecting student privacy. The cloud computing center only receives anonymized feature data and risk statistics uploaded by edge nodes for regular model updates and global data analysis. The data synchronization unit adopts an incremental synchronization method. When the network is interrupted, the edge nodes independently complete all screening work and store local data. When the network is restored, the differences are automatically synchronized to ensure data consistency.

[0051] The above are merely embodiments of the present invention. The invention is not limited to the fields covered by these embodiments. Commonly known structures and characteristics in the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are able to access all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A machine learning-based system for identifying the risk of comorbid depression and anxiety. Includes, characterized in that: The data acquisition module is used to acquire multidimensional behavioral and psychological data of the adolescent individuals to be identified; The data preprocessing module is used to process the collected raw data in a unified manner to generate a standardized dataset with a uniform structure and stable values. The feature selection module is used to select a fixed number of core features from the full set of features based on a preset performance loss threshold, through a combination of feature importance evaluation and recursive feature elimination, to form a concise feature set. The risk identification module has a built-in pre-trained comorbidity risk identification model based on gradient boosting decision tree architecture. It is used to input the simplified feature set into the model, and the computer automatically calculates and outputs the individual's comorbidity risk probability of depression and anxiety. The interpretability visualization module is used to introduce the SHAP algorithm to calculate the contribution of each core feature to the current individual prediction result and generate interpretable output results.

2. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 1, characterized in that, The data preprocessing module is also used to map textual and categorical data from different collection terminals into numerical codes, and to convert data from different scales or questionnaires into a unified numerical range. Identify outliers that exceed the reasonable range or deviate significantly from the overall distribution, and correct, truncate, or mark them according to preset rules; To ensure data integrity, methods such as statistical imputation, missing status coding, or sample removal are used depending on the type of missing data. Each indicator is standardized to ensure that all features meet the model input requirements.

3. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 2, characterized in that, The feature selection module is also used to train the preprocessed full set of features based on the LightGBM algorithm and calculate the initial importance score of each feature. Using the performance of the benchmark model trained with all features as a reference, we gradually construct different feature subsets and retrain the model. When removing a feature causes the model performance to drop beyond a preset performance loss threshold, we retain that feature. Combining the results of feature importance ranking and feature penalty weight evaluation, redundant features that are highly relevant or have low contribution are eliminated through a recursive feature elimination process; While ensuring the basic stability of the model's predictive performance, a simplified feature set containing a fixed number of core features is determined.

4. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 3, characterized in that, The comorbidity risk identification model in the risk identification module is trained through the following steps: Data partitioning: The adolescent sample data labeled with comorbidity status were divided into training set and test set in a ratio of 8:2; For model construction, the LightGBM algorithm based on gradient boosting decision tree architecture is used to build a binary classification recognition model. The log loss function is adopted, and a regularization term containing the number of leaf nodes and L2 weights is added to the objective function. Hyperparameter optimization employs 5-fold cross-validation combined with grid search to optimize the learning rate, number of leaf nodes, and feature random selection ratio. To terminate the iteration, an early stopping mechanism is introduced, which automatically stops training when the validation set loss no longer decreases within 10 consecutive iterations.

5. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 4, characterized in that, The interpretability visualization module calculates the contribution of each core feature to the prediction result of a specific individual based on the SHAP algorithm. The contribution is used to quantify the direction and magnitude of the influence of each feature in the model decision-making process. For a single individual sample, it generates an individual-level explanation output to indicate which factors play a major role in predicting the comorbidity risk of that individual. At the same time, it generates an individual risk waterfall chart to intuitively display the contribution of features.

6. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 5, characterized in that, The comorbidity risk identification model includes several regression decision trees, each of which is iteratively optimized based on the prediction residual of the previous tree; a histogram-based decision tree algorithm and a leaf growth strategy with depth restrictions are adopted. The input of the comorbidity risk identification model performs feature combination and nonlinear segmentation processing on 14 core features: mapping continuous indicators into continuous vectors, calculating the L2 regularized information gain of each feature at different segmentation points when splitting nodes, and capturing the interaction between features; The logarithmic loss function used in the comorbidity risk identification model is: ; in, These are actual observed values; 0 indicates no comorbidity, and 1 indicates comorbidity. Predict probabilities for the model; Regularization term added to the objective function It includes a leaf node number penalty and an L2 weight penalty to prevent the model from overfitting; During the hyperparameter optimization process, the learning rate was set between 0.01 and 0.1, while the number of leaf nodes and the proportion of features randomly selected in each iteration were optimized. The data acquisition module obtains data through an electronic questionnaire system, a campus information management system, or other information acquisition terminals. The data includes one or more of the following: data related to emotional experience and emotional regulation; data related to sleep duration and quality and daytime functioning; data related to academic burden and daily routines and environmental stress; and data related to perceived social support and peer relationships and family support.

7. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 6, characterized in that, The feature filtering module is also used to automatically construct an undirected weighted social network topology graph of all teenagers in the school based on class allocation, dormitory arrangement, class attendance, and club member data in the campus information management system, wherein the weight of the edges is dynamically calculated according to the frequency and duration of common activities. Using each adolescent as the central node, the average comorbidity risk probability of their first- to third-order social neighbors is calculated as the initial clustering risk coefficient; The clustering risk coefficient of each node is updated iteratively. The iteration rule is: if the proportion of high-risk individuals in the first-order neighbors of a node exceeds 30%, the clustering risk coefficient of that node is multiplied by a magnification factor of 1.

5. If the proportion of high-risk individuals in the second-order neighbors exceeds 20%, then multiply by a magnification factor of 1.2; repeat the iteration until the change in the cluster risk coefficient of all nodes is less than 0.01; Traverse all connected subgraphs and calculate the density of high-risk individuals in each subgraph. When the density of high-risk individuals in a subgraph exceeds 15%, it is marked as a local risk cluster. Further iteratively determine whether the cluster has a cross-class or cross-grade diffusion trend. If it does, it is upgraded to a school-wide risk warning area. The calculated individual clustering risk coefficient was added to the simplified feature set as the 15th dynamic feature. At the same time, the weight coefficients of peer relationships and social support-related features in the original 14 core features were adjusted according to different clustering risk levels.

8. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 7, characterized in that, The interpretability visualization module is also used to construct a backpropagation path graph with the individual as the endpoint, based on the social network topology graph, for each high-risk individual. Starting from the high-risk individual, trace back all their first- to third-order social connections, calculate the risk propagation probability of each connection, and determine the propagation probability based on connection strength, contact duration, and the risk level of upstream nodes; filter out weak connection paths with a propagation probability lower than 0.1 in a loop. For each retained propagation path, calculate the cumulative propagation strength of the path and determine whether the path is a major propagation path; further iterate to determine whether there are key propagation nodes in the major propagation paths, that is, nodes that appear in 3 or more major propagation paths at the same time; Distinguish between causal propagation and related propagation in each propagation path. If the risk at the upstream node occurs earlier than that at the downstream node and the time difference is between 1 and 6 months, it is determined to be causal propagation; otherwise, it is determined to be related propagation. Generate a three-tiered interpretable report that includes an individual's own risk contribution, direct social influence contribution, and indirect social influence contribution, and visualize the complete risk transmission path network.

9. The machine learning-based comorbidity risk identification system for depression and anxiety according to claim 8, characterized in that, Also includes: Edge computing nodes are deployed on local servers or smart terminals in schools to perform the functions of data acquisition, data preprocessing, feature filtering and risk identification modules. Sensitive personal data is processed only on edge computing nodes. The cloud computing center is used to complete the centralized training, updating and global data analysis of the model, and only receives anonymized feature data and risk statistics results uploaded by edge nodes; The data synchronization unit is used to automatically synchronize model parameters and statistical data between edge computing nodes and the cloud computing center when the network recovers.

10. A machine learning-based method for identifying the risk of comorbid depression and anxiety, characterized in that, The system described in any one of claims 1-9 is employed.