Dynamic brain network feature learning method based on Mama
By introducing the state space model framework of the Mamba model in dynamic brain network feature learning, the problem of strong subjectivity, difficulty in capturing potential features and insufficient processing capabilities in long-term series in the existing technology is solved, and high-precision classification and accurate judgment of dynamic brain network sequences are achieved.
Patent Information
- Application Number
- CN202510095857.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-02-28
AI Technical Summary
The existing dynamic brain network feature learning methods have problems such as strong subjectivity, difficulty in capturing potential key features in brain networks, and insufficient processing capabilities for long-term sequences.
Using the dynamic brain network feature learning method based on Mamba, through data preprocessing, dynamic functional network sequence construction and state transition sequence construction, combined with the state space model framework of the Mamba model, efficient capture and precise modeling of the state transfer sequence of the dynamic brain network is achieved.
High-precision classification of dynamic brain network sequences is realized, and the subject corresponding to the input rs-fMRI data can be accurately judged whether the subject is a patient or a normal person, and the problem of insufficient subjectivity and long-term sequence processing capabilities in traditional methods is overcome.
Smart Images

Figure CN119540661A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer-aided diagnosis, and in particular relates to a dynamic brain network feature learning method based on Mamba. Background Art
[0002] Dynamic brain network sequences play an important role in studying the operating mechanisms of the brain and assisting in the diagnosis of brain diseases. The brain does not operate statically, but is a dynamic system whose functional connections adjust with time and task changes. Dynamic brain network sequences can capture the time-varying characteristics of functional connections between different brain regions through time window analysis, providing important information for understanding how the brain switches between different states (such as attention, memory, and learning). However, due to the complexity of the human brain and individual differences, brain network sequence features are often difficult to identify and learn.
[0003] At present, changes in dynamic brain network features have been shown to reflect the early characteristics of neurological diseases and can be used as biomarkers for early diagnosis. However, in practice, the characteristics of dynamic brain networks are difficult to capture. The commonly used method in dynamic brain network feature learning is the manual design method, which means that researchers directly design feature extraction and analysis strategies based on experience and theoretical understanding of brain networks, and assist in the diagnosis of brain diseases based on abnormal changes in brain network characteristics.
[0004] However, these traditional dynamic brain network feature learning methods have some significant problems. 1) Artificially designed feature learning methods usually rely on the researcher's experience and assumptions and are highly subjective. This dependence not only leads to high dependence and inconsistency in research results, but also lacks universality and is difficult to adapt to the needs of different data sets or research objectives. Specifically, different researchers may have different focuses and definitions on feature selection, which directly affects the stability of model performance and cross-domain applicability. 2) Artificially designed feature learning usually focuses on extracting specific brain network properties (such as modularity, global efficiency, local clustering coefficient, etc.), but these methods often ignore other potential key features in the brain network. For example, the state transition relationship between different brain regions, as an important feature of dynamic brain networks, is often difficult to be effectively captured by traditional feature engineering methods, which may lead to the neglect of some information that is critical to classification or prediction tasks. 3) A core feature of dynamic brain networks is the complex pattern of changes over time, which is reflected in the continuous evolution of brain network states and their transition laws. This feature is crucial for studying brain diseases, cognitive processes, and behavior prediction. However, artificially designed feature methods usually find it difficult to accurately model these temporal features. Traditional methods are mostly based on static assumptions, focusing on feature extraction at a certain point in time, and lack effective use of time dimension information. This makes it difficult for the model to capture the global characteristics of dynamic brain networks and key long-distance dependencies when processing long time series data.
[0005] The Mamba model has shown strong advantages in processing long text in NLP and processing one-dimensional long time series data in tasks such as financial market forecasting, weather forecasting, and energy demand forecasting. However, there is no literature on using Mamba for automatic capture of fMRI dynamic brain network sequence features. Therefore, it is possible to consider introducing Mamba into the feature learning of dynamic brain networks. Summary of the invention
[0006] In view of the above deficiencies in the prior art, the purpose of the present invention is to provide a dynamic brain network feature learning method based on Mamba, which can efficiently capture the hidden connections in the dynamic brain network state transition sequence, accurately model the complex evolution patterns in the time series, and achieve high-precision classification of each brain network sequence.
[0007] To achieve the above objectives, the present invention provides a dynamic brain network feature learning method based on Mamba, comprising the following steps: Step 1: Data processing, including data collection, data preprocessing, dynamic functional network sequence construction and state transition sequence construction, where: Step 1.1, data collection, acquisition of resting-state functional magnetic resonance imaging rs-fMRI data; Step 1.2: Data preprocessing using statistical parameter mapping software; Step 1.3: Use sliding window strategy to construct dynamic functional network sequence; Step 1.4: Based on the coarse-grained feature extraction strategy, construct the state transition sequence; Step 2: Use the processed data as sample data for sample enhancement; Step 3: Construct a Mamba model including a linear embedding layer, a Mamba layer, a linear mapping layer, an activation function, and a loss function as a classification model. Step 4: Use the state transition sequence to train the Mamba model and optimize the hyperparameters of the Mamba model; Step 5: Based on the trained Mamba model, the enhanced sample data is predicted, and the classification result of the sample data is determined by the label output by the Mamba model to determine whether the subject corresponding to the input rs-fMRI data is a patient.
[0008] As a preferred solution of the present invention, in step 1.2, the data preprocessing using statistical parameter map software is specifically as follows: Step 1.2.1, remove the first 10 time points of resting-state functional MRI to ensure stable magnetization; Step 1.2.2: Normalize all remaining resting-state functional MRI images to MNI space; Step 1.2.3, regressing the ventricular and global signals in resting-state functional magnetic resonance imaging into interference signals; Step 1.2.4: Use Friston's 24-parameter model to correct head motion and reduce the influence of head motion in resting-state functional magnetic resonance imaging; Step 1.2.5, bandpass filter and signal detrending processing are performed on the resting-state functional magnetic resonance imaging to remove physiological noise; Step 1.2.6: Use the automated anatomical labeling technique atlas to segment the brain into 116 brain regions, calculate the average resting-state functional magnetic resonance imaging time series for each brain region, and then generate the average resting-state functional magnetic resonance imaging time series in the data matrix. In the representation, Q represents the total number of image time points, It is a real number space of Q×116 dimensions.
[0009] As a preferred solution of the present invention, in step 1.3, the dynamic functional network sequence is constructed using a sliding window strategy as follows: Step 1.3.1. For each subject’s average rs-fMRI time series of length N, divide it into K overlapping subsequences. Assuming the sliding window length is W and the step length between adjacent windows is S, the number of subsequences is defined as: ; Step 1.3.2: Calculate the Pearson correlation coefficient between each pair of subsequences representing different brain regions to generate a dynamic functional connection network FCN, which is a dynamic functional network sequence.
[0010] As a preferred solution of the present invention, in step 1.4, based on the coarse-grained feature extraction strategy, the process of constructing the state transition sequence is: Step 1.4.1: Extract useful features describing the statistical distribution of the dynamic functional connection network FCN through the seven central invariant moments of the image, reduce the redundant information and feature dimension in FCN, and define the FCN Moment and central moment And the centroid of FCN for: ; ; ; In the formula, p and q represent the order of the moment, which are used to calculate moments of different orders; is the centroid coordinate of FCN, indicating the average position of nodes in the network; , is the first-order moment, where is the sum of all x-coordinates on the target area, is the sum of all y coordinates on the target area; is the zeroth-order moment; is the functional connectivity value between the i-th brain region and the j-th brain region, i.e., the FC value, where i and j are the indices of the brain regions; Step 1.4.2: After reducing the dimension of FCN through seven central invariant moments, the FCN of all subjects is hierarchically clustered, and the Euclidean distance is selected as the similarity measure of clustering. The functional connections between different brain regions of each brain network are converted into M different states. Thus, the dynamic functional network sequence is converted into a state transition sequence to capture the temporal characteristics of the transition between states.
[0011] As a preferred solution of the present invention, in step 2, the sample enhancement method is to perform the following operations on the state transition sequence in each sample data: Assume that the state transition sequence contained in each sample data consists of M different states. The sequence is regarded as a ring structure, that is, the last state of the sequence is connected to the first state. M new sample sequences are generated by the following steps: Step 2.1, connect the original state transition sequence head to tail to form a ring structure; Step 2.2, select one state from the M states as the starting point of the new sequence; Step 2.3, starting from the selected starting point, traverse in the order of the original sequence until returning to the starting point to form a new sample sequence; Therefore, each original sample can generate M different new sample sequences.
[0012] As a preferred embodiment of the present invention, in the step 3, in the Mamba model, the linear embedding layer is used to perform a linear transformation on the input state transition sequence data, and map the input dimension to the dimension required by the Mamba layer; the Mamba layer is composed of multiple Mamba blocks, and the Mamba blocks are used to capture the long-term dependencies in the input data; the linear mapping layer maps the output of the Mamba layer back to the target dimension; the activation function is the Sigmoid activation function, and the output of the linear mapping layer is binary classified; the loss function uses a binary cross entropy loss function to measure the difference between the probability distribution predicted by the Mamba model and the actual label.
[0013] As a preferred solution of the present invention, the linear embedding layer maps the input data to the hidden dimension, adapts to the requirements of the Mamba model, and optimizes the representation space of the input data. For the state transition sequence STF, it is expressed by the formula: ; In the formula, Linear represents the linear embedding layer; LS represents the output of the linear embedding layer; Each Mamba block includes two parallel linear embedding layers, namely linear embedding layer 1 and linear embedding layer 2, as well as a convolutional layer, a SiLU activation function, a selective state space model SSM and an output layer. The input passes through the linear embedding layer 1 and the linear embedding layer 2 respectively. The output of the linear embedding layer 1 passes through the convolutional layer, the SiLU activation function, and the SSM in turn, which is recorded as the first branch. The output of the linear embedding layer 2 directly passes through the SiLU activation function, which is recorded as the second branch. The outputs of the first branch and the second branch are multiplied element by element, and finally passed through the output layer for the final output. The output layer also uses a linear mapping layer. The processing process of the Mamba block is expressed as follows: ; ; ; In the formula, X and Z represent the input of the first branch and the second branch respectively; , Represent the output of the first branch and the second branch respectively; Conv represents the convolutional layer; LINEAR represents the linear mapping layer; Y is the final output result, so: ; Where, Mamba represents the Mamba block; The linear mapping layer maps the high-dimensional features extracted from the Mamba layer back to the output space, that is, the target dimension, and then uses the Sigmoid activation function to map the output value to the (0, 1) interval, expressed as: ; In the formula, O represents the output of the Sigmoid activation function; The binary cross entropy loss function Loss is expressed as: ; In the formula, log is the logarithmic function; O is the true value, that is, the output of the Sigmoid activation function; is the predicted value.
[0014] As a preferred solution of the present invention, the selective state space model SSM in the Mamba block adopts the S4 model, which uses the intermediate state of the previous moment The input variable at time t Mapped to the output variable at time t , the mapping relationship is modeled by three continuous parameter matrices A, B, and C, expressed as: ; ; In the formula, is the intermediate state at time t; Convert the SSM to an approximate form of its discrete time representation. Through discretization, the SSM can effectively extract key information and filter out irrelevant information, modeling the relationship between input and output, expressed as: ; ; In the formula, , Represent the state vectors at time t and time t-1 respectively; represents the input vector at time t; represents the output vector at time t; and By introducing the parameter , the parameter matrix obtained by converting continuous A and B is expressed as: ; ; Where exp represents the exponential function; parameter is the time held in the zero-order hold.
[0015] As a preferred solution of the present invention, in step 4, the optimized hyperparameters are: the number of clusters is 5, that is, M=5; the value range of the sliding window length W is 40; and the value range of the step size S is 4.
[0016] As a preferred embodiment of the present invention, in step 5, the label output by the Mamba model is 0 or 1, 0 represents a patient, and 1 represents a normal person, so as to judge whether the subject corresponding to the input rs-fMRI data is a patient or a normal person.
[0017] The algorithm involved in the present invention can be executed by an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above algorithm calculation is implemented by executing the software by the processor.
[0018] The beneficial effects of the present invention are: The present invention applies the Mamba model to the recognition of dynamic brain network sequences, making full use of its framework based on the state space model (SSM), integrating the dual advantages of sequential processing capability and global information processing capability. The Mamba model can efficiently capture the hidden connections in the dynamic brain network state transition sequence, accurately model the complex evolutionary patterns in the time series, achieve high-precision classification of each brain network sequence, and accurately determine whether the subject corresponding to the input rs-fMRI data is a patient or a normal person. Compared with traditional methods, the Mamba model overcomes the problems of low efficiency, strong subjectivity and insufficient processing capability of long-term brain network sequences in artificial feature learning. Its superior performance makes the feature learning of dynamic brain network sequences more efficient and universal, providing a new solution and powerful tool support for the study of dynamic brain networks.
[0019] In order to make up for the limitation of small data volume on model training, the present invention proposes a new sample enhancement method, which significantly increases the diversity and quantity of data by effectively expanding and transforming the original data. Specifically, the brain network sequence is regarded as a ring structure by utilizing the characteristic that there is no fixed correspondence between the states of the dynamic brain network sequence at different time points, and multiple new samples are generated through operations such as cyclic translation, thereby greatly expanding the data scale. This sample enhancement method not only enriches the distribution of training data, reduces the risk of overfitting or underfitting of the model during training, but also significantly improves the feature learning ability of the model on a small data set. Combined with the sample enhancement strategy, the Mamba model can better fit the dynamic brain network sequence data, accurately extract key features such as state transition, and thus show higher accuracy and stronger robustness in classification tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 is a schematic diagram of the construction process of the state transition sequence in an embodiment of the present invention; Figure 3 is a complete structural diagram of the Mamba model in an embodiment of the present invention; Figure 4 Schematic diagram of the influence of different numbers of states on the classification accuracy ACC in an embodiment of the present invention; Figure 5 4 is a heat diagram of the recognition accuracy of different sliding windows and step sizes in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The embodiments of the present invention are further described below in conjunction with the accompanying drawings: like Figure 1 As shown in FIG. 1 , the Mamba-based dynamic brain network feature learning method includes the following steps: Step 1: Data processing, including data collection, data preprocessing, dynamic functional network sequence construction and state transition sequence construction, where: Step 1.1, data collection, acquisition of resting-state functional magnetic resonance imaging rs-fMRI data; Step 1.2: Data preprocessing using statistical parameter mapping software; Step 1.3: Use sliding window strategy to construct dynamic functional network sequence; Step 1.4: Based on the coarse-grained feature extraction strategy, construct the state transition sequence; Step 2: Use the processed data as sample data for sample enhancement; Step 3: Construct a Mamba model including a linear embedding layer, a Mamba layer, a linear mapping layer, an activation function, and a loss function as a classification model. Step 4: Use the state transition sequence to train the Mamba model and optimize the hyperparameters of the Mamba model; Step 5: Based on the trained Mamba model, the enhanced sample data is predicted, and the classification result of the sample data is determined by the label output by the Mamba model to determine whether the subject corresponding to the input rs-fMRI data is a patient.
[0022] In step 1.2, data preprocessing using statistical parameter mapping software is as follows: Step 1.2.1, remove the first 10 time points of resting-state functional MRI to ensure stable magnetization; Step 1.2.2: Normalize all remaining resting-state functional magnetic resonance images to MNI space (Montreal Neurological Institute, a standard space used in neuroimaging research); Step 1.2.3, regressing the ventricular and global signals in resting-state functional magnetic resonance imaging into interference signals; Step 1.2.4: Use the Friston 24-Parameter Model (including 6 head motion parameters, 6 head motion parameters from the previous time point, and the corresponding 12 square terms) to correct the head motion and reduce the influence of head motion in resting-state functional magnetic resonance imaging; Step 1.2.5: Bandpass filter (0.01-0.08 Hz) and detrend the signal of the resting-state functional magnetic resonance imaging to remove physiological noise; Step 1.2.6: Use the Automated Anatomical Labeling (AAL) atlas to segment the brain into 116 brain regions, calculate the average resting-state fMRI time series for each brain region, and then generate the average resting-state fMRI time series in the data matrix. In the representation, Q represents the total number of image time points, It is a real number space of Q×116 dimensions.
[0023] The Automated Anatomical Labeling (AAL) atlas is a digital brain structure atlas for neuroimaging research. It divides the brain into multiple anatomical regions to facilitate spatial localization and statistical analysis in functional neuroimaging studies.
[0024] In step 1.3, the sliding window strategy is used to construct the dynamic functional network sequence as follows: Step 1.3.1. For each subject’s average rs-fMRI time series of length N, divide it into K overlapping subsequences. Assuming the sliding window length is W and the step length between adjacent windows is S, the number of subsequences is defined as: ; Step 1.3.2: Calculate the Pearson correlation coefficient between each pair of subsequences representing different brain regions to generate a dynamic functional connection network FCN, which is a dynamic functional network sequence.
[0025] In step 1.4, based on the coarse-grained feature extraction strategy, the process of constructing the state transition sequence is: Step 1.4.1: Extract useful features describing the statistical distribution of the dynamic functional connection network FCN through the seven central invariant moments of the image, reduce the redundant information and feature dimension in FCN, and define the FCN Moment and central moment And the centroid of FCN for: ; ; ; In the formula, p and q represent the order of the moment, which are used to calculate moments of different orders; is the centroid coordinate of FCN, indicating the average position of nodes in the network; , is the first-order moment, where is the sum of all x-coordinates on the target area, is the sum of all y coordinates on the target area; is the zeroth-order moment; is the functional connectivity value between the i-th brain region and the j-th brain region, i.e., the FC value, where i and j are the indices of the brain regions; Step 1.4.2: After reducing the dimension of FCN through seven central invariant moments, the FCN of all subjects is hierarchically clustered, and the Euclidean distance is selected as the similarity measure of clustering. The functional connections between different brain regions of each brain network are converted into M different states. Thus, the dynamic functional network sequence is converted into a state transition sequence to capture the temporal characteristics of the transition between states.
[0026] In step 2, the sample enhancement method is to perform the following operations on the state transition sequence in each sample data: Assume that the state transition sequence contained in each sample data consists of M different states. The sequence is regarded as a ring structure, that is, the last state of the sequence is connected to the first state. M new sample sequences are generated by the following steps: Step 2.1, connect the original state transition sequence head to tail to form a ring structure; Step 2.2, select one state from the M states as the starting point of the new sequence; Step 2.3, starting from the selected starting point, traverse in the order of the original sequence until returning to the starting point to form a new sample sequence; Therefore, each original sample can generate M different new sample sequences.
[0027] In addition, you can also combine the following time series deformations to further enhance samples as needed to better adapt to application scenarios with small data volumes: Time scaling: changing the length of a time series, either by stretching (making the series longer) or by compressing (making the series shorter), based on interpolation methods such as linear interpolation or more advanced interpolation techniques; Time reversal: completely reverse the order of the time series. In some cases, it can be used to simulate the reverse process of brain network activity; Time warping: allows different parts of a sequence to be warped at different speeds, which can be used to simulate different rates of change in brain network activity; Mixed deformation: Combining the above deformation methods to generate more diverse data samples.
[0028] In step 3, in the Mamba model, the linear embedding layer is used to perform a linear transformation on the input state transition sequence data, mapping the input dimension to the dimension required by the Mamba layer; the Mamba layer consists of multiple Mamba blocks, which are used to capture long-term dependencies in the input data; the linear mapping layer maps the output of the Mamba layer back to the target dimension; the activation function is the Sigmoid activation function, which performs binary classification on the output of the linear mapping layer; the loss function uses the binary cross entropy loss function to measure the difference between the probability distribution predicted by the Mamba model and the actual label.
[0029] The linear embedding layer maps the input data to the hidden dimension, adapts to the requirements of the Mamba model, and optimizes the representation space of the input data. For the state transition sequence STF, it is expressed as: ; In the formula, Linear represents the linear embedding layer; LS represents the output of the linear embedding layer; Each Mamba block includes two parallel linear embedding layers, namely linear embedding layer 1 and linear embedding layer 2, as well as a convolutional layer, a SiLU activation function, a selective state space model SSM and an output layer. The input passes through the linear embedding layer 1 and the linear embedding layer 2 respectively. The output of the linear embedding layer 1 passes through the convolutional layer, the SiLU activation function, and the SSM in turn, which is recorded as the first branch. The output of the linear embedding layer 2 directly passes through the SiLU activation function, which is recorded as the second branch. The outputs of the first branch and the second branch are multiplied element by element, and finally passed through the output layer for the final output. The output layer also uses a linear mapping layer. The processing process of the Mamba block is expressed as follows: ; ; ; In the formula, X and Z represent the input of the first branch and the second branch respectively; , Represent the output of the first branch and the second branch respectively; Conv represents the convolutional layer; LINEAR represents the linear mapping layer; Y is the final output result, so: ; Where, Mamba represents the Mamba block; The linear mapping layer maps the high-dimensional features extracted from the Mamba layer back to the output space, that is, the target dimension, and then uses the Sigmoid activation function to map the output value to the (0, 1) interval, expressed as: ; In the formula, O represents the output of the Sigmoid activation function; The binary cross entropy loss function Loss is expressed as: ; In the formula, log is the logarithmic function; O is the true value, that is, the output of the Sigmoid activation function; is the predicted value.
[0030] The Linear layer is a linear transformation layer. Its function is only to realize the linear transformation of data dimensions. However, due to different roles in the neural network structure, the names are different. Therefore, when Linear is used as input, it means expanding the dimension to match the hidden layer, that is, the linear embedding layer; when Linear is used as output, it means restoring the dimension to the original dimension, that is, the linear mapping layer. In order to distinguish, Linear and LINEAR are used to represent them respectively.
[0031] The selective state space model SSM in the Mamba block adopts the S4 model, which uses the intermediate state of the previous moment The input variable at time t Mapped to the output variable at time t , the mapping relationship is modeled by three continuous parameter matrices A, B, and C, expressed as: ; ; In the formula, is the intermediate state at time t; Convert the SSM to an approximate form of its discrete time representation. Through discretization, the SSM can effectively extract key information and filter out irrelevant information, modeling the relationship between input and output, expressed as: ; ; In the formula, , Represent the state vectors at time t and time t-1 respectively; represents the input vector at time t; represents the output vector at time t; and By introducing the parameter , the parameter matrix obtained by converting continuous A and B is expressed as: ; ; Where exp represents the exponential function; parameter is the time held in the zero-order hold.
[0032] According to different input, parameters will change. Through zero-order hold, discrete data can be approximately converted into continuous signals. During the learning process, A and B are changed by parameters. It becomes discrete , Finally, the parameters of the model are obtained after learning You can also , Convert to continuous.
[0033] In step 4, the optimized hyper parameters are: the number of clusters is 5, that is, M=5; the value range of the sliding window length W is 40; and the value range of the step size S is 4.
[0034] In step 5, the label output by the Mamba model is 0 or 1, 0 represents a patient and 1 represents a normal person, so as to determine whether the subject corresponding to the input rs-fMRI data is a patient or a normal person.
[0035] The verification process is: In the validation, the resting-state functional magnetic resonance imaging dataset used was derived from the publicly available Autism Brain Imaging Data Exchange (ABIDE) database. To reduce the heterogeneity of the data, only resting-state functional magnetic resonance imaging data scanned at Langone Medical Center were selected, including 45 subjects with autism spectrum disorder and 47 healthy controls aged between 7 and 15 years old.
[0036] All included subjects met the following criteria for head movement during scanning: displacement in three directions was less than 1.5 mm, or angular rotation was less than 1.5°. The diagnosis of subjects with autism spectrum disorder was based on existing autism diagnostic criteria.
[0037] According to the method of this embodiment, dynamic brain network feature learning and classification are performed. During data preprocessing, the statistical parameter map software uses SPM8, and the resolution of the MNI space is 3×3×3mm 3 ; Q is 170, that is .
[0038] In the construction of dynamic functional network sequences using the sliding window strategy, the functional connections between different brain regions of each brain network are converted into 5 different states (corresponding to M=5). The construction process of the state conversion sequence (including data preprocessing and dynamic functional network sequence construction) is as follows: Figure 2 As shown, Figure 2 In the above, encoding is to extract useful features that describe the statistical distribution of the dynamic functional connection network FCN.
[0039] When the sample is enhanced, the original sample sequence contains 5 states, namely state 1, state 2, state 3, state 4 and state 5. The original sample sequence is as follows: State 1 → State 2 → State 3 → State 4 → State 5; Connect the sequence head to tail to form a loop. In this way, state 5 is directly connected to state 1, forming the following loop sequence: State 1 → State 2 → State 3 → State 4 → State 5 → State 1; Next, we randomly select one of the five states as the starting point to generate a new sample sequence. Since there are five states, five different new sample sequences can be generated. The following is the specific enhancement process: Starting from state 1: New sample sequence: state 1 → state 2 → state 3 → state 4 → state 5; Starting from state 2: New sample sequence: state 2 → state 3 → state 4 → state 5 → state 1; Starting from state 3: New sample sequence: state 3 → state 4 → state 5 → state 1 → state 2; Starting from state 4: New sample sequence: state 4 → state 5 → state 1 → state 2 → state 3; Starting from state 5: New sample sequence: state 5 → state 1 → state 2 → state 3 → state 4; In this way, each original sample sequence can generate 5 different new sample sequences, thus increasing the diversity of samples.
[0040] The complete structure of the Mamba model is as follows Figure 3 As shown, it contains the complete structure of the Mamba block.
[0041] During the optimization process, for the selection of M (different numbers of states, that is, the number of clusters), the influence of M values [2, 3, 4, 5, 6, 7, 8, 9] on the classification accuracy ACC was studied. Figure 4 As shown. Figure 4It can be seen that the classification accuracy is the highest when M=5.
[0042] For the window width W and the sliding window step size S, the range of W is set to [20, 30, 40, 50], and the range of S is set to [2, 4, 6, 8]. The specific experimental results are as follows Figure 5 As shown in the figure, W = 40, S = 4 were finally determined. The Mamba model effectively learned the important features of the dynamic brain network, such as state transition features, on a large amount of data, thereby achieving accurate classification of the brain network.
[0043] The method of this embodiment is compared with other artificial feature learning binary classification methods based on ASD (Autism Spectrum Disorder) dynamic brain networks. The accuracy of the method of this embodiment reaches the highest, as shown in Table 1.
[0044] Table 1 Classification results of different feature extraction methods in ASD classification experiment
[0045] It can be seen that the method of this embodiment achieved a classification accuracy of 86.3%. Based on the above verification results, the method of this embodiment can efficiently learn the key features in different dynamic brain network sequences, while overcoming the subjectivity problem in artificial feature learning. Thanks to the SSM (state space model) structure of the Mamba model and the parallel scanning algorithm of the hardware, this method effectively solves the problems of information preservation and long-distance dependency in long time sequences. Therefore, this embodiment provides a new and efficient dynamic brain network feature learning method.
Claims
1. A dynamic brain network feature learning method based on Mamba, characterized by The following steps are involved: Step 1: Data processing, including data collection, data preprocessing, dynamic functional network sequence construction and state transition sequence construction, where: Step 1.1, data collection, acquisition of resting-state functional magnetic resonance imaging rs-fMRI data; Step 1.2: Data preprocessing using statistical parameter mapping software; Step 1.3: Use sliding window strategy to construct dynamic functional network sequence; Step 1.4: Based on the coarse-grained feature extraction strategy, construct the state transition sequence; Step 2: Use the processed data as sample data for sample enhancement; Step 3: Construct a Mamba model including a linear embedding layer, a Mamba layer, a linear mapping layer, an activation function, and a loss function as a classification model. Step 4: Use the state transition sequence to train the Mamba model and optimize the hyperparameters of the Mamba model; Step 5: Based on the trained Mamba model, the enhanced sample data is predicted, and the classification result of the sample data is determined by the label output by the Mamba model to determine whether the subject corresponding to the input rs-fMRI data is a patient.
2. The Mamba-based dynamic brain network feature learning method according to claim 1, characterized in that: In step 1.2, data preprocessing using statistical parameter map software is specifically as follows: Step 1.2.1, remove the first 10 time points of resting-state functional MRI to ensure stable magnetization; Step 1.2.2: Normalize all remaining resting-state functional MRI images to MNI space; Step 1.2.3, regressing the ventricular and global signals in resting-state functional magnetic resonance imaging into interference signals; Step 1.2.4: Use Friston's 24-parameter model to correct head motion and reduce the influence of head motion in resting-state functional magnetic resonance imaging; Step 1.2.5, bandpass filter and signal detrending processing are performed on the resting-state functional magnetic resonance imaging to remove physiological noise; Step 1.2.6: Use the automated anatomical labeling technique atlas to segment the brain into 116 brain regions, calculate the average resting-state functional magnetic resonance imaging time series for each brain region, and then generate the average resting-state functional magnetic resonance imaging time series in the data matrix. In the representation, Q represents the total number of image time points, It is a real number space of Q×116 dimensions.
3. The Mamba-based dynamic brain network feature learning method according to claim 1, characterized in that: In step 1.3, the dynamic functional network sequence is constructed using a sliding window strategy as follows: Step 1.3.
1. For each subject’s average rs-fMRI time series of length N, divide it into K overlapping subsequences. Assuming the sliding window length is W and the step length between adjacent windows is S, the number of subsequences is defined as: ; Step 1.3.2: Calculate the Pearson correlation coefficient between each pair of subsequences representing different brain regions to generate a dynamic functional connection network FCN, which is a dynamic functional network sequence.
4. The Mamba-based dynamic brain network feature learning method according to claim 3 is characterized in that: In step 1.4, based on the coarse-grained feature extraction strategy, the process of constructing the state transition sequence is: Step 1.4.1: Extract useful features describing the statistical distribution of the dynamic functional connection network FCN through the seven central invariant moments of the image, reduce the redundant information and feature dimension in FCN, and define the FCN Moment and central moment And the centroid of FCN for: ; ; ; In the formula, p and q represent the order of the moment, which are used to calculate moments of different orders; is the centroid coordinate of FCN, indicating the average position of nodes in the network; , is the first-order moment, where is the sum of all x-coordinates on the target area, is the sum of all y coordinates on the target area; is the zeroth-order moment; is the functional connectivity value between the i-th brain region and the j-th brain region, i.e., the FC value, where i and j are the indices of the brain regions; Step 1.4.2: After reducing the dimension of FCN through seven central invariant moments, the FCN of all subjects is hierarchically clustered, and the Euclidean distance is selected as the similarity measure of clustering. The functional connections between different brain regions of each brain network are converted into M different states. Thus, the dynamic functional network sequence is converted into a state transition sequence to capture the temporal characteristics of the transition between states.
5. The Mamba-based dynamic brain network feature learning method according to claim 4, characterized in that: In step 2, the sample enhancement method is to perform the following operations on the state transition sequence in each sample data: The state transition sequence contained in each sample data consists of M different states. The sequence is regarded as a ring structure, that is, the last state of the sequence is connected to the first state. M new sample sequences are generated through the following steps: Step 2.1, connect the original state transition sequence head to tail to form a ring structure; Step 2.2, select one state from the M states as the starting point of the new sequence; Step 2.3, starting from the selected starting point, traverse in the order of the original sequence until returning to the starting point to form a new sample sequence; Therefore, each original sample can generate M different new sample sequences.
6. The Mamba-based dynamic brain network feature learning method according to claim 1, characterized in that: In the step 3, in the Mamba model, the linear embedding layer is used to perform a linear transformation on the input state transition sequence data, mapping the input dimension to the dimension required by the Mamba layer; the Mamba layer is composed of multiple Mamba blocks, and the Mamba blocks are used to capture the long-term dependency relationship in the input data; The linear mapping layer maps the output of the Mamba layer back to the target dimension; The activation function is the Sigmoid activation function, which performs binary classification on the output of the linear mapping layer; the loss function uses the binary cross entropy loss function to measure the difference between the probability distribution predicted by the Mamba model and the actual label.
7. The Mamba-based dynamic brain network feature learning method according to claim 6, characterized in that: The linear embedding layer maps the input data to the hidden dimension, adapts to the requirements of the Mamba model, and optimizes the representation space of the input data. For the state transition sequence STF, it is expressed by the formula: ; In the formula, Linear represents the linear embedding layer; LS represents the output of the linear embedding layer; Each Mamba block includes two parallel linear embedding layers, namely linear embedding layer 1 and linear embedding layer 2, as well as a convolutional layer, a SiLU activation function, a selective state space model SSM and an output layer. The input passes through the linear embedding layer 1 and the linear embedding layer 2 respectively. The output of the linear embedding layer 1 passes through the convolutional layer, the SiLU activation function, and the SSM in turn, which is recorded as the first branch. The output of the linear embedding layer 2 directly passes through the SiLU activation function, which is recorded as the second branch. The outputs of the first branch and the second branch are multiplied element by element, and finally passed through the output layer for the final output. The output layer also uses a linear mapping layer. The processing process of the Mamba block is expressed as follows: ; ; ; In the formula, X and Z represent the input of the first branch and the second branch respectively; , Represent the output of the first branch and the second branch respectively; Conv represents the convolutional layer; LINEAR represents the linear mapping layer; Y is the final output result, so: ; Where, Mamba represents the Mamba block; The linear mapping layer maps the high-dimensional features extracted from the Mamba layer back to the output space, that is, the target dimension, and then uses the Sigmoid activation function to map the output value to the (0, 1) interval, expressed as: ; In the formula, O represents the output of the Sigmoid activation function; The binary cross entropy loss function Loss is expressed as: ; In the formula, log is the logarithmic function; O is the true value, that is, the output of the Sigmoid activation function; is the predicted value.
8. The Mamba-based dynamic brain network feature learning method according to claim 7, characterized in that: The selective state space model SSM in the Mamba block adopts the S4 model, which uses the intermediate state of the previous moment The input variable at time t Mapped to the output variable at time t , the mapping relationship is modeled by three continuous parameter matrices A, B, and C, expressed as: ; ; In the formula, is the intermediate state at time t; Convert the SSM to its approximate form of discrete time representation. Through discretization, the SSM can effectively extract key information and filter out irrelevant information, modeling the relationship between input and output, expressed as: ; ; In the formula, , Represent the state vectors at time t and time t-1 respectively; represents the input vector at time t; represents the output vector at time t; and By introducing the parameter , the parameter matrix obtained by converting continuous A and B is expressed as: ; ; Where exp represents the exponential function; parameter is the time held in the zero-order hold.
9. The Mamba-based dynamic brain network feature learning method according to claim 4, characterized in that: In step 4, the optimized hyper parameters are: the number of clusters is 5, that is, M=5; the value range of the sliding window length W is 40; and the value range of the step size S is 4.
10. The Mamba-based dynamic brain network feature learning method according to claim 8, characterized in that: In step 5, the label output by the Mamba model is 0 or 1, 0 represents a patient, and 1 represents a normal person, so as to determine whether the subject corresponding to the input rs-fMRI data is a patient or a normal person.
Citation Information
Patent Citations
Method for extracting brain function states
CN111513717A
Human brain function network classification method based on convolutional neural network
CN113040715A
SSVEP (Steady-State Visual Evoked Potential) signal classification method based on Mama model
CN118760946A
Front-end facial image encryption and recognition method for biometric privacy protection
WO2021227349A1
Cited By
Target detection method and system with hierarchical scanning perception fused with super-resolution enhancement
CN121921499A
Hierarchical scanning perception fusion super-resolution enhanced target detection method and system
CN121921499B