Depression brain function connection analysis method combining time sequence coding and synaptic graph Transformer

By combining temporal coding and synaptic graph Transformer methods, a functional-dynamic synaptic graph neural network model, FDSyn-GNN, was constructed. This model addresses the issues of data heterogeneity and noise sensitivity in existing techniques for analyzing brain functional connectivity in depression, enabling precise analysis and personalized treatment support for depression, and enhancing the comprehensiveness and practicality of brain functional connectivity analysis.

CN121144947APending Publication Date: 2025-12-16UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511287961.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing methods for analyzing brain functional connectivity in depression rely on manual feature extraction, which is difficult to cope with the heterogeneity and noise sensitivity of functional imaging data. They also ignore the temporal characteristics of the BOLD signal, and the dynamic temporal characteristics of the BOLD signal are often overlooked, which limits their ability to capture temporal changes in brain function. Furthermore, the information transmission mechanism in GNNs often ignores the strength of inter-brain connections, resulting in a lack of biological specificity and discriminative ability in node updates.

Method used

By combining temporal coding and synaptic Transformer, a functional-dynamic synaptic neural network model, FDSyn-GNN, is constructed by collecting and preprocessing rs-fMRI data. The model includes a dynamic Bi-GRU timestamp encoding module, a functional-dynamic graph construction module, and a multi-layer synaptic Transformer encoder module. Feature learning and prediction are then performed to achieve temporal modeling of neural activity sequences in brain regions and a structured representation of dynamic connectivity relationships.

Benefits of technology

It enables precise analysis of brain functional connectivity in depression, improves the objectivity and reliability of brain function analysis, reduces subjective bias, assists doctors in making more efficient and accurate judgments, and provides objective and valuable auxiliary information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144947A_ABST
    Figure CN121144947A_ABST
Patent Text Reader

Abstract

The invention discloses a depression brain function connection analysis method combining time sequence coding and a synaptic graph Transformer, and the method comprises the steps: based on resting state functional magnetic resonance imaging data, firstly extracting blood oxygen level dependence signals of a plurality of predefined brain regions, constructing time sequence features, then constructing a function-dynamic synaptic graph neural network model FDSyn-GNN, and finally, constructing a function-dynamic synaptic graph neural network model FDSyn-GNN and a function-dynamic synaptic graph neural network model FDSyn-GNN and a function-dynamic synaptic graph neural network model FDSyn-GNN; the method comprises the following steps: performing time sequence modeling on a brain region neural activity sequence to capture a dynamic evolution rule, modeling a dynamic connection relationship between brain regions, performing structured representation learning, and finally realizing efficient analysis on a brain function connection mode by fusing time sequence characteristics and synaptic connection characteristics. The method provided by the invention can provide support for subsequent pattern recognition, biomarker positioning or other cognitive neuroscience related tasks, has good dynamic modeling ability and structural interpretability, is helpful for improving objectivity and reliability of brain function analysis, and provides objective and valuable auxiliary information for clinical research and decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep learning and neuroimaging technology, specifically relating to a method for analyzing brain functional connectivity in depression by combining temporal coding and synaptic graph Transformer. Background Technology

[0002] Major depressive disorder (MDD) is a prevalent mental illness affecting approximately 300 million people worldwide, and its incidence continues to rise. Nearly half of patients experience relapse after their first episode. Current clinical diagnosis relies primarily on subjective assessments and standardized rating scales, methods prone to misdiagnosis or omission. Furthermore, patient responses to treatment vary significantly, and objective biomarkers for assessing treatment effectiveness and monitoring disease progression remain very limited. Therefore, early and objective identification of MDD and the discovery of reliable biomarkers are crucial for optimizing intervention strategies, advancing personalized treatment, and achieving effective disease surveillance.

[0003] With the development of neuroimaging technology, especially resting-state functional magnetic resonance imaging (rs-fMRI), its superior spatiotemporal resolution and ability to capture whole-brain activity have led to its widespread application in the analysis of mental illnesses. A common approach is to construct a whole-brain functional connectivity matrix (FCM) based on blood oxygen level-dependent (BOLD) time series data from fMRI to reflect the functional interactions between brain regions. Numerous studies have shown that patients with mental illnesses often exhibit abnormal functional connectivity (FC) patterns, which are closely related to clinical symptoms. Therefore, brain functional connectivity analysis not only aids in the classification of mental illnesses but also supports the discovery of potential biomarkers.

[0004] Existing analytical methods typically rely on manual feature extraction, which not only requires advanced neuroimaging expertise but also struggles to address the heterogeneity and sensitivity to noise in functional imaging data. Given the graph structure inherent in functional neural networks (FCMs), graph neural networks (GNNs) have been widely used to identify abnormal patterns of functional connectivity in the brain to aid in the detection of mental illnesses. However, current research often overlooks the dynamic temporal characteristics of the BOLD signal, thus limiting its ability to capture temporal changes in brain function. Furthermore, the information transfer mechanisms in GNNs often neglect the strength of inter-brain connections, resulting in a lack of biological specificity and discriminative power in node updates. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method for analyzing brain functional connectivity in depression that combines temporal coding and synaptic graph Transformer, enabling precise and effective analysis of brain functional connectivity in depression.

[0006] The technical solution adopted in this invention is: a method for analyzing brain functional connectivity in depression by combining temporal coding and synaptic graph Transformer, the specific steps of which are as follows:

[0007] S1. Collect the rs-fMRI data of the subjects as a training dataset, perform preprocessing, and extract the BOLD signal of the corresponding ROI from the preprocessed training dataset according to the predefined brain atlas.

[0008] The subjects included patients and healthy control groups; the preprocessing included: (1) discarding the first 10 volumes of the BOLD signal; (2) head motion correction; (3) spatial normalization; (4) smoothing; and (5) bandpass filtering in the range of 0.01-0.1 Hz. The predefined brain atlases included: an automated anatomical labeling atlas, a Harvard-Oxford atlas, and a human connectome project atlas.

[0009] Let the time series representation of each subject's data in the preprocessed training set be... Where R represents the number of brain regions divided in the atlas, and T represents the length of the sampling time series. Represents the real number field, b R This represents the time series of the R-th predefined brain region in the atlas.

[0010] S2. The Pearson correlation algorithm is used to calculate the BOLD signal obtained in step S1 to obtain the corresponding functional connection matrix FCM, and each functional connection matrix FCM is abstracted into static functional graph structure data.

[0011] For each subject's time series B, the Pearson correlation algorithm (PCC) is used to calculate the corresponding functional connectivity matrix. The matrix X serves as the characteristic matrix of the nodes in the graph, and its calculation process is expressed as follows:

[0012] X(i,j)=PCC(b i ,b j ),(i,j=1,2,…,R)

[0013] Among them, b i and b j This represents the time series data of the i-th and j-th predefined brain regions in the atlas, with PCC representing the Pearson correlation algorithm. Functional connectivity matrix. Features in row i This represents the connection strength between the i-th node and all R nodes.

[0014] Then, the obtained functional connectivity matrix X is thresholded, retaining edges with strength greater than the threshold as connected edges, and treating the remaining edges as disconnected edges. That is, edges with strength greater than the threshold are treated as 1, and edges with strength less than the threshold are treated as 0, resulting in a sparse binary adjacency matrix.

[0015] Finally, the rs-fMRI information of each subject's data was structured into a static functional map G = (X, A).

[0016] S3. Construct the functional-dynamic synapse graph neural network model FDSyn-GNN;

[0017] The FDSyn-GNN network model includes: a dynamic Bi-GRU timestamp encoding module, a functional-dynamic graph construction module, a multi-layer synaptic graph Transformer encoder module, and a prediction module.

[0018] The dynamic Bi-GRU timestamp encoding module employs the BGTE method, which uses a Bi-GRU network for dynamic temporal modeling. The functional-dynamic graph construction module includes a linear transformation layer, a max-pooling layer, and an average pooling layer. The multi-layer synaptic graph Transformer encoder module uses an L-layer synaptic graph Transformer encoder for feature learning, with each encoder layer including an SGT module, a SERO module, and a linear transformation layer. The prediction module is used for diagnostic decision-making and outputs the predicted diagnostic results.

[0019] S4. Based on step S3, take the BOLD signal data and static functional map structure data corresponding to each rs-fMRI data obtained in steps S1 and S2 of the training dataset as input to the FDSyn-GNN network model, and take the patients or healthy control groups corresponding to each rs-fMRI data in the training dataset as data labels to train the FDSyn-GNN network model.

[0020] S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features.

[0021] S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph.

[0022] S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation.

[0023] S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks.

[0024] S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed.

[0025] S5. Input the BOLD signal and static functional map structure data corresponding to the rs-fMRI data to be analyzed into the FDSyn-GNN network model trained in step S4 to obtain the analysis results.

[0026] Furthermore, step S4 is specifically as follows:

[0027] S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features.

[0028] For the BOLD signal of each sample First, it is expanded into a time series. Each b t ′ Let R represent the ROI-level feature vector of length R at time point t, where t = 1, 2, ..., T.

[0029] Then sequence B T By inputting into the Bi-GRU network, the hidden states are extracted in both the forward and backward directions, enabling bidirectional modeling of the signal time dependency.

[0030] The forward GRU calculation process is expressed as follows:

[0031]

[0032] The expression for the reverse GRU calculation process is as follows:

[0033]

[0034]

[0035] Among them, g t and r t These represent the update gate and the reset gate, respectively. → indicates a forward GRU, and ← indicates a reverse GRU. Indicates either a forward GRU or a reverse GRU; Indicates the candidate hidden state. Indicates the current hidden state; W g W r W represents the corresponding weight matrix; σ(·) represents the Sigmoid activation function; and ⊙ represents element-wise multiplication.

[0036] Then the bidirectional hidden state representation h at time t t The calculation expression is as follows:

[0037]

[0038] Finally, the output of the Bi-GRU network is a timestamp feature representation. Where 2h represents the dimension of the bidirectional hidden state.

[0039] S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph.

[0040] First, the timestamp features are mapped to the ROI space through a linear transformation to obtain a region-level embedding representation. The expression is as follows:

[0041]

[0042] Here, Linear represents a linear transformation operation.

[0043] Then to Max pooling and average pooling operations are performed along the time axis to obtain abnormal activation patterns and baseline activity trends in brain regions, thus splicing together the brain region-level temporal feature representation X. t The expression is as follows:

[0044]

[0045] Where MaxPool represents the maximum pooling operation and AvgPool represents the average pooling operation; express The transpose of .

[0046] Then, the static functional connectivity features corresponding to each brain region obtained in step S2 are... With dynamic characteristics The features are concatenated along the feature dimension to obtain the final node feature representation. Finally, X is represented based on node characteristics. D The functional dynamic graph G is constructed by corresponding to the adjacency matrix A. D =(X D A).

[0047] S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation.

[0048] In each layer of the Transformer synapse graph encoder, the SGT module uses three sets of learnable linear mapping matrices to map node features to query vector Q, key vector K, and value vector V, respectively, to achieve the calculation of the attention mechanism across nodes. In each attention head, the expression for calculating the dynamic attention matrix attn is as follows:

[0049]

[0050] Where SoftMax represents the normalization function, d K Denotes the dimension of K; K T This represents the transpose of K.

[0051] Then, the attention matrix attn is multiplied element-wise with the original adjacency matrix A, and the value vector V is weighted and then multiplied with the input node features X. D After performing a self-loop connection, the updated node feature X is calculated. u The overall calculation expression for SGT is as follows:

[0052]

[0053] Here, ⊙ represents element-wise multiplication. This indicates element-wise addition.

[0054] Then update the node feature X u The data is fed into the SERO module for readout and, together with the adjacency matrix A, constructs a new graph structure, which serves as the input to the next-layer SGT module. The SERO module operates through a "compression-excitation" mechanism, first processing the node features X... u A global average is performed, and then weights are calculated using a multilayer perceptron (MLP) and activation function in the SERO module. Finally, these weights are applied to the node features for weighting and then aggregated again. The calculation process is expressed as follows:

[0055]

[0056] Among them, Z l This represents the graph-level representation obtained by reading the output of the l-th layer SGT module through the SERO module and then passing it through the Linear transformation layer. Avg(·) represents the averaging operation on the node dimension.

[0057] Finally, through linear transformation, Z is adjusted according to the requirements of downstream tasks. l The mapping is used to represent the final feature dimension.

[0058] S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks.

[0059] All readout features Z from step S43 l The data is then fused and input into the prediction module, where the predicted probability Pred is generated using the Sigmoid function. The specific expression is as follows:

[0060]

[0061] Where L represents the number of synaptic graph Transformer encoder layers in the multi-layer synaptic graph Transformer encoder module.

[0062] After obtaining the output Pred through the entire FDSyn-GNN network model, the error is calculated using cross-entropy loss and the network weights are updated via backpropagation, as shown in the following expression:

[0063]

[0064] Where Loss represents the cross-entropy loss, N represents the total number of subjects during training, and y i p represents the true label of the i-th subject. i ∈[0,1] represents the corresponding diagnostic prediction value in the classification task, i.e., y i The corresponding predicted value.

[0065] S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed.

[0066] The FDSyn-GNN network model is trained using a pre-defined batch size and number of iterations.

[0067] The beneficial effects of this invention are as follows: Based on resting-state functional magnetic resonance imaging (fMRI) data, the method first extracts blood oxygenation level-dependent signals from multiple predefined brain regions and constructs time-series features. Then, it constructs a functional-dynamic synaptic map neural network model (FDSyn-GNN) to perform temporal modeling of brain region neural activity sequences to capture their dynamic evolution patterns. Next, it models the dynamic connectivity relationships between brain regions and performs structured representation learning. Finally, by fusing temporal features and synaptic connection features, it achieves efficient analysis of brain functional connectivity patterns. This method can support subsequent pattern recognition, biomarker localization, or other cognitive neuroscience-related tasks. It possesses excellent dynamic modeling capabilities and structural interpretability, helping to improve the objectivity and reliability of brain function analysis. It provides objective and valuable auxiliary information for clinical research and decision-making, reduces subjective bias, and assists physicians in making more efficient and accurate judgments. Attached Figure Description

[0068] Figure 1 This is a flowchart of a brain functional connectivity analysis method for depression that combines temporal coding and synaptic graph Transformer according to the present invention.

[0069] Figure 2 This is a diagram of the FDSyn-GNN architecture of the functional-dynamic synaptic graph neural network model in an embodiment of the present invention. Detailed Implementation

[0070] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0071] like Figure 1 The flowchart of the present invention, which combines temporal coding and synaptic graph Transformer for analyzing brain functional connectivity in depression, is shown below. The specific steps are as follows:

[0072] S1. Collect the rs-fMRI data of the subjects as a training dataset, perform preprocessing, and extract the BOLD signal of the corresponding ROI (Region of Interest) from the preprocessed training dataset according to the predefined brain atlas;

[0073] The subjects included patients and healthy control groups; the preprocessing included: (1) discarding the first 10 volumes of the BOLD signal to reduce initial signal instability; (2) head motion correction to correct for the influence of head movement during the scanning process; (3) spatial normalization to make the image conform to standard anatomical space; (4) smoothing to improve the signal-to-noise ratio; and (5) bandpass filtering in the range of 0.01-0.1 Hz to isolate the frequency range related to resting state fluctuations. The predefined brain atlases included: Automated Anatomical Labeling (AAL) atlas, Harvard-Oxford Atlas (HO) atlas, and Human Connectome Project (HCP) atlas. In this embodiment, the brain atlas used is the Automated Anatomical Labeling (AAL) atlas.

[0074] Let the time series representation of each subject's data in the preprocessed training set be... Where R represents the number of brain regions divided in the atlas, and T represents the length of the sampling time series. Represents the real number field, b R This represents the time series of the R-th predefined brain region in the atlas.

[0075] S2. The BOLD signal obtained in step S1 is calculated using the Pearson correlation algorithm to obtain the corresponding functional connectivity matrix (FCM), and each functional connectivity matrix (FCM) is abstracted into static functional graph structure data (i.e., generating feature matrices and adjacency matrices at the node / ROI level).

[0076] For each subject's time series B, the corresponding functional connectivity matrix is ​​calculated using the Pearson correlation coefficient (PCC) algorithm. The matrix X serves as the characteristic matrix of the nodes in the graph, and its calculation process is expressed as follows:

[0077] X(i,j)=PCC(b i ,b j ),(i,j=1,2,…,R)

[0078] Among them, b i and b j This represents the time series data of the i-th and j-th predefined brain regions in the atlas, and PCC stands for Pearson correlation algorithm. The feature vector of each node represents its connection strength / correlation with all nodes, and the functional connectivity matrix... Features in row i This represents the connection strength between the i-th node and all R nodes.

[0079] The FCM generated by PCC is a complete graph, which may contain a large number of pseudo-connections or irrelevant connections. Therefore, the obtained functional connectivity matrix X is thresholded. In this embodiment, the top 30% of edges by strength are retained as connected edges, and the remaining edges are considered disconnected. That is, edges with strength greater than the threshold are treated as 1, and edges with strength less than the threshold are treated as 0, resulting in a sparse binary adjacency matrix.

[0080] Finally, the rs-fMRI information of each subject's data is structured into a static functional map G=(X,A) for subsequent feature extraction or graph neural network processing.

[0081] S3. Construct a Functional-Dynamic Synaptic Graph Neural Network (FDSyn-GNN);

[0082] like Figure 2 As shown, the FDSyn-GNN network model includes: a dynamic Bi-GRU timestamp encoding module, a functional-dynamic graph construction module, a multi-layer synaptic graph Transformer encoder module, and a prediction module.

[0083] To fully exploit the dynamic features of the BOLD time series in rs-fMRI signals, the dynamic Bi-GRU timestamp encoding module (BGTE) effectively models its contextual temporal dependencies using the BGTE method, i.e., dynamic temporal modeling is performed through the Bi-GRU network. The functional-dynamic graph construction module includes a linear transform layer, a max pooling layer, and an average pooling layer. In this embodiment, the multi-layer synaptic graph Transformer encoder module uses an L=4-layer synaptic graph Transformer encoder for feature learning. Each encoder layer includes an SGT module (Synaptic graph Transformer), a SERO module (Squeeze-Excitation Readout Module), and a linear transform layer. The prediction module is used for diagnostic decision-making and outputs the predicted diagnostic results.

[0084] S4. Based on step S3, take the BOLD signal data and static functional map structure data corresponding to each rs-fMRI data obtained in steps S1 and S2 of the training dataset as input to the FDSyn-GNN network model, and take the patients or healthy control groups corresponding to each rs-fMRI data in the training dataset as data labels to train the FDSyn-GNN network model.

[0085] S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features.

[0086] S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph.

[0087] S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation.

[0088] S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks.

[0089] S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed.

[0090] S5. Input the BOLD signal and static functional map structure data corresponding to the rs-fMRI data to be analyzed into the FDSyn-GNN network model trained in step S4 to obtain the analysis results.

[0091] In this embodiment, step S4 is specifically as follows:

[0092] S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features.

[0093] For the BOLD signal of each sample First, it is expanded into a time series. Each b t ′ Let R represent the ROI-level feature vector of length R at time point t, where t = 1, 2, ..., T.

[0094] Then sequence B T By inputting into the Bi-GRU network, the hidden states are extracted in both the forward and backward directions, enabling bidirectional modeling of the signal time dependency.

[0095] The forward GRU calculation process is expressed as follows:

[0096]

[0097] The expression for the reverse GRU calculation process is as follows:

[0098]

[0099] Among them, g t and r t These represent the update gate and the reset gate, respectively. → indicates a forward GRU, and ← indicates a reverse GRU. Indicates either a forward GRU or a reverse GRU; Indicates the candidate hidden state. Indicates the current hidden state; W g W r W represents the corresponding weight matrix; σ(·) represents the Sigmoid activation function; and ⊙ represents element-wise multiplication.

[0100] Then the bidirectional hidden state representation h at time t t The calculation expression is as follows:

[0101]

[0102] Finally, the output of the Bi-GRU network is a timestamp feature representation. Where 2h represents the dimension of the bidirectional hidden state.

[0103] S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph.

[0104] To obtain dynamic node representations, the timestamp features are first mapped to the ROI space through a linear transformation, resulting in region-level embedding representations. The expression is as follows:

[0105]

[0106] Here, Linear represents a linear transformation operation.

[0107] To extract the statistical features of each brain region over time, and then... Max pooling and average pooling operations are performed along the time axis to obtain abnormal activation patterns and baseline activity trends in brain regions, thus splicing together the brain region-level temporal feature representation X. t The expression is as follows:

[0108]

[0109] Where MaxPool represents the maximum pooling operation and AvgPool represents the average pooling operation; express The transpose of .

[0110] To integrate static functional connectivity features and dynamic temporal features, the static functional connectivity features corresponding to each brain region obtained in step S2 are then... With dynamic characteristics The features are concatenated along the feature dimension to obtain the final node feature representation. Finally, X is represented based on node characteristics. D The functional dynamic graph G is constructed by corresponding to the adjacency matrix A. D =(X D A).

[0111] S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation.

[0112] like Figure 2 As shown in the SGT module, in each layer of the Transformer encoder, the SGT module uses three sets of learnable linear mapping matrices to map node features into query vectors (Query, Q), key vectors (Key, K), and value vectors (Value, V), respectively, to realize the calculation of attention mechanisms between nodes, thereby achieving the goal of adaptive modeling of the importance of connections between brain regions. In each attention head, the expression for calculating the dynamic attention matrix attn is as follows:

[0113]

[0114] Where SoftMax represents the normalization function, d K Denotes the dimension of K; K T This represents the transpose of K.

[0115] Then, to enhance the functional relevance of attention, the attention matrix attn is multiplied element-wise with the original adjacency matrix A, limiting attention propagation to paths where functional connections exist. This results in a weighted sum of the value vector V and the input node features X. D After performing a self-loop connection, the updated node feature X is calculated. u The overall calculation expression for SGT is as follows:

[0116]

[0117] Here, ⊙ represents element-wise multiplication. This indicates element-wise addition. For example... Figure 2 The update process of SGT in the middle is visualized. For node 3, its neighboring nodes 1, 2, 4, 5, and R are updated through attention weight w. 13 w 23 w43 w 53 w R3 The feature vectors are weighted and aggregated, and then self-looped with the node's own feature v3 to obtain the updated node representation v3+∑. i v i w i3 .

[0118] Then update the node feature X u The data is fed into the SERO module for readout and, together with the adjacency matrix A, constructs a new graph structure, which serves as the input to the next layer SGT module, forming a multi-layer encoder structure to improve the model's ability to model complex brain network connectivity patterns.

[0119] This embodiment integrates the existing SERO module to enhance the discriminative power of graph-level features, used for the node-level features X output by SGT. u Adaptive aggregation is performed to form a more discriminative graph-level representation. The SERO module operates through a "compression-activation" mechanism, first processing node features X... u A global average is performed, and then weights are calculated using a Multilayer Perceptron (MLP) and activation function in the SERO module. Finally, these weights are applied to the node features for weighting and then aggregated again. The calculation process is expressed as follows:

[0120]

[0121] Among them, Z l This represents the graph-level representation obtained by reading the output of the l-th layer SGT module through the SERO module and then passing it through the Linear transformation layer. Avg(·) represents the averaging operation on the node dimension.

[0122] Finally, through linear transformation, Z is adjusted according to the requirements of downstream tasks. l The mapping is used to represent the final feature dimension.

[0123] S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks.

[0124] This embodiment proposes a multi-layer feature fusion mechanism to integrate the graph-level feature representations output from each coding layer of a synaptic graph neural network, generating a stable and highly discriminative final graph representation suitable for modeling various downstream tasks. All readout features Z from step S43 are then integrated. l The data is then fused and input into the prediction module, where the predicted probability Pred is generated using the Sigmoid function. The specific expression is as follows:

[0125]

[0126] Where L represents the number of synaptic Transformer encoder layers in the multi-layer synaptic Transformer encoder module, and in this embodiment, L = 4. The above method effectively utilizes multi-layer feature representation, enhancing the model's adaptability to complex brain map structures, while also improving generalization performance and stability in downstream tasks.

[0127] After obtaining the output Pred through the entire FDSyn-GNN network model, the error is calculated using cross-entropy loss and the network weights are updated via backpropagation, as shown in the following expression:

[0128]

[0129] Where Loss represents the cross-entropy loss, N represents the total number of subjects during training, and y i p represents the true label of the i-th subject. i ∈[0,1] represents the corresponding diagnostic prediction value in the classification task, i.e., y i The corresponding predicted value.

[0130] S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed.

[0131] The FDSyn-GNN network model is trained using a pre-defined batch size and number of iterations. In this embodiment, the batch size is set to 4, and the number of iterations is set to 30. Training stops when 30 iterations are completed, resulting in a fully trained FDSyn-GNN.

[0132] This embodiment further validated the invention through experiments and compared its technical effects with existing technologies. Based on rs-fMRI data of recurrent depression collected by the Rest-meta-MDD consortium (including 189 patients with depression and 426 healthy controls), a five-fold cross-validation experiment was conducted on the analysis method of this invention. The method was evaluated using five performance metrics: accuracy (ACC), precision (PRE), recall, F1 score (F1), and area under the curve (AUC). The performance metrics comparison results between the method of this invention and existing technologies are shown in Table 1.

[0133] Table 1

[0134] method ACC (%) PRE(%) Recall (%) F1(%) AUC(%) BrainNetCNN 68.61±3.62 52.19±9.69 34.38±6.78 38.47±5.64 70.21±5.89 BrainGNN 66.34±2.98 44.67±6.28 38.16±9.42 40.60±6.80 66.04±3.67 FBNETGEN 70.89±2.59 54.12±5.69 38.64±3.82 44.93±3.81 70.15±4.10 XG-GNN 65.85±3.81 44.99±4.94 41.28±3.66 42.67±2.02 66.36±4.11 Method of the present invention 72.03±3.65 56.60±8.30 51.32±5.39 53.08±1.78 70.27±4.67

[0135] Among these, existing technologies such as BrainNetCNN, BrainGNN, FBNETGEN, and XG-GNN are all methods for brain rs-fMRI analysis published in authoritative international journals. As shown in Table 1, existing methods generally neglect the dynamic temporal characteristics of BOLD signals, limiting their ability to characterize changes in brain function over time. Furthermore, GNN-based methods often ignore the strength of connections between brain regions during information transmission, resulting in node representations lacking biological specificity and discriminative power. The method of this invention introduces a dynamic Bi-GRU timestamp encoding module to model the temporal dependence of brain regions and combines it with a synaptic graph Transformer structure to construct a connection strength-aware graph neural network representation mechanism, thereby enhancing the ability to model information flow and discriminative connections between brain regions. The method of this invention helps improve the accuracy of early diagnosis of depression and support for personalized treatment, enhancing the comprehensiveness and practicality of brain functional connectivity analysis. It can not only accurately identify the disease but also provide crucial data for future treatment strategies. Therefore, the method of this invention can analyze brain functional connectivity in depression more accurately and effectively than current mainstream methods, achieving superior performance.

[0136] In summary, the method of this invention combines the temporal dynamics of rs-fMRI brain activity with spatial connectivity patterns across brain regions, utilizing a functional-dynamic synaptic neural network (FDSyn-GNN) to achieve automated assisted diagnosis of depression-related mental disorders (MDD). This invention introduces a dynamic Bi-GRU timestamp encoding module to extract time-dependent features from the BOLD signal, and a synaptic transformer module to enhance the information transmission capability of cross-brain region connectivity strength perception, improve the discriminative expression of functional connectivity, and ultimately achieve the goal of analyzing brain functional connectivity in depression. This can serve as an objective clinical diagnostic reference, reducing subjective bias and assisting physicians in making more efficient and accurate judgments.

[0137] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of the claims of the invention.

Claims

1. A method for analyzing brain functional connectivity in depression by combining temporal coding and synaptic graph Transformer, the specific steps of which are as follows: S1. Collect the rs-fMRI data of the subjects as a training dataset, perform preprocessing, and extract the BOLD signal of the corresponding ROI from the preprocessed training dataset according to the predefined brain atlas. The subjects included: Patients and healthy control groups; the preprocessing includes: (1) discarding the first 10 volumes of the BOLD signal; (2) head motion correction; (3) spatial normalization; (4) smoothing; (5) bandpass filtering in the range of 0.01-0.1Hz; the predefined brain atlas includes: automatic anatomical labeling atlas, Harvard-Oxford atlas, and human connectome project atlas; Let the time series representation of each subject's data in the preprocessed training set be... Where R represents the number of brain regions divided in the atlas, and T represents the length of the sampling time series. Represents the real number field, b R This represents the time series of the R-th predefined brain region in the atlas; S2. The Pearson correlation algorithm is used to calculate the BOLD signal obtained in step S1 to obtain the corresponding functional connection matrix FCM, and each functional connection matrix FCM is abstracted into static functional graph structure data. For each subject's time series B, the Pearson correlation algorithm (PCC) is used to calculate the corresponding functional connectivity matrix. The matrix X serves as the characteristic matrix of the nodes in the graph, and its calculation process is expressed as follows: X(i,j)=PCC(b i ,b j ),(i,j=1,2,…,R) Among them, b i and b j This represents the time series of the i-th and j-th predefined brain regions in the atlas; PCC represents the Pearson correlation algorithm; functional connectivity matrix. Features in row i This represents the connection strength between the i-th node and all R nodes; Then, the obtained functional connectivity matrix X is thresholded, retaining edges with strength greater than the threshold as connected edges, and treating the remaining edges as disconnected edges. That is, edges with strength greater than the threshold are treated as 1, and edges with strength less than the threshold are treated as 0, resulting in a sparse binary adjacency matrix. Finally, the rs-fMRI information of each subject's data was structured into a static functional map G = (X, A); S3. Construct the functional-dynamic synapse graph neural network model FDSyn-GNN; The FDSyn-GNN network model includes: a dynamic Bi-GRU timestamp encoding module, a functional-dynamic graph construction module, a multi-layer synaptic graph Transformer encoder module, and a prediction module; The dynamic Bi-GRU timestamp encoding module employs the BGTE method, i.e., dynamic temporal modeling is performed through a Bi-GRU network; the functional-dynamic graph construction module includes a linear transformation layer, a max pooling layer, and an average pooling layer; the multi-layer synaptic graph Transformer encoder module uses an L-layer synaptic graph Transformer encoder for feature learning, with each encoder layer including an SGT module, a SERO module, and a linear transformation layer; the prediction module is used for diagnostic decision-making and outputs the predicted diagnostic results. S4. Based on step S3, take the BOLD signal data and static functional map structure data corresponding to each rs-fMRI data obtained in steps S1 and S2 of the training dataset as input to the FDSyn-GNN network model, and take the patients or healthy control groups corresponding to each rs-fMRI data in the training dataset as data labels to train the FDSyn-GNN network model. S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features. S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph. S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation. S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks. S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed. S5. Input the BOLD signal and static functional map structure data corresponding to the rs-fMRI data to be analyzed into the FDSyn-GNN network model trained in step S4 to obtain the analysis results.

2. The method for analyzing brain functional connectivity in depression by combining temporal coding and synaptic graph Transformer as described in claim 1, characterized in that, Step S4 is as follows: S41. Input the BOLD timing signal obtained in step S1 into the dynamic Bi-GRU timestamp encoding module, that is, perform dynamic timing modeling through the bidirectional gated cyclic unit Bi-GRU network and output timestamp features. For the BOLD signal of each sample First, it is expanded into a time series. Each b t ′ Let R represent the ROI-level feature vector of length R at time point t, where t = 1, 2, ..., T; Then sequence B T By inputting into the Bi-GRU network, the hidden states are extracted in both the forward and backward directions, thus achieving bidirectional modeling of the signal time dependency. The forward GRU calculation process is expressed as follows: The expression for the reverse GRU calculation process is as follows: Among them, g t and r t These represent the update gate and the reset gate, respectively. → indicates a forward GRU, and ← indicates a reverse GRU. Indicates either a forward GRU or a reverse GRU; Indicates the candidate hidden state. Indicates the current hidden state; W g W r W represents the corresponding weight matrix; σ(·) represents the Sigmoid activation function; and ⊙ represents element-wise multiplication. Then the bidirectional hidden state representation h at time t t The calculation expression is as follows: Finally, the output of the Bi-GRU network is a timestamp feature representation. Where 2h represents the dimension of the bidirectional hidden state; S42. Input the timestamp feature representation output in step S41 and the static functional graph structure data obtained in step S2 into the functional-dynamic graph construction module to construct the functional-dynamic graph. First, the timestamp features are mapped to the ROI space through a linear transformation to obtain a region-level embedding representation. The expression is as follows: Wherein, Linear represents a linear transformation operation; Then to Max pooling and average pooling operations are performed along the time axis to obtain abnormal activation patterns and baseline activity trends in brain regions, thus splicing together the brain region-level temporal feature representation X. t The expression is as follows: Where MaxPool represents the maximum pooling operation and AvgPool represents the average pooling operation; express transpose; Then, the static functional connectivity features corresponding to each brain region obtained in step S2 are... With dynamic characteristics The features are concatenated along the feature dimension to obtain the final node feature representation. Finally, X is represented based on node characteristics. D The functional dynamic graph G is constructed by corresponding to the adjacency matrix A. D =(X D A); S43. Input the functional dynamic graph obtained in step S42 into the multi-layer synapse graph Transformer encoder module for feature learning and output the feature dimension representation. In each layer of the Transformer synapse graph encoder, the SGT module uses three sets of learnable linear mapping matrices to map node features to query vector Q, key vector K, and value vector V, respectively, to achieve cross-node attention mechanism computation; in each attention head, the expression for calculating the dynamic attention matrix attn is as follows: Where SoftMax represents the normalization function, d K Denotes the dimension of K; K T Indicates the transpose of K; Then, the attention matrix attn is multiplied element-wise with the original adjacency matrix A, and the value vector V is weighted and then multiplied with the input node features X. D After performing a self-loop connection, the updated node feature X is calculated. u The overall calculation expression for SGT is as follows: Here, ⊙ represents element-wise multiplication. This indicates element-wise addition. Then update the node feature X u The data is fed into the SERO module for readout and, together with the adjacency matrix A, constructs a new graph structure, which serves as the input to the next-layer SGT module. The SERO module operates through a "compression-excitation" mechanism, first processing the node features X... u A global average is performed, and then weights are calculated using a multilayer perceptron (MLP) and activation function in the SERO module. Finally, these weights are applied to the node features for weighting and then aggregated again. The calculation process is expressed as follows: With l =Linear(Avg(σ(MLP(Avg(X u )))⊙X u )) Among them, Z l This represents the graph-level representation obtained by reading the output of the l-th layer SGT module through the SERO module and then through the Linear transformation layer. Avg(·) represents the averaging operation on the node dimension. Finally, through linear transformation, Z is adjusted according to the requirements of downstream tasks. l Mapped to the final feature dimension representation; S44. Concatenate and fuse all feature dimension representations output in step S43, input them into the prediction module to generate prediction probabilities, and output the prediction results of downstream tasks. All readout features Z from step S43 l The data is then fused and input into the prediction module, where the predicted probability Pred is generated using the Sigmoid function. The specific expression is as follows: Wherein, L represents the number of synaptic graph Transformer encoder layers in the multi-layer synaptic graph Transformer encoder module; After obtaining the output Pred through the entire FDSyn-GNN network model, the error is calculated using cross-entropy loss and the network weights are updated via backpropagation, as shown in the following expression: Where Loss represents the cross-entropy loss, N represents the total number of subjects during training, and y i p represents the true label of the i-th subject. i ∈[0,1] represents the corresponding diagnostic prediction value in the classification task, i.e., y i The corresponding predicted value; S45. Repeat steps S41-S45 until the preset number of training iterations is reached, the model converges, and the FDSyn-GNN network model training is completed. The FDSyn-GNN network model is trained using a pre-defined batch size and number of iterations.