A method for interpreting CNN classification results of multi-subject complex fMRI data based on heatmap
By generating and averaging heat maps, the decision-making basis of the phase information of the complex space activation map of the CNN model in the auxiliary diagnosis of neuropsychiatric brain diseases is explained, which improves the interpretability and classification accuracy of the model and solves the problem of complex space activation of the CNN model. Decision-making based on graph phase information is difficult to explain.
Patent Information
- Application Number
- CN202111511828.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-12-06
AI Technical Summary
In the auxiliary diagnosis of neuropsychiatric brain-like diseases, the existing CNN model lacks a decision-making basis for explaining the phase information of the complex spatial activation map in the classification results, and it is difficult to explain its internal transmission and decision-making process.
By extracting slice samples of a single subject's three-dimensional SSP map from the trained CNN model, calculating the gradient and weighting the feature map, a heat map is generated to visualize the decision-making basis of the model, and the heat maps of similar subjects are averaged to explain multiple subjects. Trial classification results.
Improved the interpretability and classification accuracy of the CNN model. In particular, the SSP map showed greater inter-group differences than the SSM map in the auxiliary diagnosis of neuropsychiatric brain diseases. The slice-level accuracy increased by 9.72%, and the subject-level Accuracy increased by 15%.
Smart Images

Figure CN114187475B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of biomedical signal processing and relates to a method for explaining CNN (Convolutional neural network) classification results of multiple subject complex fMRI (functional magnetic resonance imaging) data based on a heat map. Background Art
[0002] In recent years, deep learning has shown unique advantages in image classification. Among them, CNN is widely used in medical image classification because it fully explores and utilizes the correlation between adjacent pixels of the input image. However, the CNN model has a "black box" attribute. People cannot be sure what factors influence the CNN prediction results, or what factors dominate the classification results. Therefore, the interpretability of CNN models has become a hot topic. For medical image classification and computer-aided diagnosis, it is particularly important to provide CNN classification evidence.
[0003] fMRI data is often used in CNN classification of neuropsychiatric brain diseases such as schizophrenia due to its advantages such as high safety, non-invasiveness and high spatial resolution of millimeters. Considering the extremely low signal-to-noise ratio and severe noise of fMRI observation data, most CNN inputs use fMRI data after denoising or spatial-temporal features extracted from fMRI observation data. As a data-driven blind source separation algorithm, independent component analysis (ICA) can extract denoised brain spatial activation maps from complex fMRI data and can reflect the changes in spatial activation caused by changes in brain function. Therefore, ICA spatial activation maps are an effective CNN input. For example, in the existing ICA-CNN classification framework (patent application number 201910350137.2), ICA is first used to extract the amplitude information of the complex spatial activation map of the component of interest from the complex fMRI observation data, namely the spatial source magnitude (SSM) map, establish the SSM map sample set, and then send it to 2D-CNN to classify schizophrenia patients and healthy control subjects. However, studies have shown that compared with the SSM map, the phase information of the complex spatial activation map, namely the spatial source phase (SSP) map, is hundreds of times more sensitive to the spatial differences between the schizophrenia patient group and the healthy control group. Therefore, the SSP map has more potential in the auxiliary diagnosis of neuropsychiatric brain diseases. However, in the internal transmission and decision-making process of CNN, what are the unique advantages of the SSP map, and whether the decision basis can explain the classification results, there is currently no interpretable method. Summary of the invention
[0004] Based on a trained CNN model and a slice sample of a single subject's three-dimensional SSP map along the z-axis, the present invention first extracts the feature map output by the last pooling layer of CNN, then calculates the gradient of the model output relative to the feature map through back propagation, and then sends the gradient-weighted feature map to the Rectified Linear Unit (ReLU) to retain the features that play a positive role in the calculation of the output category. Finally, a heat map is obtained through upsampling, thereby visualizing the decision basis of the model and explaining the classification results of a single subject. For multiple subjects, the heat maps of the same type of subjects are averaged to obtain a group heat map to explain the classification results of multiple subjects.
[0005] The technical solution adopted by the present invention is as follows (see Figure 1 ):
[0006] Step 1: Input the 2D SSP slice sample of subject j into a trained 2D-CNN model. The SSP slice is represented as J is the total number of subjects, X×Y is the size of the SSP slice, x=1,…,X, y=1,…,Y. The trained 2D-CNN model is denoted as h(·).
[0007] Step 2: Extract the feature map of 2D-CNN. Extract the feature map of the last pooling layer output from the 2D-CNN model, expressed as K is the number of channels, X′×Y′ is the size of the feature map, X' and Y' are determined by the convolution kernel size of the corresponding layer, j=1,…,J.
[0008] Step 3: Output the prediction results of the SSP slice samples. Calculate the 2D-CNN model to (j) The probability that (x,y) is judged as a healthy control subject and a patient with a neuropsychiatric brain disease such as schizophrenia, that is:
[0009]
[0010] The predicted category corresponding probability is
[0011] Step 4: Calculate the weighted value based on the gradient. The gradient of each channel feature map output by the last pooling layer corresponding to the model output category is calculated through back propagation, and then global average pooling is performed as follows:
[0012]
[0013] is the weight of the k-th channel feature map, k=1,…,K, j=1,…,J.
[0014] Step 5: Generate a single subject heat map. The feature maps of all channels output by the last pooling layer Use the corresponding After weighting, the sum is taken and sent to the ReLU function to retain the features that have a positive impact on the calculation of the output category, as follows:
[0015]
[0016] right Interpolate to make it the same as the input SSP slice sample size X×Y, and get the single-subject heat map, expressed as
[0017] Step 6: Generate a group heat map of multiple subjects. Average the heat maps of the same type of subjects that are correctly classified to get the group heat map, as follows:
[0018]
[0019] In the formula, J′ is the total number of subjects of the same type.
[0020] The beneficial effect of the present invention is that the classification basis of the CNN model is visualized through the heat map, and the classification results are explained afterwards. For example, after extracting the default mode network (DMN) components of interest from the multiple resting-state fMRI data of 82 subjects, sample sets of SSP maps and SSM maps are established respectively, and two 2D-CNN models with the same structure are trained. Then, the heat map visualization method provided by the present invention is used to calculate the heat maps of schizophrenia patients and healthy control subjects under the two CNN models, and single-subject and multi-subject analysis are performed. The results are displayed in Figure 2 , Figure 3 It can be observed that, for both healthy control subjects and schizophrenia patients, the SSP map depicts a more complete DMN area than the SSM map, and shows an opposite trend, that is, the DMN area of the healthy control subjects is large, while the DMN area of the schizophrenia patients is small. For the SSM map, the healthy control subjects did not locate the DMN area, and the schizophrenia patients were mainly located in the posterior cingulate cortex area, and a small part was located in the inferior parietal lobule area. Therefore, the heat map generated by the SSP map has a greater inter-group difference than the SSM map. This explains why the SSP map has better CNN classification results than the SSM map (slice-level accuracy increased by 9.72%, and subject-level accuracy increased by 15%), and improves the credibility of the CNN model classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of generating a single-subject heat map according to the present invention.
[0022] Figure 2 Single-subject heat map comparison between healthy control subjects and schizophrenia patients.
[0023] Figure 3 Multi-subject group heat map comparison of healthy control subjects and schizophrenia patients. DETAILED DESCRIPTION
[0024] The embodiments of the present invention are described in detail below in conjunction with the technical solutions.
[0025] There are multiple resting-state fMRI data of J = 82 subjects, including 42 schizophrenia patients and 40 healthy control subjects. Each subject has 146 whole-brain scans, and each whole-brain scan has a total of X×Y×Z=53×63×46=153594 voxels of whole-brain data, of which there are 62336 voxels in the brain.
[0026] First, obtain the SSP map of the component of interest. Set the model order N = 20, and use the complex EBM (Entropy Bound Minimization) algorithm to separate the complex fMRI data of each subject. According to the reference template of DMN (Selected from the analysis results given in the literature "SMSmith, PTFox et al., Correspondence of the brain's functional architecture during activation and rest, Proceedings of the National Academy of Sciences of the United States of America, vol. 106, no. 31, pp. 13040-13045, 2009") Extract the multiple DMN components of each subject as the components of interest. Among them, the spatial activation map Time course based on The real part energy is maximized to calculate the rotation angle of phase correction as follows:
[0027]
[0028] In the formula, “Re{·}” means taking the real part, Then add s (j) The rotation correction in the complex plane is as follows:
[0029]
[0030] In the formula, “corr(·)” calculates the correlation coefficient of two vectors, and “-1” means a 180-degree rotation in the complex plane. Constructing a binary mask as follows:
[0031]
[0032] express s (j) The phase value of voxel v in , v = 1, ..., 62336; using masking b (j) right s (j) Phase denoising is performed to obtain:
[0033]
[0034] In the formula Denotes the Hadamard product. is the DMN spatial activation map after denoising; repeat the above steps 10 times, and use the method in "LDKuang, QHLin et al., Model order effects on ICA of resting-state complex-valued fMRI data: application to schizophrenia, Journal of Neuroscience Methods vol.304, pp.24–38, 2018" to take the best run result in 10 DMN denoised spatial activation maps, expressed as Pick The phase of DMNSSP diagram is obtained.
[0035] Then, the SSP sample set was established. After zero-filling the extracerebral voxels of the SSP map of the DMN, it was expanded along the z-axis into 46 two-dimensional slice stacks of size 53×63, and then the SSP map was constructed according to the reference template. After retaining the 25 slices with large information content (z = 12, ..., 36), the absolute value of each slice is taken and standardized to obtain the sample set of subject j for Tags (definition Indicates that the slice is from a healthy control subject. Indicates that it comes from schizophrenia patients); the model order N ranges from 30 to 140, and a value is taken every 10. Repeat the above steps 12 times to obtain an augmented sample set of 82 subjects.
[0036] Next, train the CNN model. Randomly shuffle the order of the subjects, and divide the sample set into training set, validation set, and test set in a ratio of 3:1:1; build a 2D-CNN with a structure similar to that in patent application number 201910350137.2, including two convolutional layers, two pooling layers, and two fully connected layers, except that the activation function after the two convolutional layers is set to tanh. The model was trained for 50 rounds with a batch size of 64. The model obtained in each round of training was evaluated using the accuracy on the validation set. Among the 50 rounds, the model with the highest accuracy on the validation set was determined as the final CNN model obtained by training. The test set was sent to the final CNN model for prediction, and the slice classification accuracy was calculated to be 77.85%, and the subject classification accuracy was 98%.
[0037] Based on the above single-subject SSP graph slice sample and the trained CNN model, the steps of using the present invention to generate a heat map for CNN model interpretation are as follows:
[0038] Step 1: Select J = 30 subjects with less noise (including 15 healthy control subjects and 15 schizophrenia patients) to generate heat maps and explain the classification results of single subjects and multiple subjects.
[0039] Step 2: Slice the 2D SSP of test j (j=1,…,30) Input the trained 2D-CNN model h(·).
[0040] Step 3: Extract the feature map output by the last pooling layer from the 2D-CNN model.
[0041] Step 4: Calculate sample I according to formula (1) (j) The CNN predicted probability p of (x,y) (j) , where the probability corresponding to the predicted category is
[0042] Step 5: Calculate the weights corresponding to the 16 channel feature maps of the last pooling layer through back propagation according to formula (2)
[0043] Step 6: and Substituting into formula (3) we get Then bilinear interpolation is performed to obtain the single subject heat map.
[0044] Step 7: According to formula (4), the heat maps of the same type of subjects that were correctly classified were averaged to obtain the heat maps of the healthy control group and the schizophrenia group, which are expressed as
[0045] Step 8: Get the SSM graph of the component of interest. Repeat the above steps, except that The SSM map is obtained by the amplitude value, and then the SSM sample set is established in the same way as the SSP map sample set. The 2D-CNN model with the same structure is trained, and the slice classification accuracy is calculated to be 68.13%, and the subject classification accuracy is 83%.
[0046] Step 9: Repeat steps 1 to 7 to generate single-subject and multi-subject heat maps of the SSM graph, and compare them with the results of the SSP graph. The results are as follows: Figure 2 , Figure 3 shown.
Claims
1. A method for explaining the CNN classification results of multi-subject complex fMRI data based on heat maps, firstly inputting a single-subject slice sample into a trained CNN model, extracting the feature map output by the last pooling layer, and then calculating the gradient of the model output relative to the feature map through back propagation for weighting the feature map, and then upsampling after processing by a linear rectifier unit to obtain a heat map for explaining the single-subject classification results; wherein, The single-subject slice sample is a whole-brain data sample obtained by whole-brain scanning; for multiple subjects, the heat maps of the same type of subjects are averaged to obtain a group heat map to explain the classification results of multiple subjects; it is characterized by the following steps: Step 1: Input the 2D SSP slice sample of subject j into a trained 2D-CNN model. The SSP slice is represented as J is the total number of subjects, X×Y is the size of the SSP slice, x=1,…,X, y=1,…,Y, and the trained 2D-CNN model is denoted as h(·); Step 2: Extract the feature map of 2D-CNN. Extract the feature map output by the last pooling layer from the 2D-CNN model, expressed as K is the number of channels, X′×Y′ is the size of the feature map, X' and Y' are determined by the convolution kernel size of the corresponding layer, j=1,…,J; Step 3: Output the prediction results of the SSP slice samples and calculate the 2D-CNN model to (j) The probability that (x,y) is judged as a healthy control subject and a patient with neuropsychiatric brain disease is: The predicted category corresponding probability is Step 4: Calculate the gradient-based weighted value, calculate the gradient of each channel feature map output by the last pooling layer corresponding to the model output category through back propagation, and then perform global average pooling, as follows: is the weight of the k-th channel feature map, k = 1, ..., K, j = 1, ..., J; Step 5: Generate a single subject heat map and output the feature maps of all channels of the last pooling layer Use the corresponding After weighting, the sum is taken and sent to the ReLU function to retain the features that have a positive impact on the calculation of the output category, as follows: right Interpolate to make it the same as the input SSP slice sample size X×Y, and get the single-subject heat map, expressed as Step 6: Generate a group heat map of multiple subjects, and average the heat maps of the same type of subjects that are correctly classified to obtain a group heat map, as follows: In the formula, J′ is the total number of subjects of the same type.
