A brain mental illness recognition method based on resting-state functional nuclear magnetic resonance imaging

By introducing a random inactivation training model and a Transformer encoder onto a brain functional network dataset and employing a multi-view DropEdge strategy, the accuracy and stability issues of brain and mental disease classification and identification under small sample and noisy conditions were addressed, achieving more efficient brain functional network identification.

CN122289753APending Publication Date: 2026-06-26SOUTH CHINA AGRICULTURAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTH CHINA AGRICULTURAL UNIVERSITY
Filing Date
2026-02-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in classifying and identifying neuropsychiatric disorders under conditions of small sample sizes and noise in brain functional network datasets, and the identification results are unstable.

Method used

We employ a method based on resting-state functional magnetic resonance imaging, combined with a random inactivation training model and a Transformer encoder. By randomly perturbing the brain functional network through a multi-view DropEdge strategy, we generate multiple complementary views to alleviate the structural uncertainty caused by thresholding mapping. Furthermore, we extract multi-view node representations based on shared graph convolutional encoding, model the global interaction between ROIs across long distances, and achieve adaptive aggregation.

Benefits of technology

It improves the accuracy and stability of the identification of neuropsychiatric diseases. Through multi-perspective learning and global interactive modeling, it enhances the model's discriminative ability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289753A_ABST
    Figure CN122289753A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying neuropsychiatric disorders based on resting-state functional magnetic resonance imaging (fMRI). The method includes the following steps: acquiring an fMRI training dataset; selecting a set of data from the fMRI training dataset as the first data; preprocessing the first data to obtain preprocessed fMRI data; inputting the preprocessed fMRI data into a random inactivation training model to obtain fMRI features and fMRI features for each viewpoint; inputting the fMRI features into a neuropsychiatric disorder identification model to obtain predicted neuropsychiatric disorder results; calculating the total loss value and optimizing the random inactivation training model and the neuropsychiatric disorder identification model; selecting another set of data and repeating the process until preset conditions are met; obtaining a trained neuropsychiatric disorder identification model; acquiring fMRI data to be identified; preprocessing the fMRI data to be identified to obtain preprocessed fMRI data to be identified; inputting the preprocessed fMRI data to be identified into the neuropsychiatric disorder identification model to obtain the final neuropsychiatric disorder result. This invention features high identification accuracy and strong stability of the identification results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to artificial intelligence, and more specifically, to a method for identifying brain and mental disorders based on resting-state functional magnetic resonance imaging. Background Technology

[0002] In recent years, deep learning methods, especially Graph Neural Networks (GNNs), have been widely applied to brain network data modeling and brain disease prediction tasks, demonstrating strong representation learning capabilities in the field of network neuroscience. As one of the important application scenarios of GNNs, graph classification tasks aim to learn graph-level representations end-to-end to support downstream class discrimination. To obtain effective graph-level representations, models typically need to simultaneously characterize local structural patterns and global topological regularities, and model the interaction between the two. To achieve this goal, existing research has enhanced the expressive power of GNNs from different perspectives, such as expanding the receptive field to capture higher-order neighborhood information, designing more effective graph pooling / readout operators to improve graph-level aggregation capabilities, and mitigating problems such as excessive smoothing that occur as the network deepens.

[0003] In the context of brain functional networks, functional magnetic resonance imaging (fMRI) is frequently used to construct functional connectivity (FC) networks: nodes are typically represented by regions of interest (ROIs) defined in a brain atlas, and edges are characterized by pairwise correlations between time series of ROIs. Compared to graph data in other domains, brain functional networks are often more structurally complex and affected by factors such as noise and uncertainties in thresholding mapping; at the same time, the size of publicly available brain imaging datasets is usually limited, further increasing the difficulty of learning stable and generalizable graph-level representations. Therefore, learning compact and discriminative graph-level representations under conditions of small samples and noisy structures remains crucial in brain functional network classification research.

[0004] The Transformer architecture has made significant progress in Natural Language Processing (NLP), with BERT and GPT being typical examples. In recent years, this architecture has also been introduced into graph-structured data modeling. Compared to GNNs, which rely on sparse message passing mechanisms, Transformers can alleviate representation degradation problems caused by deep propagation (such as oversmoothing and over-compression) to some extent, and show advantages in capturing long-range dependencies and global information. Existing research has attempted to more effectively integrate graph structural information into Transformer modeling; for example, Graphimer introduces topological priors into graphs through structural encoding, while Structural Attention Transformer (SAT) explicitly injects structural information using subgraph representations. However, given that functional brain network datasets typically have only a few hundred to a few thousand samples, directly using deep models with large parameter sizes is easily limited by small-sample training, resulting in insufficient generalization ability or unstable training, thus limiting the effectiveness of Transformers in this type of task. In summary, existing technologies are not effective for the classification and identification of neuropsychiatric disorders.

[0005] Existing technology discloses a standard digital modeling and verification method and system based on artificial intelligence. It acquires initial multi-source heterogeneous data through multi-source API interfaces; uses the BERT model to perform semantic recognition on text data and establishes a dynamic knowledge graph; processes the structural features of the dynamic knowledge graph based on a GNN graph neural network, uses a Transformer to capture long-range text dependencies, inputs the dynamic knowledge graph into a hybrid neural network model for recognition, and uses the Monte Carlo Dropout method to quantify prediction confidence; selects the optimal modeling paradigm based on the recognition results to establish a digital model, and uses a trained GAN generative adversarial network to generate test cases for the digital model and detect model blind spots. However, this method does not optimize the process for classifying and recognizing neuropsychiatric disorders, resulting in low accuracy in identifying these disorders. Summary of the Invention

[0006] This invention addresses the shortcomings of existing technologies in identifying neuropsychiatric disorders by providing a method for identifying neuropsychiatric disorders based on resting-state functional magnetic resonance imaging (fMRI). This method is characterized by high accuracy and strong stability of the identification results.

[0007] The primary objective of this invention is to solve the aforementioned technical problems. The technical solution of this invention is as follows:

[0008] A method for identifying neuropsychiatric disorders based on resting-state functional magnetic resonance imaging includes: S1: Obtain the fMRI training dataset; the training dataset includes multiple sets of training data; each set of training data includes fMRI data and categories of neuropsychiatric diseases; construct a neuropsychiatric disease identification model and a random inactivation training model; S2: Select a set of data from the fMRI training dataset as the first set of data; S3: Preprocess the fMRI data in the first data to obtain preprocessed fMRI data; S4: Input the preprocessed FMRI data into the random inactivation training model to obtain FMRI features and FMRI features for each viewpoint; S5: Input the FMRI features into the brain and mental disease identification model to obtain the predicted brain and mental disease results; S6: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; S7: Optimize the random inactivation training model and the brain and mental disease identification model based on the total loss value; S8: Select another set of data from the fMRI training dataset as the new first data; repeat steps S3 to S7 until the preset conditions are met; obtain the trained brain and mental disease recognition model; S9: Acquire the fMRI data to be identified; S10: Preprocess the fMRI data to be identified to obtain preprocessed fMRI data to be identified; S11: Input the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.

[0009] Furthermore, the formula for calculating the total loss value is as follows:

[0010] This represents the total loss value. Represents cross-entropy loss, This represents the consistency regularization loss. Indicates the weight.

[0011] Furthermore, the formula for calculating the consistency regularization loss is as follows:

[0012] K represents the total number of viewpoints. This represents the fMRI features at viewpoint k, where k represents the viewpoint. Indicates fMRI features.

[0013] Furthermore, the brain and mental illness identification model includes a first encoder connected end-to-end, a global attention pooling layer, and a multilayer perceptron layer.

[0014] Furthermore, the random deactivation training model includes multiple graph convolutional units and a feature fusion layer; the output of each graph convolutional unit is connected to the input of the feature fusion layer. The graph convolutional unit includes a second encoder connected end-to-end, a graph convolutional layer, and a projection mapping layer.

[0015] Furthermore, the calculation formula for the projection mapping layer is as follows:

[0016] This represents the output of the graph convolutional layer at the k-th graph convolutional unit, where k represents the graph convolutional unit number. This indicates a mapping.

[0017] Furthermore, the calculation formula for the output of the graph convolutional layer is as follows:

[0018]

[0019]

[0020]

[0021] L represents the total number of steps in the graph convolution unit. This represents the output of the second encoder. The k-th graph convolutional unit represents the k-th graph convolutional unit. Step propagation operator, This represents the adjacency matrix of the k-th graph convolutional unit. The k-th graph convolutional unit represents the k-th graph convolutional unit. The first intermediate computation of the step, The k-th graph convolutional unit represents the k-th graph convolutional unit. The second intermediate computational cost of the step This indicates splicing along the feature dimension. represents the operator index in graph convolution, and k represents the graph convolution unit index.

[0022] Furthermore, the adjacency matrix of the k-th graph convolutional unit is calculated using the following formula:

[0023] Each element in the dataset follows a Bernoulli distribution, and A represents the preprocessed fMRI data.

[0024] Furthermore, the preprocessing includes: S01: Correct and segment the fMRI data to obtain a set of ROI time series; S02: Calculate the Pearson correlation coefficient matrix for the ROI time series set; S03: Perform Fisher Z-transform on the Pearson correlation coefficient matrix to obtain the transformed correlation coefficient matrix; S04: Perform a thresholding operation on the Pearson correlation coefficient matrix to obtain a binary adjacency matrix; S05: The transformed correlation coefficient matrix and the binary adjacency matrix are used as preprocessed fMRI data.

[0025] A system for identifying mental disorders based on resting-state functional magnetic resonance imaging includes: Dataset acquisition module: Acquires the fMRI training dataset; the training dataset includes multiple sets of training data; each set of training data includes fMRI data and categories of neuropsychiatric diseases; constructs a neuropsychiatric disease identification model and a random inactivation training model; Data selection module: Selects a set of data from the fMRI training dataset as the first set of data; First preprocessing module: preprocesses the fMRI data in the first data to obtain preprocessed fMRI data; Random inactivation module: Input the preprocessed fMRI data into the random inactivation training model to obtain fMRI features and fMRI features for each viewpoint; First result reasoning module: Input the FMRI features into the brain and mental disease recognition model to obtain the predicted brain and mental disease results; Loss calculation module: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; Optimization module: Based on the total loss value, optimize the random inactivation training model and the brain and mental disease recognition model; Repeat module: Select another set of data from the fMRI training dataset as the new first data; repeat until the preset conditions are met; obtain the trained brain and mental disease recognition model; Data acquisition module: Acquires the fMRI data to be identified; The second preprocessing module preprocesses the fMRI data to be identified to obtain preprocessed fMRI data to be identified. The second result reasoning module inputs the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.

[0026] Compared with the prior art, the beneficial effects of the present invention are: This invention introduces a random inactivation training model to randomly perturb the brain functional network at the structural level, generating multiple complementary perspectives to alleviate the structural uncertainty caused by thresholding graph construction. Simultaneously, it extracts multi-perspective node representations based on shared graph convolutional encoding. Through a brain-psychiatric disease identification model, it models global interactions between distant ROIs, achieving adaptive aggregation of global patterns in the brain functional network.

[0027] In summary, this invention features high recognition accuracy and strong stability of recognition results. Attached Figure Description

[0028] Figure 1 The flowchart is provided for Example 1, which describes a method for identifying brain and mental disorders based on resting-state functional magnetic resonance imaging.

[0029] Figure 2 This is a schematic diagram of the training phase process provided in Example 1.

[0030] Figure 3 This is a schematic diagram of the inference stage process provided in Example 1.

[0031] Figure 4 The flowchart for the preprocessing provided in Example 1.

[0032] Figure 5 This is a schematic diagram of the preprocessing process provided in Example 1.

[0033] Figure 6 A statistical chart of the dataset provided in Example 1.

[0034] Figure 7 The result diagram of the method of the present invention provided in Example 1 in the dataset.

[0035] Figure 8 A comparison chart of the results of the various methods provided in Example 1 on the dataset. Detailed Implementation

[0036] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions; It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

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

[0038] Example 1 like Figure 1, Figure 2 , Figure 3 As shown, a method for identifying brain disorders based on resting-state functional magnetic resonance imaging includes: S1: Obtain the fMRI training dataset; the training dataset includes multiple sets of training data; each set of training data includes fMRI data and categories of neuropsychiatric diseases; construct a neuropsychiatric disease identification model and a random inactivation training model; S2: Select a set of data from the fMRI training dataset as the first set of data; S3: Preprocess the fMRI data in the first data to obtain preprocessed fMRI data; S4: Input the preprocessed FMRI data into the random inactivation training model to obtain FMRI features and FMRI features for each viewpoint; S5: Input the FMRI features into the brain and mental disease identification model to obtain the predicted brain and mental disease results; S6: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; S7: Optimize the random inactivation training model and the brain and mental disease identification model based on the total loss value; S8: Select another set of data from the fMRI training dataset as the new first data; repeat steps S3 to S7 until the preset conditions are met; obtain the trained brain and mental disease recognition model; S9: Acquire the fMRI data to be identified; S10: Preprocess the fMRI data to be identified to obtain preprocessed fMRI data to be identified; S11: Input the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.

[0039] It should be noted that S1~S8 is the training phase, and S9~S11 is the inference phase.

[0040] Furthermore, the formula for calculating the total loss value is as follows:

[0041] This represents the total loss value. Represents cross-entropy loss, This represents the consistency regularization loss. Indicates the weight.

[0042] Furthermore, the formula for calculating the consistency regularization loss is as follows:

[0043] K represents the total number of viewpoints. This represents the fMRI features at viewpoint k, where k represents the viewpoint. Indicates fMRI features.

[0044] It should be noted that, in order to further constrain the stability of multi-view learning, this invention applies a consistency regularization term between each view representation and the fused representation.

[0045] Furthermore, the brain and mental illness identification model includes a first encoder connected end-to-end, a global attention pooling layer, and a multilayer perceptron layer.

[0046] In one specific embodiment, the first encoder is a transformer encoder.

[0047] It's important to note that while Transformers leverage self-attention mechanisms to model long-range dependencies, their direct application to graph data requires addressing the question of "how to inject structural priors." Existing methods often enhance structure awareness through positional embeddings or structural encodings. For example, Graph-Bert integrates WL role and relative position embeddings, Ground Graph introduces Laplacian feature vectors, and Graphormer further designs spatial and centrality encodings to adapt to graph modeling. On the other hand, some studies combine GNNs with Transformers to balance local message passing and global interaction, and borrow the "[CLS]" mechanism for graph-level readout; SAT, on the other hand, injects structural information into Transformers more naturally through subgraph representations.

[0048] This invention leverages the global interaction modeling capabilities of Transformer to construct more robust graph-level embedding representations for brain functional network classification tasks. First, a self-attention mechanism is used to model the global dependencies of node representations, followed by adaptive graph-level aggregation through global attention readout. The motivation behind this design is that graph convolution primarily propagates information within local neighborhoods, while the discrimination patterns of brain functional networks often exhibit collaborative changes across distant Regions of Interest (ROIs). Therefore, introducing global self-attention before readout allows for explicit modeling of the interaction relationships between arbitrary node pairs, resulting in more globally consistent node representations. Subsequently, global attention pooling further assigns higher weights to key nodes, enabling the graph-level representation to focus on the subset of ROIs most relevant to disease discrimination.

[0049] In one specific embodiment, the output of the feature fusion layer is used as the token sequence input to the TransformerEncoder to achieve global context enhancement through multi-head self-attention. Let the input be... Then, after Transformer encoding, we get:

[0050] in This represents the standard Transformer Encoder (composed of a multi-head self-attention and feedforward network, and including residual connections and layer normalization), whose output... This can be viewed as a node representation that is "globally interactive." Through this step, each node representation can adaptively aggregate information from other nodes in the entire graph, thereby compensating for the limitations of graph convolution in long-range dependency modeling.

[0051] After obtaining globally enhanced node features Subsequently, this invention employs Global Attention Pooling for graph pooling. Specifically, an importance weight is learned for each node, and graph-level embeddings are generated in a weighted summation form. Let the gated network be denoted as... Then the node weights are:

[0052] in In the implementation, it uses a two-layer MLP. The final graph-level representation is defined as:

[0053] The pooling process described above can be interpreted as a data-driven "soft selection" readout: attention weights Characterizing the contribution of each ROI to graph-level discrimination allows the model to further focus on key nodes and their interaction patterns after global interaction modeling, thereby generating compact and more discriminative graph-level embeddings. .

[0054] In the graph classification section, the graph-level embedding obtained in section 3.4 is used. Used as input to MLP and softmax to generate classification results.

[0055] Furthermore, the random deactivation training model includes multiple graph convolutional units and a feature fusion layer; the output of each graph convolutional unit is connected to the input of the feature fusion layer. The graph convolutional unit includes a second encoder connected end-to-end, a graph convolutional layer, and a projection mapping layer.

[0056] It's important to note that the primary purpose of graph convolutional units is graph classification. The goal of graph classification is to learn transferable graph-level representations based on node and structural information. Common approaches include readout / pooling and hierarchical coarsening: for example, SAGPool selects key nodes for aggregation based on attention, while DiffPool and Graclus achieve hierarchical representation learning through clustering. However, on various real-world graph datasets, more complex aggregation or clustering layers do not necessarily yield stable gains. Therefore, recent work has also focused on improving structural representation capabilities: GraphSAGE enhances scalability and generalization through sampling, while GIN and subgraph isomorphism counting methods improve the upper limit of model expression from a discriminative perspective.

[0057] Because deep GNNs are susceptible to oversmoothing, overfitting, and structural noise, random deactivation strategies for graph data are widely used for regularization and robustness improvement. Typical methods include: DropNode, which randomly discards nodes to alleviate overfitting; DropEdge, which introduces structural perturbations (discarding some edges) at the edge level to reduce oversmoothing and enhance robustness to noisy edges; and DropAGG, which reduces training instability and improves efficiency by sampling aggregate sets. Overall, these methods improve the generalization ability of graph representations by "injecting controlled perturbations during training."

[0058] In summary, the random deactivation training model can enhance robustness to structural noise and thresholding uncertainty in functional connectivity networks while maintaining discriminativeness, providing a more stable node-level input representation for subsequent global modeling.

[0059] In one specific embodiment, the fused representation is concatenated with the basic representation to obtain the module output:

[0060] Therefore, the random deactivation training model of this invention introduces multi-view DropEdge structural perturbation learning into the GNN framework.

[0061] Furthermore, the calculation formula for the projection mapping layer is as follows:

[0062] This represents the output of the graph convolutional layer at the k-th graph convolutional unit, where k represents the graph convolutional unit number. This indicates a mapping.

[0063] It should be noted that, considering the potential distribution shifts in the feature space among different viewpoint branches, this invention introduces an MLP projection head with cross-branch shared parameters. Perform a consistent mapping on the output of each branch. Sharing weights across all branches enables explicit coupling of multi-perspective learning at the optimization level, encouraging semantic alignment between branches and facilitating the exchange of complementary information.

[0064] Based on this, the multi-view representation is fused using an averaging operator:

[0065] Furthermore, the calculation formula for the output of the graph convolutional layer is as follows:

[0066]

[0067]

[0068]

[0069] L represents the total number of steps in the graph convolution unit. This represents the output of the second encoder. The k-th graph convolutional unit represents the k-th graph convolutional unit. Step propagation operator, This represents the adjacency matrix of the k-th graph convolutional unit. The k-th graph convolutional unit represents the k-th graph convolutional unit. The first intermediate computation of the step, The k-th graph convolutional unit represents the k-th graph convolutional unit. The second intermediate computational cost of the step This indicates splicing along the feature dimension. represents the operator index in graph convolution, and k represents the graph convolution unit index.

[0070] It should be noted that each branch learns representations on different structural subgraphs. Within the viewpoint branch, L-step graph convolutional propagation is used to capture high-order neighborhood interactions, and staggered residuals are used to explicitly preserve and accumulate step information.

[0071] Furthermore, the adjacency matrix of the k-th graph convolutional unit is calculated using the following formula:

[0072] Each element in the dataset follows a Bernoulli distribution, and A represents the preprocessed fMRI data.

[0073] In one specific embodiment, the preprocessed fMRI data includes: a node feature matrix corresponding to each subject. and binary adjacency matrix

[0074] This invention further introduces a multi-view feature convolution extraction module to alleviate the structural uncertainty and interference from noisy side pair representation learning commonly found in thresholded functional connectivity networks. Structurally, this module consists of a shared shallow graph convolutional encoder and... It consists of several parallel perspective branches: the shared encoder first generates a basic representation based on the original image structure. Each viewpoint branch performs multi-step graph convolutional propagation under random structural perturbations to learn complementary representations. Subsequently, a consistent mapping of the feature space is achieved through projection heads sharing parameters across branches. Consistency constraints are introduced during the fusion phase to improve training stability and optimizability. Formally, a single layer of graph convolution (or a general message-passing operator) is first used to perform shallow encoding of the input:

[0075] in As a common input for all viewpoint branches. To construct multi-view structural perturbations, this invention uses each branch... Perform independent DropEdge sampling on the set of edges; for any edge Define Bernoulli mask

[0076] in, Depend on composition.

[0077] Furthermore, such as Figure 4 , Figure 5 As shown, the preprocessing includes: S01: Correct and segment the fMRI data to obtain a set of ROI time series; S02: Calculate the Pearson correlation coefficient matrix for the ROI time series set; S03: Perform Fisher Z-transform on the Pearson correlation coefficient matrix to obtain the transformed correlation coefficient matrix; S04: Perform a thresholding operation on the Pearson correlation coefficient matrix to obtain a binary adjacency matrix; S05: The transformed correlation coefficient matrix and the binary adjacency matrix are used as preprocessed fMRI data.

[0078] In one specific embodiment, the preprocessing steps are as follows: First, the raw resting-state fMRI sequences underwent routine preprocessing, including removal of initial time points, slice timing, and head motion correction, and functional images were registered to standard space. Subsequently, denoising was performed, and the time series were bandpass filtered to preserve low-frequency fluctuations. Finally, ROI time series were extracted based on brain region segmentation templates and used as input for subsequent static functional connectivity calculations.

[0079] The process for constructing static functional connectivity features and binary adjacency structures uses the ROI time series of each participant as input. Let the ROI signal matrix of a single participant be... (1) in Indicates the number of time points. This indicates the number of ROIs. Considering that some ROIs may have constant variance (zero variance) over the entire time dimension, which can lead to unstable correlation coefficient calculations or NaN values, we first calculate the standard deviation of each ROI and then apply the results to ROIs that meet the following criteria. The eigenvalues ​​of constant ROIs are set to 0 to obtain the effective ROI set. .

[0080] Subsequently, the Pearson correlation coefficient matrix was calculated for the time series of the removed ROIs: (2) The NaN values ​​generated during the relevant calculations were set to 0 to ensure the stability of the matrix values. To enhance the normality of the correlation coefficients and facilitate subsequent modeling, the correlation matrix underwent a Fisher Z-transform: (3) The clip operation is used to avoid... This leads to numerical divergence. Finally, the diagonal elements are set to 0 to remove self-joins.

[0081] In terms of graph structure construction, this invention employs a thresholding strategy to generate a binary adjacency matrix. When the absolute value of the correlation coefficient between any two ROIs exceeds the threshold... At that time, it was believed that there was a connection between the two: (4) And order Repeat the above process for each participant in the dataset to obtain the corresponding Fisher-Z feature matrix. and binary adjacency matrix Finally, these are stacked and saved as three-dimensional tensors for subsequent model input.

[0082] A system for identifying mental disorders based on resting-state functional magnetic resonance imaging includes: Dataset acquisition module: Acquires the fMRI training dataset; the training dataset includes multiple sets of training data; each set of training data includes fMRI data and categories of neuropsychiatric diseases; constructs a neuropsychiatric disease identification model and a random inactivation training model; Data selection module: Selects a set of data from the fMRI training dataset as the first set of data; First preprocessing module: preprocesses the fMRI data in the first data to obtain preprocessed fMRI data; Random inactivation module: Input the preprocessed fMRI data into the random inactivation training model to obtain fMRI features and fMRI features for each viewpoint; First result reasoning module: Input the FMRI features into the brain and mental disease recognition model to obtain the predicted brain and mental disease results; Loss calculation module: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; Optimization module: Based on the total loss value, optimize the random inactivation training model and the brain and mental disease recognition model; Repeat module: Select another set of data from the fMRI training dataset as the new first data; repeat until the preset conditions are met; obtain the trained brain and mental disease recognition model; Data acquisition module: Acquires the fMRI data to be identified; The second preprocessing module preprocesses the fMRI data to be identified to obtain preprocessed fMRI data to be identified. The second result reasoning module inputs the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.

[0083] This invention proposes a Multiview DropEdge and Transformer Encoding Network (MDTN) method for classifying brain functional networks. This method introduces DropEdge and Transformer into the GNN framework: First, multiview DropEdge is used to randomly perturb the brain functional network at the structural level, generating multiple complementary perspectives to alleviate structural uncertainty caused by thresholding graph construction. Then, multiview node representations are extracted based on shared graph convolutional encoding, and these node representations are used as sequence inputs to the Transformer encoder to model global interactions between distant ROIs. Finally, global attention readout is used to obtain graph-level representations for classification, achieving adaptive aggregation of global patterns in the brain functional network. This invention is evaluated on three publicly available brain functional network datasets related to autism spectrum disorder and major depressive disorder. Experimental results show that this method achieves relatively stable classification performance.

[0084] like Figure 6 As shown, ABIDE I and ABIDE II contain resting-state fMRI data of patients with autism spectrum disorder (ASD) and healthy controls (HC). By eliminating low-quality images, we selected 1102 subjects for ABIDE I, including 571 with ASD and 531 with HC; and 652 subjects for ABIDE II, including 311 with ASD and 341 with HC.

[0085] REST-meta-MDD comprises brain network data generated from resting states. This study collected fMRI data from 2027 subjects (1041 MDD participants and 986 HC participants). Brain functional networks for each subject were constructed on the ABIDE I, ABIDE II, and REST-meta-MDD datasets. Nodes represent Regions of Interest (ROIs) based on brain atlases, and edges between nodes represent brain functional connectivity between ROI pairs. Functional connectivity is defined by pairwise Pearson correlation coefficients between mean fMRI series of ROIs. Regions of Interest (ROIs) features are defined by the rows corresponding to nodes in the brain network adjacency matrix.

[0086] like Figure 7As shown, a typical GNN module is implemented based on PyTorch Geometric (PyG), and the Transformer-related structures are implemented using PyTorch. The Transformer encoder uses the GELU activation function; batch normalization and dropout are sequentially added after each fully connected layer of the classifier (MLP); the AdamW optimizer is used. The loss function is the sum of cross-entropy loss and consistency regularization term (with weight λ) (experiments without consistency regularization term use only cross-entropy loss). The learning rate adopts a linear warmup + inverse square root decay scheduling strategy.

[0087] The input graph is constructed using fixed-threshold binarization: the threshold of REST-meta-MDD. ABIDE threshold .

[0088] In all experiments, the learning rate, weight decay, and batch size were set to 0.01, 1e, and 1e, respectively. 4 and 16. The dropout rate of MLP is 0.5, the dropout rate of Transformer is 0.1, the dropout probability of DropEdge is 0.5, D_model = 128, Num_heads = 8, Num_Layers = 6, FFN_Dim = 4 * D_model. Each dataset is trained for 300 epochs.

[0089] This invention uses 10-fold cross-validation (90% training and 10% testing per fold) to evaluate model performance, and uses accuracy (Acc) and F1 score as the main evaluation metrics.

[0090] like Figure 8 As shown, the method of the present invention (MDTN) is compared with the following methods: GCN: The classic message passing paradigm uses a normalized adjacency matrix to perform linear aggregation and smoothing on the features of neighbor nodes, extracting local structural information layer by layer. Graph-level tasks are usually combined with global pooling for readout.

[0091] GIN: Employs "summation aggregation + MLP" in message passing and introduces learnable mechanisms. Theoretically, self-information has a stronger ability to distinguish different graph structures and is often used as a strong baseline for graph classification.

[0092] Graphormer: A graph Transformer structure that uses nodes as tokens, models global interactions with self-attention, and injects graph structure information as attention bias through structural encoding (such as shortest path distance / centrality), thereby improving the expression of long-range dependencies.

[0093] GraphGPS is a hybrid framework that combines "local MPNN + global Transformer". Each layer performs local neighborhood propagation and global attention interaction simultaneously. It is usually combined with structural location encoding (such as LapPE / RWSE) to enhance the characterization of graph structure and take into account both local and global modeling capabilities.

[0094] TSEN is a hybrid encoding framework for graph classification: it first extracts local structural features using graph convolution, then models global dependencies using Transformer, and combines global attention to read out graph-level representations, and finally completes classification using MLP+Softmax.

[0095] All methods employed consistent data preprocessing and experimental setups on the ABIDE I, ABIDE II, and REST-meta-MDD datasets. Stratified 10-fold cross-validation was used for evaluation, and the mean and standard deviation (mean ± std) of accuracy (ACC) and F1-score (F1) are reported.

[0096] On ABIDE I, MDTN's ACC is 70.03±1.80, close to the best TSEN (70.27±4.34) with less fluctuation, demonstrating good stability. On ABIDE II, MDTN achieves the highest ACC of 71.23±3.30, slightly better than TSEN (71.16±0.15). On REST-meta-MDD, MDTN simultaneously achieves the highest ACC of 69.16±2.80 and F1 score of 69.68±6.70, representing improvements of 2.90 and 3.94 percentage points respectively compared to the second-best TSEN (ACC=66.26±1.74, F1=65.74±1.74), showing the most significant advantage. Overall, MDTN performs stably on the three public datasets and achieves best or near-best performance on key datasets. The same or similar labels correspond to the same or similar parts; The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent. Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for identifying brain mental illness based on resting-state functional magnetic resonance imaging, characterized in that, include: S1: Obtain the fMRI training dataset; The training dataset includes multiple sets of training data; Each set of training data includes fMRI data and categories of neuropsychiatric diseases; Constructing a brain and mental illness identification model and a random inactivation training model; S2: Select a set of data from the fMRI training dataset as the first set of data; S3: Preprocess the fMRI data in the first data to obtain preprocessed fMRI data; S4: Input the preprocessed FMRI data into the random inactivation training model to obtain FMRI features and FMRI features for each viewpoint; S5: Input the FMRI features into the brain and mental disease identification model to obtain the predicted brain and mental disease results; S6: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; S7: Optimize the random inactivation training model and the brain and mental disease identification model based on the total loss value; S8: Select another set of data from the fMRI training dataset as the new first data; repeat steps S3 to S7 until the preset conditions are met; obtain the trained brain and mental disease recognition model; S9: Acquire the fMRI data to be identified; S10: Preprocess the fMRI data to be identified to obtain preprocessed fMRI data to be identified; S11: Input the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.

2. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 1, characterized in that, The formula for calculating the total loss value is as follows: This represents the total loss value. Represents cross-entropy loss, This represents the consistency regularization loss. Indicates the weight.

3. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 2, characterized in that, The formula for calculating the consistency regularization loss is as follows: K represents the total number of viewpoints. This represents the fMRI features at viewpoint k, where k represents the viewpoint. Indicates fMRI features.

4. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 1, characterized in that, The brain and mental illness identification model includes a first encoder connected end-to-end, a global attention pooling layer, and a multilayer perceptron layer.

5. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 1, characterized in that, The random deactivation training model includes multiple graph convolutional units and a feature fusion layer; the output of each graph convolutional unit is connected to the input of the feature fusion layer. The graph convolutional unit includes a second encoder connected end-to-end, a graph convolutional layer, and a projection mapping layer.

6. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 5, characterized in that, The calculation formula for the projection mapping layer is as follows: This represents the output of the graph convolutional layer at the k-th graph convolutional unit, where k represents the graph convolutional unit number. This indicates a mapping.

7. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 5, characterized in that, The formula for calculating the output of the graph convolutional layer is as follows: L represents the total number of steps in the graph convolution unit. This represents the output of the second encoder. The k-th graph convolutional unit represents the k-th graph convolutional unit. Step propagation operator, This represents the adjacency matrix of the k-th graph convolutional unit. The k-th graph convolutional unit represents the k-th graph convolutional unit. The first intermediate computation of the step, The k-th graph convolutional unit represents the k-th graph convolutional unit. The second intermediate computational cost of the step This indicates splicing along the feature dimension. represents the operator index in graph convolution, and k represents the graph convolution unit index.

8. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 7, characterized in that, The adjacency matrix of the k-th graph convolutional unit is calculated using the following formula: Each element in the dataset follows a Bernoulli distribution, and A represents the preprocessed fMRI data.

9. The method for identifying brain disorders based on resting-state functional magnetic resonance imaging according to claim 1, characterized in that, Preprocessing includes: S01: Correct and segment the fMRI data to obtain a set of ROI time series; S02: Calculate the Pearson correlation coefficient matrix for the ROI time series set; S03: Perform Fisher Z-transform on the Pearson correlation coefficient matrix to obtain the transformed correlation coefficient matrix; S04: Perform a thresholding operation on the Pearson correlation coefficient matrix to obtain a binary adjacency matrix; S05: The transformed correlation coefficient matrix and the binary adjacency matrix are used as preprocessed fMRI data.

10. A brain mental disease identification system based on resting-state functional magnetic resonance imaging, applied to the identification method according to any one of claims 1 to 9, characterized in that, include: Dataset Acquisition Module: Acquires the fMRI training dataset; The training dataset includes multiple sets of training data; Each set of training data includes fMRI data and categories of neuropsychiatric diseases; Constructing a brain and mental illness identification model and a random inactivation training model; Data selection module: Selects a set of data from the fMRI training dataset as the first set of data; First preprocessing module: preprocesses the fMRI data in the first data to obtain preprocessed fMRI data; Random inactivation module: The preprocessed fMRI data is input into the random inactivation training model to obtain fMRI features and fMRI features for each viewpoint; First result reasoning module: Input the FMRI features into the brain and mental disease recognition model to obtain the predicted brain and mental disease results; Loss calculation module: Based on the first data, the FMRI features, the FMRI features of each viewpoint, and the predicted brain and mental disease results, the total loss value is obtained; Optimization module: Based on the total loss value, optimize the random inactivation training model and the brain and mental disease recognition model; Repeat module: Select another set of data from the fMRI training dataset as the new first data; repeat until the preset conditions are met; obtain the trained brain and mental disease recognition model; Data acquisition module: Acquires the fMRI data to be identified; The second preprocessing module preprocesses the fMRI data to be identified to obtain preprocessed fMRI data to be identified. The second result reasoning module inputs the preprocessed FMRI data to be identified into the trained brain and mental disease identification model to obtain the final brain and mental disease result.