A pulmonary nodule CT image classification method based on dual-source domain heterogeneous transfer learning with adaptive selection
Through adaptive selection of dual-source domain heterogeneous transfer learning and diversified branch block structures, combined with sparse Bayesian extreme learning machines, the problems of small sample overfitting and redundant feature migration in pulmonary nodule CT image classification are solved, achieving Efficient classification and diagnosis of pulmonary nodules.
Patent Information
- Application Number
- CN202210280434.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology In the classification of pulmonary nodule CT images, the transfer learning method based on model fine-tuning is easy to overfit in the case of small samples, and redundant feature transfer may lead to negative transfer, and the feature matching between dual source domain data is dependent. More manpower and low efficiency.
Adopting a dual-source domain heterogeneous transfer learning method based on adaptive selection, by designing an adaptive feature matching network and a target network with a diverse branch block structure, it automatically selects features that are beneficial to the target task and constrains training, combined with sparse Bayesian limit Ensemble classifier of learning machine to improve robustness and feature expression ability.
It improves the accuracy and robustness of lung nodule CT image classification, reduces manpower and material investment, improves performance in small samples, and maintains inference time cost.
Smart Images

Figure CN114708347B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of CT image classification, and specifically relates to a lung nodule CT image classification method based on dual-source domain heterogeneous transfer learning with adaptive selection. Background Art
[0002] With the development of computed tomography (CT) technology, the detection rate of solitary pulmonary solid nodules (SPSN) has been greatly improved. SPSN is the abbreviation of solitary pulmonary solid nodules, PT is the abbreviation of pulmonary tuberculosis; LA is the abbreviation of lung adenocarcinoma, and pulmonary tuberculosis (PT) is a typical histopathological manifestation of benign SPSN; on the other hand, lung adenocarcinoma (LA) is the most common histological type of lung cancer. In clinical practice, LA patients should adopt more aggressive treatment plans to improve prognosis; while PT patients should avoid unnecessary treatment procedures (such as surgery, chemotherapy, etc.). Therefore, once SPSN is found, its malignant risk must be assessed to determine an appropriate treatment plan. However, since the radiological manifestations of PT in SPSN are similar to those of LA, it brings diagnostic difficulties to clinicians. Therefore, it is very necessary to develop an accurate and efficient method to distinguish PT from LA in SPSN before surgery.
[0003] In recent years, with the rapid development of medical imaging technology and computer technology, computer-aided diagnosis has received widespread attention. Due to the excellent feature learning ability of Convolutional Neural Network (CNN), CNN has been widely used in medical imaging research. However, the scale of medical datasets is often small, and CNN is prone to overfitting in the case of small samples. In order to improve the effect of CNN under small samples, scholars have introduced transfer learning into CNN. In the medical imaging research of pulmonary nodules, model-based fine-tuning is a commonly used transfer learning strategy. The model-based fine-tuning method first trains a source network on a large dataset (such as ImageNet), then uses the learned weights as the initial weights of the target network, and uses the target data to fine-tune the target network. However, when the source domain data and the target domain data are not semantically similar, the transfer learning model based on model fine-tuning will still overfit on the target data.
[0004] To this end, scholars have proposed heterogeneous transfer learning methods. In heterogeneous transfer learning, knowledge is transferred between different fields through feature matching, so that the knowledge learned from the source domain data can be used to help the training of the target network. Romero et al. proposed a teacher-student training model, which transfers knowledge from a deeper teacher network to a shallower student network by calculating the l2 matching loss between the teacher features and the student features. Zagoruyko et al. and Srinivas et al. proposed attention transfer and Jacobian matrix matching methods respectively, using feature maps or Jacobian matrices to generate attention maps to achieve knowledge transfer.
[0005] Although the above method makes the model have certain effects in the case of heterogeneous data sources, there are two problems: ① In a source network, different features have different importance to the target task, and some features are even redundant. When redundant features are migrated to the target network, negative migration may occur. ② It will take a lot of manpower and material resources to determine how to migrate the features in the source network to the target network based solely on experience, and the results may not be optimal.
[0006] In addition, studies have shown that transfer learning works better when the source domain data is closer to the target domain data. In the field of medical imaging, ImageNet is generally used as the source domain data for transfer learning because the network trained by ImageNet has rich basic texture information. However, in medical imaging, medical images of the same tissue (e.g., whole-view digital slice images (WSI) of the lung and CT images of the lung) are semantically closer than ImageNet. The WSI of the lung is considered the gold standard for lung pathology diagnosis because it can provide a large amount of microscopic information of the tumor under a microscope; in contrast, CT images of the lung can reflect the imaging information of the tumor at a macroscopic scale. Therefore, when using CT images for auxiliary diagnosis of SPSN patients, the effect of dual-source domain heterogeneous transfer learning combining ImageNet and lung WSI may be better. Summary of the invention
[0007] In view of the problems existing in the above-mentioned prior art, the present invention proposes a lung nodule CT image classification method based on adaptively selected dual-source domain heterogeneous transfer learning, and uses CT images to perform preoperative auxiliary diagnosis of PT and LA for SPSN patients. The method includes two parts: ① feature extraction based on adaptively selected dual-source domain heterogeneous transfer learning, and ② construction of an integrated classifier based on a sparse Bayesian extreme learning machine (ELM).
[0008] First, a dual-source domain heterogeneous transfer learning model based on adaptive selection is proposed. This model adaptively determines the matching weights of each pair of feature maps between the source network (source network 1 based on ImageNet and source network 2 based on lung WSI) and the target network, as well as the matching weights between the source network feature blocks and the target network feature blocks by designing a dual-source domain feature matching network based on adaptive selection. These two weights can automatically select features in the source network that are beneficial to the learning of the target task and the destination of feature transfer, thereby constraining the training of the target network and improving the robustness of the target network in the case of small samples.
[0009] At the same time, a target network based on a Diverse Branch Block (DBB) structure is proposed, which enables the target network to have different receptive fields and paths of complexity, further improving the feature expression ability of the target network. After the target network is trained, the DBB structure in the target network is equivalently converted into a convolution kernel, which will enable the target network to have a rich feature space while maintaining the original inference time cost.
[0010] Then, the convolution kernel of the target network is used as a feature extractor to extract features. In addition, the clinical characteristics and CT signs of the patients are included in the analysis to conduct a comprehensive analysis of the patients. After that, an ensemble classifier based on sparse Bayesian ELM is proposed. The ensemble learning uses the output of the base classifier as the output of the hidden layer of the ensemble classifier, and can automatically tend to how to combine the outputs of different base classifiers to improve the classification performance. Finally, the effect of this method is evaluated on the data of two medical centers.
[0011] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0012] A lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning, comprising:
[0013] Step 1: Obtain the original lung SPSN CT image dataset, lung cancer WSI dataset, and ImageNet dataset of natural images;
[0014] Step 2: Use the lung cancer WSI dataset obtained in step 1 to train ResNet34 as source network 1; use the ImageNet dataset of natural images obtained in step 1 to train another ResNet34 as source network 2;
[0015] Step 3: Based on step 2, the CT image dataset of lung SPSN obtained in step 1 is used to obtain source feature space 1 and source feature space 2 through source network 1 and source network 2 respectively, and the output of each convolution kernel in source network 1 and source network 2 is used as a feature map of source feature space 1 and source feature space 2 respectively;
[0016] Step 4: Based on step 3, the CT image dataset of lung SPSN is used to train a dual-source domain feature matching model based on adaptive selection and a ResNet18 based on a diversified branch block structure as the target model;
[0017] Step 5: Based on step 4, the CT image of the lung SPSN is used as the input data of the target model after equivalent transformation, and the convolution kernel after equivalent transformation of the target model is used as a feature extractor to extract deep learning features;
[0018] Step 6: Obtain the clinical characteristics and subjective CT signs of each patient, and concatenate the deep learning features in step 5 to form a new feature set;
[0019] Step 7: Based on step 6, an ensemble learning classifier based on a sparse Bayesian extreme learning machine is trained. Both the base classifier and the ensemble classifier in the ensemble learning classifier are based on a sparse Bayesian extreme learning machine to obtain the classification results of the pulmonary nodule CT image.
[0020] Preferably, step 4 comprises:
[0021] Step 4.1: Based on the source feature space 1 and source feature space 2 obtained in step 3, the matching weights of each pair of feature maps between source feature space 1, source feature space 2 and the target network, as well as the matching weights between the feature blocks of source network 1, source network 2 and each pair of convolution blocks of the target network are adaptively determined based on the adaptively selected dual-source domain feature matching network. A transfer loss function is constructed based on these two matching weights, and the loss function of the dual-source domain heterogeneous transfer learning model based on the adaptive selection is combined with the loss function of the target network.
[0022] Step 4.2: Use step 4.1 to obtain the loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection, and use a four-stage training method to train the feature matching model in the dual-source domain heterogeneous transfer learning based on adaptive selection and the target network based on a diversified branch block structure;
[0023] Preferably, the step 4.1 is specifically as follows:
[0024] Step 4.1.1: Let x be the target network based on the diversified branch block structure and the input of source network 1 and source network 2, represents the feature map of the m1th block in the source feature space 1, represents the feature map of the m2th block of source network 2, represents the feature map of the nth block of the target network with parameter θ. The goal of the dual-source domain feature matching network based on adaptive selection is to use the feature constraints T in S1 and S2 that are beneficial to the target task learning. θ training, define a and and The l2 norm distance between them is used to achieve feature selection that is beneficial to target task learning by minimizing the l2 norm distance. The l2 norm distance is defined as:
[0025]
[0026] Among them, r θ (·) is point-wise convolution, ensuring With the source feature space Have the same number of channels;
[0027] Step 4.1.2: Define the weighted feature matching loss of each feature map in source network 1 and source network 2 as:
[0028]
[0029]
[0030] Among them, H×W is and The feature map size is For the c1th channel and The weights to be learned between For the c2th channel (x) and The weights to be learned between The weights to be learned are the matching weights of a pair of feature maps;
[0031] Step 4.1.3: and Define two fully connected neural networks and Study separately and The value of and Respectively and The global mean pooling of each feature map in is taken as input, and the output of the network is in the form of softmax, then:
[0032]
[0033] where φ1 and φ2 are and Parameters, for a given and and In each input image, for Different feature maps are given different trainable weights. The more important the feature map, the larger the corresponding weight, which makes the loss of the corresponding feature map more concerned.
[0034] Step 4.1.4: The output of each convolutional block in is a unit, and a learnable parameter is introduced for each convolutional block (m1,n) and (m2,n) and and Respectively right right The migration degree, that is, the matching weight of a pair of convolution blocks, and The larger the value is, the more beneficial the features of the convolutional blocks are for learning the target task. Similarly, define two fully connected neural networks. and Study separately and The value of and Respectively and The global mean pooling of is taken as input, and the output of the network is given in the form of ReLU6 to ensure and The non-negativity of and Become too large, that is:
[0035]
[0036] The network automatically learns the important block pairs of the source network feature map to the target network feature map;
[0037] Step 4.1.5: After getting The matching weights for each pair of feature maps relative to the target network and and the matching weights for each pair of convolutional blocks and After that, the migration loss is defined as:
[0038]
[0039] Among them, P1 and P2 are and and A set of candidate convolutional block pairs;
[0040] The final loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection is defined as:
[0041] Ltotal (θ|x,y,φ)=L org (θ|x,y)+βL wfm (θ|x,φ) (5)
[0042] Among them, L org (θ|x,y) is the original loss function of the target network, and β is a hyperparameter.
[0043] Preferably, based on the feature matching network in the dual-source domain heterogeneous transfer learning model with adaptive selection and the training method of the target model based on the diversified branch block, the step 4.2 specifically includes:
[0044] Step 4.2.1: Initialize θ and φ, and define θ as θ0;
[0045] Step 4.2.2: For the current parameter θ0, the target network in the adaptive selection-based dual-source domain heterogeneous transfer learning is updated T times using the CT image dataset of the lung SPSN, so that L wfm (θx,φ) is minimized, and the updated θ is defined as θ T ;
[0046] Step 4.2.3: For the current parameter θ T , the CT image dataset of lung SPSN is used to update the target network in the dual-source domain heterogeneous transfer learning based on adaptive selection in a single step, so that L org (θx,y) is minimized, and the updated θ is defined as θ T+1 ;
[0047] Step 4.2.4: Based on the samples used in steps 4.2.2 to 4.2.3, org (θ T |x,y) to L org (θ T+1 |x,y) measures the speed at which the target network adapts to the target task. Finally, by minimizing L org (θ T+1 |x,y) Update the parameters φ of the feature matching network;
[0048] Step 4.2.5: The training process iteratively repeats steps 4.2.2 to 4.2.4 until the convergence condition of the target network is met. The convergence condition is that the loss of the target network tends to be stable or the maximum number of training times is reached.
[0049] Preferably, when the target model is trained, a target network based on a diversified branch block structure is used, that is, the convolution kernel in the traditional ResNet18 is replaced with a diversified branch block structure. After the target model is trained, before extracting deep learning features, the diversified branch block structure of the target model needs to be equivalently transformed into a convolution kernel; the step 5 specifically includes:
[0050] Step 5.1: Let the input of the convolution kernel be V is the number of input feature maps, H×W is the size of the input feature map, and the parameters of the convolution kernel are C is the number of input channels, which is equal to the number of input feature maps, D is the number of output channels, K×K is the convolution size; the matrix form of the convolution kernel bias is The convolution kernel output is H′×W′ is the size of the output feature map. The homogeneity and additivity of convolution are shown in formulas (6) and (7) respectively:
[0051]
[0052]
[0053] Where F1 and F2 are the parameters of convolution kernel 1 and convolution kernel 2 respectively, and p is a real number;
[0054] Step 5.2: According to the homogeneity and additivity of the convolution in step 5.1, 5 equivalent transformation formulas can be obtained for equivalent transformation. Finally, the 5 equivalent transformation formulas are used to transform the DBB structure into a single convolution kernel to improve the feature expression capability.
[0055] Preferably, the five equivalent transformation formulas of step 5.2 include:
[0056] Equivalent transformation 1: Fusion of convolution kernel and batch normalization;
[0057] Convolution kernels and batch normalization appear in pairs, and the two can be combined into one convolution according to the homogeneity of convolution. Let j be the channel index, μ j and σ j are the mean and variance of the batch data, γ j and β j are the scale factor and bias term of batch normalization respectively. According to the principle of batch normalization, the output of the j-th output channel after merging is
[0058]
[0059] According to the homogeneity of convolution, the parameters of the combined convolution kernel are
[0060]
[0061] Equivalent transformation 2: convolution branch addition;
[0062] When the outputs of two or more convolution kernels with the same parameters are added, according to the additivity of convolution, the outputs of the above convolution combinations can be combined into the output of one convolution kernel, and the parameters of the combined convolution kernel are:
[0063] F′←F1+F2,b′←b1+b2 (10)
[0064] Among them, F1 and F2 are the parameters of convolution kernel 1 and 2 respectively, b1 and b2 are the biases of convolution kernel 1 and 2 respectively;
[0065] Equivalent transformation 3: fusion of serial convolutions;
[0066] For a 1×1 convolution cascaded with a K×K convolution, let the parameters of the 1×1 convolution be The parameters of the K×K convolution are The combined output of the two convolution kernels is:
[0067]
[0068] REP(b1) represents the matrix form of bias b1. All values in the matrix are b1, and the size of the matrix follows the size of the corresponding convolution kernel.
[0069] Since F1 is a 1×1 convolution, it only performs linear combination of each channel without spatial aggregation, so the 1×1 convolution and K×K convolution can be combined into a new convolution kernel. That is, formula (11) can be transformed into:
[0070]
[0071] In the formula, TRANS(F1) represents the transposition of the convolution kernel F1, that is, the position of the input channel number of F1 is transposed with the position of the output channel number, such as TRANS(F1 D×C×1×1 )=F C×D×1×1 ,because is a constant matrix, then
[0072]
[0073] Equivalent transformation 4: average pooling transformation;
[0074] The average pooling operation with kernel size K and stride s is equivalent to a convolution kernel with the same K and s. is defined as:
[0075]
[0076] Like average pooling, when s>1, it behaves as downsampling, but when s=1, it is a smoothing operation.
[0077] Equivalent transformation 5: multi-scale convolution fusion;
[0078] For zero padding the size is k h ×k w (k h ≤K,k w ≤K) can be equivalently transformed into a K×K convolution kernel, such as a convolution kernel with a step size of 1 and zero padding. It is equivalent to a convolution kernel with a step size of 1 and padding of K / 2. b′∈R D for:
[0079]
[0080] Bias b′=b∈R D .
[0081] Preferably, the step 7 comprises:
[0082] Step 7.1: Use the Mann-Whitney U test to test the deep learning features extracted in step 5 and the clinical characteristics and CT signs of the patients extracted in step 6, and select the deep learning features, clinical characteristics and CT signs that have significant differences in the diagnosis of PT and LA;
[0083] Step 7.2: The deep learning features, clinical features and CT signs with significant differences are connected in series to form a new feature set. The size of the feature set is N*K, where the total number of samples is N, which represents the number of samples, and K represents the number of features of each sample.
[0084] Step 7.3: Randomly sample the N*K feature set to become M sample sets (m1*K, m2*K...m M *K);
[0085] Step 7.4: Use the M sample sets to train M base classifiers respectively, where the base classifier is an extreme learning machine based on sparse Bayesian.
[0086] Step 7.5: After the M base classifiers are trained, the outputs of the M base classifiers are used as the hidden layer outputs of the ensemble classifier, which is an extreme learning machine based on sparse Bayesian.
[0087] Step 7.6: Train the weights of the hidden layer and the output layer of the integrated classifier. After the weights of the hidden layer and the output layer are trained, the result of the integrated classifier is the classification result of the pulmonary nodule CT image.
[0088] Compared with the prior art, the present invention has the following beneficial effects:
[0089] 1. The present invention proposes a dual-source domain heterogeneous transfer learning model based on adaptive selection. The model adaptively determines the matching weights of each pair of feature maps between the source network (source network 1 based on ImageNet and source network 2 based on lung WSI) and the target network, as well as the matching weights between the source network feature blocks and the target network feature blocks by designing a dual-source domain feature matching network based on adaptive selection. These two weights can automatically select features in the source network that are conducive to target task learning and the destination of feature migration, thereby constraining the training of the target network and improving the robustness of the target network in the case of small samples;
[0090] 2. The present invention proposes a target network based on a Diverse Branch Block (DBB) structure, so that the target network has different receptive fields and paths of complexity, further improving the feature expression capability of the target network;
[0091] 3. After the target network is trained, the present invention converts the DBB structure in the target network into a convolution kernel, which will enable the target network to have a rich feature space while maintaining the original reasoning time cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0093] In the attached picture:
[0094] Figure 1 is a flow chart of the method of the present invention;
[0095] Figure 2 It is a framework diagram of the method of the present invention;
[0096] FIG3 is a dual-source domain feature matching network based on adaptive selection of the present invention, (a) is the selection of features in the source network that are beneficial to target task learning, and (b) is the matching of convolutional blocks between two source networks and the target network;
[0097] FIG4 (a) is a target network based on the DBB structure of the present invention, and (b) is a DBB structure during training;
[0098] Figure 5 It is the feature extraction process of the present invention;
[0099] Figure 6 This is an integrated classifier based on sparse Bayesian ELM of the present invention. DETAILED DESCRIPTION
[0100] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0101] Example:
[0102] See attached Figure 1-6 As shown in Figure 1, a lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning is proposed. Figure 1 As shown in the figure, it includes two parts: ① Feature extraction based on adaptive selection of dual-source domain heterogeneous transfer learning, and ② Classifier construction based on ensemble learning of sparse Bayesian ELM. Specifically, it includes:
[0103] Step 1: Obtain the original lung SPSN CT image dataset, lung cancer WSI dataset, and ImageNet dataset of natural images from the database;
[0104] Step 2: Use the lung cancer WSI dataset obtained in step 1 to train ResNet34 as source network 1; use the ImageNet dataset of natural images obtained in step 1 to train another ResNet34 as source network 2;
[0105] Step 3: Based on step 2, the CT image dataset of lung SPSN obtained in step 1 is used to obtain source feature space 1 and source feature space 2 through source network 1 and source network 2 respectively, and the output of each convolution kernel in source network 1 and source network 2 is used as a feature map of source feature space 1 and source feature space 2 respectively;
[0106] Step 4: Based on step 3, the dual-source domain feature matching model based on adaptive selection and ResNet18 based on diversified branch block structure are trained using the CT image dataset of lung SPSN as the target model. The function of the feature matching model is to select feature constraints in source feature space 1 and source feature space 2 that are beneficial to target task learning and train the target model based on diversified branch block structure;
[0107] This embodiment proposes ResNet18 based on DBB structure as the target network. As shown in Figure 4, the network replaces the original 3×3 convolution with DBB structure. The DBB structure combines branch structures of different scales and complexities (including multi-scale convolution sequences, sequence convolutions, and average pooling) to enable the target network to have different receptive fields and paths of different complexities, thereby improving the feature expression ability of the network. At the same time, each convolution kernel or average pooling is followed by a batch normalization to speed up the convergence of the model and avoid gradient disappearance. Furthermore, according to the homogeneity and additivity of convolution, the DBB structure can be equivalently converted to a single convolution kernel. Therefore, a network structure based on DBB structure is used when training the target network, and an equivalently converted network structure is used during verification / inference. This allows the target network to have a rich feature space while maintaining the original reasoning time cost.
[0108] Therefore, step 4 specifically includes:
[0109] Step 4.1: Based on the source feature space 1 and source feature space 2 obtained in step 3, the matching weights of each pair of feature maps between source feature space 1, source feature space 2 and the target network, as well as the matching weights between the feature blocks of source network 1, source network 2 and each pair of convolution blocks of the target network are adaptively determined based on the adaptively selected dual-source domain feature matching network. A transfer loss function is constructed based on these two matching weights, and the loss function of the dual-source domain heterogeneous transfer learning model based on the adaptive selection is combined with the loss function of the target network.
[0110] Given a source network and a target network, as shown in Figure 3, the feature matching network determines: ① which features in the source network should be migrated and the weight of the migration (selecting features in the source network that are beneficial to learning the target task); ② which blocks of features between the source network and the target network should be matched for migration. The thickness of the lines in Figure 3 represents the size of the weight, and the thicker the line, the greater the weight.
[0111] The step 4.1 is specifically as follows:
[0112] Step 4.1.1: Let x be the target network based on the diversified branch block structure and the input of source network 1 and source network 2, represents the feature map of the m1th block in the source feature space 1, represents the feature map of the m2th block of source network 2, represents the feature map of the nth block of the target network with parameter θ. The goal of the dual-source domain feature matching network based on adaptive selection is to use the feature constraints T in S1 and S2 that are beneficial to the target task learning. θ training, define a and and The l2 norm distance between them is used to achieve feature selection that is beneficial to target task learning by minimizing the l2 norm distance. The l2 norm distance is defined as:
[0113]
[0114] Among them, r θ (·) is point-wise convolution, ensuring With the source feature space Have the same number of channels;
[0115] Step 4.1.2: Define the weighted feature matching loss of each feature map in source network 1 and source network 2 as:
[0116]
[0117]
[0118] Among them, H×W is and The feature map size is For the c1th channel and The weights to be learned between For the c2th channel and The weights to be learned between The weights to be learned are the matching weights of a pair of feature maps;
[0119] Step 4.1.3: and Define two fully connected neural networks and Study separately and The value of and Respectively and The global mean pooling of each feature map in is taken as input, and the output of the network is in the form of softmax, then:
[0120]
[0121] where φ1 and φ2 are and Parameters, for a given and and As shown in Figure 3(a), in each input image, Different feature maps are given different trainable weights. The more important the feature map, the larger the corresponding weight, which makes the loss of the corresponding feature map more concerned.
[0122] Step 4.1.4: As shown in Figure 3(b), The output of each convolutional block in is a unit, and a learnable parameter is introduced for each convolutional block (m1,n) and (m2,n) and and Respectively right right The migration degree, that is, the matching weight of a pair of convolution blocks, and The larger the value is, the more beneficial the features of the convolutional blocks are for learning the target task. Similarly, define two fully connected neural networks. and Study separately and The value of and Respectively and The global mean pooling of is taken as input, and the output of the network is given in the form of ReLU6 to ensure and The non-negativity of and Become too large, that is:
[0123]
[0124] The network automatically learns the important block pairs of the source network feature map to the target network feature map;
[0125] Step 4.1.5: After getting The matching weights for each pair of feature maps relative to the target network and and the matching weights for each pair of convolutional blocks and After that, the migration loss is defined as:
[0126]
[0127] Among them, P1 and P2 are and and A set of candidate convolutional block pairs;
[0128] The final loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection is defined as:
[0129] Ltotal (θ|x,y,φ)=L org (θ|x,y)+βL wfm (θ|x,φ) (5)
[0130] Among them, L org (θ|x,y) is the original loss function of the target network, and β is a hyperparameter.
[0131] Step 4.2: Use step 4.1 to obtain the loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection, and use a four-stage training method to train the feature matching model in the dual-source domain heterogeneous transfer learning based on adaptive selection and the target network based on a diversified branch block structure; the feature matching network in the dual-source domain heterogeneous transfer learning model based on adaptive selection and the training method of the target model based on a diversified branch block, the step 4.2 specifically includes:
[0132] Step 4.2.1: Initialize θ and φ, and define θ as θ0;
[0133] Step 4.2.2: For the current parameter θ0, the target network in the adaptive selection-based dual-source domain heterogeneous transfer learning is updated T times using the CT image dataset of the lung SPSN, so that L wfm (θ|x,φ) is minimized, and the updated θ is defined as θ T ;
[0134] Step 4.2.3: For the current parameter θ T , the CT image dataset of lung SPSN is used to update the target network in the dual-source domain heterogeneous transfer learning based on adaptive selection in a single step, so that L org (θ|x,y) is minimized, and the updated θ is defined as θ T+1 ;
[0135] Step 4.2.4: Based on the samples used in Steps 4.2.2 to 4.2.3, rg (θ T |x,y) to Lo rg (θ T+1 |x,y) measures the speed at which the target network adapts to the target task. Finally, by minimizing Lo rg (θ T+1 |x,y) Update the parameters φ of the feature matching network;
[0136] Step 4.2.5: The training process iteratively repeats steps 4.2.2 to 4.2.4 until the convergence condition of the target network is met. The convergence condition is that the loss of the target network tends to be stable or the maximum number of training times is reached.
[0137] Step 5: Figure 5 The feature extraction process of an SPSN patient is demonstrated. On the basis of step 4, the CT image of the lung SPSN is used as the input data of the target model after equivalent transformation, and the convolution kernel after equivalent transformation of the target model is used as the feature extractor to extract deep learning features; the purpose of deep learning feature extraction is to find a set of image features that can accurately reflect the intrinsic properties of SPSN and have high robustness, which is the guarantee of high performance of the classifier. When the target model is trained, a target network based on a diversified branch block structure (see Figure 3) is used, that is, the convolution kernel in the traditional ResNet18 is replaced with a diversified branch block structure. After the target model is trained, before extracting deep learning features, the diversified branch block structure of the target model needs to be equivalently transformed into a convolution kernel; the step 5 specifically includes:
[0138] Step 5.1: Let the input of the convolution kernel be V is the number of input feature maps, H×W is the size of the input feature map, and the parameters of the convolution kernel are C is the number of input channels, which is equal to the number of input feature maps, D is the number of output channels, K×K is the convolution size; the matrix form of the convolution kernel bias is The convolution kernel output is H′×W′ is the size of the output feature map. The homogeneity and additivity of convolution are shown in formulas (6) and (7) respectively:
[0139]
[0140]
[0141] Where F1 and F2 are the parameters of convolution kernel 1 and convolution kernel 2 respectively, and p is a real number;
[0142] Step 5.2: According to the homogeneity and additivity of the convolution in step 5.1, 5 equivalent transformation formulas can be obtained for equivalent transformation. Finally, the 5 equivalent transformation formulas are used to transform the DBB structure into a single convolution kernel to improve the feature expression capability.
[0143] Preferably, the five equivalent transformation formulas of step 5.2 include:
[0144] Equivalent transformation 1: Fusion of convolution kernel and batch normalization;
[0145] Convolution kernels and batch normalization appear in pairs, and the two can be combined into one convolution according to the homogeneity of convolution. Let j be the channel index, μ j and σ j are the mean and variance of the batch data, γ j and β jare the scale factor and bias term of batch normalization respectively. According to the principle of batch normalization, the output of the j-th output channel after merging is
[0146]
[0147] According to the homogeneity of convolution, the parameters of the combined convolution kernel are
[0148]
[0149] Equivalent transformation 2: convolution branch addition;
[0150] When the outputs of two or more convolution kernels with the same parameters are added, according to the additivity of convolution, the outputs of the above convolution combinations can be combined into the output of one convolution kernel, and the parameters of the combined convolution kernel are:
[0151] F′←F1+F2,b′←b1+b2 (10)
[0152] Among them, F1 and F2 are the parameters of convolution kernel 1 and 2 respectively, b1 and b2 are the biases of convolution kernel 1 and 2 respectively;
[0153] Equivalent transformation 3: fusion of serial convolutions;
[0154] For a 1×1 convolution cascaded with a K×K convolution, let the parameters of the 1×1 convolution be The parameters of the K×K convolution are The combined output of the two convolution kernels is:
[0155]
[0156] REP(b1) represents the matrix form of bias b1. All values in the matrix are b1, and the size of the matrix follows the size of the corresponding convolution kernel.
[0157] Since F1 is a 1×1 convolution, it only performs linear combination of each channel without spatial aggregation, so the 1×1 convolution and K×K convolution can be combined into a new convolution kernel. That is, formula (11) can be transformed into:
[0158]
[0159] In the formula, TRANS(F1) represents the transposition of the convolution kernel F1, that is, the position of the input channel number of F1 is transposed with the position of the output channel number, such as TRANS(F1 D×C×1×1 )=F C×D×1×1 ,because is a constant matrix, then
[0160]
[0161] Equivalent transformation 4: average pooling transformation;
[0162] The average pooling operation with kernel size K and stride s is equivalent to a convolution kernel with the same K and s. is defined as:
[0163]
[0164] Like average pooling, when s>1, it behaves as downsampling, but when s=1, it is a smoothing operation.
[0165] Equivalent transformation 5: multi-scale convolution fusion;
[0166] For zero padding the size is k h ×k w (k h ≤K,k w ≤K) can be equivalently transformed into a K×K convolution kernel, such as a convolution kernel with a step size of 1 and zero padding. It is equivalent to a convolution kernel with a step size of 1 and padding of K / 2. b′∈R D for:
[0167]
[0168] Bias b′=b∈R D .
[0169] Finally, the convolution kernel after equivalent transformation of the target model is used as a feature extractor to extract deep learning features; Figure 5 The feature extraction process of a SPSN patient is demonstrated.
[0170] Step 6: Obtain clinical characteristics and CT subjective signs of each patient, and concatenate the deep learning features in step 5 to form a new feature set; clinical characteristics include gender and age. CT signs are features read by radiologists based on SPSN CT images, mainly including: mean diameter of lung nodules, spicule sign, lobulation sign, and shape sign.
[0171] Step 7: Based on step 6, train an ensemble learning classifier based on sparse Bayesian extreme learning machine. Both the base classifier and the ensemble classifier in the ensemble learning classifier are based on sparse Bayesian extreme learning machine to obtain the classification results of pulmonary nodule CT images. Including:
[0172] Step 7.1: Use the Mann-Whitney U test to test the deep learning features extracted in step 5 and the clinical characteristics and CT signs of the patients extracted in step 6, and select the deep learning features, clinical characteristics and CT signs that have significant differences in the diagnosis of PT and LA; the Mann-Whitney U test is a non-parametric rank sum hypothesis test, which aims to test whether the means of two samples are significantly different. When the p value of the Mann-Whitney U test is less than 0.05, it means that the feature has a significant effect in the diagnosis of pulmonary tuberculosis and lung adenocarcinoma in SPSN.
[0173] Step 7.2: The deep learning features, clinical features and CT signs with significant differences are connected in series to form a new feature set. The size of the feature set is N*K, where the total number of samples is N, which represents the number of samples, and K represents the number of features of each sample.
[0174] Step 7.3: Randomly sample the N*K feature set to become M sample sets (m1*K, m2*K...m M *K);
[0175] Step 7.4: Use the M sample sets to train M base classifiers respectively, where the base classifier is an extreme learning machine based on sparse Bayesian.
[0176] Step 7.5: After the M base classifiers are trained, the outputs of the M base classifiers are used as the hidden layer outputs of the ensemble classifier, which is an extreme learning machine based on sparse Bayesian.
[0177] Step 7.6: Train the weights of the hidden layer and the output layer of the integrated classifier. After the weights of the hidden layer and the output layer are trained, the result of the integrated classifier is the classification result of the pulmonary nodule CT image.
[0178] like Figure 6 As shown, the sparse Bayesian ELM is used as the base classifier and the ensemble classifier of the ensemble learning, respectively, wherein the parameters between the hidden layer and the output layer of the base classifier and the ensemble classifier are solved by the following sparse Bayesian.
[0179] In ELM, the l1 norm is introduced to constrain the model so that the model has a sparse solution. However, the introduction of the l1 norm inevitably introduces hyperparameters. Therefore, this paper proposes an ELM based on sparse Bayes, which not only avoids the use of time-consuming cross-validation to solve hyperparameters, but also has good generalization performance.
[0180] The objective function of ELM based on sparse Bayes is:
[0181]
[0182] Where t represents the true label of the sample; represents the weight between the hidden layer and the output layer; L is the number of neurons in the hidden layer; λ>0 represents the coefficient of the constraint term. X represents the output of the hidden layer. When the connection weight between the input layer and the hidden layer and the bias of the hidden layer are randomly determined, X is determined.
[0183] Regarding the solution of the parameters in formula (16), this paper proposes a solution method based on sparse Bayesian learning and automatic correlation determination. The Gaussian conjugate sparse prior is introduced into the classical empirical Bayesian linear model to obtain a sparse Bayesian model. That is, assuming is a zero-mean Gaussian random variable with inverse variance β, and the label t is modeled as a linear combination with additive Gaussian noise. For the training sample (X, t), N represents the number of samples, and the likelihood of the weight vector w is written as a multivariate Gaussian distribution
[0184] p(t|X,w,β)=N(t|X T w,β- 1 ) (17)
[0185] In order to obtain the posterior probability of w, a sparse prior of a multivariate Gaussian distribution with zero mean and diagonal covariance matrix is introduced for w. The sparse prior can be expressed as
[0186]
[0187] From formula (18), we can see that the sparse prior is for each weight vector ω i Set a single hyperparameter α i , thus generating a hyperparameter vector α = (α i ,…,α D ) T , which is the diagonal element of the covariance matrix of w. Due to the conjugation of the Gaussian prior to the Gaussian likelihood (relative to the mean), it can be seen that the posterior probability of w is a closed form Gaussian solution. The posterior probability of w can be expressed as:
[0188] p(w|t,X,α,β)=N(w|m,∑) (19)
[0189] Then, the most likely value of w can be found by maximizing the posterior probability. The mean m and covariance ∑ of the posterior probability distribution of w are defined as
[0190] m=β∑X T t (20)
[0191] ∑ -1 =A+βX T X (21)
[0192] Where A = diag(α). The hyperparameters α and β can be calculated using the maximum marginal likelihood method. By integrating the output weights w, the marginal likelihood p(tα,β) is obtained, that is,
[0193] p(t|α,β)=∫p(t|w,β)p(w|α)dw (22)
[0194] Then, by squaring the exponential and using the standard form of the Gaussian function's standardized coefficients, we get the log-likelihood:
[0195]
[0196] By setting the partial derivatives of the log-likelihood with respect to the hyperparameters α and β to zero, we can obtain the maximum likelihood estimate of the hyperparameters, which is
[0197]
[0198]
[0199] Among them, m i is the i-th component of the posterior mean m; γ i definition
[0200] γ i =1-α i ∑ ii ,i∈{1,2,…,D} (26)
[0201] Among them, ∑ ii is the i-th diagonal component of the posterior distribution covariance ∑. In the autocorrelation determination, when maximizing the marginal likelihood with respect to α, some elements in α tend to infinity and the corresponding weights have posterior distributions centered at zero. Therefore, the features associated with these weights play no role in the model's prediction, forming a sparse model.
[0202] In order to maximize the log-likelihood, an iterative training scheme is used: ① Initialize the hyperparameters α and β; ② Then calculate the hyperparameters m and ∑ of the posterior distribution according to formulas (20) and (21); ③ Check the convergence of the log-likelihood or weight w. If the convergence criterion is not met, update the hyperparameters α and β according to formulas (24), (25) and (26), and then return to the second step; if the convergence criterion is met, then
[0203] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning, characterized by: include: Step 1: Obtain the original lung SPSN CT image dataset, lung cancer WSI dataset, and ImageNet dataset of natural images; Step 2: Use the lung cancer WSI dataset obtained in step 1 to train ResNet34 as source network 1; use the ImageNet dataset of natural images obtained in step 1 to train another ResNet34 as source network 2; Step 3: Based on step 2, the CT image dataset of lung SPSN obtained in step 1 is used to obtain source feature space 1 and source feature space 2 through source network 1 and source network 2 respectively, and the output of each convolution kernel in source network 1 and source network 2 is used as a feature map of source feature space 1 and source feature space 2 respectively; Step 4: Based on step 3, a dual-source domain feature matching model based on adaptive selection and a ResNet18 based on a diversified branch block structure are trained using the CT image dataset of lung SPSN as the target model; step 4 includes: Step 4.1: Based on the source feature space 1 and source feature space 2 obtained in step 3, the matching weights of each pair of feature maps between source feature space 1, source feature space 2 and the target network, as well as the matching weights between the feature blocks of source network 1, source network 2 and each pair of convolution blocks of the target network are adaptively determined based on the adaptively selected dual-source domain feature matching network. A transfer loss function is constructed based on these two matching weights, and the loss function of the dual-source domain heterogeneous transfer learning model based on the adaptive selection is combined with the loss function of the target network. The step 4.1 is specifically as follows: Step 4.1.1: Let x be the target network based on the diversified branch block structure and the input of source network 1 and source network 2, represents the feature map of the m1th block in the source feature space 1, represents the feature map of the m2th block in the source feature space 2, represents the feature map of the nth block of the target network with parameter θ. The goal of the dual-source domain feature matching network based on adaptive selection is to use the feature constraints T in S1 and S2 that are beneficial to the target task learning. θ training, define a and and The l2 norm distance between them is used to achieve feature selection that is beneficial to target task learning by minimizing the l2 norm distance. The l2 norm distance is defined as: Among them, r θ (·) is point-wise convolution, ensuring With the source feature space Have the same number of channels; Step 4.1.2: Define the weighted feature matching loss of each feature map in source network 1 and source network 2 as: Among them, H×W is and The feature map size is For the c1th channel and The weights to be learned between For the c2th channel and The weights to be learned between The weights to be learned are the matching weights of a pair of feature maps; Step 4.1.3: and Define two fully connected neural networks and Study separately and The value of and Respectively and The global mean pooling of each feature map in is taken as input, and the output of the network is in the form of softmax, then: where φ1 and φ2 are and Parameters, for a given and and In each input image, for Different feature maps are given different trainable weights. The more important the feature map, the larger the corresponding weight, which makes the loss of the corresponding feature map more concerned. Step 4.1.4: The output of each convolutional block in is a unit, and a learnable parameter is introduced for each convolutional block (m1,n) and (m2,n) and and Respectively right right The migration degree, that is, the matching weight of a pair of convolution blocks, and The larger the value is, the more beneficial the features of the convolutional blocks are for learning the target task. Similarly, define two fully connected neural networks. and Study separately and The value of and Respectively and The global mean pooling of is taken as input, and the output of the network is given in the form of ReLU6 to ensure and The non-negativity of and Become too large, that is: The network automatically learns the important block pairs of the source network feature map to the target network feature map; Step 4.1.5: After getting The matching weights for each pair of feature maps relative to the target network and and the matching weights for each pair of convolutional blocks and After that, the migration loss is defined as: Among them, P1 and P2 are and and A set of candidate convolutional block pairs; The final loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection is defined as: L total (θ|x,y,φ)=L org (θ|x,y)+βL wfm (θ|x,φ) (5) Among them, L org (θ|x,y) is the original loss function of the target network, and β is a hyperparameter; Step 4.2: Use step 4.1 to obtain the loss function of the dual-source domain heterogeneous transfer learning model based on adaptive selection, and use a four-stage training method to train the feature matching model in the dual-source domain heterogeneous transfer learning based on adaptive selection and the target network based on a diversified branch block structure; Step 5: Based on step 4, the CT image of the lung SPSN is used as the input data of the target model after equivalent transformation, and the convolution kernel after equivalent transformation of the target model is used as a feature extractor to extract deep learning features; Step 6: Obtain the clinical characteristics and subjective CT signs of each patient, and concatenate the deep learning features in step 5 to form a new feature set; Step 7: Based on step 6, an ensemble learning classifier based on a sparse Bayesian extreme learning machine is trained. Both the base classifier and the ensemble classifier in the ensemble learning classifier are based on a sparse Bayesian extreme learning machine to obtain the classification results of the pulmonary nodule CT image.
2. According to claim 1, a lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning is characterized by: The feature matching network in the dual-source domain heterogeneous transfer learning model based on adaptive selection and the training method of the target model based on the diversified branch block, the step 4.2 specifically includes: Step 4.2.1: Initialize θ and φ, and define θ as θ0; Step 4.2.2: For the current parameter θ0, the target network in the adaptive selection-based dual-source domain heterogeneous transfer learning is updated T times using the CT image dataset of the lung SPSN, so that L wfm (θx,φ) is minimized, and the updated θ is defined as θ T ; Step 4.2.3: For the current parameter θ T , the CT image dataset of lung SPSN is used to update the target network in the dual-source domain heterogeneous transfer learning based on adaptive selection in a single step, so that L org (θx,y) is minimized, and the updated θ is defined as θ T+1 ; Step 4.2.4: Based on the samples used in steps 4.2.2 to 4.2.3, org (θ T |x,y) to L org (θ T+1 |x,y) measures the speed at which the target network adapts to the target task. Finally, by minimizing L org (θ T+1 |x,y) Update the parameters φ of the feature matching network; Step 4.2.5: The training process iteratively repeats steps 4.2.2 to 4.2.4 until the convergence condition of the target network is met. The convergence condition is that the loss of the target network tends to be stable or the maximum number of training times is reached.
3. The lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning according to claim 2 is characterized by: When the target model is trained, a target network based on a diversified branch block structure is used, that is, the convolution kernel in the traditional ResNet18 is replaced with a diversified branch block structure. After the target model is trained, before extracting deep learning features, the diversified branch block structure of the target model needs to be equivalently transformed into a convolution kernel; the step 5 specifically includes: Step 5.1: Let the input of the convolution kernel be V is the number of input feature maps, H×W is the size of the input feature map, and the parameters of the convolution kernel are C is the number of input channels, which is equal to the number of input feature maps, D is the number of output channels, K×K is the convolution size; the matrix form of the convolution kernel bias is The convolution kernel output is H′×W′ is the size of the output feature map. The homogeneity and additivity of convolution are shown in formulas (6) and (7) respectively: Where F1 and F2 are the parameters of convolution kernel 1 and convolution kernel 2 respectively, and p is a real number; Step 5.2: According to the homogeneity and additivity of the convolution in step 5.1, 5 equivalent transformation formulas can be obtained for equivalent transformation. Finally, the 5 equivalent transformation formulas are used to transform the DBB structure into a single convolution kernel to improve the feature expression capability.
4. The lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning according to claim 3 is characterized by: The five equivalent transformation formulas of step 5.2 include: Equivalent transformation 1: Fusion of convolution kernel and batch normalization; Convolution kernels and batch normalization appear in pairs, and the two can be combined into one convolution according to the homogeneity of convolution. Let j be the channel index, μ j and σ j are the mean and variance of the batch data, γ j and β j are the scale factor and bias term of batch normalization respectively. According to the principle of batch normalization, the output of the j-th output channel after merging is According to the homogeneity of convolution, the parameters of the combined convolution kernel are Equivalent transformation 2: convolution branch addition; When the outputs of two or more convolution kernels with the same parameters are added, according to the additivity of convolution, the outputs of the above convolution combinations can be combined into the output of one convolution kernel, and the parameters of the combined convolution kernel are: F′←F1+F2,b′←b1+b2(10) Among them, F1 and F2 are the parameters of convolution kernel 1 and 2 respectively, b1 and b2 are the biases of convolution kernel 1 and 2 respectively; Equivalent transformation 3: fusion of serial convolutions; For a 1×1 convolution cascaded with a K×K convolution, let the parameters of the 1×1 convolution be The parameters of the K×K convolution are The combined output of the two convolution kernels is: REP(b1) represents the matrix form of bias b1. All values in the matrix are b1, and the size of the matrix follows the size of the corresponding convolution kernel. Since F1 is a 1×1 convolution, it only performs linear combination of each channel without spatial aggregation, so the 1×1 convolution and K×K convolution can be combined into a new convolution kernel. That is, formula (11) can be transformed into: In the formula, TRANS(F1) represents the transposition of the convolution kernel F1, that is, the position of the input channel number of F1 is transposed with the position of the output channel number, such as TRANS(F1 D×C×1×1 )=F C×D×1×1 ,because is a constant matrix, then Equivalent transformation 4: average pooling transformation; The average pooling operation with kernel size K and stride s is equivalent to a convolution kernel with the same K and s. is defined as: Like average pooling, when s>1, it behaves as downsampling, but when s=1, it is a smoothing operation. Equivalent transformation 5: multi-scale convolution fusion; For zero padding the size is k h ×k w (k h ≤K,k w ≤K) can be equivalently transformed into a K×K convolution kernel, such as a convolution kernel with a step size of 1 and zero padding. It is equivalent to a convolution kernel with a step size of 1 and padding of K / 2. for: Bias b′=b∈R D .
5. The lung nodule CT image classification method based on adaptive selection of dual-source domain heterogeneous transfer learning according to claim 4 is characterized by: The step 7 comprises: Step 7.1: Use the Mann-Whitney U test to test the deep learning features extracted in step 5 and the clinical characteristics and CT signs of the patients extracted in step 6, and select the deep learning features, clinical characteristics and CT signs that have significant differences in the diagnosis of PT and LA; Step 7.2: The deep learning features, clinical features and CT signs with significant differences are connected in series to form a new feature set. The size of the feature set is N*K, where the total number of samples is N, which represents the number of samples, and K represents the number of features of each sample. Step 7.3: Randomly sample the N*K feature set to become M sample sets (m1*K, m2*K...m M *K); Step 7.4: Use the M sample sets to train M base classifiers respectively, where the base classifier is an extreme learning machine based on sparse Bayesian. Step 7.5: After the M base classifiers are trained, the outputs of the M base classifiers are used as the hidden layer outputs of the ensemble classifier, which is an extreme learning machine based on sparse Bayesian. Step 7.6: Train the weights of the hidden layer and the output layer of the integrated classifier. After the weights of the hidden layer and the output layer are trained, the result of the integrated classifier is the classification result of the pulmonary nodule CT image.
