Deep network incremental learning method for multi-view pediatric tumor pathology image classification
By employing a deep network incremental learning method with multi-level knowledge distillation regularization, the problem of memory loss of old categories in pathological image classification is solved. By utilizing the underlying texture information of pathological images, efficient adaptation to new data and accurate classification are achieved.
Patent Information
- Application Number
- CN202310356664.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-04-04
AI Technical Summary
Existing incremental learning methods struggle to maintain accuracy for old categories in pathological image classification while learning new categories. In particular, they fail to fully utilize the underlying texture information of pathological images, leading to severe catastrophic forgetting problems.
A multi-level knowledge distillation regularization method is adopted, which combines the DetexNet model and LwM algorithm. Through multi-view feature extraction and knowledge distillation loss function, a deep network incremental learning method with multi-level knowledge distillation regularization is designed to perform incremental learning using the low-level texture information of pathological images.
It effectively alleviates the catastrophic forgetting problem in incremental learning of pathological images, improves the model's adaptability to new data and classification robustness, reduces the initial training data requirements, and enhances classification accuracy and robustness.
Smart Images

Figure CN116363461B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer technology, and relates to pattern recognition and machine learning technology, in particular to a deep network incremental learning method. BACKGROUND
[0002] The background technology involves four parts: knowledge distillation, incremental learning, DetexNet model, and LwM algorithm.
[0003] 1) Knowledge Distillation
[0004] Knowledge distillation is a technique that extracts knowledge from a large model and transfers it to a small model to improve the performance of the small model. This method is often used to compress the size of the model, improve the inference speed of the model, and make the model more suitable for running on edge devices. Knowledge distillation has become a very important technology in deep learning and is widely used in many application scenarios.
[0005] The core idea of knowledge distillation is to use a large pre-trained model to extract the knowledge it has learned, and then transfer this knowledge to a small target model. This knowledge can be in various forms, such as intermediate layer outputs, feature maps, gradients, etc. Generally speaking, this knowledge can be regarded as an approximation or approximate answer to the target function. Knowledge distillation trains a smaller model by combining this knowledge with the training target of the target model.
[0006] Specifically, assuming there is a large model F and a small model f, the goal of knowledge distillation is to train f so that it is similar to F when performing tasks. In knowledge distillation, the output of F is used as the target output of f, and the intermediate layer output of F is used as the input of f, which is usually referred to as soft target. Knowledge distillation also uses the original training data as the input of f, so that f learns more information.
[0007] Specifically, knowledge distillation can be represented by the following formula:
[0008]
[0009] where θ represents the parameters of f, L is the loss function of the original training data, x is the input of the original training data, y is the output label, H is the auxiliary loss function of knowledge distillation, and g(x) is the output of the large model F. The parameter λ controls the balance between the two loss functions.
[0010] Knowledge distillation can also be widely applied in incremental learning. Incremental learning is a machine learning method that allows models to dynamically learn from new data and classify on an ever-increasing set of classes. In incremental learning, a model needs to continuously learn new classes while maintaining accuracy on existing classes. This process is often referred to as continual learning or continuous learning.
[0011] Knowledge distillation can be used in incremental learning to help models maintain memories of old classes while learning new classes. Specifically, knowledge distillation can be used to train a new model f t that can utilize the knowledge of an existing model f t-1 when training new classes to maintain accuracy on old classes. In incremental learning, the method of knowledge distillation can be used to transfer the knowledge learned in f t-1 , thereby speeding up the training process and improving the accuracy of the model.
[0012] In addition, knowledge distillation can also be used to compress the size of the model while maintaining the accuracy of the model, improving the performance of the model on edge devices. This is very important for some resource-constrained application scenarios. In incremental learning, knowledge distillation can pass the knowledge of the existing model to the new model to avoid using the complete model in the training of each new class, thereby reducing the model size and computational complexity.
[0013] In summary, knowledge distillation is a very important technology that can be used to compress the size of deep learning models, improve the inference speed of models, and improve the performance of models on edge devices.
[0014] 2) Incremental Learning
[0015] Incremental learning refers to the process of continuously learning on new data rather than training all data at once. It is an important technology in the field of machine learning and is widely used in online learning, intelligent recommendation, natural language processing, computer vision, and other fields.
[0016] The advantage of incremental learning is that it can handle new data in a timely manner, avoiding the process of repeated training, saving computing resources, and continuously improving the performance of the model on the original basis. In incremental learning, common methods include online learning, incremental learning, and hybrid learning.
[0017] Online Learning refers to updating the model based on the current model after receiving new data, rather than retraining the entire model. The core of online learning is online learning algorithm, which updates model parameters step by step through methods such as stochastic gradient descent, suitable for large-scale data scenarios, can quickly process new data, but may face data stability, overfitting and other problems.
[0018] Incremental Learning refers to the fusion of the original model and new data, and the retraining of the entire model. Incremental Learning needs to select appropriate data samples for incremental training to avoid the original model being "flooded" by new data, and also needs to consider how to maintain the stability and generalization ability of the original model.
[0019] Hybrid Learning refers to a method that combines online learning and incremental learning, dynamically adjusting learning rate, sample selection and other parameters during training to balance the influence of new and old data, and improve the performance and stability of the model.
[0020] In incremental learning, performance evaluation of the model usually uses cross-validation, accuracy, recall and other indicators to measure. Among them, cross-validation (Cross-validation) refers to dividing the data set into training set and test set, and evaluating the performance of the model through multiple training and testing. Accuracy (Precision) and recall (Recall) refer to the proportion of correctly classified samples in the total sample and the proportion of correctly classified positive samples in all positive samples in the classification model.
[0021] In practical applications, incremental learning usually needs to consider data stability, security and other issues. For example, how to prevent the model from being attacked maliciously, how to ensure data privacy, etc. all need to be carefully designed and implemented. In addition, incremental learning can be combined with deep learning, reinforcement learning and other technologies for application, further improving the performance and stability of the model.
[0022] 3) DetexNet model
[0023] The structure design of DetexNet deep convolutional neural network model is based on the famous DenseNet. This model can utilize the professional prior knowledge of traditional hand-crafted texture feature extractors and embed them into deep convolutional neural networks, so theoretically this model can achieve excellent and robust performance.
[0024] The TEM kernels in DetexNet represent the units designed by DetexNet, which are placed at the bottom layer of the entire convolutional network. The values of the kernels in TEM kernel convolution are calculated by the Texture Energy Measure (TEM) feature algorithm. The TEM feature of each MxM sliding window of each channel of the image is given by the following formula:
[0025]
[0026] where W x,y is the sliding window centered at image coordinates (x, y), φ(·) is a nonlinear function, and R(a, b) is a mask filter. Formally, R(a, b) = p(a, b)m(a, b), which multiplies the pixel value p at position (a, b) with the mask value m at the corresponding position in the sliding window.
[0027] and normalized by the following formula:
[0028]
[0029] Use γ·to represent the new filter, and design a new feature extraction function:
[0030]
[0031] The input image is an RGB image (red R, green G, and blue B). The RGB image will be divided into R, G, and B channels and sent into three independent TEM kernels to obtain the underlying texture features of the corresponding channels. Then the extracted RGB texture features will be concatenated into a feature map and sent to higher layers, such as shown in the DenseNet backbone network in Figure 3 The last layer of the DetexNet network model is a classifier with a fully connected layer, which outputs the probability prediction of the final classification result, thereby providing a predicted diagnosis result from the pathological image.
[0032] 4) LwM algorithm
[0033] Learning without Memorizing (LwM) is an incremental learning (IL) method that aims to improve the ability of the trained model to recognize more classes. The key problem of this method is that while teaching the classifier to learn new classes, it needs to store data related to existing classes (such as images). However, this is impractical because it increases memory requirements at each incremental step, making it impossible to implement IL algorithms on edge devices with limited memory. Therefore, LwM proposes a method to preserve the information of existing (base) classes without storing any of their data, while allowing the classifier to gradually learn new classes.
[0034] The core idea of LwM is to use an attention distillation loss (L) to penalize the changes in the attention maps of the classifier, thus preserving the information of the base classes when new classes are added. The attention distillation loss (L) is defined as follows:
[0035]
[0036] where N is the batch size, C is the number of base classes, A,t and A,s are the attention maps of the target network and the source network on the i-th sample and the j-th base class, respectively. The attention map is obtained by global average pooling on the feature map. LwM also uses a knowledge distillation loss (L) to preserve the prediction ability of the source network on the base classes. The knowledge distillation loss (L) is defined as follows:
[0037]
[0038] where P,t and P,s are the prediction probabilities of the target network and the source network on the i-th sample and the j-th base class, respectively.
[0039] The total loss function of LwM is:
[0040] L = L CE + λL D + γL AD
[0041] where L is the cross-entropy loss used to train the classification ability of the target network on new classes, and λ and γ are hyperparameters used to balance the weights of different loss terms.
[0042] The main problem of applying LwM algorithm to medical pathology images is that this knowledge distillation loss often works well on natural images, but performs poorly on pathology images. Pathology is different from natural images, which are characterized by clear and distinct objects, while pathology images rely on the repetitive patterns of cells or tissues as the smallest constituent parts. Therefore, the basic features such as textures in the middle or even shallow layers of neural network models are more important than high-level abstract object features in reflecting the information of these images. SUMMARY
[0043] The purpose of the present application is to provide a deep network incremental learning method for multi-view child tumor pathology image classification. The method proposes a new multi-level knowledge distillation regularization method for pathology images, applies this mechanism to multi-view child tumor pathology image classification, and gives the mathematical model of the method. The learning algorithm of this model is also given. The present application designs a multi-level knowledge distillation loss for the characteristics of pathology images, which can fully utilize the bottom texture information of pathology images for knowledge distillation regularization, and improve the application effect of incremental learning algorithm in pathology images.
[0044] The specific technical scheme for achieving the object of the present application is:
[0045] A deep network incremental learning method for multi-view pediatric tumor pathological image classification, comprising the following steps:
[0046] Step 1: Preprocessing of data set containing medical pathological images and corresponding classification labels
[0047] The original data are H&E stained pediatric tumor tissue pathological section (WSI) scanning pictures, each section is cropped into a plurality of non-overlapping sub-images, each sub-image has a size of 224*224; each sub-image is manually labeled with a corresponding classification label, thereby constructing the data set;
[0048] Step 2: Determining the model structure for pathological image classification
[0049] The adopted pathological image classification neural network model is DetexNet model; the DetextNet model is based on DensetNet network structure, and a TEM multi-view feature extractor is designed at the bottom layer of the DenseNet network, R, G and B three view features are extracted from the input source image through the TEM algorithm, the features are connected by channels and then sent into the DenseNet network, and finally a Softmax activation layer is used to obtain the classification relative probability of each class, and the class with the maximum probability is the classification result of the model;
[0050] Step 3: Determining the optimization objective of initial training
[0051] In incremental learning, the training data is constantly updated, and different new data will be obtained at different time points, and the model needs to be trained every time new data is obtained; when the first batch of data arrives, the model structure determined in step 2 is instantiated, and the model is initially trained using the first batch of data, and the optimization objective used for training is only the multi-class cross-entropy loss, which is described by the following formula:
[0052]
[0053] Among them, represents the output of the model, K represents the number of classes, y k represents the one-hot label vector; the obtained model after training is the current model;
[0054] Step 4: Determining the optimization objective of incremental training
[0055] The optimization objective of the model is multi-class cross-entropy loss and multi-level knowledge distillation regularization; every time a batch of new data is obtained, the current existing model is incrementally trained on the new data using the optimization objective; the current model is defined as the teacher model M t The model structure and parameters of the teacher model M t are copied as a learnable student model M s ; the optimization objective function includes cross-entropy loss of learning the classification of the current new data and multi-level knowledge distillation regularization loss of preserving the knowledge of the old data; the optimization objective function is described as follows:
[0056]
[0057] Wherein M s is the student model, x is the current batch of new data, σ represents the Softmax activation function at the tail of the network, K represents the number of categories, y k represents the one-hot label vector, s and t respectively represent the intermediate feature vectors extracted from different intermediate layers of the student model network and the teacher model network, n represents the number of layers extracted, p i represents the weight of the corresponding level; after the current round of new data training is completed, the teacher model M t is discarded, and the obtained student model M s is used as the current model;
[0058] Step five: training the deep network incremental learning model
[0059] First, use the first batch of data to do initial training according to step three, and the initial training only uses the conventional multi-class cross-entropy loss for optimization, and every time a batch of new data is obtained, the incremental learning step described in step four is used to train the new data;
[0060] In the new data incremental training, the replay strategy is applied: after training the model M0 using the initial data X 0 , the model M0 is used to extract features from the already trained data X 0 , and the features are clustered, and N most representative samples closest to the cluster centers are selected to form a set P0;
[0061] Next, when a batch of new data X 1 comes, P0 is mixed into X 1 , and the mixed data is used to incrementally train the model M0 to obtain a new model M1; then the new model M1 is used to extract features from the new data X 1 , and the clustering algorithm is used to cluster the features, and N samples closest to the cluster centers are selected as Finally, and P0, get the most representative N sample set P1; each time new data arrives, repeat the process, use P1 instead of P0 for subsequent incremental learning;
[0062] Incremental training of each round of new data updates the model according to the gradient of the objective function in step three, and uses Adam algorithm to optimize the objective function of the model; the specific training includes the following steps:
[0063] Step a1: initial training uses the xaiver initialization method based on uniform distribution to initialize the parameters of the neural network;
[0064] Step a2: set the hyperparameters, batch size, and maximum number of iterations;
[0065] Step a3: set the learning rate hyperparameter of the Adam optimizer, and use the Adam algorithm to update the parameters of the model;
[0066] Step a4: set the Early stop mechanism, and use the result on the validation set as the standard, when the accuracy of the validation set no longer rises, stop the training of the model;
[0067] Step six: after the training is completed, the model inference is carried out, that is, the pediatric tumor pathological image is classified.
[0068] The multi-level knowledge distillation regularization uses a pathological image classification model with the following structural characteristics: the backbone network model is composed of several DenseBlocks, and the intermediate features Xl passing through each DenseBlock are reserved for subsequent knowledge distillation calculation; the calculation of each intermediate feature is described by the formula:
[0069] X l =H l (X0,X1,...,X l-1 )
[0070] Where X l represents the feature obtained by the lth DenseBlock, and H l represents the lth DensBlock.
[0071] In the pathological image classification model, the low-level features contain local texture information, and the high-level features contain global information; in the training process, let the student model M s (Student Model) and the teacher model M t(TeacherModel) obtain the same number of intermediate features s and t, and calculate the knowledge distillation loss between s and t two by two, and finally all the obtained knowledge distillation losses are weighted and summed; in addition, by adjusting the weights between different levels, the information transmission and combination mode between different levels in the network are controlled, and the performance of the model is further improved; the formula description of the multi-level knowledge distillation loss is:
[0072]
[0073] Wherein, s i and t i represent the multi-level features extracted in the student model and the teacher model respectively, K represents the number of categories, n represents the number of extracted layers, sigma represents the Softmax activation function at the tail of the neural network, p i represents the weight of the corresponding level, and the sum of the weights is 1; the values of p0 to p n are interpolation values from 0.1 to 1, and are normalized to:
[0074]
[0075] The beneficial effects of the present application include:
[0076] 1) Compared with the traditional method, the innovation of the present application is that a multi-level knowledge distillation regularization method is designed according to the image characteristics of medical pathological images, thereby effectively alleviating the catastrophic forgetting problem in pathological image incremental learning, thereby realizing the improvement of data incremental effect;
[0077] 2) The present application improves the adaptability of the medical pathological image analysis software to new data in the application process, reduces the requirement of initial training to the data volume, and improves the robustness of classification. The data of the medical analysis software training algorithm is labeled by professional medical experts, and the labeling cost is very high, so the amount of collected data is small and cannot cover all cases, so the algorithm robustness is not enough and it is difficult to adapt to various situations. Secondly, when the software is put into use, doctors often need to correct the results, and the labeling information provided by this step is not effectively utilized, and the present application method can better solve this problem. BRIEF DESCRIPTION OF DRAWINGS
[0078] Figure 1 is the flowchart of the present application;
[0079] Figure 2 is the optimization target structure diagram of the present application;
[0080] Figure 3 is the DetexNet network structure framework diagram;
[0081] Figure 4A flowchart of a replay strategy training algorithm. DETAILED DESCRIPTION
[0082] The present application will be further described with reference to the following specific examples and accompanying drawings. The process, conditions, experimental methods, etc. for implementing the present application are the general knowledge and common sense in the art, and the present application does not have special limitations.
[0083] The specific embodiment flowchart of the present application is shown in Figure 1
[0084] The specific embodiment includes the following steps:
[0085] 1. Preprocessing the medical pathology image and corresponding classification label dataset
[0086] Processing the original pathology image WSI slice scan data can use the following steps:
[0087] Split the whole picture: Since the file size of the whole picture is very large, it needs to be split into several sub-pictures to facilitate subsequent algorithm processing. Open source image processing libraries such as OpenCV or Pillow can be used to implement picture splitting.
[0088] Adjust the size of the sub-picture: Since the input image size of the convolutional neural network is 224x224, the size of each sub-picture needs to be adjusted to 224x224. The resize function in the image processing library can be used to achieve this.
[0089] Assign a label to each sub-picture: Each sub-picture needs to be assigned a corresponding classification label. This is done through manual annotation.
[0090] Data augmentation: In order to avoid overfitting of the model, data augmentation can be performed on each sub-picture, including rotation, translation, and flipping. This can be achieved through functions in the OpenCV or torchvision image processing library.
[0091] Divide the training set and test set: In order to evaluate the performance of the model, the dataset needs to be divided into training and test sets. Generally, 80% of the dataset is used for training and 20% for testing. Open source Python libraries such as scikit-learn can be used to implement the division of the dataset.
[0092] Data standardization: In order to avoid the influence of feature scale differences on the model, data needs to be standardized. Generally, the value of each pixel is subtracted from the mean of the dataset and then divided by the standard deviation of the dataset. Open source Python libraries such as NumPy can be used to implement data standardization.
[0093] Data Loader: Finally, the processed dataset needs to be loaded into the model for training and testing. Open-source Python libraries, such as PyTorch's DataLoader, can be used to implement a data loader, allowing the model to read data from the dataset for training and testing.
[0094] 2. Determine the neural network model for classifying multi-view pathological images.
[0095] This invention employs the aforementioned multi-view pathological classification neural network model, such as... Figure 3 As shown, the structure is as follows: the pathological image is divided into three channels, RGB, and each channel passes through a TEM kernel (calculated by the TEM algorithm) to obtain data from three different views. These channels are then merged and fed into DenseNet. In DenseNet, the intermediate features X of each DenseBlock are processed... l These will be retained for subsequent knowledge distillation calculations; each DenseBlock in DenseNet is described by the following formula:
[0096] X l =H l (X0, X1, ..., X l-l)
[0097] X l The features obtained from the l-th layer DenseBlock, H l This represents the l-th DensBlock.
[0098] In the entire network, lower-level features mainly contain local texture information, while higher-level features contain more global information. During training, both the student and teacher models receive the same number of intermediate features, and the knowledge distillation loss between them is calculated. Finally, these features are weighted and summed. Furthermore, by adjusting the weights between different levels, the information transfer and combination between different levels in the network are controlled to further improve the model's performance.
[0099] 3. Determine the optimization objective of this model.
[0100] The optimized target structure diagram of the present invention is as follows: Figure 2 As shown. The main optimization strategy of the model in this invention is multi-class cross-entropy loss and multi-level knowledge distillation regularization; whenever a new batch of data is obtained, the current existing model is incrementally trained on the new data using this optimization objective; the model that has been trained on the old data is defined as the teacher model M. t Teacher model M t A copy of the model structure and parameters is made as a learnable student model M.s The objective function consists of two parts: the first part is the cross-entropy loss for learning the classification of the new data, and the second part is the multi-level knowledge distillation regularization loss for retaining knowledge of the old data. The objective function is described by the following formula:
[0101]
[0102] M s For the student model, x represents the new data in the current batch, σ represents the Softmax activation function at the end of the network, K represents the number of classes, y represents the one-hot label vector, s and t represent the intermediate feature vectors extracted from different intermediate layers in the student model network and the teacher model network, respectively, n represents the number of layers extracted, and p i This indicates the weight of the corresponding level; after training on the new data in this round, the teacher model M is discarded. t The resulting student model M s As the current existing model.
[0103] 4. Training the model
[0104] The model of this invention first undergoes initial training with the first batch of data. This initial training uses only the conventional multi-class cross-entropy loss for optimization. Each time a new batch of data is obtained, the incremental learning steps described in step three are used to train the new data. A replay strategy is applied during incremental training with new data; see [reference needed]. Figure 4 : Using initial data X 0 After training model M0, use model M0 on the already trained data X. 0 Features are extracted and clustered, and N most representative samples closest to the cluster centers are selected to form a set P0; next, when a new batch of data X is available... 1 When it arrives, mix P0 into X. 1 and using mixed data Incremental training is performed on model M0 to obtain a new model M1; then the new model M1 is used on the new data X. 1 Feature extraction is performed, and then a clustering algorithm is used to cluster the features. The N samples closest to the cluster centers are selected as the cluster centers. Finally, Cluster P0 to obtain the most representative N sample sets P1; whenever new data arrives, repeat the above process and use P1 instead of P0 for subsequent incremental learning;
[0105] The present application uses Pytorch as the code implementation framework, and uses a NVIDIA RTX3090 GPU with 24GB memory to train the neural network model. In order to obtain the best training result, the training strategy of training 20K iterations for each batch of data is adopted, and the batch size is set to 32. These data use the Adam optimizer to optimize the network modules of the neural network model during training, so as to obtain better results. In addition, the learning rate of the teacher and student network is set to 0.0004 to obtain higher accuracy and better model effect.
[0106] 5. After training, model inference is performed, that is, pathological image classification
[0107] For the input WSI image mentioned in step 1, a series of processing needs to be performed. First, it needs to be cut into a plurality of non-overlapping sub-images, and the size of the sub-image is fixed to 224x224. This step can ensure that each small image can be accurately processed in the subsequent processing. Next, these sub-images are batched into the model for inference. During inference, data augmentation is not required as in the training process, but data normalization processing is still required. This can ensure that the model can obtain accurate results during inference. After inference, each sub-image will obtain a predicted class. These prediction values can be used to calculate the confidence of each sub-image, thereby further improving the accuracy of the overall prediction. Finally, all sub-images are superimposed according to their positions, and the comprehensive result obtained is the prediction result of the overall WSI. Through this series of processing, the WSI image can be effectively classified and predicted, and accurate results can be obtained.
[0108] Embodiment
[0109] The experimental data of the present application is the PNT7 data set, which is a peripheral neuroblastoma data set containing seven categories. The data set consists of 163 pathological sections from a certain children's medical center, covering 73 patient cases, with recording time from January 1, 2014 to December 31, 2015. Each category contains 8 to 30 patients, and the number of slices per patient varies from 2 to 186. All these specimens are collected according to the standard histological protocol and digitized using a ScanScope T2 digitizer. In order to make the histological section image contain enough visual information for the pathologist to classify and comfortably adapt to human vision, each histological section image is cut into a plurality of non-overlapping image blocks with a size of 768x768 pixels, and the label is recorded by naming the patch header. According to the histological standard of international neuroblastoma pathological classification, all patches are histologically labeled by a senior pediatric pathologist and divided into seven categories: GN, GNBi, UD, PD, D, NOS and UN.
[0110] Table 1 Accuracy percentage of different algorithms under different increments
[0111]
[0112] Table 1 is the accuracy percentage of the method proposed in the present application and different algorithms under different increments. The experimental construction method is: the PNT7 dataset is randomly shuffled and divided into 5 equal datasets, and then one (20%) new data is added at each stage to simulate the form of data increment. In the table, LwF avoids network forgetting previously learned content by retaining the knowledge of old tasks during training. Specifically, LwF uses the backpropagation algorithm to update network weights, uses the Kullback-Leibler divergence to measure the difference between new and old tasks, and uses these differences to adjust the size of weight updates. LwM aims to achieve memoryless learning. Compared with traditional machine learning algorithms, LwM pays more attention to real-time processing and analysis of data, rather than relying on previous experience or memory. This algorithm can better adapt to rapidly changing environments and has better generalization ability. iCARL uses important sample selection and knowledge distillation methods to effectively alleviate the forgetting and interference problems between classes and has good generalization performance. It can continuously improve the accuracy of the model while continuously receiving new class data. Fine-tuning refers to slightly adjusting the weights of the already trained model using new data to improve the accuracy and generalization ability of the model. This can make the model better adapt to the characteristics of new data, thereby improving the prediction ability of new data. In the fine-tuning process, a smaller learning rate is used to avoid too much interference with the already learned weights. Joint training uses all data, including old and new data, to train at the same time, and this method has the best effect and can be considered as the upper limit of incremental learning. The method of the present application performs significantly better than other algorithms in the data incremental learning task of pathological images, and finally achieves an accuracy of 74.8%, which indicates the effectiveness of the method of the present application.
[0113] The protection scope of the present application is not limited to the above embodiments. Changes and advantages that can be thought of by those skilled in the art without departing from the spirit and scope of the present application are included in the present application and are protected by the appended claims.
Claims
1. A deep network incremental learning method for multi-view pediatric tumor pathology image classification, characterized in that, The method comprises the following steps: Step one: preprocessing a data set comprising medical pathological images and corresponding classification labels The raw data is a WSI scanning image of a H&E-stained pediatric tumor tissue pathological section, each section is cropped into a plurality of non-overlapping sub-images, each sub-image has a size of 224*224; each sub-image is manually labeled with a corresponding classification label to construct the data set; Step two: determining a model structure for pathological image classification The adopted pathological image classification neural network model is a DetexNet model; the DetexNet model is based on a DensetNet network structure, and a TEM multi-view feature extractor is designed at the bottom layer of the DenseNet network; the R, G and B features of the source image are extracted through the TEM algorithm, the features are connected by channels and then sent to the DenseNet network, and finally a Softmax activation layer is used to obtain the classification relative probability of each category, and the category with the highest probability is the classification result of the model; Step three: determining the optimization objective of initial training In incremental learning, the training data is constantly updated, and different new data is obtained at different time points, and the model needs to be trained each time new data is obtained; when the first batch of data arrives, the model structure determined in step two is instantiated, and the model is initially trained using the first batch of data; the optimization objective used in the training is only the multi-classification cross-entropy loss, which is described by the following formula: wherein represents the output of the model, K represents the number of categories, and y represents a one-hot label vector; the model obtained after training is the current model; Step four: determining the optimization objective of incremental training The optimization objective of the model is the multi-classification cross-entropy loss and the multi-level knowledge distillation regularization; When a batch of new data is obtained, the optimization objective is used to perform incremental training of the current model on the new data; The current model is defined as a teacher model M, and the model structure and parameters of the teacher model M are copied as a learnable student model M; the optimization objective function includes the cross-entropy loss of learning the classification of the current new data and the multi-level knowledge distillation regularization loss of preserving the knowledge of the old data; the optimization objective function is described by the following formula: M s is the student model, x is the new data of the current batch, σ represents the Softmax activation function at the tail of the network, K represents the number of categories, y k represents the one-hot label vector, s i and t i respectively represent the intermediate feature vectors extracted from different intermediate layers of the student model network and the teacher model network, n represents the number of layers extracted, p i represents the weight of the corresponding layer; after the training of the new data in this round is completed, the teacher model M t is discarded, and the obtained student model M s serves as the current model; Step five: training the incremental learning model of the deep network First, the first batch of data is initially trained according to step three, and the initial training only uses the conventional multi-classification cross-entropy loss for optimization; when a batch of new data is obtained, the incremental learning step in step four is used to train the new data; Apply the replay strategy in the new data incremental training: use the initial data X 0 After training the model M0, use the model M0 to the data X that has been trained 0 Extract features and cluster the features, select N most representative samples closest to the cluster center to form the set P0; Next, when a new batch of data X... 1 When it arrives, mix P0 into X. 1 and using mixed data Incremental training is performed on model M0 to obtain a new model M1; then the new model M1 is used on the new data X. 1 Feature extraction is performed, and then a clustering algorithm is used to cluster the features. The N samples closest to the cluster centers are selected as the cluster centers. Finally, Cluster P0 to obtain the most representative N sample sets P1; whenever new data arrives, repeat the above process and use P1 instead of P0 for subsequent incremental learning; In each round of incremental training of the new data, the gradient of each parameter is calculated according to the objective function in step three to update the model; the Adam algorithm is used to optimize the objective function of the model; the specific training comprises the following steps: Step a1: the initial training uses the xaiver initialization method based on uniform distribution to initialize the parameters of the neural network; Step a2: setting the hyperparameters, batch size, and maximum number of iterations; Step a3: setting the learning rate hyperparameter of the Adam optimizer, and updating the parameters of the model using the Adam algorithm; Step a4: setting the Early stop mechanism, taking the result on the validation set as the standard, and stopping the training of the model when the accuracy on the validation set no longer increases; Step six: After training, the model inference is performed, that is, the pediatric tumor pathological image is classified.
2. The deep network incremental learning method of claim 1, wherein, The multi-level knowledge distillation regularization uses a pathological image classification model with the following structural characteristics: the backbone network model is composed of several DenseBlocks, and the intermediate feature X l of each DenseBlock is calculated and reserved for subsequent knowledge distillation calculation; the calculation of each intermediate feature is described by the formula: X l = H l (X0, X1,..., X l-1 ) wherein X l represents the features obtained by the lth layer DenseBlock, H l represents the lth DenseBlock; In the model of pathological image classification, the low-level features contain local texture information, and the high-level features contain global information; in the training process, the student model M and the teacher model M obtain the same number of intermediate features s and t, and the knowledge distillation loss between s and t is calculated, and finally all the knowledge distillation losses are weighted and summed; in addition, by adjusting the weight between different levels, the information transmission and combination mode between different levels in the network are controlled, and the performance of the model is further improved; the formula of the multi-level knowledge distillation loss is described as: where s i and t i represent the multi-level features extracted from the student model and the teacher model, respectively, K denotes the number of classes, n denotes the number of extracted layers, σ denotes the Softmax activation function at the tail of the neural network, p i denotes the weight of the corresponding level, and the sum of the weights is 1; the values of p0to p n are interpolated from 0.1 to 1 and normalized to: