Method and system for predicting juvenile depression based on intestinal flora

By combining high-throughput sequencing and graph attention neural network models with gradient boosting trees and SHAP algorithms, a gut microbiota prediction system for adolescent depression was constructed. This system addresses the issues of subjectivity and insufficient prediction accuracy in existing adolescent depression screening technologies, enabling early identification and individualized intervention.

CN121306573APending Publication Date: 2026-01-09SOUTHWEST JIAOTONG UNIV

Patent Information

Application Number
CN202511866200.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing methods for screening adolescent depression rely on psychological questionnaires, which are highly subjective and lack objective biological indicators. The models are unstable and have insufficient predictive accuracy, making it difficult to effectively reflect the true network characteristics and temporal dynamics of the gut ecosystem.

Method used

Gut microbiota 16S rRNA gene sequence data were collected through high-throughput sequencing, preprocessed using the QIIME2 platform, and stable core features were selected by combining gradient boosting tree and SHAP algorithms to construct a hybrid weighted graph structure. An improved graph attention neural network model was then used for training to establish a prediction system based on the ecological synergistic and antagonistic relationships among microbiota.

Benefits of technology

It enables early identification and individualized intervention for adolescent depression, provides objective molecular-level biological data support, improves the robustness and prediction accuracy of the model under small sample conditions, and possesses biological rationality and algorithmic interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121306573A_ABST
    Figure CN121306573A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for predicting juvenile depression based on intestinal flora, and relates to the technical field of bioinformatics and artificial intelligence, and the method comprises the steps: firstly, obtaining an original sequence of a microbiome, carrying out the preprocessing of the original sequence of the microbiome, and obtaining a feature matrix; and screening core flora characteristics with stable trans-folding by adopting characteristic importance evaluation and interpretability analysis based on a gradient boosting decision tree. A mixed weighted graph is constructed based on Spearman correlation and a proximity relationship, and an absolute value of a correlation coefficient is taken as an edge weight and an edge density is adjusted through a threshold adaptive strategy. And finally, through an improved graph attention neural network, based on edge weight attention, layer normalization and random inactivation, enhancing robustness, and adopting adaptive optimization to complete parameter learning. And determining a dynamic classification threshold according to the AUC of the target patient, and outputting a sample discrimination result and confidence. According to the method, the accuracy, stability and biological interpretability of juvenile depression recognition are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of bioinformatics and artificial intelligence, and in particular to a method and system for predicting adolescent depression based on gut microbiota. Background Technology

[0002] In recent years, the incidence of adolescent depression has risen significantly, becoming one of the major public health problems affecting the physical and mental health of adolescents worldwide. In its early stages, the disease often manifests as symptoms such as low mood, loss of interest, decreased attention, and learning disabilities. However, due to the immature psychological characteristics of adolescents, their mood is highly volatile, and clinical symptoms are often subtle and easily overlooked, leading to low diagnosis rates and delayed intervention.

[0003] Current diagnostic methods primarily rely on questionnaires and psychological scales, but these methods are highly subjective, greatly influenced by environment and emotional state, and lack support from objective biological indicators. Therefore, exploring an early screening method based on objective biological characteristics is of great significance for early warning and intervention of adolescent depression. Numerous studies have shown that the gut microbiota interacts closely with the central nervous system at the neural, immune, and endocrine levels through the "gut-brain axis." The gut microbiota of adolescents is in a dynamic developmental stage, and its composition, metabolic activity, and stability differ from those of adults. Abnormal fluctuations in the microbiota structure may lead to imbalances in neurotransmitter synthesis, inflammatory responses, and energy metabolism, thereby affecting the functional regulation of the nervous system and being closely related to the occurrence of depression. Obtaining the 16S rRNA gene sequence of gut microbiota using high-throughput sequencing technology can reveal the potential link between the microbiota and depression, providing new molecular-level evidence for the early detection of mental disorders in adolescents. However, adolescent gut microbiota data are characterized by significant high dimensionality, sparsity, and individual variability, with not only large differences between samples but also abundant microbiota but low stability.

[0004] Traditional statistical or machine learning methods (such as logistic regression, support vector machine, random forest, etc.) can classify or predict the abundance characteristics of gut microbiota to a certain extent, but they still have problems such as a single feature selection process, relying only on the importance score of a single model, ignoring the ecological symbiotic or antagonistic relationships between microbiota, failing to effectively model the complex hierarchical structure and nonlinear interactions between microbiota, making it difficult to reflect the true network characteristics of the gut ecosystem, and the strong temporal dynamics of adolescent microbiota composition, which makes it difficult for traditional static feature analysis to capture the differences in developmental stages, resulting in insufficient generalization ability of prediction models. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for predicting adolescent depression based on gut microbiota, which solves the technical problems of existing adolescent depression screening and risk assessment methods, such as reliance on psychological questionnaires, strong subjectivity, lack of objective biological indicators, unstable model features, and insufficient prediction accuracy.

[0006] To achieve the above objectives, the present invention provides the following technical solution: On the one hand, the present invention provides a method for predicting adolescent depression based on gut microbiota, comprising the following steps: S1. 16S rRNA gene sequence data of gut microbiota in depressed and non-depressed adolescents were collected by high-throughput sequencing, and bioinformatics preprocessing was performed using the QIIME2 platform to generate species annotations containing taxonomic information, providing a high-confidence biological basis for subsequent abundance calculation and feature extraction.

[0007] S2. The species abundance table obtained after processing S1 and the health labels of the samples are used to build a feature matrix, and then standardized to obtain a feature matrix suitable for machine learning and graph neural network model input.

[0008] S3. Calculate the importance score of each microbial community feature based on Gradient Boosting Tree (XGBoost) and extract the top K most important features from each fold cross-validation. Use the SHAP algorithm to calculate the average contribution of each feature to the model's predicted output to measure its interpretability. Repeat the training of the model within the five-fold cross-validation framework and count the frequency of feature occurrences. Take the union of microbial community features with a frequency greater than or equal to three occurrences with the top-ranked features from each fold SHAP to form a stable core feature set. This stable core feature set contains key microbial communities that continuously contribute to the assessment of adolescent depression risk, significantly reducing feature drift.

[0009] S4. To fully consider the ecological synergy and antagonism among bacterial communities, a stable core feature set is used, and a hybrid weighted graph structure (Spearman-KNN) is constructed based on the Spearman correlation coefficient and proximity relationship among bacterial communities. The hybrid weighted graph structure uses nodes to represent bacterial communities and edge weights to represent the strength of symbiotic relationships, so as to reflect the synergy strength and topological relationship among bacterial communities.

[0010] S5. The constructed hybrid weighted graph structure is input into the improved graph attention neural network model (Phylo-GATv2) for training. The input layer of the model receives the standardized feature matrix and the weighted adjacency matrix. The weighted graph attention layer introduces edge weight attributes when computing information interaction between nodes, so that the interaction strength between the microbial community affects the feature aggregation process in the form of weights. During the training process, the working feature curve index is used to monitor the model performance and dynamically adjust the learning rate.

[0011] S6. Use the trained graph attention neural network model to identify depression samples and output confidence scores to assist clinical decision-making.

[0012] On the other hand, the present invention provides a system for predicting adolescent depression based on gut microbiota, using the above method and including the following modules: Data import module: used to collect DNA sequencing data of gut microbiota in depressed and non-depressed adolescents, and to perform bioinformatics preprocessing and species annotation; Sequence processing module: The species abundance table and health labels of the samples obtained after the data import module are processed are used to build a feature matrix and perform standardization processing to generate a standardized feature matrix and sample label file; Feature selection module: Based on gradient boosting tree and combined with feature importance assessment and interpretability analysis, multi-fold cross-validation is performed to obtain a stable core feature set; using the stable core feature set, a hybrid weighted graph structure is constructed based on the Spearman correlation coefficient and proximity relationship between bacterial communities; Graph construction module: Utilizes the stable core feature set output by the feature selection module, and constructs a hybrid weighted graph structure based on the Spearman correlation coefficient and proximity relationship between bacterial communities; Graph Neural Network Training Module: Inputs the hybrid weighted graph structure output by the graph construction module into the improved graph attention neural network model for training. During the training process, the model performance is monitored using the working feature curve index and the learning rate is dynamically adjusted. Prediction output module: Utilizes a trained graph attention neural network model to determine the discrimination results and confidence levels of depression samples, which can be used to assist clinical decision-making.

[0013] Compared with the prior art, the present invention has the following beneficial effects: This invention establishes an intelligent gut microbiota-based depression prediction system for adolescents through an innovative technical approach: "multi-stage feature selection—Spearman-KNN weighted graph construction—Phylo-GATv2 neural network prediction." This system not only automates the entire process from raw DNA sequence data to disease risk output but also possesses the dual advantages of algorithmic interpretability and biological rationality. It can reveal the potential mechanisms between gut microbiota imbalance and mental disorders in adolescents, demonstrating significant potential for scientific research and clinical application.

[0014] This invention improves the robustness of the model under small sample conditions through multi-stage feature selection; the established weighted graphical neural network model can fully explore the potential ecological interactions among microbial communities, overcoming the limitation of traditional linear models in expressing higher-order dependencies; and the dynamic threshold mechanism based on the Youden index enables the prediction results to be adaptive and physiologically consistent. This invention does not rely on subjective assessment methods such as psychological scales, but rather constructs a risk model based on objective molecular-level biological data, providing a scientific basis for the early identification, individualized intervention, and health monitoring of adolescent depression. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the overall process of Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the improved graph attention neural network (Phylo-GATv2) model according to Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the overall structure of Embodiment 2 of the present invention. Detailed Implementation

[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0017] Example 1: Please see Figures 1-2 A method for predicting adolescent depression based on gut microbiota includes the following steps: Step 1: Collect DNA sequencing data of gut microbiota from depressed and non-depressed adolescents, and use the QIIME2 (Quantitative nsights Into Microbial Ecology 2, an open-source bioinformatics tool for analyzing and interpreting microbiome data. The QIIME2 platform is an open-source, modular bioinformatics platform for microbiome data processing and analysis. It supports a complete workflow from raw sequencing data to downstream statistical analysis and provides various functions such as quality control, species classification, and diversity calculation) platform for bioinformatics preprocessing and species annotation.

[0018] In one specific embodiment, fecal samples were collected from the subjects, and gut microbiota DNA was extracted for high-throughput sequencing. The experimental samples included patients with depression (MDD group, Major Depressive Disorder) and healthy controls (Control group), with a total of 205 samples, of which 99 samples were from the MDD group and 106 samples were from the control group.

[0019] All samples were placed immediately after collection. Store in an 80°C frozen environment to prevent DNA shift caused by bacterial degradation.

[0020] Paired-end sequencing of the V3–V4 region of the 16S rRNA gene was performed using the Illumina NovaSeq 6000 sequencing system platform, with a read length of 2... 250 bp. The V3-V4 region of the 16S rRNA gene was chosen because this region has high variability in the bacterial kingdom, and the conserved sequences on both sides are beneficial for designing universal primers. Therefore, it is widely used for the analysis of bacterial community structure and classification.

[0021] The raw sequencing files were imported into the QIIME2 platform in FASTQ format for bioinformatics preprocessing. This included the following steps: 1) Remove adapter sequences and low-quality fragments using Cutadapt software (an adapter removal tool mainly used to remove adapter sequences and trim low-quality bases in high-throughput sequencing data), with a quality threshold set to Q30.

[0022] 2) Use VSEARCH (a multifunctional metagenomics sequence processing tool whose core functions include sequence search, clustering, redundancy removal, etc., and is mainly used for microbiome data analysis) to perform paired-end sequence splicing to obtain complete comparable reads.

[0023] 3) Apply the UCHIME (chimera detection) algorithm to remove chimeric sequences to reduce PCR amplification bias.

[0024] 4) Use VSEARCH's clustering module to perform operational taxonomic unit (OTU) clustering at 97% sequence similarity. The operational taxonomic unit (OTU) is a taxonomic unit defined in microbiome based on sequence similarity (usually 97%) clustering. It represents an approximate concept of a bacterial "species" or "genus" and is the basis for constructing the bacterial community abundance matrix.

[0025] 5) The clustered feature sequences are annotated using the SILVA (Ribosomal RNA Database) (version 138), mapping OTU sequences to genus and species levels. The SILVA database is a high-quality, comprehensive ribosomal RNA (rRNA) gene sequence database focused on providing accurate taxonomic frameworks to ensure the reliability and consistency of bacterial community species annotation. This method utilizes the Naive Bayes algorithm to accurately identify bacterial community composition at the genus or species level, generating a species annotation table containing taxonomic information, providing a high-confidence biological basis for subsequent abundance calculations and feature extraction.

[0026] To eliminate differences in sample sequencing depth, the data was diluted and standardized, ultimately generating an OTU abundance table containing abundance information for each bacterial community, providing standardized basic data for subsequent feature analysis.

[0027] The OTU abundance table obtained through the above steps is presented in matrix form with samples as columns and bacterial communities as rows, where the matrix elements represent the sequence counts of bacterial communities in a specific sample.

[0028] To ensure data quality, the QIIME2 platform automatically counts the total number of sequences for each sample and removes abnormal samples with a sequencing depth of less than 10,000 sequences. At this point, the raw sequencing data is transformed into quantifiable microbial abundance data through bioinformatics processing.

[0029] Step 2: Use the species abundance table and sample health labels obtained in Step 1 to build a feature matrix and perform standardization to eliminate sequencing differences, low abundance noise and extreme value interference, and finally generate a standardized feature matrix and sample label file.

[0030] In one specific embodiment, firstly, low-abundance bacteria are filtered out. If a certain bacterial group has an occurrence rate of less than 5% in all samples, the feature column corresponding to that bacterial group is removed.

[0031] Then, a pseudo-count of 1.0 is added at all locations where the abundance is zero to avoid infinity during subsequent logarithmic operations.

[0032] After completing the low abundance filtering, perform a centralized logarithmic ratio (CPR). Conversion: ; in, ; In the formula, For bacteria abundance value; This is a pseudo-counting constant with a value of 1.0; This is the geometric mean of the abundance of all bacterial communities in the sample; For microbial community indexing; This refers to the number of bacteria.

[0033] CLR transformation is a crucial step in processing compositional data, such as bacterial abundance, which is characterized by a constant sum (e.g., 100%). This dependency can lead to biases in traditional statistical analysis. CLR transformation effectively removes this collinearity constraint by projecting the data onto the Aitchison geometric space, ensuring that the data satisfies the assumptions of Euclidean space and is suitable for subsequent multivariate statistical and machine learning algorithms.

[0034] Finally, Z-score standardization is performed to unify the feature distribution: ; In the formula, For the first The first sample 1 eigenvalue, , Features The mean and standard deviation of the features. Z-score processing ensures that each feature has zero mean and unit variance when it is input into the model, avoiding over-reliance on a single feature during gradient descent.

[0035] After the above steps, a standardized feature matrix and sample label file are generated. In the label file, the "label" column uses 1 to represent an MDD sample and 0 to represent a healthy sample, ensuring the data can be directly read by machine learning algorithms. Data quality inspection results show that the average feature dimension of all samples is approximately 1200, with a value range of [-5, 5], meeting the stability requirements for subsequent model input.

[0036] Step 3: Perform multi-stage feature selection based on the gradient boosting tree (XGBoost) machine learning algorithm, and perform multi-fold cross-validation by combining feature importance evaluation and interpretability analysis. In each fold of training, calculate the feature importance and interpretability index respectively, and count the features that recur in different folds to obtain a stable core feature set.

[0037] In one specific embodiment, XGBoost uses an incremental optimization approach to gradually minimize the objective function, which is: ; in, ; ; In the formula, The loss function; This represents the prediction result from the previous iteration; Authentic labels; For the first The output of the regression tree; For regularization terms; For node splitting penalty terms; The number of leaf nodes; These are L2 regularization parameters; The weights are those of the leaf nodes; for The L2 norm.

[0038] A second-order Taylor expansion of the objective function yields: ; in, ; ; In the formula, , These are the first-order and second-order gradients, respectively. This is the symbol for partial differentials.

[0039] The gain of the split node is: ; In the formula, , , , These are the cumulative sums of the gradients and second-order gradients of the left and right child nodes, respectively; For L2 regularization parameters, This is a penalty term for node splitting. The larger the feature's Gain value, the higher its contribution to sample splitting.

[0040] In this embodiment, a five-fold stratified cross-validation is used, with 80% of the samples in each fold used as the training set and 20% as the validation set. After training at each fold, the importance score of the features is calculated and the top 300 features are extracted. Finally, the frequency of occurrence in each of the five folds is counted. The features of the third degree are used as a stable feature set.

[0041] This embodiment yielded approximately 150 stable bacterial community features, which significantly contributed to the model predictions across multiple folds. Common examples include genus-level bacterial communities such as Bacteroides, Faecalibacterium, and Lactobacillus.

[0042] To ensure the stability of feature importance, this embodiment uses the SHAP (Shapley Additive Exlanations) method to perform interpretive analysis on the XGBoost model output. SHAP defines the marginal contribution of each feature to the predicted output based on cooperative game theory: ; In the formula, For the entire feature set; For features not included subset of For the model in subset The SHAP value quantifies the average direction and magnitude of each feature's influence on the model's predictions. The results show that some bacterial communities, such as *Bacteroides vulgatus* and *Ruminococcus gnavus*, have relatively high absolute SHAP values, indicating that they play a crucial role in the model's determination of depression and control states.

[0043] Step 4: Utilize the stable core feature set obtained in Step 3, and based on the Spearman correlation coefficient among bacterial communities... The proximity relationship is used to construct a hybrid weighted graph structure that reflects the interaction characteristics of the community. This includes the following steps: First, calculate the microbial community. With the microbiome Spearman correlation coefficient: ; In the formula, , respectively microbial communities With the microbiome In the sample rank value in; The sample size is represented by the Spearman coefficient, which reflects the monotonic correlation between features and is suitable for non-normally distributed microbial community data. To avoid directional interference from negative correlations, its absolute value is used as the edge weight. ,Right now An initial adjacency matrix is ​​established based on a threshold strategy. ,when (When the initial threshold is set to 0.15) connect the bacterial community With the microbiome ,otherwise .

[0044] Then, execute Nearest neighbor edges are used to enhance graph connectivity; for each node, select... The highest relevant neighbor is used to fill in the adjacent edges. The final weighted adjacency matrix A is defined as: ; In the formula, For bacteria Most similar One neighbor; By calculating the graph density function: ; And iteratively adjust the threshold ,make The value is kept between 0.20 and 0.35 to ensure that the network is both sparse enough to highlight key relationships and sufficiently connected to facilitate information dissemination.

[0045] Finally, to more intuitively illustrate the interactions among the bacterial communities, the core community was analyzed by calculating the node degree distribution and weighted degree: ; ; In the formula, This is an indicator function.

[0046] The results show that the hybrid weighted graph structure exhibits an approximately power-law distribution, with high-level nodes mostly being functional core microbial communities, such as Bacteroides and Faecalibacterium. These nodes will play the role of information hubs in the subsequent propagation of the graph neural network.

[0047] Step 5: Input the constructed hybrid weighted graph structure into the improved graph attention neural network model for training. During the training process, monitor the model performance using the working characteristic curve index and dynamically adjust the learning rate.

[0048] In one specific embodiment, the improved graph attention neural network model employs Phylo-GATv2. Its design philosophy utilizes graph structure learning to model the interactions between microbial community features, enabling information to propagate along weighted edges between nodes. Unlike traditional convolutional networks, graph attention networks assign learnable weights to each edge through a self-attention mechanism, thereby automatically emphasizing biologically significant microbial community relationships during feature aggregation.

[0049] like Figure 2 As shown, the input of the Phylo-GATv2 model includes the node feature matrix. with weighted adjacency matrix ,in, The number of nodes (i.e., the number of stable characteristic bacterial communities); Input dimension for each node (set to 1).

[0050] The model consists of three graph attention convolutional layers (GATv2Conv) and one linear output layer. Each layer considers edge weights during information propagation, thus enabling weighted information flow.

[0051] For the microbial community Its neighboring microbial communities First, calculate the unnormalized attention score: ; In the formula, For activation functions; The weight vector is a learnable weight vector; It is the transpose symbol; The feature mapping matrix; For bacteria abundance value; For bacteria abundance value; This is a vector concatenation operation; The weighted term is adjusted by the edge weight; Attention weights are obtained by normalizing the neighboring microbial communities using the Softmax function. ; In the formula, the normalized For bacteria For the microbial community The intensity of the impact; For gut microbiota correlation; For bacteria The set of neighbors; For bacteria Its neighboring microbial communities The degree of correlation between them.

[0052] Update the gut microbiota Embedding vector: ; In the formula, This is the updated microbial community embedding vector; Since it is a non-linear activation function, the ELU function is chosen to prevent gradient vanishing. For bacteria The set of neighboring nodes.

[0053] To enhance feature representation capabilities, a multi-head attention mechanism is employed. This mechanism allows for the parallel learning of different relationship patterns among microbial communities across multiple feature subspaces, thereby improving the network's ability to capture complex ecological associations. Each attention head independently calculates its weights, and the concatenated results are as follows: ; In the formula, For bacteria Multi-head attention outputs feature vectors; For the number of heads; For the first A person's attention to microbial flora For the microbial community Normalized attention weights; For the first The feature mapping matrix corresponding to each attention head; For bacteria The input feature vector.

[0054] The above operations can learn different relationship patterns between bacterial communities in parallel across multiple feature subspaces, thereby improving the network's ability to capture complex ecological associations.

[0055] Layer normalization (LayerNorm) and Dropout operations are added to each convolutional layer. The LayerNorm layer is used to maintain training stability, and the Dropout layer randomly deactivates some nodes to suppress overfitting. Layer normalization ensures numerical stability under different node degree distributions, and Dropout (set to 0.3) reduces the risk of overfitting by randomly deactivating some neurons.

[0056] The model's output layer uses global mean pooling to aggregate node features into a global sample representation. It aggregates all node embeddings to obtain sample-level feature representations. Finally, a linear layer and a sigmoid function output the probability score of the sample as depression.

[0057] The weighted binary cross-entropy loss function is used during training to effectively balance the class imbalance problem; ; In the formula, The number of samples; , These are the weight coefficients for the positive and negative classes, respectively. , , The proportion of positive class samples; For the first The true label of each sample; For the Sigmoid function; This is the logit value output by the model.

[0058] The model optimizer uses AdamW, with a weight decay term used to constrain parameter size, and the learning rate is set to... Weight decay The scheduler uses ReduceLROnPlateau, with the validation set AUC value as the monitoring metric. The learning rate is automatically reduced when the validation AUC shows no improvement for 10 consecutive epochs. The training epochs are set to 800, the batch size to 8, and the early stopping threshold to 30 epochs.

[0059] During the model training phase, this embodiment uses five-fold cross-validation to evaluate the model's performance and stability. The AUC value of the validation set is recorded and calculated during each fold of training to assess the model's discriminative ability. The results show that the AUC differences between different folds are small, indicating that the model has good generalization performance.

[0060] The model employs a Graph Attention Network (GAT) structure, incorporating phylogenetic relationships among bacterial communities as graph edge weights, and learning weighted interactions between communities through an attention mechanism. During the training phase, the AUC metric is used to monitor model performance and dynamically adjust the learning rate to ensure stable model optimization.

[0061] During the model inference phase, ROC curves and AUC values ​​were calculated using independent test sets to evaluate the classification performance of the final model. The results show that the model maintains a high AUC in multi-fold validation, indicating that this method can effectively distinguish between depressed and non-depressed samples.

[0062] S6. Use the trained graph attention neural network model to identify depression samples and output confidence scores to assist clinical decision-making.

[0063] In one specific embodiment, a dynamic classification threshold is calculated using the Receiver Operating Characteristic (ROC) curve and the Youden index method to achieve adaptive depression detection. The true positive rate (TPR) and false positive rate (FPR) are calculated at different thresholds on the target samples. ; And according to the Youden formula: ; Find the optimal classification threshold corresponding to the maximum value: ; In the formula, This represents the number of samples that were actually MDDs and were correctly predicted as MDDs by the model. This represents the number of samples that were actually Control but were incorrectly predicted as MDD by the model. This represents the number of samples that were actually MDDs but were incorrectly predicted as Controls by the model. This represents the number of samples that were actually Controls and were correctly predicted as Controls by the model. The Youden index is a metric that comprehensively measures the model's ability to distinguish between different models; a higher value indicates better discrimination performance. For mathematical operators, the subscript represents the argument (parameter) that maximizes the function. This clarifies that the independent variable to be optimized is the classification threshold. ; This is the classification threshold.

[0064] When predicting probability When the threshold is set, the sample is classified as MDD; otherwise, it is classified as Control. This threshold is data-adaptive and unaffected by sample distribution shifts, thus significantly improving the model's generalization performance across different populations.

[0065] This invention has many beneficial effects: First, at the feature level, this invention significantly improves the consistency and repeatability of feature selection through multi-stage feature screening and cross-validation stability analysis, solving the problems of feature drift and strong sample dependence in traditional methods. Secondly, at the structural level, by constructing the Spearman-KNN hybrid weighted graph, the ecological synergy among the microbial communities is explicitly integrated into the model, so that the network no longer relies solely on independent variables, but can learn the interaction patterns within the microbial community system, thereby improving the biological interpretability and predictive reliability. Third, at the algorithm level, by improving the graph attention network structure, the model utilizes the edge weight information and multi-channel feature fusion mechanism in attention calculation, enabling the model to automatically identify key bacterial community nodes and their associated paths during information propagation, thereby achieving dynamic weighted optimization of feature aggregation and significantly improving the model's recognition ability. Fourth, in terms of model training strategy, dynamic learning rate adjustment and random deactivation mechanism are adopted to effectively prevent model overfitting and enhance its generalization performance under small sample conditions, which is particularly suitable for the actual situation of limited sample size and significant individual differences in adolescent microbial community data.

[0066] This invention has broad application prospects, not only applicable to the analysis and prediction of depression, but also extend to the microbiome analysis of other mental or metabolic diseases, such as anxiety disorders, bipolar disorder, or obesity risk prediction analysis. Cross-disease transfer learning can be achieved by replacing the input dataset and training target.

[0067] Example 2 like Figure 3 As shown, a system for predicting adolescent depression based on gut microbiota, using the method described in Example 1, includes the following modules: Data import module: used to collect DNA sequencing data of gut microbiota in depressed and non-depressed adolescents, and to perform bioinformatics preprocessing and species annotation; Sequence processing module: The species abundance table and health labels of the samples obtained after the data import module are processed are used to build a feature matrix and perform standardization processing to generate a standardized feature matrix and sample label file; Feature selection module: Based on gradient boosting tree and combined with feature importance assessment and interpretability analysis, multi-fold cross-validation is performed to obtain a stable core feature set; using the stable core feature set, a hybrid weighted graph structure is constructed based on the Spearman correlation coefficient and proximity relationship between bacterial communities; Graph construction module: Utilizes the stable core feature set output by the feature selection module, and constructs a hybrid weighted graph structure based on the Spearman correlation coefficient and proximity relationship between bacterial communities; Graph Neural Network Training Module: Inputs the hybrid weighted graph structure output by the graph construction module into the improved graph attention neural network model for training. During the training process, the model performance is monitored using the working feature curve index and the learning rate is dynamically adjusted. Prediction output module: Utilizes a trained graph attention neural network model to identify depression samples and output confidence scores to assist in clinical decision-making.

[0068] This invention discloses a system for predicting adolescent depression based on gut microbiota, which can be installed in a computer device. The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a program for predicting adolescent depression based on gut microbiota. The memory includes at least one type of readable storage medium, including flash memory, a portable hard drive, a multimedia card, a card-type memory (e.g., SD or DX memory), magnetic storage, a hard disk, an optical disk, etc. The processor is the control core of the electronic device, connecting various components of the computer device via various interfaces and lines. It executes programs or modules stored in the memory and accesses data stored in the memory to perform various functions and process data.

[0069] The module described in this invention refers to a series of computer program segments that can be executed by the processor of a computer device and can perform a fixed function, and which are stored in the memory of the computer device.

[0070] The system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0071] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0072] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall fall within the scope of the present invention.

Claims

1. A method for predicting adolescent depression based on gut microbiota, characterized in that, Includes the following steps: S1. Collect DNA sequencing data of gut microbiota from depressed and non-depressed adolescents, and perform bioinformatics preprocessing and species annotation. S2. Use the species abundance table and sample health labels obtained after processing S1 to build a feature matrix, and perform standardization processing to generate a standardized feature matrix and sample label file. S3. Based on gradient boosting trees and combined with feature importance evaluation and interpretability analysis, multi-fold cross-validation is performed to obtain a stable set of core features; S4. Utilize a stable core feature set, and based on the Spearman correlation coefficient among bacterial communities and Proximity relationships are used to construct a hybrid weighted graph structure; S5. Input the constructed hybrid weighted graph structure into the improved graph attention neural network model for training. During the training process, monitor the model performance using the working feature curve index and dynamically adjust the learning rate. S6. Use the trained graph attention neural network model to identify depression samples and output confidence scores to assist clinical decision-making.

2. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, Includes the following steps: In S1, the biological information preprocessing and species annotation include the following steps: Sequencing data were input into the QIIME2 platform to remove adapter and primer sequences; Perform paired-end sequence merging and quality control; Perform chimeric removal sequence detection to eliminate false positive sequences; The bacterial community operational taxonomic units are generated and then annotated using a species classifier.

3. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, S2 includes the following steps: Low abundance filtering was performed on the bacterial community abundance in the abundance table; After low abundance filtering is completed, a centralized logarithmic ratio transformation is performed. Finally, Z-score standardization was performed to unify the feature distribution.

4. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, S3 includes the following steps: Multi-stage feature selection is performed based on gradient boosting trees. Feature importance and interpretability metrics are calculated in each training fold, and features that repeat in different folds are counted. Interpretive analysis of the gradient boosting tree output is performed using SHAP values; The importance distribution of features was statistically analyzed using a five-fold cross-validation method. Features that appeared at least three times in the five-fold cross-validation and ranked high on average importance were selected as stable core microbiota.

5. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, S4 includes the following steps: Calculating microbial communities With the microbiome The Spearman correlation coefficient was used as the edge weight; An edge connection is established when the edge weight between bacterial communities is greater than a set threshold. If the number of connections to a node is lower than the set value, then execute... Nearest neighbor edge completion, select for each node By adding edges to the highest-relevant neighbors to enhance the connectivity of the graph, a weighted adjacency matrix is ​​obtained: ; The threshold is adjusted iteratively by calculating the graph density function to prevent excessive smoothing of information. In the formula, The edge weights; For bacteria Most similar One neighbor; The number of bacteria; This is an indicator function.

6. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, S5 includes the following steps: Node feature matrix with weighted adjacency matrix The input is fed into an improved graph attention neural network model for training; where, The number of nodes; The input dimension for each node; The improved graph attention neural network model is Phylo-GATv2, which includes three graph attention convolutional layers and one linear output layer. After each layer is computed, the model maintains numerical stability through layer normalization and uses the Dropout strategy to prevent overfitting. Training employs a five-fold cross-validation strategy, where each fold of the model stores the weight parameter with the highest AUC value on the validation set. Finally, multiple optimal models are integrated for prediction, and a comprehensive result is output to improve the model's generalization ability.

7. The method for predicting adolescent depression based on gut microbiota according to claim 6, characterized in that, The training includes the following steps: For the microbial community Its neighboring microbial communities First, calculate the unnormalized attention score: ; The attention weights are obtained by normalizing the neighbor nodes using the Softmax function. ; Update the gut microbiota Embedding vector: ; A multi-head attention mechanism is used, where each attention head independently calculates its weights and the results are concatenated. ; The weighted binary cross-entropy loss function is used during training: ; The optimization algorithm uses AdamW, with learning and weight decay settings, and the scheduler uses ReduceLROnPlateau, with the validation set AUC value as the monitoring metric. In the formula, For activation functions; The weight vector is a learnable weight vector; It is the transpose symbol; The feature mapping matrix; For bacteria abundance value; For bacteria abundance value; This is a vector concatenation operation; The weighted term is adjusted by the edge weight; For bacteria For the microbial community The intensity of the impact; For gut microbiota correlation; For bacteria Its neighboring microbial communities The degree of correlation between them; For bacteria The set of neighboring nodes; This is the updated microbial community embedding vector; It is a non-linear activation function; For bacteria Multi-head attention outputs feature vectors; For the number of heads; For the first The microbial community in attention For the microbial community Normalized attention weights; For the first The feature mapping matrix corresponding to each attention head; For bacteria The input feature vector; The number of samples; , These are the weight coefficients for the positive and negative classes, respectively. , , The proportion of positive class samples; For the first The true label of each sample; For the Sigmoid function; This is the logit value output by the model.

8. The method for predicting adolescent depression based on gut microbiota according to claim 1, characterized in that, In S5, a dynamic classification threshold is calculated based on the AUC curve. The dynamic classification threshold prediction stage automatically selects the optimal classification threshold using the ROC curve and the Youden index.

9. A system for predicting adolescent depression based on gut microbiota, using the method described in any one of claims 1-8, characterized in that, include: Data import module: used to collect DNA sequencing data of gut microbiota in depressed and non-depressed adolescents, and to perform bioinformatics preprocessing and species annotation; Sequence processing module: The species abundance table and health labels of the samples obtained after the data import module are processed are used to build a feature matrix and perform standardization processing to generate a standardized feature matrix and sample label file; Feature selection module: Based on gradient boosting tree and combined with feature importance evaluation and interpretability analysis, multi-fold cross-validation is performed to obtain a stable core feature set; A stable set of core features was used, and a hybrid weighted graph structure was constructed based on the Spearman correlation coefficient and proximity relationship among bacterial communities. Graph construction module: Utilizes the stable core feature set output by the feature selection module, and constructs a hybrid weighted graph structure based on the Spearman correlation coefficient and proximity relationship between bacterial communities; Graph Neural Network Training Module: Inputs the hybrid weighted graph structure output by the graph construction module into the improved graph attention neural network model for training. During the training process, the model performance is monitored using the working feature curve index and the learning rate is dynamically adjusted. Prediction output module: Utilizes a trained graph attention neural network model to identify depression samples and output confidence scores to assist in clinical decision-making.

Citation Information

Patent Citations

  • Microbial marker combination, method, system, equipment and medium for diagnosing or predicting depression

    CN118813841A

  • Personalized diagnosis method for intestinal flora and obesity based on graph attention network

    CN119380974A

  • Microbial marker combination for predicting colorectal cancer neoadjuvant chemotherapy sensitivity and application thereof

    CN120350126A

  • Radiotherapy decision support system based on genetic characteristics of tumors

    CN120356621A

  • Machine learning-based autism spectrum disorder diagnosis method and device using metabolite as marker

    US20220373563A1

Cited By

  • Full-process quality control type human intestinal flora resource library construction method and system

    CN121922215A

  • Formula flora construction method and device, electronic equipment and storage medium

    CN122090960A

  • Formulation bacterial community construction method and device, electronic equipment and storage medium

    CN122090960B