A brain function network classification method and system based on adversarial graph contrastive learning
By dynamically preserving key functional connections through adversarial graph contrastive learning, the shortcomings of GNN models in brain region differentiation and disease identification are addressed, achieving high-precision and highly interpretable brain functional network classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG CANCER HOSPITAL
- Filing Date
- 2026-01-20
- Publication Date
- 2026-06-23
AI Technical Summary
Existing brain functional network classification models based on graph neural networks (GNNs) suffer from node permutation invariance problems when distinguishing functional differences between different brain regions and identifying disease-related specific brain regions, resulting in poor classification performance and insufficient interpretability. Furthermore, graph contrastive learning methods lack dynamic augmentation strategies and cannot effectively preserve key functional connections.
We employ an adversarial graph-based contrastive learning approach. By generating an edge deletion probability matrix through a trainable encoder, we dynamically retain key functional connections and remove redundant connections to construct an augmented graph. Combined with a feature extraction layer and a projection head, we achieve data-driven, task-oriented augmentation, thereby improving classification accuracy and interpretability.
It improves the accuracy and interpretability of brain functional network classification, can accurately distinguish the functional specificity of different brain regions, and provides reliable support for disease auxiliary diagnosis.
Smart Images

Figure CN121544971B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and artificial intelligence technology, specifically to a brain functional network classification method and system based on adversarial graph contrastive learning. Background Technology
[0002] Neurological disorders such as autism spectrum disorder (ASD) and major depressive disorder (MDD) have high incidence and disability rates, causing immense suffering to patients and their families and incurring high medical costs. However, the underlying pathological and neural mechanisms of these diseases are not yet fully understood. Currently, their diagnosis mainly relies on symptom scores obtained by clinicians through interviews, which is highly subjective and easily influenced by the doctor's experience, making it difficult to achieve early, accurate detection and objective assessment.
[0003] Functional magnetic resonance imaging (fMRI), a non-invasive imaging technique, can dynamically observe brain region activation by measuring blood oxygen level-dependent (BOLD) signals, and has become an important tool for studying brain functional patterns in neurological diseases. Functional connectivity (FC) matrices constructed based on the temporal correlation between brain regions (ROIs) are key carriers for fMRI data analysis, reflecting the functional integration and separation characteristics of brain networks, and are widely used to discover disease-related neurobiomarkers.
[0004] In recent years, computer-aided diagnostic techniques based on resting-state fMRI (rs-fMRI) data have made significant progress, and deep learning methods have been widely used to extract topological features from fully connected (FC) matrices for disease classification. For example, BrainNetCNN designed various convolutional kernels as encoders to adapt to brain network data; some studies extracted features using unsupervised methods such as sparse autoencoders and denoising autoencoders; and other studies used LSTM networks to identify dynamic functional connectivity patterns related to ASD. In particular, graph neural networks (GNNs) are widely used in brain network analysis due to their powerful graph structure representation capabilities. For example, BrainGNN highlights key regions of interest (ROIs) through pooling regularization, Hi-GCN uses hierarchical graph convolutions to fuse network topology and sample association information, and CI-GNN can identify key subgraphs related to decision-making.
[0005] However, existing GNN-based brain map classification models generally suffer from a key drawback: ignoring the contradiction between the node permutation invariance of GNNs and brain region specificity. The node permutation invariance of GNNs prevents the model from distinguishing functional differences between different brain regions, resulting not only in poor classification performance but also rendering the model's interpretability meaningless and making it difficult to identify disease-related specific brain regions. Although some models circumvent this problem by introducing diverse node features, there is currently a lack of systematic research guiding GNNs to actively identify brain region specificity and extract discriminative features.
[0006] Meanwhile, existing methods in the field of graph contrastive learning (GCL) still have significant shortcomings: for example, GATE generates positive fMRI samples through a sliding window of signal sequences, but does not consider the topological specificity of brain networks; some studies design fixed-type graph augmentation strategies (such as random edge deletion or node masking), which cannot dynamically adjust the augmentation method according to the characteristics of FC matrix data, and are prone to retaining redundant information or losing key functional connections. Therefore, there is an urgent need for a framework that can take into account brain region specificity, dynamic graph augmentation, and adversarial contrastive learning to improve the accuracy and interpretability of brain map classification and provide reliable support for the auxiliary diagnosis of neurological diseases. Summary of the Invention
[0007] The technical problem to be solved by this invention is: to provide a method that generates an edge deletion probability matrix P based on a functional connectivity matrix X using a trainable encoder, and then performs edge deletion on the functional connectivity matrix X based on the edge deletion probability matrix P while retaining key functional connections to obtain an augmented graph. This paper proposes a brain functional network classification method and system based on adversarial graph contrastive learning, which achieves data-driven and task-oriented dynamic augmentation, retains functional connections related to classification, and removes redundant connections. This enables the model to distinguish the functional specificity of different brain regions, avoiding the problem that traditional GNN models cannot distinguish the functional differences of different brain regions due to node permutation invariance, resulting in poor classification performance and loss of interpretability. The method has high classification accuracy and interpretability.
[0008] To address the aforementioned technical problems, the present invention provides a brain functional network classification method and system based on adversarial graph contrastive learning, comprising at least the following steps:
[0009] Acquire resting-state functional magnetic resonance imaging data, preprocess the image data, and construct a functional connectivity matrix X based on the preprocessing results;
[0010] The functional connectivity matrix X is input into the adversarial graph contrastive learning classification model for classification to obtain brain function classification results.
[0011] The adversarial graph contrastive learning classification model is trained based on standard sample data, and includes at least the following components:
[0012] A graph augmenter, which incorporates a trainable encoder, generates an edge deletion probability matrix P based on the functional connectivity matrix X. Then, based on the edge deletion probability matrix P, it performs edge deletion while preserving key functional connections on the functional connectivity matrix X to obtain an augmented graph. ;
[0013] Feature extraction layer, which is used to extract the functional connectivity matrix X and the augmented graph, respectively. Feature representation;
[0014] The projection head includes at least one multilayer perceptron for mapping the feature representation output by the feature extraction layer to the contrast learning space and obtaining the optimal weight parameters based on the contrast results.
[0015] A classifier, comprising at least one multilayer perceptron, for classifying brain functions based on the feature representations output by the feature extraction layer.
[0016] In a preferred embodiment, the augmented graph is obtained by performing edge deletion and retaining key functional connections on the functional connection matrix X based on the edge deletion probability matrix P. Specifically, it includes the following steps:
[0017] Based on the edge deletion probability matrix P, a continuous edge deletion mask M is generated through reparameterization. The specific calculation method is as follows:
[0018] ;
[0019] Where E is a random matrix that follows a uniform distribution. For temperature parameters;
[0020] Based on the continuous edge deletion mask M and the functional connection matrix X, an augmented graph is obtained by performing edge deletion while preserving key functional connections through element-wise multiplication. The specific calculation method is as follows:
[0021] ;
[0022] Where M is the continuous edge deletion mask and X is the functional connection matrix.
[0023] A preferred embodiment further includes identifying key brain functional regions based on the continuous edge deletion mask M, specifically including the following steps:
[0024] The average mask matrix is obtained by averaging the edge deletion masks M corresponding to the same brain function classification results element by element. The specific calculation method is as follows:
[0025] ;
[0026] Where N is the number of edge deletion masks M with the same brain function classification results;
[0027] Based on a preset threshold, the average mask matrix The elements are filtered, and if the value of an element is greater than a preset threshold, the connection corresponding to the element is defined as a key connection, thus obtaining a set of key connections.
[0028] Iterate through all elements in the set of key connections and count the number of times the brain region of interest appears in the key connections;
[0029] The brain regions of interest were sorted according to their statistical frequency, and the 10 brain regions of interest with the highest frequency were selected as the key brain functional areas corresponding to the brain function classification results.
[0030] In a preferred embodiment, the encoder includes a first side convolutional layer for extracting local topological features from the functional connectivity matrix X, a first LeakyReLU activation function layer connected to the output of the first side convolutional layer, a second side convolutional layer connected to the output of the first LeakyReLU activation function layer for further extracting higher-order graph structural features, a second LeakyReLU activation function layer connected to the output of the second side convolutional layer, a 1×1 convolutional layer connected to the output of the second LeakyReLU activation function layer for fusing and mapping multi-channel features to a single channel, and a Sigmoid activation function layer connected to the output of the 1×1 convolutional layer for compressing the mapped values to (0, 1) to obtain the edge deletion probability matrix P.
[0031] In a preferred embodiment, the feature extraction layer includes at least a third-side convolutional layer for extracting initial local features, a third LeakyReLU activation function layer connected to the output of the third-side convolutional layer, a fourth-side convolutional layer connected to the output of the third LeakyReLU activation function layer for extracting higher-order graph structure features, a fourth LeakyReLU activation function layer connected to the output of the fourth-side convolutional layer, an R×1 convolutional layer connected to the output of the fourth LeakyReLU activation function layer for column aggregation to extract global features of the target brain functional area, a fifth LeakyReLU activation function layer connected to the output of the R×1 convolutional layer, a 1×R convolutional layer connected to the output of the fifth LeakyReLU activation function layer for row aggregation to extract global features of the source brain functional area, and a linear layer connected to the output of the 1×R convolutional layer for linearly transforming and mapping data to the feature representation space.
[0032] In a preferred embodiment, the first, second, third, and fourth edge convolutional layers employ the same edge convolutional layer structure, wherein the edge convolutional layer comprises at least:
[0033] The parallel R×1 convolutional filter and 1×R convolutional filter are implemented using the following calculation method:
[0034] ;
[0035] ;
[0036] Where x is the input feature, W R×1 and b r The weights and biases of the R×1 convolutional filter are W, respectively. 1×R and b c These are the weight parameters and bias of the 1×R convolutional filter, respectively;
[0037] A fusion layer, connected to the outputs of the R×1 and 1×R convolutional filters respectively, is used to perform a broadcast operation on the outputs of the R×1 and 1×R convolutional filters to restore their dimensions through outer product calculation, and then concatenate the dimension-restored results. The specific calculation method is as follows:
[0038] ;
[0039] ;
[0040] ;
[0041] Where I is a 1×R vector with all elements being 1. This is for outer product operations.
[0042] In a preferred embodiment, the projection head includes a first multilayer perceptron, a sixth LeakyReLU activation function layer connected to the output of the first multilayer perceptron, and a second multilayer perceptron connected to the output of the sixth LeakyReLU activation function layer, specifically implemented using the following calculation method:
[0043] ;
[0044] Where H represents the input feature. Let W1 be the LeakyReLU activation function, and W2 and b2 be the weight parameters and biases of the first multilayer perceptron, respectively.
[0045] The classifier includes a third multilayer perceptron, a seventh LeakyReLU activation function layer connected to the output of the third multilayer perceptron, a fourth multilayer perceptron connected to the output of the seventh LeakyReLU activation function layer, and a Sigmoid activation function layer connected to the output of the fourth multilayer perceptron. It is implemented using the following calculation method:
[0046] ;
[0047] Where H represents the input feature. Here, W3 and b3 are the weights and biases of the third multilayer perceptron, and W4 and b4 are the weights and biases of the fourth multilayer perceptron.
[0048] In a preferred embodiment, the loss function L of the adversarial graph contrastive learning classification model total Including the calculation of contrast loss L con Calculate the classification loss L cls And calculate the regularization loss L reg The calculation of the contrast loss L con The specific calculation method is as follows:
[0049] ;
[0050] Where B is the batch size, z i Let X be the contrastive embedding vector in the contrastive learning space. For augmented image In the contrastive embedding vectors of the contrastive learning space, sim() represents the cosine similarity. To compare temperature over-parameters;
[0051] The calculation of classification loss L cls The specific calculation method is as follows:
[0052] ;
[0053] Among them, y i For real labels, The classification results are for the functional connectivity matrix X. For augmented image Classification results;
[0054] The calculation of regularization loss L reg The specific calculation method is as follows:
[0055] ;
[0056] Where R is the number of brain regions, M i Let I be the edge deletion mask, and let I be an all-1 vector.
[0057] The loss function L total The specific calculation method is as follows:
[0058] ;
[0059] in, The weight hyperparameters for the classification loss are... The weight hyperparameters for the regularization loss.
[0060] In a preferred embodiment, the image data is preprocessed, specifically including performing temporal correction, head motion correction, spatial normalization, and Gaussian smoothing on the resting-state functional magnetic resonance imaging data, and eliminating the differences between data from different sources using an empirical Bayesian framework tuning method.
[0061] The present invention also provides a system for classifying brain functional networks using the adversarial graph contrastive learning method described above, comprising at least:
[0062] The data preprocessing module is used to preprocess the resting-state functional magnetic resonance image data and construct a functional connectivity matrix X based on the preprocessing results.
[0063] An adversarial graph contrastive learning classification model construction module is used to construct the adversarial graph contrastive learning classification model, train the constructed adversarial graph contrastive learning classification model based on sample standard data to obtain the optimal weight parameters, and load the optimal weight parameters into the adversarial graph contrastive learning classification model.
[0064] The classification module, based on the functional connectivity matrix X, performs classification using the trained adversarial graph contrastive learning classification model to obtain brain function classification results.
[0065] The brain functional network classification method and system based on adversarial graph contrastive learning of the present invention has the following advantages compared with the prior art:
[0066] (1) The brain functional network classification method and system based on adversarial graph contrastive learning of the present invention includes at least the following steps: acquiring resting-state functional magnetic resonance imaging data; preprocessing the image data; and constructing a functional connectivity matrix X based on the preprocessing results; inputting the functional connectivity matrix X into an adversarial graph contrastive learning classification model for classification to obtain brain functional classification results. The adversarial graph contrastive learning classification model is trained based on standard sample data and includes at least a graph augmenter, a feature extraction layer, a projection head, and a classifier. The graph augmenter has a built-in trainable encoder. Based on the functional connectivity matrix X, it generates an edge deletion probability matrix P through the encoder, and based on the edge deletion probability matrix P, it performs edge deletion on the functional connectivity matrix X to retain key functional connections to obtain an augmented graph. On the one hand, a trainable encoder dynamically generates an edge deletion probability matrix P based on the unique topological structure of each input functional connection matrix X. This makes the augmentation strategy no longer random or pre-set, but data-driven and task-oriented, enabling it to adaptively retain key connections and delete redundant connections for different samples, thus improving the augmentation effect. On the other hand, the augmented graph generated by this dynamic augmentation... The positive sample pair formed with the functional connectivity matrix X constitutes a highly semantically consistent pair, which fully considers the topological specificity of brain networks and provides high-quality and meaningful positive samples for contrastive learning, forcing the encoder to learn core features that are robust to noise and sensitive to disease.
[0067] The trainable encoder generates a continuous edge deletion mask M based on the edge deletion probability matrix P through reparameterization. Then, based on the continuous edge deletion mask M and the functional connectivity matrix X, it performs edge deletion while preserving key functional connections through element-wise multiplication to obtain the augmented graph. This solves the gradient interruption problem caused by discrete sampling, allowing the graph augmenter to be trained and optimized along with the entire model.
[0068] (2) The brain functional network classification method and system based on adversarial graph contrastive learning of the present invention includes an encoder comprising a first side convolutional layer for extracting local topological features from the functional connectivity matrix X, a first LeakyReLU activation function layer connected to the output of the first side convolutional layer, a second side convolutional layer connected to the output of the first LeakyReLU activation function layer for further extracting higher-order graph structural features, a second LeakyReLU activation function layer connected to the output of the second side convolutional layer, a 1×1 convolutional layer connected to the output of the second LeakyReLU activation function layer for fusing multi-channel features and mapping them to a single channel, and a Sigmoid activation function layer connected to the output of the 1×1 convolutional layer for compressing the mapped values to (0, 1) to obtain the edge deletion probability matrix P. A two-level edge convolutional layer structure is adopted. On the one hand, the first edge convolutional layer specifically extracts local topological features from the functional connectivity matrix to capture direct connection patterns between brain regions. The second edge convolutional layer further extracts high-order graph structural features based on the primary features to identify complex brain network interaction patterns, enabling the model to accurately distinguish the functional specificity of different brain regions and providing a reliable foundation for subsequent identification of key brain functional areas. On the other hand, a 1×1 convolutional layer is used to achieve the fusion and dimensionality reduction of multi-channel features, mapping high-order graph features to single-channel edge importance scores. The Sigmoid activation function compresses the scores to the (0,1) interval, forming an edge deletion probability matrix P with clear probabilistic significance. It can dynamically generate personalized augmentation strategies based on the unique topological characteristics of each brain network, overcoming the blindness of fixed augmentation strategies and achieving "targeted" intelligent edge deletion.
[0069] The feature extraction layer includes at least a third-side convolutional layer for extracting initial local features, a third LeakyReLU activation function layer connected to the output of the third-side convolutional layer, a fourth-side convolutional layer connected to the output of the third LeakyReLU activation function layer for extracting higher-order graph structure features, a fourth LeakyReLU activation function layer connected to the output of the fourth-side convolutional layer, an R×1 convolutional layer connected to the output of the fourth LeakyReLU activation function layer for column aggregation to extract global features of the target brain functional area, a fifth LeakyReLU activation function layer connected to the output of the R×1 convolutional layer, a 1×R convolutional layer connected to the output of the fifth LeakyReLU activation function layer for row aggregation to extract global features of the source brain functional area, and a linear layer connected to the output of the 1×R convolutional layer for linearly transforming and mapping data to the feature representation space. On the one hand, by using the row-column separation convolution operation of the third and fourth edge convolutional layers, the absolute anatomical location information of the brain region is encoded into the feature representation, fundamentally breaking the permutation invariance limitation of traditional GNNs; on the other hand, through the cascaded design of "edge convolution → LeakyReLU → edge convolution → LeakyReLU", progressive feature extraction from local topological features to high-order graph structures is achieved, ensuring the complete capture of brain functional network features at different levels.
[0070] The first, second, third, and fourth side convolutional layers adopt the same side convolutional layer structure. Each side convolutional layer includes at least two parallel R×1 convolutional filters and one 1×R convolutional filter. The fusion layer is connected to the outputs of the R×1 and 1×R convolutional filters, respectively, and is used to restore the dimensions by broadcasting the outputs of the R×1 and 1×R convolutional filters through outer product calculation, and then concatenate the restored dimensions. A parallel approach with row and column paths is adopted. On the one hand, an R×1 convolutional filter is used to extract the column features of each brain region as the information "target" to capture the "receiving" function of the brain region. On the other hand, a 1×R convolutional filter is used to extract the row features of each brain region as the information "source" to capture the "sending" function of the brain region. This ensures that the topological features of the brain network are completely extracted from both row and column dimensions. On the other hand, the row and column features are combined through outer product operations to reconstruct a side-level feature representation containing rich contextual information. Each reconstructed feature contains functional information of both the source and target brain regions. This avoids the loss of practical significance in model interpretability caused by the inability of traditional GNNs to distinguish the functional differences between different brain regions due to node permutation invariance. Attached Figure Description
[0071] Figure 1 This is a flowchart illustrating the classification method of a brain functional network classification method and system based on adversarial graph contrastive learning, according to an embodiment of the present invention.
[0072] Figure 2This is a schematic diagram of the adversarial graph contrastive learning classification model structure of an embodiment of a brain functional network classification method and system based on adversarial graph contrastive learning according to the present invention.
[0073] Figure 3 This is a schematic diagram of the encoder structure of an embodiment of a brain functional network classification method and system based on adversarial graph contrastive learning according to the present invention.
[0074] Figure 4 This is a schematic diagram of the feature extraction layer structure of an embodiment of a brain functional network classification method and system based on adversarial graph contrastive learning according to the present invention.
[0075] Figure 5 This is a schematic diagram of the edge convolutional layer structure of an embodiment of a brain functional network classification method and system based on adversarial graph contrastive learning according to the present invention. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0077] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0078] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, an integral connection, or a detachable connection; they can refer to the internal connection of two components; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0079] Example
[0080] This embodiment presents a brain functional network classification method based on adversarial graph contrastive learning, such as... Figure 1 As shown, it includes at least the following steps:
[0081] Step S01: Obtain resting-state functional magnetic resonance imaging data, preprocess the image data, and construct the functional connectivity matrix X based on the preprocessing results.
[0082] Preprocessing of image data specifically includes:
[0083] Temporal correction aligns the acquisition times of different slices to a unified time point, avoiding temporal differences in brain images at the same time point caused by the sequential layer-by-layer acquisition method.
[0084] Head motion correction involves using a specific time point as a reference and performing rigid body transformations on the 3D images at all subsequent time points to align them spatially with the reference image, thus eliminating image displacement and rotation caused by slight head movements during the scanning process.
[0085] Spatial standardization maps each subject’s unique brain anatomy to a standard brain atlas template space.
[0086] Gaussian smoothing is applied by convolving the image with a Gaussian smoothing kernel to avoid potential mismatches that may remain after standardization due to subtle differences in brain structure among different subjects.
[0087] By using the empirical Bayesian framework harmonization method, the differences between data from different sources are eliminated. In this embodiment, the ComBat harmonization method is used to eliminate the batch effect caused by different scanning sites. Specifically, the empirical Bayesian framework is used to estimate the batch effect of the mean and variance of each feature. The location parameter correction eliminates the difference in the average signal level between different sites, and the scale parameter correction eliminates the difference in the degree of signal variation between different sites.
[0088] It should be noted that in this embodiment, the resting-state functional magnetic resonance imaging data processing assistant (DPARSF) is used to preprocess the data.
[0089] The brain was divided into 116 regions of interest (ROIs) using an automated anatomical labeling brain atlas. A connectivity matrix was obtained based on the Pearson correlation coefficient of the time series data of the ROIs, and the diagonal elements of the connectivity matrix were initialized to 0 to construct a functional connectivity matrix X. , where R=116, is the number of regions of interest.
[0090] Step S02: Input the functional connectivity matrix X into the adversarial graph contrastive learning classification model for classification to obtain brain function classification results.
[0091] The adversarial graph contrastive learning classification model is trained on standard sample data. In this embodiment, the standard sample data includes the ABIDE I dataset and the REST-meta-MDD dataset. It should be noted that the ABIDE I dataset contains 1112 resting-state functional magnetic resonance imaging (fMRI) images of the brain provided by 17 international institutions. Samples without files, with zero values for regions of interest (ROIs), and those failing quality control by three experts were excluded from the ABIDE I dataset, resulting in 1035 standard sample data. Of these, 505 samples were labeled as autism spectrum disorder, and 530 samples were labeled as normal. The REST-meta-MDD dataset contains 2428 resting-state fMRI images of the brain from 17 hospitals in China. The REST-meta-MDD dataset was filtered according to standard quality control procedures to remove duplicate data, retaining 1160 standard sample data. Of these, 597 samples were labeled as major depressive disorder, and 563 samples were labeled as normal.
[0092] In this embodiment, the standard sample data is divided into a training set and a test set in a ratio of 8:2, and the adversarial graph contrastive learning classification model is trained to obtain the optimal weight parameters.
[0093] Adversarial graph contrastive learning classification models, such as Figure 2 As shown, it includes at least a graph augmenter, a feature extraction layer, a projection head, and a classifier.
[0094] The graph augmenter has a built-in trainable encoder. Based on the functional connectivity matrix X, it generates an edge deletion probability matrix P, and then performs edge deletion on the functional connectivity matrix X based on the edge deletion probability matrix P, preserving key functional connections to obtain the augmented graph. On the one hand, a trainable encoder dynamically generates an edge deletion probability matrix P based on the unique topological structure of each input functional connection matrix X. This makes the augmentation strategy no longer random or pre-set, but data-driven and task-oriented, enabling it to adaptively retain key connections and delete redundant connections for different samples, thus improving the augmentation effect. On the other hand, the augmented graph generated by this dynamic augmentation... The positive sample pair formed with the functional connectivity matrix X constitutes a highly semantically consistent pair, which fully considers the topological specificity of brain networks and provides high-quality and meaningful positive samples for contrastive learning, forcing the encoder to learn core features that are robust to noise and sensitive to disease.
[0095] In this embodiment, the encoder, such as Figure 3As shown, it includes a first side convolutional layer for extracting local topological features from the functional connectivity matrix X, a first LeakyReLU activation function layer connected to the output of the first side convolutional layer, a second side convolutional layer connected to the output of the first LeakyReLU activation function layer for further extracting higher-order graph structural features, a second LeakyReLU activation function layer connected to the output of the second side convolutional layer, a 1×1 convolutional layer connected to the output of the second LeakyReLU activation function layer for fusing multi-channel features and mapping them to a single channel, and a Sigmoid activation function layer connected to the output of the 1×1 convolutional layer for compressing the mapped values to (0, 1) to obtain the edge deletion probability matrix P. A two-level edge convolutional layer structure is adopted. On the one hand, the first edge convolutional layer specifically extracts local topological features from the functional connectivity matrix to capture direct connection patterns between brain regions. The second edge convolutional layer further extracts high-order graph structural features based on the primary features to identify complex brain network interaction patterns, enabling the model to accurately distinguish the functional specificity of different brain regions and providing a reliable foundation for subsequent identification of key brain functional areas. On the other hand, a 1×1 convolutional layer is used to achieve the fusion and dimensionality reduction of multi-channel features, mapping high-order graph features to single-channel edge importance scores. The Sigmoid activation function compresses the scores to the (0,1) interval, forming an edge deletion probability matrix P with clear probabilistic significance. It can dynamically generate personalized augmentation strategies based on the unique topological characteristics of each brain network, overcoming the blindness of fixed augmentation strategies and achieving "targeted" intelligent edge deletion.
[0096] Based on the edge deletion probability matrix P, an augmented graph is obtained by performing edge deletion and retaining key functional connections on the functional connection matrix X. Specifically, it includes the following steps:
[0097] (1) Based on the edge deletion probability matrix P, a continuous edge deletion mask M is generated through reparameterization. The specific calculation method is as follows:
[0098] ;
[0099] Where E is a random matrix that follows a uniform distribution. This refers to the temperature parameter. In this embodiment, the temperature parameter... Set to 1.0.
[0100] (2) Based on the continuous edge deletion mask M and the functional connection matrix X, the augmented graph is obtained by performing edge deletion while retaining key functional connections through element-wise multiplication. The specific calculation method is as follows:
[0101] ;
[0102] Where M is the continuous edge removal mask and X is the functional connectivity matrix, the gradient interruption problem caused by discrete sampling is solved, and the graph augmenter can be trained and optimized together with the whole model.
[0103] Feature extraction layer, used to extract the functional connectivity matrix X and the augmented graph, respectively. Feature representation, such as Figure 4 As shown, it includes at least a third-side convolutional layer for extracting initial local features, a third LeakyReLU activation function layer connected to the output of the third-side convolutional layer, a fourth-side convolutional layer connected to the output of the third LeakyReLU activation function layer for extracting higher-order graph structure features, a fourth LeakyReLU activation function layer connected to the output of the fourth-side convolutional layer, an R×1 convolutional layer connected to the output of the fourth LeakyReLU activation function layer for column aggregation to extract global features of the target brain functional area, a fifth LeakyReLU activation function layer connected to the output of the R×1 convolutional layer, a 1×R convolutional layer connected to the output of the fifth LeakyReLU activation function layer for row aggregation to extract global features of the source brain functional area, and a linear layer connected to the output of the 1×R convolutional layer for linearly transforming and mapping data to the feature representation space. On the one hand, by using the row-column separation convolution operation in the third and fourth edge convolutional layers, the absolute anatomical location information of brain regions is encoded into the feature representation, fundamentally breaking the permutation invariance limitation of traditional GNNs. On the other hand, through the cascaded design of "edge convolution → Leaky ReLU → edge convolution → Leaky ReLU", progressive feature extraction from local topological features to higher-order graph structures is achieved, ensuring the complete capture of brain network features at different levels. In this embodiment, the linear layer uses a standard fully connected layer to filter out noise and redundancy, thereby obtaining a compact and information-dense feature representation.
[0104] It should be noted that the first, second, third, and fourth edge convolutional layers use the same edge convolutional layer structure, such as... Figure 5 As shown, it includes at least:
[0105] The parallel R×1 convolutional filter and 1×R convolutional filter are implemented using the following calculation method:
[0106] ;
[0107] ;
[0108] Where x is the input feature, W R×1 and b r The weights and biases of the R×1 convolutional filter are W, respectively. 1×R and b c These are the weight parameters and bias of the 1×R convolutional filter, respectively;
[0109] The fusion layer is connected to the outputs of both the R×1 and 1×R convolutional filters. It is used to perform an outer product calculation to broadcast the outputs of the R×1 and 1×R convolutional filters to restore their dimensions, and then concatenate the restored results. The specific calculation method is as follows:
[0110] ;
[0111] ;
[0112] ;
[0113] Where I is a 1×R vector with all elements being 1. The outer product operation is employed. A parallel row-column dual-path setup is used. On one hand, an R×1 convolutional filter extracts the column-oriented features of each brain region as the information "target," capturing the "receiving" functional characteristics of the brain region. A 1×R convolutional filter extracts the row-oriented features of each brain region as the information "source," capturing the "transmitting" functional characteristics of the brain region. This ensures the complete extraction of the brain network's topological features from both row and column dimensions. On the other hand, the row and column features are combined through the outer product operation to reconstruct a side-level feature representation containing rich contextual information. Each reconstructed feature simultaneously contains functional information from both the source and target brain regions, avoiding the inability of traditional GNNs to distinguish functional differences between different brain regions due to node permutation invariance, which leads to a loss of practical interpretability in the model.
[0114] The projection head includes at least one multilayer perceptron for mapping the feature representation output by the feature extraction layer to the contrastive learning space and obtaining the optimal weight parameters based on the contrast results.
[0115] The classifier includes at least one multilayer perceptron for classifying brain functions based on the feature representations output by the feature extraction layer.
[0116] In this embodiment, the projection head includes a first multilayer perceptron, a sixth LeakyReLU activation function layer connected to the output of the first multilayer perceptron, and a second multilayer perceptron connected to the output of the sixth LeakyReLU activation function layer. The specific calculation method used is as follows:
[0117] ;
[0118] Where H represents the input feature. Let W1 be the LeakyReLU activation function, and W2 and b2 be the weight parameters and biases of the first multilayer perceptron, respectively.
[0119] The classifier comprises a third multilayer perceptron, a seventh LeakyReLU activation function layer connected to the output of the third multilayer perceptron, a fourth multilayer perceptron connected to the output of the seventh LeakyReLU activation function layer, and a Sigmoid activation function layer connected to the output of the fourth multilayer perceptron. It is implemented using the following computational method:
[0120] ;
[0121] Where H represents the input feature. Here, W3 and b3 are the weights and biases of the third multilayer perceptron, and W4 and b4 are the weights and biases of the fourth multilayer perceptron.
[0122] It should be noted that the projection head obtains the optimal weight parameters by comparing the results of the loss function. The loss function L in the adversarial graph contrastive learning classification model is... total Including the calculation of contrast loss L con Calculate the classification loss L cls And calculate the regularization loss L reg ; Calculate the contrast loss L con The specific calculation method is as follows:
[0123] ;
[0124] Where B is the batch size, z i Let X be the contrastive embedding vector in the contrastive learning space. For augmented image In the contrastive embedding vectors of the contrastive learning space, sim() represents the cosine similarity. To compare temperature hyperparameters. In this embodiment, temperature hyperparameters are compared. Set it to 0.2.
[0125] Calculate the classification loss L cls The specific calculation method is as follows:
[0126] ;
[0127] Among them, y i For real labels, The classification results are for the functional connectivity matrix X. For augmented image Classification results;
[0128] Calculate the regularization loss L reg The specific calculation method is as follows:
[0129] ;
[0130] Where R is the number of brain regions, M i Let I be the edge deletion mask, and let I be an all-1 vector.
[0131] Loss function L total The specific calculation method is as follows:
[0132] ;
[0133] in, The weight hyperparameters for the classification loss are... These are the weight hyperparameters for the regularization loss. In this embodiment, the weight hyperparameters for the classification loss are... Set to 1.0, the weight hyperparameter of the regularization loss. Set to 0.2. Use the Adam optimizer with a learning rate of 1e-3, a data augmentation module learning rate of 1e-4, 300 training epochs, and a batch size of 16.
[0134] Step S03, identifying key brain functional areas based on the continuous edge deletion mask M, specifically includes the following steps:
[0135] The average mask matrix is obtained by averaging the edge deletion masks M corresponding to the same brain function classification results element by element. The specific calculation method is as follows:
[0136] ;
[0137] Where N is the number of edge deletion masks M with the same brain function classification results;
[0138] Based on a preset threshold, the average mask matrix The elements are filtered, and if the element value is greater than a preset threshold, the connection corresponding to the element is defined as a key connection, thus obtaining a set of key connections.
[0139] Iterate through all elements in the key connection set and count the number of times the brain region of interest appears in the key connections;
[0140] The brain regions of interest are sorted according to their statistical frequency, and the 10 regions of interest with the highest frequency are selected as the key brain functional regions corresponding to the brain function classification results. In this embodiment, the preset threshold is set to 0.8, and the average mask matrix is... Connections with an element value greater than 0.8 are defined as key connections. A diagnostic report is generated by analyzing the brain function classification results output by the adversarial graph contrastive learning model and the corresponding key brain functional areas.
[0141] In this embodiment, the area under the curve (AUC), accuracy, and harmonic mean (F1 score) are used as evaluation metrics for classification performance. As shown in Table 1, the adversarial graph contrastive learning classification model achieves an AUC of 70.3±2.6, an accuracy of 68.6±3.5, and an F1 score of 66.9±3.2 on the ABIDE I dataset. On the REST-meta-MDD dataset, the AUC reaches 71.2±2.1, the accuracy is 67.9±3.1, and the F1 score is 67.8±4.2. Compared with traditional machine learning methods (SVM, MLP), classic GNN models (GCN, GAT), and fMRI brain network analysis-specific models (BrainNetCNN, BrainGNN, Hi-GCN, A-GCL), all evaluation metrics show significant improvements.
[0142] Table 1, Performance Evaluation Indicators
[0143]
[0144] This embodiment also provides a system for classifying brain functional networks using the adversarial graph contrastive learning-based method described above, comprising at least:
[0145] The data preprocessing module is used to preprocess resting-state functional magnetic resonance imaging data and construct a functional connectivity matrix X based on the preprocessing results.
[0146] The module for building an adversarial graph contrastive learning classification model is used to build an adversarial graph contrastive learning classification model. It trains the built adversarial graph contrastive learning classification model based on standard sample data to obtain the optimal weight parameters and loads the optimal weight parameters into the adversarial graph contrastive learning classification model.
[0147] The classification module, based on the functional connectivity matrix X, uses a trained adversarial graph contrastive learning model to obtain brain function classification results.
[0148] In summary, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A brain functional network classification method based on adversarial graph contrastive learning, characterized in that, It should include at least the following steps: Acquire resting-state functional magnetic resonance imaging data, preprocess the image data, and construct a functional connectivity matrix X based on the preprocessing results; The functional connectivity matrix X is input into the adversarial graph contrastive learning classification model for classification to obtain brain function classification results. The adversarial graph contrastive learning classification model is trained based on standard sample data, and includes at least the following components: A graph augmenter, comprising a built-in trainable encoder, generates an edge deletion probability matrix P based on the functional connectivity matrix X, and performs edge deletion while preserving key functional connections on the functional connectivity matrix X based on the edge deletion probability matrix P to obtain an augmented graph X'. The encoder includes a first edge convolutional layer and a second edge convolutional layer, both employing the same edge convolutional layer structure. Each edge convolutional layer includes at least: The parallel R×1 convolutional filter and 1×R convolutional filter are implemented using the following calculation method: ; ; Where x is the input feature, W R×1 and b r The weights and biases of the R×1 convolutional filter are W, respectively. 1×R and b c These are the weight parameters and bias of the 1×R convolutional filter, respectively; A fusion layer, connected to the outputs of the R×1 and 1×R convolutional filters respectively, is used to perform a broadcast operation on the outputs of the R×1 and 1×R convolutional filters to restore their dimensions through outer product calculation, and then concatenate the dimension-restored results. The specific calculation method is as follows: ; ; ; Where I is a 1×R vector with all elements being 1. This is an outer product operation; A feature extraction layer is used to extract feature representations of the functional connectivity matrix X and the augmented graph X', respectively. The projection head includes at least one multilayer perceptron for mapping the feature representation output by the feature extraction layer to the contrast learning space and obtaining the optimal weight parameters based on the contrast results. A classifier, comprising at least one multilayer perceptron, for classifying brain functions based on the feature representations output by the feature extraction layer.
2. The brain functional network classification method based on adversarial graph contrastive learning according to claim 1, characterized in that, The process of obtaining an augmented graph X' by performing edge deletion and retaining key functional connections on the functional connection matrix X based on the edge deletion probability matrix P specifically includes the following steps: Based on the edge deletion probability matrix P, a continuous edge deletion mask M is generated through reparameterization. The specific calculation method is as follows: ; Where E is a random matrix that follows a uniform distribution. For temperature parameters; Based on the continuous edge deletion mask M and the functional connection matrix X, the augmented graph X' is obtained by deleting edges while preserving key functional connections through element-wise multiplication. Specifically, the following calculation method is used: ; Where M is the continuous edge deletion mask and X is the functional connection matrix.
3. A brain functional network classification method based on adversarial graph contrastive learning according to claim 2, characterized in that: It also includes identifying key brain functional areas based on the continuous edge deletion mask M, specifically including the following steps: The average mask matrix is obtained by averaging the edge deletion masks M corresponding to the same brain function classification results element by element. The specific calculation method is as follows: ; Where N is the number of edge deletion masks M with the same brain function classification results; Based on a preset threshold, the average mask matrix The elements are filtered, and if the element value is greater than a preset threshold, the connection corresponding to the element is defined as a key connection, thus obtaining a set of key connections. Iterate through all elements in the set of key connections and count the number of times the brain region of interest appears in the key connections; The brain regions of interest were sorted according to their statistical frequency, and the 10 brain regions of interest with the highest frequency were selected as the key brain functional areas corresponding to the brain function classification results.
4. A brain functional network classification method based on adversarial graph contrastive learning according to any one of claims 1-3, characterized in that, The encoder includes a first side convolutional layer for extracting local topological features from the functional connection matrix X, a first LeakyReLU activation function layer connected to the output of the first side convolutional layer, a second side convolutional layer connected to the output of the first LeakyReLU activation function layer for further extracting higher-order graph structure features, a second LeakyReLU activation function layer connected to the output of the second side convolutional layer, a 1×1 convolutional layer connected to the output of the second LeakyReLU activation function layer for fusing and mapping multi-channel features to a single channel, and a Sigmoid activation function layer connected to the output of the 1×1 convolutional layer for compressing the mapped values to (0, 1) to obtain the edge deletion probability matrix P.
5. A brain functional network classification method based on adversarial graph contrastive learning according to claim 4, characterized in that, The feature extraction layer includes at least a third-side convolutional layer for extracting initial local features, a third LeakyReLU activation function layer connected to the output of the third-side convolutional layer, a fourth-side convolutional layer connected to the output of the third LeakyReLU activation function layer for extracting higher-order graph structure features, a fourth LeakyReLU activation function layer connected to the output of the fourth-side convolutional layer, an R×1 convolutional layer connected to the output of the fourth LeakyReLU activation function layer for column aggregation to extract global features of the target brain functional area, a fifth LeakyReLU activation function layer connected to the output of the R×1 convolutional layer, a 1×R convolutional layer connected to the output of the fifth LeakyReLU activation function layer for row aggregation to extract global features of the source brain functional area, and a linear layer connected to the output of the 1×R convolutional layer for linearly transforming and mapping data to the feature representation space.
6. A brain functional network classification method based on adversarial graph contrastive learning according to claim 5, characterized in that: The first, second, third, and fourth edge convolutional layers all use the same edge convolutional layer structure.
7. A brain functional network classification method based on adversarial graph contrastive learning according to any one of claims 1-3 or 5-6, characterized in that: The projection head includes a first multilayer perceptron, a sixth LeakyReLU activation function layer connected to the output of the first multilayer perceptron, and a second multilayer perceptron connected to the output of the sixth LeakyReLU activation function layer. The specific calculation method used is as follows: ; Where H represents the input feature. Let W1 be the LeakyReLU activation function, and W2 and b2 be the weight parameters and biases of the first multilayer perceptron, respectively. The classifier includes a third multilayer perceptron, a seventh LeakyReLU activation function layer connected to the output of the third multilayer perceptron, a fourth multilayer perceptron connected to the output of the seventh LeakyReLU activation function layer, and a Sigmoid activation function layer connected to the output of the fourth multilayer perceptron. It is implemented using the following calculation method: ; Where H represents the input feature. Here, W3 and b3 are the weights and biases of the third multilayer perceptron, and W4 and b4 are the weights and biases of the fourth multilayer perceptron.
8. A brain functional network classification method based on adversarial graph contrastive learning according to any one of claims 1-3 or 5-6, characterized in that: The loss function of the adversarial graph contrastive learning classification model is L. total Including the calculation of contrast loss L con Calculate the classification loss L cls And calculate the regularization loss L reg The calculation of the contrast loss L con The specific calculation method is as follows: ; Where B is the batch size, z i Let z be the contrastive embedding vector of the functional connectivity matrix X in the contrastive learning space. i ' is the contrastive embedding vector of the augmented image X' in the contrastive learning space, and sim() is the cosine similarity. To compare temperature over-parameters; The calculation of classification loss L cls The specific calculation method is as follows: ; Among them, y i For real labels, The classification results are for the functional connectivity matrix X. To augment the classification results of graph X'; The calculation of regularization loss L reg The specific calculation method is as follows: ; Where R is the number of brain regions, M i Let I be the edge deletion mask, and let I be an all-1 vector. The loss function L total The specific calculation method is as follows: ; in, The weight hyperparameters for the classification loss are... The weight hyperparameters for the regularization loss.
9. A brain functional network classification method based on adversarial graph contrastive learning according to any one of claims 1-3 or 5-6, characterized in that, The image data is preprocessed, specifically including time-level correction, head motion correction, spatial normalization and Gaussian smoothing of the resting-state functional magnetic resonance imaging data, and eliminating the differences between data from different sources by using the empirical Bayesian framework tuning method.
10. A system applying the brain functional network classification method based on adversarial graph contrastive learning as described in any one of claims 1-9, characterized in that, At least including: The data preprocessing module is used to preprocess the resting-state functional magnetic resonance image data and construct a functional connectivity matrix X based on the preprocessing results. An adversarial graph contrastive learning classification model construction module is used to construct the adversarial graph contrastive learning classification model, train the constructed adversarial graph contrastive learning classification model based on sample standard data to obtain the optimal weight parameters, and load the optimal weight parameters into the adversarial graph contrastive learning classification model. The classification module, based on the functional connectivity matrix X, performs classification using the trained adversarial graph contrastive learning classification model to obtain brain function classification results.