Method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging
Patent Information
- Application Number
- CN202410008327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-18
- Filing Date
- 2024-01-02
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-01-02
AI Technical Summary
[0004]本发明针对现有技术融合两种不同模态影像数据之后,预测模型精度不高的技术问题,提出了一种联合结构和功能磁共振影像预测大脑任务激活模式的方法,以提升大脑任务激活模式的预测精度
[0044]This invention constructs three network models: a Prompt text encoding model, which embeds the Prompt text into the text feature space; a backbone network model, which extracts high-level semantic features of the brain and integrates features from both functional and structural modalities; and a Prompt interaction module, which integrates Prompt information to make the model's predictions easier to interpret and understand. The three network models are optimized based on a classification-contrast loss objective function to predict task-oriented activation patterns from non-task activation patterns, thereby effectively improving the prediction accuracy of the model after integrating information from two different modalities. Furthermore, the integration of Prompt technology further enhances model performance, contributing to the prediction of task activation patterns in the brains of patients with mental illnesses, the elderly, or infants.
Smart Images

Figure CN118013264B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of pattern recognition in biomedical engineering, and specifically relates to a method for predicting brain task activation patterns by combining structural and functional magnetic resonance imaging. Background Technology
[0002] In 2016, Tavor et al. first introduced a spatially independent component analysis method to identify functional networks from resting-state brain imaging data. Subsequently, they combined brain structural features and successfully predicted brain activation patterns under task conditions using a general linear model. This groundbreaking research demonstrated the ability to predict task-oriented brain activation patterns using task-free brain imaging data. However, this research still had limitations, and the accuracy of the predictions needed improvement. With the development of deep learning technology, the application of neural network models such as CNN, LSTM, and Transformer in the biomedical field has been continuously promoted. For example, in 2021, Ngo et al. proposed a fully convolutional neural network model based on the cerebral cortex, which validated using large-scale samples that functional brain imaging could predict brain task activation patterns in different individuals. Following this, in 2022, David et al. successfully combined deep learning technology with structural brain imaging, demonstrating that structural features can also capture differences between individuals, thus also predicting brain task activation patterns. Furthermore, in 2023, Zhu et al. proposed a geometric deep learning framework that designed a dual-channel network model to learn local and global information separately, thereby obtaining comprehensive features that can be used to predict the model and successfully predicting brain activation patterns in task states. Previous studies have demonstrated that functional magnetic resonance imaging (fMRI) can capture spontaneous activity of cognitive and behavioral information in the brain, and that this information is highly individual-specific. In addition, cortical folding patterns and microstructural features in structural magnetic resonance imaging are also closely related to functional patterns of the brain in different tasks.
[0003] However, current research only uses functional or structural brain imaging to predict brain activation patterns during task states. Although some studies have attempted to fuse the two, the results are still lacking. Therefore, further research and exploration are needed to more effectively integrate imaging data from these two modalities. Summary of the Invention
[0004] This invention addresses the technical problem of low prediction model accuracy after fusing two different modalities of image data in existing technologies. It proposes a method for predicting brain task activation patterns by combining structural and functional magnetic resonance imaging, thereby improving the prediction accuracy of brain task activation patterns.
[0005] The technical solution adopted in this invention is as follows:
[0006] A method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging, comprising the following steps:
[0007] Step S1: Extract brain functional and structural features:
[0008] Independent component analysis was performed on functional magnetic resonance imaging data to obtain group-level spatial components. Then, the correlation coefficient (preferably Pearson correlation coefficient) between the time series of each vertex of the cerebral cortex and the average time series of all vertices within the spatial component was calculated to obtain brain functional characteristics.
[0009] Structural magnetic resonance images are processed using magnetic resonance data processing tools (such as Freesurfer) to extract structural features for each vertex of the brain, including the spatial location of each vertex on the inner and outer surfaces of the cortex (i.e., x, y, and z coordinates) and other attributes, including cortical thickness, sulcus depth, myelin value, curvature, and atlas labels (preferably Desikan atlas labels and Destrieux atlas labels).
[0010] Step S2: Construct a task activation pattern prediction model, which includes a text encoder, a backbone network, and a Prompt interaction module.
[0011] A text encoder (i.e., the Prompt text encoding model) is used to transform the prompt text into a text feature space to obtain the encoded text feature vector;
[0012] The backbone network is used to extract high-level semantic features of the brain:
[0013] The backbone network includes: multiple layers of different graph attention networks, a multilayer perceptron, two layers of Transformer encoders, and a splicing layer;
[0014] A graph is constructed using the intrinsic edge information of a triangular mesh in the cerebral cortex. Each node in the graph represents the input feature of a corresponding vertex in the cerebral cortex, and edges represent the connections between vertices. The constructed graph is then input into multiple layers of graph attention networks (preferably a 3-layer structure). The input and output of the graph attention networks are then residually connected to capture the microstructural features of the brain, resulting in the local high-level semantic features F of the brain. local ;
[0015] Multilayer perceptron (MLP) is used to perform nonlinear mapping and further extraction of brain features to obtain high-level semantic representations; among which, brain features include brain functional and structural features;
[0016] This paper utilizes a two-layer Transformer encoder to capture the complex relationships between brain features globally. Then, a residual connection is established between the input and output of the Transformer encoder to better preserve global information and mitigate the vanishing gradient problem. Finally, the model outputs the global semantic features F of the brain. global ;
[0017] The high-level semantic representation is input into a two-layer Transformer encoder, and then the input and output of the two Transformer encoders are residually concatenated to obtain the global semantic features F of the brain. global ;
[0018] At the end of the backbone network, local and global semantic features are concatenated to generate the final brain feature representation F. brain Its definition is:
[0019] F brain =Concatenate(F local ,F global )
[0020] The Prompt interaction module is used to fuse prior information and brain features from different tasks, helping the model to better adapt to various tasks and data distributions:
[0021] Generate brain features with Prompt information: The brain features F generated in step S3... brain Global average pooling and 1x1 convolution operations are performed on both the feature dimension and the spatial dimension to generate a (compact) brain feature vector F. b ′ rain ;
[0022] Then, the brain feature vector F b ′ rain A Softmax operation is performed to emphasize important parts of the features, and this is concatenated with the text feature vector (i.e., the Prompt vector) obtained in step S2. This concatenated vector is then input into the Transformer encoder for interaction, resulting in a text feature vector that incorporates brain feature information. This vector is then combined with the brain feature vector F... brain Multiplication yields the first feature representation output Y. prompt ;
[0023] Using Multilayer Perceptron (MLP) directly based on brain features F brain To produce an independent feature representation output Y brain The brain feature F brain The input is a multilayer perceptron, and the second feature representation output Y is obtained based on its output. brain ;
[0024] Based on the two feature representations obtained, brain information generated by different features is fused to avoid the loss of important information, resulting in the final brain task activation pattern Y. final Its definition is: Y final =Y prompt +Y brain .
[0025] Step S3: Train the task activation pattern prediction model based on the preset training loss function. When the preset training termination condition is met, the prediction model of the predetermined brain task activation pattern is obtained.
[0026] Furthermore, in step S2, the prompt text is converted to a text feature space to obtain the encoded text feature vector, specifically including:
[0027] The input prompt text is tokenized to vectorize the text. This involves querying the established vocabulary, numbering each word in the text, and obtaining a tokenized sequence of length L (preset value) as the input to the text encoder.
[0028] The obtained tokenized sequence is mapped to a high-dimensional vector space through a word vector encoder to obtain a word embedding vector matrix;
[0029] The tokenized sequence is used to encode the word embedding vectors positionally using a position encoder, and the output is added to the word embedding vector matrix. The result of the addition is then input into a Transformer encoder to calculate and obtain the vector with the highest index in the sequence as the encoded text feature vector.
[0030] Furthermore, in step S3, the training loss function used is a classification-contrast loss function, which includes a classification loss function, a contrastive loss function, and a reconstruction loss function. The classification loss function is designed to enable the model to accurately classify each task. Classification loss helps distinguish the differences between different tasks and encourages the model to learn task-related features by emphasizing the category of each task. Therefore, in this invention, cross-entropy loss is used to measure the classification performance of each task. For each task, the cross-entropy between the model's predicted distribution and the actual labels is calculated, and then the losses of all tasks are averaged, defined as follows:
[0031]
[0032] Among them, y i , Represent the true value and predicted value of the task activation graph for the i-th task, respectively. The value is the corresponding Y finalThe value of C represents the number of brain task activation modes.
[0033] In this invention, the contrastive loss function is based on the relationship between C different tasks. By comparing the outputs of different tasks, the model can better learn the differences and commonalities between tasks, thereby improving the model's generalization ability. In this invention, the contrastive loss function is defined as follows:
[0034]
[0035]
[0036]
[0037] Among them, t pos t neg These represent the gradient cutoff thresholds (preset values) for positive and negative samples, respectively. Let these represent the loss functions for positive and negative samples, respectively. Represents the contrastive loss function;
[0038] The reconstruction loss function is designed primarily to ensure that the model's predictions closely approximate the true labels, and it is defined as follows:
[0039]
[0040] The classification-contrast loss function consists of the three parts mentioned above and is used to balance the model's performance. Through this combined objective function design, the prediction model of this invention can effectively handle multi-task prediction problems, ensuring good performance on different tasks. It can be expressed as:
[0041]
[0042] Where λ1 and λ2 represent the regularization parameters for classification and contrast loss, respectively.
[0043] The technical solution provided by this invention brings at least the following beneficial effects:
[0044] This invention constructs three network models: a Prompt text encoding model, which embeds the Prompt text into the text feature space; a backbone network model, which extracts high-level semantic features of the brain and integrates features from both functional and structural modalities; and a Prompt interaction module, which integrates Prompt information to make the model's predictions easier to interpret and understand. The three network models are optimized based on a classification-contrast loss objective function to predict task-oriented activation patterns from non-task activation patterns, thereby effectively improving the prediction accuracy of the model after integrating information from two different modalities. Furthermore, the integration of Prompt technology further enhances model performance, contributing to the prediction of task activation patterns in the brains of patients with mental illnesses, the elderly, or infants. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of the method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging provided in this embodiment of the invention.
[0047] Figure 2 This is a schematic diagram illustrating the method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging provided in this embodiment of the invention.
[0048] Figure 3 This is a schematic diagram comparing specific test results of an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0050] The purpose of this invention is to explore in depth the relationship between the brain's no-task activation mode and task-oriented activation mode, so as to achieve the prediction of the brain's task activation mode and provide new perspectives and insights for brain cognitive research.
[0051] The method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging provided in this invention is based on previous research and incorporates deep learning methods to establish a brain task activation pattern prediction model based on Prompt technology. The implementation of this method includes the following steps.
[0052] A. Extract the functional and structural features of the brain.
[0053] Step A1: Extract functional features.
[0054] First, functional magnetic resonance imaging (fMRI) data of the participants were acquired, and group-level spatial components (n=50) obtained at the group level using spatially independent component analysis were downloaded from the Human Connectome Project. The correlation coefficient between each vertex and the 50 components was calculated to obtain the functional connectome of the cerebral cortex, i.e., the brain's functional characteristics. The specific calculation formula is as follows:
[0055]
[0056] Where, r ij t represents the functional connectivity between cortical vertex i and the j-th component of the brain. i The time series representing vertex i, Let represent the average time series of all vertices within the j-th component, and let Correlation denote the calculation of the Pearson correlation coefficient between the two series.
[0057] Step A2: Extract structural features.
[0058] For the structural data, firstly, Freesurfer was used for preprocessing and alignment to standard cortical space. After preprocessing, each hemisphere contained 32,492 vertices. Furthermore, since the medial wall does not contain cortical gray matter, this embodiment of the invention selected 29,696 vertices in the left hemisphere and 29,716 vertices in the right hemisphere, resulting in a total of 59,412 vertices in the cerebral cortex. The brain anatomical features processed by Freesurfer were used as brain structural features, including the spatial location of each vertex on the inner and outer surfaces of the cortex (i.e., x, y, and z coordinates), cortical thickness, sulcus depth, curvature, myelin value, Desikan atlas, and neuroanatomical labels from the Destrieux atlas.
[0059] B. Prompt encoding module.
[0060] Step B1: First, create a standardized Prompt text with the format "{Task Name}:{ContrastCaption}", for example, "Working Memory:2back body";
[0061] Step B2: Perform a tokenization operation on the Prompt text obtained in Step B1 to vectorize it, generating a tokenized sequence of length L. Note that the text encoders used in this embodiment of the invention are all based on the pre-trained CLIP model and do not participate in the subsequent model training and parameter tuning;
[0062] Step B3: Pass the tokenized sequence generated in step B2 through the CLIP word vector encoder to obtain a word embedding matrix of size L*512;
[0063] Step B4: Use CLIP's position encoder to perform positional encoding on the word embedding matrix obtained in Step B3, and linearly add the output to the result of Step B3;
[0064] Step B5: Input the result of step B4 into the Transformer layer in CLIP for calculation to obtain the vector with the highest index in the output sequence as the encoded text feature vector, which has a size of 1*512.
[0065] C. Extract high-level semantic features of the brain.
[0066] Step C1: Extract local semantic features of the brain.
[0067] First, a graph G is constructed using the inherent edge information of the triangular mesh in the cerebral cortex space. Each node in the graph represents the input feature X of the corresponding vertex in the cerebral cortex (i.e., the functional and structural features obtained in step A), and the edges represent the connections between vertices.
[0068] Then, three different layers of graph attention networks and residual connections are used to capture the microstructural features of the brain. Each layer of the graph attention network includes graph attention mechanism operations and exponential linear unit (ELU) operations. The output dimensions of the three layers of graph attention networks are 64, 128, and 256, respectively. Finally, the local semantic features F of the brain are output. local The process is defined as follows:
[0069] F local =GCN 256 (GCN 128 (GCN 64 (Z),X),x)
[0070] Step C2: Extract global semantic features of the brain.
[0071] First, a three-layer multilayer perceptron (MLP) is used to perform nonlinear mapping and feature extraction on brain features, with output dimensions of 64, 128 and 256 respectively. Each layer of the multilayer perceptron (MLP) includes three operations: fully connected, ELU and Dropout, to obtain a higher-level representation.
[0072] Next, a brain map proposed by Glasser et al. can be used to divide the cerebral cortex into 360 regions, and a custom trainable parameter matrix W of size 360*512 can be defined, and the feature vector matrix D of all vertices in each region can be used. i The corresponding row vector W of the parameter matrixi The data is concatenated and encoded using a Transformer encoder to achieve local encoding within each region. The resulting parameter matrix row vector W of each region is then processed. i They are spliced together to form a new matrix W′ containing information about different regions of the brain.
[0073] Then, a Transformer encoder is used to encode information in matrix W′ to facilitate information interaction between different areas of the brain, and the output is upsampled to the number of vertices of the whole brain to obtain matrix W″ containing information of the whole brain.
[0074] Next, the output of the previous multilayer perceptron (MLP) is residually concatenated with matrix W″ to better preserve global information and alleviate the gradient vanishing problem.
[0075] Finally, the global semantic features F of the brain are output. global .
[0076] The above process is defined as follows:
[0077] Y MLP =MLP 256 (MLP 128 (MLP 64 (X))))
[0078] f global =Concatenate(Transformer2(Transformer1(Y MLP ),W),Y MLP )
[0079] Step C3: Merge the local and global semantic features of the brain obtained in steps C1 and C2 to generate the final brain feature representation F. brain Its specific definition is:
[0080] F brain =Concatenate(F local ,F global )
[0081] D.Prompt interactive module.
[0082] Step D1: Generate brain features with Prompt information.
[0083] First, represent brain features f brain Global average pooling and 1x1 convolution are performed on both the feature dimension and the spatial dimension to generate a compact brain feature vector F′ of size 1*512. brain The 1x1 convolution includes one convolution, ELU, and Dropout operations.
[0084] Then, a softmax operation is performed, and the result is concatenated with the Prompt vector P and input into a Transformer encoder for information exchange, resulting in a Prompt vector incorporating brain features. This Prompt vector is then combined with the brain feature F. brain Perform matrix multiplication to obtain the output Y prompt The corresponding dimension is 47, and its process is defined as follows:
[0085] Y prompt =Transformer(Softmax(Conv) 1x1 (GAP(F brain ))),P)×F brain
[0086] Step D2: Utilize Multilayer Perceptron (MLP) directly based on brain features F brain To produce an independent feature representation output Y braon Each layer of the multilayer perceptron includes three operations: fully connected, ELU, and Dropout. The output dimensions of the three-layer multilayer perceptron are 256, 128, and 47, respectively, and their definitions are as follows:
[0087] Y brain =MLP 47 (MLP 128 (MLP 256 (F brain )))
[0088] Step D3: Based on steps D1 and D2, brain information generated from different features is fused to avoid the loss of important information, resulting in the final brain task activation pattern Y. final Its definition is:
[0089] Y final =Y prompt +Y brain
[0090] E. Training phase.
[0091] Step E1: Obtain training data, which includes raw brain functional and structural features, with sizes of 59412*50 and 59412*12 respectively. Here, 59412 represents the number of vertices in the cerebral cortex. A standardized Prompt text prompt, with a size of 47, represents 47 different brain task activation patterns for each participant. Additionally, a brain task activation pattern distribution map for each participant is 59412*47 in size.
[0092] Step E2: Encode the Prompt text into a text feature vector using a text encoder, with a size of 47*512. Then, use the backbone network to extract high-level semantic features of the brain and input the results into the Prompt interaction module to obtain the predicted brain task activation pattern distribution map, with a size of 59412*47.
[0093] Step E3: The objective function defined in this embodiment is the classification-contrast loss function. It consists of three parts, namely classification loss. Comparative loss and reconstruction losses as follows:
[0094]
[0095]
[0096]
[0097]
[0098] Among them, y i , These represent the actual and predicted values of the task activation map, respectively; C represents the number of brain task activation patterns; and t... pos t neg λ1 and λ2 represent the gradient cutoff thresholds for positive and negative samples, respectively; λ1 and λ2 represent the regularization parameters for classification and contrastive losses, respectively.
[0099] Step E4: Based on the predicted and actual results, update the weights of the objective function using the Adam optimization algorithm. The specific Adam optimization parameters are as follows: step size ε defaults to 0.001; the exponential decay rates ρ1 and ρ2 for moment estimation default to 0.9 and 0.999 respectively; the numerical stability constant δ defaults to 10. -8 The parameters θ are initialized with a normal distribution with a mean of 0 and a variance of 0.001; the first and second moment variables are initialized to s = 0 and r = 0; the time step is initialized to t = 0. One sample (x, y) is taken each time to update the model parameters using gradient descent.
[0100] Step F1: Collect test data, including raw brain functional and structural features (sizes 59412*50 and 59412*12 respectively, where 59412 represents the number of vertices in the cerebral cortex), standardized Prompt text prompts (size 47, where 47 represents 47 different brain task activation patterns for each participant), and a brain task activation pattern distribution map for each participant (size 59412*47). Note that test data is not included in the training data;
[0101] Step F2: After training, the network parameters of the backbone network and the Prompt interaction module are fixed. Inputting test samples into the model generates a brain task activation pattern map of size 59412*47, which is the model's prediction result. This process achieves the research goal of predicting task-oriented activation patterns using non-task activation patterns of the brain. This embodiment uses the method to predict brain task activation maps for different subjects, such as... Figure 3 As shown, the model successfully predicted the general distribution trend of brain task activation and was able to capture the activation differences between different subjects.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0103] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A method for predicting brain task activation patterns using combined structural and functional magnetic resonance imaging, characterized in that, Includes the following steps: Step S1: Extract brain functional and structural features; Independent component analysis was performed on functional magnetic resonance imaging data to obtain group-level spatial components. Then, the correlation coefficient between the time series of each vertex of the cerebral cortex and the average time series of all vertices within the spatial component was calculated to obtain brain functional characteristics. Structural magnetic resonance images were processed using magnetic resonance data processing tools to extract structural features for each vertex of the brain, including the spatial location of each vertex on the inner and outer surfaces of the cortex and specified attribute information. Step S2: Construct a task activation pattern prediction model, which includes a text encoder, a backbone network, and a Prompt interaction module. A text encoder is used to convert prompt text into a text feature space to obtain an encoded text feature vector; The backbone network is used to extract high-level semantic features of the brain. This backbone network includes multiple layers of different graph attention networks, multilayer perceptrons, two layers of Transformer encoders, and splicing layers. A graph is constructed using the intrinsic edge information of a triangular mesh in the cerebral cortex. Each node in the graph represents the input feature of a corresponding vertex in the cerebral cortex, and edges represent the connections between vertices. The constructed graph is then input into multiple layers of graph attention networks, and the inputs and outputs of the graph attention networks are residually connected to capture the microstructural features of the brain, resulting in local high-level semantic features F of the brain. local ; A multilayer perceptron is used to perform nonlinear mapping and further extraction of brain features to obtain a high-level semantic representation. This high-level semantic representation is then input into a two-layer Transformer encoder, and the inputs and outputs of the two Transformer encoders are residually concatenated to obtain the global semantic features F of the brain. global Among these, brain characteristics include both functional and structural features. By splicing layers to access local high-level semantic features of the brain F local And the global semantic features of the brain F global The data is spliced together to generate a brain feature representation F. brain ; The Prompt interaction module is used to integrate prior information and brain features from different tasks, including: Generate brain features with Prompt information: The resulting brain features F brain Perform global average pooling and 1x1 convolution operations on the feature dimension and spatial dimension respectively to generate a brain feature vector F′. brain The 1x1 convolution operation includes: convolution with a kernel size of 1x1, function mapping based on the activation function ELU, and Dropout operation; and processing the brain feature vector F′. brain Perform a Softmax operation, and concatenate the result of the Softmax operation with the text feature vector obtained in step S2. Then, input the concatenation into the Transformer encoder to obtain a text feature vector that incorporates brain feature information. Finally, combine this text feature vector with the brain feature F... brain Multiplication yields the first feature representation output Y. prompt ; Brain characteristics F brain The input is a multilayer perceptron, and the second feature representation output Y is obtained based on its output. brain ; By fusing the two feature representations, the final brain task activation pattern Y is obtained. final Y final =Y prompt +Y brain ; Step S3: Train the task activation pattern prediction model based on the preset training loss function. When the preset training termination condition is met, the prediction model of the predetermined brain task activation pattern is obtained.
2. The method as described in claim 1, characterized in that, In step S1, the specified attribute information includes: cortical thickness, sulcus depth, myelin value, curvature, and atlas label.
3. The method as described in claim 2, characterized in that, In step S1, the map labels include Desikan map labels and Destrieux map labels.
4. The method as described in claim 1, characterized in that, In step S1, the correlation coefficient of the average time series is specifically the Pearson correlation coefficient of the average time series.
5. The method as described in claim 1, characterized in that, In step S2, the prompt text is converted to a text feature space to obtain the encoded text feature vector, specifically including: The input prompt text is segmented into vectorized text, and a query is performed in a pre-built vocabulary. Each word in the text is numbered to obtain a tokenized sequence of a specified length. The obtained tokenized sequence is mapped using a word vector encoder to obtain a word embedding vector matrix; The tokenized sequence is used to encode the word embedding vectors positionally using a position encoder, and the output of the position encoding is added to the word embedding vector matrix. The result of the addition is then input into a Transformer encoder for calculation to obtain the vector with the highest index in the sequence as the encoded text feature vector.
6. The method as described in claim 1, characterized in that, Each layer of the graph attention network includes two types of operations: graph attention mechanism operations and exponential linear units.
7. The method as described in claim 1, characterized in that, The second feature output represents the output Y. brain Each layer of the multilayer perceptron consists of a fully connected layer, a mapping layer based on the activation function ELU, and a dropout layer.
8. The method as described in claim 1, characterized in that, In step S3, the training loss function used is as follows: in, This represents the classification-contrast loss function. Represents the reconstruction loss function. Represents the classification loss function. Let λ1 and λ2 represent the regularization parameters of the classification and contrastive loss functions, respectively. Classification loss function for: Where C represents the number of brain task activation modes, y i , Let represent the actual value and the predicted value of the task activation graph for the i-th task, respectively. Corresponding to brain task activation mode Y final ; Contrast loss function for: in, Let t represent the loss functions for positive and negative samples, respectively. pos t neg These represent the gradient cutoff thresholds for positive and negative samples, respectively. This represents the predicted value of the task activation graph for the j-th task; Reconstruction loss function for: