Brain function network classification method based on diffusion model guidance generation
By introducing diffusion models and guiding generation formulas, the problem of overfitting and inconsistent data distribution in brain functional network classification is solved, and data that meets the target distribution is generated, which improves classification accuracy and interpretability.
Patent Information
- Application Number
- CN202510320636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-04
AI Technical Summary
The existing technology has problems of overfitting and inconsistent data distribution in brain functional network classification, and the cost of pre-training and fine-tuning is high, and the existing data enhancement methods cannot effectively adjust the data to meet the needs of classification tasks.
The diffusion model is introduced and the diffusion process is trained, combined with the guidance generation formula of the brain functional network classification model, and data that meets the target distribution is generated through the forward noise addition and reverse denoising process. The generation ability of the diffusion model and the guidance of the classification task are used to adjust the direction and quality of data generation.
It improves the classification accuracy and interpretability of the brain functional network classification model, alleviates the overfitting phenomenon, and the generated data is more in line with expectations, improving the classification effect of downstream models.
Smart Images

Figure CN120257048A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data classification, and in particular to a brain functional network classification method guided by a diffusion model for generation. Background Art
[0002] A brain functional network is a type of data composed of a functional connection matrix and a graph structure. The functional connection matrix is extracted from brain magnetic resonance imaging scans, and a certain graph structure can be obtained based on the functional connection matrix. Brain functional networks are used to characterize brain activity, and there are significant differences in different diseases, genders, and other characteristics. With the development of machine learning and deep learning technologies, people are committed to designing different neural network models for the classification of brain functional networks. The development of pre-training and fine-tuning techniques has solved the problem of insufficient data volume in brain functional networks. A large amount of data is used to pre-train the model, and then a small amount of downstream data is used to fine-tune the model. However, the forms of pre-training and fine-tuning are prone to overfitting in brain functional networks, and the data distributions of pre-trained and fine-tuned brain functional networks are often inconsistent, resulting in high costs during fine-tuning. In addition, the current data augmentation methods for brain functional networks are limited to segmenting time series data or simply adding noise, and cannot be processed according to different upstream and downstream target data.
[0003] To solve such problems, it is necessary to introduce a diffusion process, utilize the generation ability of the diffusion model, and combine the guiding generation formula of the brain functional network classification model to generate brain functional network data, thereby improving the accuracy of the brain functional network classification model. Summary of the Invention
[0004] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and propose a brain functional network classification method guided by a diffusion model for generation. A diffusion process is introduced and the diffusion model is trained. The generation ability of the diffusion model is combined with the classification task, and the labeled target knowledge in the brain functional network dataset is used to guide the denoising process of the diffusion model to generate data close to the target distribution space. The classification effect of the brain functional network classification model is improved through data generation, and the interpretability of the classification is enhanced.
[0005] To achieve the above purpose, the technical solution provided by the present invention is as follows: A brain functional network classification method guided by a diffusion model for generation, comprising the following steps:
[0006] 1) Construct a diffusion process and a neural network model in the diffusion process. The diffusion process consists of a forward noise addition process and a reverse denoising process, which are respectively used to add noise to and restore the input brain functional network dataset. Design the neural network model in the diffusion process, simply referred to as the diffusion model, and learn the noise added in the forward noise addition process during the reverse denoising process;
[0007] 2) Construct a brain functional network dataset to be trained. Use this dataset to perform the diffusion process in step 1) and train the diffusion model to obtain a trained diffusion model;
[0008] 3) Utilize the trained diffusion model in step 2) to design a new guidance generation formula during the diffusion process; construct a brain functional network classification model and a brain network dataset for classification. The guidance generation formula combines the characteristics of this brain functional network classification model and the brain network dataset;
[0009] 4) According to the trained diffusion model and the designed guidance generation formula, during the training process of the brain functional network classification model, use the classified brain network dataset to perform the diffusion process to generate new data, and supplement the new data into the classified brain network dataset for the training of the brain functional network classification model to obtain a classification result.
[0010] Furthermore, the forward noise addition process is represented as a process of gradually adding noise to the original data, as shown in formula (1):
[0011]
[0012] where t is the time length of the forward noise addition process, and the value varies from 0 to 1. dG (t) represents adding noise to the original data G at time t; dw is a standard Brownian motion process, representing the uncertain diffusion of the original data; σ min and σ max represent the minimum and maximum added noises respectively; the noise added during this forward noise addition process will gradually increase over time;
[0013] The reverse denoising process is the inverse process of formula (1) and is represented by formula (2):
[0014]
[0015] where dG' (t) represents denoising the noisy data G' at time t, dt represents the change at time t, logp t (G' (t) ) represents the distribution of data G' at time t, and the gradient term is approximated by a score function in practice; this score function is obtained by fitting and calculating with the diffusion model, and the noise added to data G' at time t is the output result of data G' passing through the diffusion model.
[0016] Further, the diffusion model is used to fit the score function in the diffusion process, and the diffusion model is composed of a multi-head self-attention module and a first forward propagation module; the multi-head self-attention module encodes the input data, captures semantic information multiple times based on the self-attention mechanism, and obtains an encoded vector representation; the first forward propagation module learns and compresses the dimension of the vector representation to obtain an output result with the same dimension as the input data; the diffusion model can learn the connections between brain regions in the brain functional network data, thereby learning the noise added during denoising and fitting the score function in the diffusion process.
[0017] Further, the brain functional network dataset to be trained includes data related to the Human Connectome Project (HCP). One data represents the brain activity of a subject within a preset time range, and a series of brain functional network data G is obtained through preprocessing. pretrain , from G pretrain = {G1, G2, …, G n} represents, where n is the scale of the dataset. Among them, G1, G2, …, G n respectively represent individual data, and each data is represented by a functional connection matrix A of size N*N FC and a time series Timeseries i represents, where N represents the number of brain regions.
[0018] Further, the diffusion process is carried out and the diffusion model is trained. The specific process is to regard each data in the brain functional network data G pretrain as the original data G, obtain the noisy data G' through the forward noise addition process of T' time steps, and then obtain the restored data G recover through the backward denoising process of T' time steps. At each time step in the backward denoising process, the input noisy data G' needs to pass through the diffusion model to obtain the value of the gradient term in the backward process; the purpose of training is to minimize the gap between the original data G and the restored data G recover and improve the restoration ability of the diffusion model;
[0019] Specifically, the training loss function is the gradient between the score function learned by the diffusion model and the logarithmic density function of the true data distribution , specifically shown in formula (3):
[0020]
[0021] In the formula, q(G (t-1) | G (0) , G (t) ) represents the data G after multiple noise additions under the condition of known original data G (0) and noisy data G (t) (t-1) The distribution, p(G' (t-1) |G (t) ) represents the distribution of the denoised data G' obtained by the diffusion model from the previous-step data G (t) . Logarithmic operations are performed on them respectively and the gradient values are calculated. Then, the mean value of the squared difference between these two gradient values is calculated. In the formula, (t-1) represents the expected value under the joint distribution of the original data G and the data G (0) after being noisy for several times. Finally, the loss (t) is obtained.
[0022] Furthermore, the brain functional network classification model is a neural network model designed based on the characteristics of brain functional network data; this model is composed of a virtual classification vector, a self-attention module, a second forward propagation module, and a multi-layer perceptron module; the virtual classification vector is a vector of all zero values concatenated into the input data for subsequent classification. Inspired by the cls vector in natural language processing, similar virtual vectors are used to enrich the feature information of the static brain network for classification; in terms of the self-attention module, for the input graph data G input after being concatenated with the virtual classification vector, with a dimension of N*(N + 1), the self-attention calculation of a single attention head is shown in formula (4):
[0023]
[0024] In the formula, Q, K, and V respectively represent three weight parameter matrices that map the input to different representation vectors, namely Query, Key, and Value, for weighted summation. d k represents the element feature dimension of the input graph data G input .
[0025] The feature matrix G feature obtained after being processed by the activation function SoftMax is input into the second forward propagation module; the second forward propagation module consists of two fully connected layers. First, the input feature dimension is mapped to another feature dimension, and then mapped back to the original input feature dimension. The first layer is stacked with the ReLU linear function to further enrich its non-linear expression ability. This module needs to add the output result to the original input as a residual connection and perform layer regularization processing;
[0026] The input of the multi-layer perceptron module is the virtual classification vector that has been learned and updated by the second forward propagation module; the multi-layer perceptron module consists of one fully connected layer and calculates the final classification probability through the SoftMax function. This module also includes a Dropout layer to avoid overfitting. During classification training, the cross-entropy loss function is used for supervised learning.
[0027] Furthermore, the brain network dataset is collected from multiple sites, including autistic patients and healthy controls; the data is divided into 200 brain regions by the Craddock200 brain atlas, and the correlation coefficients of the average time series between brain regions are calculated pairwise to obtain a functional connectivity matrix of size 200*200 as the final brain network dataset; each functional connectivity matrix in the dataset corresponds to a classification label y label , y label The value of y is 0 for health and 1 for disease.
[0028] Furthermore, the guidance generation formula combines a brain functional network classification model with a reverse diffusion process and replaces the gradient term in the reverse diffusion process to generate new data based on the diffusion process. The guidance generation formula is shown in formula (5).
[0029]
[0030] where s(G' (t) , t) is the score value of the data G' in the diffusion denoising step in the brain network dataset (t) output by the diffusion model, α is the quotient of the logarithmic norm of the loss function and the score value s(G' (t) , t) for converging the brain functional network classification model; in the gradient term, is the objective function of the guidance generation formula, which consists of two objectives: classification loss and similarity measure. Among them, in terms of classification loss, the data G' in the diffusion denoising step (t) has the same classification label y as the data in the brain network dataset label , then the predicted label y pred produced by the brain functional network classification model should be close to the classification label y of the data in the brain network dataset label ; for this purpose, the gap between the classification label and the predicted label is minimized, and the cross-entropy loss function is specifically used; in terms of similarity measure, the similarity between the data in the diffusion denoising step and the data in the brain network dataset is measured. The features of the two data are defined as the flattening of the corresponding adjacency matrix A, and the gap is measured as the sum of the mean squared difference of the features of the two data and the covariance matrix of the features.
[0031] Furthermore, a diffusion process is used to generate new data with the classified brain network dataset, specifically during the classification using the brain functional network classification model; the brain functional network classification model is trained when the parameters of the diffusion model are frozen, and after a specified number of rounds, guidance generation is performed. When performing guidance generation, the weights of the brain functional network classification model need to be frozen. At the same time, for the trained diffusion model, the direction of data generation by this diffusion model is adjusted in combination with the gradient update formula, thereby generating new data. After the guidance generation ends, the new data is obtained for the classification task; after multiple guidance generations, the new data can improve the classification performance in the classification task.
[0032] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0033] 1. Aiming at the problems of overfitting or inconsistent data distribution in the pre-training and fine-tuning processes of the brain functional network, the present invention introduces a diffusion process and trains the diffusion model, which can effectively utilize the powerful generation ability of the diffusion model to enhance the input training data and generate data required for the classification task. The guidance generation formula designed based on the diffusion process can combine the trained diffusion model and the brain functional network classification model to adjust the direction and quality of data generation, making the generated data more in line with expectations.
[0034] 2. Different from the previous diffusion model guidance methods, the present invention uses the classification task to guide the reverse denoising process in the diffusion process, and dynamically adjusts the weights of the diffusion model during the adjustment process. The guidance generation formula can be customized, and finally the generation direction and scale of the diffusion model are controllable, with a high degree of freedom. By combining the characteristics of the brain functional network, it helps to improve the accuracy of the brain functional network classification model. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a schematic diagram of the overall framework of the brain functional network classification method guided by the diffusion model in the embodiment.
[0036] Figure 2 is a schematic diagram of training the diffusion model in the embodiment.
[0037] Figure 3 is a schematic diagram of the guidance generation process in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] The present invention will be further described in detail below in conjunction with the embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0039] As Figures 1 to 3 shown, this embodiment discloses a brain functional network classification method guided by a diffusion model, and the specific situation is as follows:
[0040] 1) Construct the diffusion process and diffusion model. As Figure 1 shown, it consists of two parts: training the diffusion model and guiding the generation for classification. The diffusion process is composed of a forward noise-adding process and a reverse denoising process, which are used to add noise to and restore the input original data respectively. The diffusion model is used to learn the noise added in the forward noise-adding process during the reverse denoising process, and the calculated diffusion model score is used in the reverse denoising process.
[0041] 2) Construct the brain functional network dataset to be trained, and perform the diffusion process with this dataset. As Figure 2 shown, use the training dataset to perform multi-step noise addition and denoising on the data, calculate the loss function by computing the difference between the original data and the data after multiple denoisings, and train the diffusion model with this. Finally, obtain the trained diffusion model.
[0042] 3) Construct the brain functional network classification model and the brain network dataset for classification. Combine this classification model and the trained diffusion model in step 2, and design the guiding generation formula in the diffusion process. This formula is obtained from Figure 3 calculating the gradient term of the classification task.
[0043] 4) As Figure 3 shown, according to the trained diffusion model and the designed guiding generation formula, use the classified brain network dataset to perform the reverse diffusion process to obtain the data after multiple denoisings. Supplement the new data into the classified brain network dataset for training the brain functional network classification model, and finally obtain the classification result.
[0044] The aforementioned diffusion process consists of a forward noise-adding process and a reverse denoising process. As Figure 2 shown, the forward noise-adding process can be represented as a process of gradually adding noise to the original data, and the formula is:
[0045]
[0046] where t is the time length of the forward noise-adding process, and its value varies from 0 to 1. dG (t) represents adding noise to the original data G at time t, dw is the standard Wiener process, representing the uncertain diffusion of the original data, and σ min σ min and σ max represent the minimum noise and the maximum noise added respectively. The noise added in this forward noise-adding process will gradually increase over time; the reverse denoising process is the inverse process of the forward noise-adding process and can be represented by the following formula:
[0047]
[0048] In the formula, dG' (t)Denote the denoising of the noise data G' at time t, dt represents the change at time t, and logp t (G' (t) ) represents the distribution of the data G' at time t. The gradient term is usually approximated by a score function in practice. This score function is usually calculated by a diffusion model. The distribution of the data at time t is usually the output result of the data G' passing through a neural network.
[0049] The diffusion model is used to fit the score function in the diffusion process. As Figure 2 shown, this diffusion model is specifically composed of a multi-head self-attention module and a first forward propagation module. The multi-head self-attention module encodes the input data, captures semantic information multiple times based on the self-attention mechanism, and obtains an encoded vector representation. The first forward propagation module learns and compresses the dimension of this vector representation to obtain an output result with the same dimension as the input data.
[0050] The brain functional network dataset to be trained is collected from public network channels, including relevant data such as the Human Connectome Project (HCP). One data represents the brain activity of a subject within a certain time range. After preprocessing, a series of brain functional network data G pretrain is obtained. It can be represented by G pretrain ={G1, G2, …, G n}, where n is the scale of the dataset. Among them, G1, G2, …, G n respectively represent individual data. Each data is represented by a functional connectivity matrix A FC of size N*N and a time series Timeseries i , where N represents the number of brain regions.
[0051] Perform the diffusion process and train the diffusion model. As Figure 2 shown, the specific process is to regard each data in the brain functional network data G pretrain as the original data, obtain the noise data G' through the forward noise addition process of T' time steps, and then obtain the restored data G recover through the reverse denoising process of T' time steps. At each time step in the reverse denoising process, the input noise data G' needs to pass through the diffusion model to obtain the value of the gradient term in the reverse process. The purpose of training is to minimize the gap between the original data and the restored data G recover and improve the restoration ability of the diffusion model.
[0052] The training loss function in this process is the gap between the score function learned by the diffusion model and the gradient of the logarithmic density function of the true data distribution . Specifically, it is as follows:
[0053]
[0054] wherein, q(G (t-1) |G (0) ,G (t) ) represents the distribution of the data G (0) after multiple noise additions under the condition of the known original data G (t) and the noisy data G (t-1) , p(G' (t-1) |G (t) ) represents the distribution of the data G' (t) obtained by denoising the previous-step data G (t-1) by the diffusion model. After taking the logarithm of them respectively and calculating the gradient values, and then calculating the squared difference between the two gradient values, is used to calculate the expected value under the joint distribution of the original data G (0) and the data G (t) after multiple noise additions, and finally the loss
[0055] The brain functional network classification model is a neural network model designed based on the characteristics of brain functional network data. This model consists of a virtual classification vector, a self-attention module, a second forward propagation module, and a multi-layer perceptron module. The virtual classification vector is a vector of all zero values concatenated in the input data for subsequent classification. It is inspired by the cls vector in natural language processing and enriches the feature information of the static brain network through a similar virtual vector for classification. In terms of the self-attention module, for the input graph data G input concatenated with the virtual classification vector, with a dimension of N*(N + 1), the self-attention calculation of a single attention head is shown in the following formula:
[0056]
[0057] wherein, Q, K, and V respectively represent three weight parameter matrices that map the input to different representation vectors, namely Query, Key, and Value, for weighted summation, and d k represents the element feature dimension of the input graph data G input . The feature matrix G feature obtained after being processed by the activation function SoftMax is input into the second forward propagation module.
[0058] The second forward propagation module consists of two fully connected layers. First, it maps the input feature dimension to another feature dimension, and then maps back from this feature dimension to the original input feature dimension, and further enriches its non-linear expression ability by stacking the ReLU linear function in the first layer. The calculation of this module can be represented by the following formula:
[0059] FFN(G feature ) = max(0, G feature W1 + b1)W2 + b2
[0060] Where max represents taking the positive value of the function inside the parentheses, which is equivalent to the ReLU activation function. W1 and W2 represent the weight parameter matrices, and b1 and b2 represent the bias terms. This module needs to add the output result to the original input as a residual connection and perform layer regularization processing.
[0061] The input of the multi-layer perceptron module is the virtual classification vector after learning and updating features by the second forward propagation module. The multi-layer perceptron module consists of a simple fully connected layer and calculates the final classification probability through the SoftMax function. This module also includes a Dropout layer to avoid overfitting. Cross-entropy loss function is used for supervised learning during classification training.
[0062] The downstream dataset (i.e., the brain network dataset) is obtained from public channels. This dataset is collected from multiple sites, including autistic patients and healthy controls. Each functional connectivity matrix in the dataset corresponds to a classification label y label , y label The value of which is 0 indicating health and 1 indicating disease.
[0063] The guidance generation formula is obtained from the "downstream classification task gradient term" and "score function" as shown in Figure 3 . Combining the classification task and the reverse diffusion process, and replacing the gradient term in the reverse diffusion process, new data is generated based on the diffusion process. The guidance generation formula is as follows:
[0064]
[0065] Where s(G' (t) , t) is the score value of the data G' in the diffusion denoising step in the brain network dataset (t) after passing through the diffusion model. α is the quotient of the logarithmic norm of the loss function and the score value s(G' (t) , t) used to converge the brain functional network classification model. In the gradient term, is the objective function of the guidance generation formula, which consists of two objectives: classification loss and similarity measure. Among them, in terms of classification loss, the data G' in the diffusion denoising step (t) has the same classification label y as the data in the brain network dataset label . Then, the predicted label y pred produced by the brain functional network classification model should be the same as the classification label y of the data in the brain network dataset labelApproach; to minimize the gap between the classification label and the predicted label, specifically using the cross-entropy loss function. In terms of similarity measurement, measure the similarity between the data in the diffusion denoising step and the data in the brain network dataset. Define the features of the two data as the flattening of the corresponding adjacency matrix A, and measure the gap as the sum of the mean squared difference of the features of the two data and the covariance matrix of the features. Use such a guiding generation formula, which combines the powerful denoising ability of the trained diffusion model and the characteristics of the classification dataset and the classification model to control the generation process and direction.
[0066] Use the classified brain network dataset to generate new data during the diffusion process, specifically when using the brain functional network classification model for classification. As Figure 1 Shown in the overall framework, the downstream model (i.e., the brain functional network classification model) is trained when the parameters of the diffusion model are frozen. After a specified number of rounds, guiding generation is performed. When performing guiding generation, it is necessary to freeze the weights of the brain functional network classification model. At the same time, for the already trained diffusion model, adjust the direction of the data generated by the diffusion model in combination with the gradient update formula to generate new data, and then obtain new data for the classification task after the guiding generation ends. After performing multiple guiding generations, the new data can improve the classification performance in the classification task.
[0067] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A method for classifying brain functional networks guided by diffusion models, characterized in that, Including the following steps: 1) Construct a diffusion process and a neural network model in the diffusion process. The diffusion process consists of a forward noise-adding process and a reverse denoising process, which are used to add noise to and recover the input brain functional network dataset respectively. Design the neural network model in the diffusion process, simply referred to as the diffusion model, and learn the noise added in the forward noise-adding process during the reverse denoising process; 2) Construct a brain functional network dataset to be trained, and perform the diffusion process in step 1) with this dataset to train the diffusion model, obtaining a trained diffusion model; 3) Use the trained diffusion model in step 2) to design a new guidance generation formula in the diffusion process; construct a brain functional network classification model and a brain network dataset for classification. The guidance generation formula combines the characteristics of this brain functional network classification model and the brain network dataset; 4) According to the trained diffusion model and the designed guidance generation formula, during the training process of the brain functional network classification model, use the classified brain network dataset to perform the diffusion process to generate new data, and supplement the new data into the classified brain network dataset for the training of the brain functional network classification model to obtain a classification result.
2. The brain functional network classification method guided by the diffusion model according to claim 1, characterized in that The forward noise-adding process is represented as a process of gradually adding noise to the original data, as shown in formula (1): where t is the time length of the forward noise addition process, with a value ranging from 0 to 1, and dG (t) represents adding noise to the original data G at time t; dw is a standard Brownian motion process, representing the uncertain diffusion of the original data; σ min and σ max represent the minimum and maximum added noises respectively; the noise added during this forward noise addition process will gradually increase with time; The reverse denoising process is the inverse process of formula (1) and is represented by formula (2): where dG' (t) denotes denoising the noise data G' at time t, and dt represents the change at time t, represents the distribution of the data G' at time t, and the gradient term is approximated by a scoring function in practice; The score function is obtained by fitting calculation of the diffusion model. The noise added to data G' at time t is the output result of data G' passing through the diffusion model.
3. The brain functional network classification method guided by the diffusion model according to claim 2, wherein, The diffusion model is used to fit the score function in the diffusion process. The diffusion model consists of a multi-head self-attention module and a first forward propagation module; the multi-head self-attention module encodes the input data, captures semantic information multiple times based on the self-attention mechanism, and obtains an encoded vector representation; the first forward propagation module learns and compresses the dimension of this vector representation to obtain an output result with the same dimension as the input data; the diffusion model can learn the connections between brain regions in the brain functional network data, thereby learning the noise added during noise addition and fitting the score function in the diffusion process.
4. The brain functional network classification method guided by a diffusion model according to claim 3, wherein The brain functional network dataset to be trained includes data related to the Human Connectome Project (HCP). One data represents the brain activity of a subject within a preset time range. After preprocessing, a series of brain functional network data G is extracted. pretrain , which is represented by G pretrain = {G1, G2, …, G n}, where n is the scale of the dataset. Among them, G1, G2, …, G n respectively represent individual data, and each data is represented by a functional connectivity matrix A FC of size N*N and a time series Timeseries i , where N represents the number of brain regions.
5. The brain functional network classification method generated based on the guidance of the diffusion model according to claim 4, wherein Perform the diffusion process and train the diffusion model. The specific process is to regard each data in the brain functional network data G pretrain as the original data G. After the forward noise-adding process of T' time steps, the noisy data G' is obtained, and then the restored data G recover is obtained through the backward denoising process of T' time steps. At each time step in the backward denoising process, the input noisy data G' needs to pass through the diffusion model to obtain the value of the gradient term in the backward process; The purpose of training is to minimize the gap between the original data G and the recovered data G recover and improve the recovery ability of the diffusion model; The specific training loss function is the score function learned by the diffusion model and the gradient of the log density function of the true data distribution The gap between them is specifically shown in formula (3): where \(q(G (t-1) |G (0) ,G (t) ) represents the distribution of the data \(G (0) after multiple noise additions under the condition of the known original data \(G (t) and the noisy data \(G (t-1) . \(p(G' (t-1) |G (t) ) represents the distribution of the data \(G' (t) obtained by denoising the previous-step data \(G (t-1) by the diffusion model. Take the logarithm of them respectively, calculate the gradient values, then calculate the mean value of the squared difference between the two gradient values. In the formula, represents the mean value under the joint distribution of the original data \(G (0) and the data \(G (t) after multiple noise additions. Finally, the loss 6. The brain functional network classification method guided by a diffusion model according to claim 5, wherein The brain function network classification model is a neural network model designed based on the characteristics of brain function network data; the model consists of a virtual classification vector, a self-attention module, a second forward propagation module, and a multi-layer perceptron module; the virtual classification vector is a vector of all zero values concatenated in the input data for subsequent classification, inspired by the cls vector in natural language processing, and enriches the feature information of the static brain network through a similar virtual vector for classification; in terms of the self-attention module, for the input graph data G after concatenating the virtual classification vector input , with a dimension of N*(N + 1), the self-attention calculation of a single attention head is shown in formula (4): Wherein, Q, K, and V respectively represent three weight parameter matrices, which map the input to different representation vectors, namely Query, Key, and Value, and perform weighted summation, and d k represents the input graph data G input is the element feature dimension of; The feature matrix G obtained after being processed by the activation function SoftMax feature , is input into the second forward propagation module; the second forward propagation module consists of two fully connected layers. First, the input feature dimension is mapped to another feature dimension, and then mapped back to the original input feature dimension from this feature dimension. The first layer superimposes the ReLU linear function to further enrich its non-linear expression ability. This module needs to add the output result and the original input as a residual connection and perform layer regularization processing; The input of the multi-layer perceptron module is the virtual classification vector after learning and updating features by the second forward propagation module; the multi-layer perceptron module consists of a single fully connected layer, and calculates the final classification probability through the SoftMax function. This module also includes a Dropout layer to avoid overfitting, and the cross-entropy loss function is used for supervised learning during classification training.
7. The brain functional network classification method guided by the diffusion model according to claim 6, wherein, The brain network dataset is collected from multiple sites, including autistic patients and healthy controls; the data is divided into 200 brain regions through the Craddock200 brain atlas, and the correlation coefficient of the average time series between brain regions is calculated pairwise to obtain a functional connectivity matrix of size 200*200 as the final brain network dataset; Each functional connectivity matrix in the dataset corresponds to a classification label y label , y label A value of 0 for y indicates health, and a value of 1 indicates disease.
8. The method for classifying brain functional networks generated under the guidance of a diffusion model according to claim 7, characterized in that, The guidance generation formula combines the brain functional network classification model and the reverse diffusion process, and replaces the gradient term in the reverse diffusion process, thereby generating new data based on the diffusion process. The guidance generation formula is shown in formula (5), Where s(G' (t) , t) is the fractional value of the data G' in the diffusion denoising step of the brain network dataset (t) output by the diffusion model, α is the loss function and the quotient of the logarithmic norm of the fractional value s(G' (t) , t) is used to converge the brain functional network classification model; in the gradient term, is the objective function guiding the generation formula, which consists of two objectives: classification loss and similarity measure. Among them, in terms of classification loss, the data G' in the diffusion denoising step (t) has the same classification label y as the data in the brain network dataset label , then the predicted label y pred generated by the brain functional network classification model should be close to the classification label y of the data in the brain network dataset label . Therefore, the gap between the classification label and the predicted label is minimized, and the cross-entropy loss function is specifically used; in terms of similarity measure, the similarity degree between the data in the diffusion denoising step and the data in the brain network dataset is measured. The features of the two data are defined as the flattening of the corresponding adjacency matrix A, and the gap is measured as the sum of the mean squared difference of the features of the two data and the covariance matrix of the features.
9. The brain functional network classification method guided by a diffusion model according to claim 8, characterized in that Generate new data through the diffusion process using a classified brain network dataset, specifically during the classification using a brain functional network classification model; the brain functional network classification model is trained when the parameters of the diffusion model are frozen, and after a specified number of rounds, guided generation is performed. During guided generation, the weights of the brain functional network classification model need to be frozen. At the same time, for the trained diffusion model, the direction of data generation by the diffusion model is adjusted in combination with the gradient update formula, thereby generating new data, and new data is obtained for the classification task after the guided generation ends; after multiple guided generations, the new data can improve the classification performance in the classification task.