Data distillation model training method, device and equipment for continuous learning

By using the target distillation network to generate classification soft labels and iteratively train iteratively, the problem of poor performance of image classification models in old tasks is solved, and the performance improvement of the model on old tasks is achieved.

CN120451638APending Publication Date: 2025-08-08XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510512638.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the continuous learning scenario, the existing technology ignores the relationship between new and old tasks through data distillation, resulting in poor performance of image classification models on old tasks.

Method used

By obtaining the predicted probability distribution vector of the samples to be distilled in the memory buffer of the first image classification model, a classification soft label rich in category information is generated using the target distillation network, and the model is iteratively trained based on the second task sample set to generate a second image classification model with better performance.

Benefits of technology

The performance of image classification model on old tasks is improved, and the performance degradation caused by ignoring the relationship between new and old tasks in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451638A_ABST
    Figure CN120451638A_ABST
Patent Text Reader

Abstract

The invention discloses a data distillation model training method, device and equipment for continuous learning, and relates to the field of artificial intelligence. The specific implementation scheme comprises the steps of obtaining a first image classification model; inputting the prediction probability distribution vector corresponding to the first to-be-distilled sample into a target distillation network to obtain a first classification soft label containing rich category information; and performing iterative training on the first image classification model based on the second task sample set, the first to-be-distilled sample and the first classification soft label to obtain a second image classification model with better performance on the old task. According to the method and the device, the problem that the image classification performance of the image classification model on the old task is poor due to the fact that the relationship between the new task and the old task is still ignored through a data distillation mode in a continuous learning scene in the prior art can be solved, and the performance of the image classification model on the old task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data distillation model training method, device and equipment for continuous learning. Background Art

[0002] In image classification scenarios, when learning new tasks (i.e., new image classification tasks), AI models (i.e., image classification models) typically train on a small coreset through continuous learning (CL), also known as lifelong learning, to minimize the risk of performance degradation on old tasks. However, due to model capacity limitations, a limited memory buffer may not be able to accurately approximate the stationary distribution of all old tasks. In particular, when using heuristic strategies to select samples, there is often a large gap between the distribution of the data in the memory buffer and the distribution of the complete data of the old tasks.

[0003] Data distillation can be used to distill information from large amounts of data into a smaller set. However, when analyzing the evolution of a memory buffer, the memory buffer generated before a new task only condenses information within the task, while ignoring the relationships between different tasks. This limitation makes the memory buffer unsuitable for replay-based continuous learning methods.

[0004] Therefore, in the continuous learning scenario, how to improve the classification performance of image classification models on old tasks through data distillation has become an urgent problem to be solved. Summary of the Invention

[0005] The embodiments of the present application provide a data distillation model training method, device and equipment for continuous learning, which solves the problem that the existing technology still ignores the relationship between new and old tasks through data distillation in continuous learning scenarios, resulting in poor image classification performance of the image classification model on old tasks. The performance of the image classification model on old tasks can be improved.

[0006] In a first aspect, embodiments of the present application provide a data distillation model training method for continuous learning, including:

[0007] A first image classification model is obtained; the first image classification model is obtained by iteratively training an initial model based on a first task sample set, and is used to complete a first image classification task corresponding to the first task samples. The first task sample set includes multiple groups of first task samples, each of which includes a first image to be classified and a first classification hard label. The predicted probability distribution vector corresponding to the first sample to be distilled is input into a target distillation network to obtain a first classification soft label. The first sample to be distilled is a portion of the task samples in a memory buffer of the first image classification model. The memory buffer of the first image classification model is used to store a portion of the first task samples that have been used for training. The target distillation network is used to extract the relationship between different image categories from the predicted probability distribution vectors of the old task samples to generate corresponding classification soft labels containing rich category information. The first image classification model is iteratively trained based on a second task sample set, the first sample to be distilled, and the first classification soft label to obtain a second image classification model. The second task samples include a second image to be classified and a second classification hard label. The second task samples and the first task samples correspond to different image classification tasks. The memory data is data in the memory buffer of the first image classification model. The second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task samples.

[0008] Furthermore, the first sample to be distilled is any batch of old task samples in the memory buffer of the first image classification model.

[0009] Furthermore, the method further comprises:

[0010] Based on the first samples to be distilled and the second samples to be distilled, the target distillation network is iteratively trained to obtain the target distillation network with updated parameters; wherein the second samples to be distilled are part of the task samples in the memory buffer of the second image classification model, and the memory buffer of the second image classification model is used to store part of the second task samples that have been used for training.

[0011] Furthermore, in the process of iteratively training the first image classification model based on the second task sample set, the first sample to be distilled, and the first classification soft label to obtain the second image classification model, each time an iterative training is completed, the first sample to be distilled is updated, and the first classification soft label is updated through the target distillation network.

[0012] Furthermore, the target distillation network includes a first MLP unit and a second MLP unit. The predicted probability distribution vector input to the target distillation network is processed by the first MLP unit, activated using ReLU, and then processed by the second MLP unit to obtain the corresponding classification soft label.

[0013] Furthermore, in the process of iterative training of the first image classification model, the objective function used is shown in the following formula:

[0014]

[0015] Among them, θ * (ω) represents the optimal parameters of the second image classification model when the target distillation network parameters ω remain unchanged, θ represents the current parameters of the second image classification model, arg min represents the minimum operator, represents the cross entropy loss function, f θ represents the output of the first image classification model, represents the data of the second task sample, represents the data of the first sample to be distilled, and α represents the first loss trade-off value.

[0016] Furthermore, during the iterative training of the target distillation network, the objective function used is as follows:

[0017]

[0018] Among them, ω * represents the optimal parameters of the target distillation network, ω represents the current parameters of the target distillation network, argmin represents the minimum operator, represents the cross entropy loss function, represents the output of the second image classification model, represents the data of the first sample to be distilled, represents the data of the second sample to be distilled, and β represents the second loss trade-off value.

[0019] Furthermore, the method further comprises:

[0020] Based on the test set, the image classification accuracy of the second image classification model is evaluated using the average classification accuracy index and the precision decay index. The test set includes multiple images to be classified and classification labels corresponding to the first image classification task, and multiple images to be classified and classification labels corresponding to the second image classification task.

[0021] In a second aspect, an embodiment of the present application provides a data distillation model training device for continuous learning, comprising:

[0022] An acquisition module is used to obtain a first image classification model; wherein the first image classification model is obtained by iteratively training an initial model based on a first task sample set, and is used to complete a first image classification task corresponding to the first task sample; the first task sample set includes multiple groups of first task samples, and the first task sample includes a first image to be classified and a first classification hard label.

[0023] The distillation module is used to input the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network to obtain a first classification soft label; wherein the first sample to be distilled is part of the task samples in the memory buffer of the first image classification model; the memory buffer of the first image classification model is used to store part of the first task samples that have been used for training; the target distillation network is used to extract the relationship between different image categories from the predicted probability distribution vector of the old task sample, and generate corresponding classification soft labels containing rich category information.

[0024] A classification training module is used to iteratively train the first image classification model based on the second task sample set, the first sample to be distilled, and the first classification soft label to obtain a second image classification model; wherein the second task sample includes a second image to be classified and a second classification hard label, the second task sample corresponds to a different image classification task from the first task sample, the memory data is the data in the memory buffer of the first image classification model, and the second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task sample.

[0025] In a third aspect, an embodiment of the present application provides a device comprising: a processor; a memory for storing processor-executable instructions; and a method for implementing the first aspect or any possible implementation of the first aspect when the processor executes the executable instructions.

[0026] In a fourth aspect, an embodiment of the present application provides a non-volatile computer-readable storage medium, which includes a device for storing a computer program or instruction, and when the computer program or instruction is executed, the method of the first aspect or any possible implementation method of the first aspect is implemented.

[0027] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0028] This application obtains a first image classification model, inputs the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network, and obtains a first classification soft label containing rich category information; based on the second task sample set, the first sample to be distilled, and the first classification soft label, the first image classification model is iteratively trained to obtain a second image classification model with better performance on the old task. This solves the problem that the existing technology still ignores the relationship between the new and old tasks through data distillation in the continuous learning scenario, resulting in poor image classification performance of the image classification model on the old task, and can improve the performance of the image classification model on the old task. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0030] Figure 1 A flowchart of a data distillation model training method for continuous learning provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of the structure of the initial model provided in the embodiment of the present application;

[0032] Figure 3 Schematic diagram of the network structure of the target distillation network;

[0033] Figure 4 Performance test results of different methods in an online setting provided by the embodiments of this application;

[0034] Figure 5 Performance test results of different methods in offline settings provided by the embodiments of this application;

[0035] Figure 6 Schematic diagram of the composition of a data distillation model training device for continuous learning provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0037] The following description of some of the technologies involved in the embodiments of this application is provided to facilitate understanding and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for the sake of clarity and conciseness, some descriptions of well-known functions and structures are omitted from the following description.

[0038] In image classification scenarios, when learning new tasks (i.e., new image classification tasks), AI models (i.e., image classification models) typically train on a small coreset through continuous learning (CL), also known as lifelong learning, to minimize the risk of performance degradation on old tasks. However, due to model capacity limitations, a limited memory buffer may not be able to accurately approximate the stationary distribution of all old tasks. In particular, when using heuristic strategies to select samples, there is often a large gap between the distribution of the data in the memory buffer and the distribution of the complete data of the old tasks.

[0039] Data distillation can be used to distill information from large amounts of data into a smaller set. However, when analyzing the evolution of a memory buffer, the memory buffer generated before a new task only condenses information within the task, while ignoring the relationships between different tasks. This limitation makes the memory buffer unsuitable for replay-based continuous learning methods.

[0040] Therefore, in the continuous learning scenario, how to improve the classification performance of image classification models on old tasks through data distillation has become an urgent problem to be solved.

[0041] Against this background, the present disclosure provides a data distillation model training method for continuous learning, which can improve the performance of image classification models on old tasks.

[0042] The execution subject of the model training method provided by the embodiment of the present disclosure may be a computer or a server, or may also be other electronic devices with data processing capabilities; or, the execution subject of the method may also be a processor (such as a central processing unit (CPU)) in the above-mentioned electronic device; or, the execution subject of the method may also be an application (application, APP) installed in the above-mentioned electronic device that can implement the functions of the method; or, the execution subject of the method may also be a functional module or unit in the above-mentioned electronic device that has the functions of the method. There is no restriction on the execution subject of the method herein.

[0043] The model training method is exemplified below with reference to the accompanying drawings.

[0044] Figure 1 This is a flow chart of the model training method provided in the embodiment of the present application. Figure 1This is only an execution order shown in the embodiment of the present application, and does not represent the only execution order of the model training method. Figure 1 The steps shown can be performed in parallel or in reverse. Figure 1 As shown, the method may include:

[0045] S101. Obtain a first image classification model.

[0046] Among them, the first image classification model is obtained by iteratively training the initial model based on the first task sample set, and is used to complete the first image classification task corresponding to the first task sample; the first task sample set includes multiple groups of first task samples, and the first task samples include the first image to be classified and the first classification hard label.

[0047] For example, samples of the same image category (such as apple, chair, truck, etc.) in an existing image classification dataset (such as the CIFAR-10 dataset, the CIFAR-100 dataset, or the Tiny-ImageNet dataset, etc.) can be used as first task samples to construct a first task sample set.

[0048] It should be noted that the image category of the first task sample determines the first image classification task corresponding to the first task sample. For example, if the image category of the first task sample is apple, the first image classification task can be the image classification task of "determining whether the image is / contains apples."

[0049] For example, the initial model can be a ResNet-18 model, which can effectively handle complex image classification tasks and alleviate the gradient vanishing or gradient exploding problems in deep network training through residual connections. It should be noted that any neural network model for image classification can also be used as the initial model.

[0050] For example, the ResNet-18 model as the initial model can have the following structure: Figure 2 shown. Figure 2 This is a schematic diagram of the initial model. Figure 2 , the initial model can include convolution layer Conv1, Conv2_x module, Conv3_x module, Conv4_x module, Conv5_x module, and fully connected layer MLP.

[0051] The convolution kernel of the convolution layer Conv1 is 7×7, the number of output channels is 64, and the stride is 2. Since the stride is 2, Conv1 will reduce the size of the feature map, and the size of the output feature map is 112×112.

[0052] The Conv2_x module consists of a max pooling layer and two residual blocks. The max pooling layer uses a 3×3 window size with a stride of 2 to further reduce the size of the feature map. Each residual block in the Conv2_x module contains two 3×3 convolutional layers, and the number of output channels of each convolutional layer is 64. The output feature map size of the Conv2_x module is 56×56.

[0053] The Conv3_x module also includes two residual blocks. Compared to the two residual blocks in the Conv2_x module, the number of output channels of the convolutional layer of each residual block in the Conv3_x module is increased to 128. By stacking residual blocks, richer feature representations can be learned. The output feature map of the Conv3_x module is of size 28×28.

[0054] The Conv4_x module also includes two residual blocks, but the number of output channels of the convolution layer of each residual block is increased to 256. The size of the output feature map of the Conv4_x module is reduced to 14×14.

[0055] The Conv5_x module also includes two residual blocks, but the number of output channels of the convolution layer of each residual block is increased to 512. The size of the output feature map of the Conv5_x module is reduced to 7×7.

[0056] The convolution kernel of the fully connected layer MLP is 1×1, which is used for cross-channel feature integration. It does not change the spatial size of the feature map, but the number of output channels becomes the final number of classification categories.

[0057] Exemplarily, the first image to be classified in the first task sample can be used as the input of the initial model, and the first classification hard label in the first task sample can be used as the output of the initial model. The initial model is iteratively trained to obtain the first image classification model that completes the first image classification task.

[0058] S102: Input the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network to obtain a first classification soft label.

[0059] Among them, the first sample to be distilled is part of the task samples in the memory buffer of the first image classification model; the memory buffer of the first image classification model is used to store part of the first task samples that have been used for training; the target distillation network is used to extract the relationship between different image categories from the predicted probability distribution vector of the old task samples, and generate corresponding classification soft labels containing rich category information.

[0060] To prevent catastrophic forgetting in image classification models during continuous learning tasks, a memory cache mechanism is introduced. A corresponding memory buffer is set up for the image classification model to store some of the task samples that have been used for training. It should be noted that the number of task samples stored in the memory buffer is much smaller than the total number of task samples used for training (for example, if the total number of task samples used for training is 1000, the number of task samples stored in the memory buffer is 10).

[0061] For example, the training samples used when obtaining the first image classification model are all the first task samples in the first task sample set, and what is stored in the memory buffer are part of the first task samples in the first task sample set.

[0062] In some possible implementations, the first sample to be distilled is any batch of old task samples in the memory buffer of the first image classification model.

[0063] Figure 3 Schematic diagram of the network structure of the target distillation network. In some possible implementations, refer to Figure 3 The target distillation network consists of a first MLP unit and a second MLP unit. The predicted probability distribution vector input to the target distillation network is processed by the first MLP unit, activated with ReLU, and then processed by the second MLP unit to obtain the corresponding classification soft label. This lightweight distillation network can reduce computing resources and time consumption.

[0064] S103: Based on the second task sample set, the first sample to be distilled, and the first classification soft label, iteratively train the first image classification model to obtain a second image classification model.

[0065] Among them, the second task sample includes a second image to be classified and a second classification hard label. The image classification task corresponding to the second task sample is different from that corresponding to the first task sample. The memory data is the data in the memory buffer of the first image classification model. The second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task sample.

[0066] Exemplarily, the second image to be classified in the second task sample and the first image to be classified in the first sample to be distilled can be used as the input of the first image classification model, and the second classification hard label in the second task sample, the first classification hard label and the first classification soft label in the first sample to be distilled can be used as the output of the first image classification model. The first image classification model is iteratively trained to obtain a second image classification model that completes the first image classification task and the second image classification task.

[0067] Exemplarily, the parameters of the first image classification model can be updated by training using a stochastic gradient descent algorithm. The stochastic gradient descent algorithm first calculates the gradient of the classification loss function with respect to the parameters of the image classification model. This gradient indicates the direction in the parameter space where the classification loss function value increases fastest. The parameters are updated in the opposite direction of the gradient, that is, in the direction where the classification loss function value decreases. Specifically, each parameter is subtracted from the product of a step size (learning rate) proportional to the gradient of the parameter. After such a step of gradient descent, the parameters of the classification model are updated so that under the new parameters, the model's prediction results are closer to the true label, thereby reducing the classification loss.

[0068] Specifically, during the iterative training of the first image classification model, the objective function used is as follows:

[0069]

[0070] Among them, θ * (ω) represents the optimal parameters of the second image classification model when the target distillation network parameters ω remain unchanged, θ represents the current parameters of the second image classification model, arg min represents the minimum operator, represents the cross entropy loss function, f θ represents the output of the first image classification model, Data representing the second task sample (second task sample, second classification hard label), Represents the data of the first sample to be distilled (the first image to be classified, the first classification hard label, and the first classification soft label corresponding to the first sample to be distilled), and α represents the first loss trade-off value.

[0071] It should be noted that in a continuous learning scenario, when there are more than two image classification tasks, the image classification model training method can continue to refer to the training method of the above embodiment. However, the difference is that the previous image classification task needs to be used as the first image classification task, and the current image classification task needs to be used as the second image classification task.

[0072] For example, taking the image classification tasks including A, B, and C, and the task sample sets corresponding to the image classification tasks A, B, and C are a, b, and c, respectively, the task sample set a corresponding to the first image classification task A can be used as the first task sample set. Based on the task sample set a, the initial model is trained to obtain the image classification model M1. The image classification model M1 is used as the first image classification model, and the task sample set b corresponding to the image classification task B is used as the second task sample set. S102 and S103 are executed to obtain the second image classification model (named image classification model M2). It can be understood that the image classification model M2 can complete the image classification tasks A and B.

[0073] When continuing to train the image classification model M2 to obtain an image classification model M3 that can also complete image classification task C, the image classification model M2 can be used as the first image classification model, and the task sample set c corresponding to the image classification task C can be used as the second sample set. S102 and S103 are executed to obtain a second image classification model (i.e., image classification model M3). It can be understood that the obtained image classification model M3 can complete image classification tasks A, B, and C.

[0074] In this way, the model can be trained in a continuous learning scenario when the number of image classification tasks is greater than 2, so that the performance of the final image classification model on the old tasks can be improved.

[0075] The disclosed embodiment obtains a first image classification model, inputs the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network, and obtains a first classification soft label containing rich category information; based on the second task sample set, the first sample to be distilled, and the first classification soft label, the first image classification model is iteratively trained to obtain a second image classification model with better performance on the old task.

[0076] In some possible implementations, the method may further include:

[0077] Based on the first sample to be distilled and the second sample to be distilled, the target distillation network is iteratively trained to obtain the target distillation network with updated parameters.

[0078] The second samples to be distilled are part of the task samples in the memory buffer of the second image classification model, and the memory buffer of the second image classification model is used to store part of the second task samples that have been used for training.

[0079] For example, Adam (Adaptive Moment Estimation) can be used for training to update the parameters of the target distillation network.

[0080] Specifically, during the iterative training of the target distillation network, the objective function used is as follows:

[0081]

[0082] Among them, ω * represents the optimal parameters of the target distillation network, ω represents the current parameters of the target distillation network, argmin represents the minimum operator, represents the cross entropy loss function, represents the output of the second image classification model, The data representing the first sample to be distilled (the first image to be classified, the first classification hard label, and the first classification soft label corresponding to the first sample to be distilled). Represents the data of the second sample to be distilled (the second image to be classified and the second classification hard label corresponding to the second sample to be distilled), and β represents the second loss trade-off value.

[0083] This embodiment iteratively trains the target distillation network based on the first and second samples to be distilled, generating a target distillation network with updated parameters. This updated target distillation network can further improve the performance of the resulting second image classification network on the old task. During training, the distillation network aligns the effect of the distilled data on the classification network with the effect of the full, large-scale data on the classification network, thereby distilling global information.

[0084] In some possible implementations, during the process of iteratively training the first image classification model based on the second task sample set, the first samples to be distilled, and the first classification soft labels to obtain the second image classification model, after each iterative training, the first samples to be distilled are updated, and the first classification soft labels are updated through the target distillation network. This can further improve the performance of the second image classification model obtained from the first image classification model on the old task.

[0085] It should be noted that to update the first classification soft label, the target distillation network can be updated through the aforementioned embodiment first, thereby further improving the performance of the second image classification model on the old task.

[0086] In some possible implementations, the method may further include:

[0087] Based on the test set, the image classification accuracy of the second image classification model is evaluated using the average classification accuracy metric and the precision decay metric.

[0088] The test set includes multiple images to be classified and classification labels corresponding to the first image classification task, and multiple images to be classified and classification labels corresponding to the second image classification task.

[0089] For example, the average classification accuracy index can be calculated as follows:

[0090]

[0091] Among them, ACC is the average classification accuracy, T is the number of image classification tasks in the continuous learning training process, and a t is the maximum prediction accuracy of the t-th image classification task during training.

[0092] It can be understood that the higher the average classification accuracy index, the better the overall classification performance of the image classification model on all tasks, that is, the classification model can more accurately identify samples of different tasks.

[0093] For example, the calculation method of the precision decay index (also known as the forgetting index) can be:

[0094]

[0095] Among them, FM is the precision decay index, T is the number of image classification tasks in the continuous learning training process, and a * is the maximum prediction accuracy of the t-th task during training, a t,T is the prediction accuracy of the t-th image classification task obtained after training.

[0096] It can be understood that the precision decay index reflects the degree of forgetting of the image classification model on the old task. The smaller the precision decay index, the less forgetting, and the higher the performance of the image classification model on the old task.

[0097] The embodiment of the present application can more accurately evaluate the image classification accuracy of the second image classification model by using the average classification accuracy index and the precision decay index based on the test set.

[0098] Comparative experiment

[0099] Performance tests were conducted on the Split CIFAR-10 dataset using different methods (ER, DERPP, CLSER, ER-ACE, ER DDN, DERPP DDN, CLSER DDN, and ER-ACE DDN) in both online and offline settings, with different memory buffer sizes (M = 0.2k and M = 0.5k). The term "DDN" indicates that the distillation method was introduced in the manner of this application.

[0100] Figure 4 The performance test results of different methods in an online setting provided by the embodiments of this application are as follows: Figure 5 The performance test results of different methods in offline settings provided by the embodiments of this application are as follows. Figure 4 and Figure 5 It can be seen that, whether in the online setting or the offline setting, the methods introducing distillation (ER DDN, DERPP DDN, CLSER DDN, ER-ACEDDN) with the same capacity of memory buffer have better ACC and FM indicators than the original methods (ER, DERPP, CLSER, ER-ACE) on the Split CIFAR-10 dataset; and the ACC and FM indicators corresponding to the large-capacity memory buffer are basically better than those of the small-capacity memory buffer.

[0101] In summary, it can be explained that the performance advantage of the distillation method introduced in the manner of this application on old tasks.

[0102] Although the present application provides method operation steps such as embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative work. The order of steps listed in this embodiment is only one way of executing the order of many steps and does not represent the only execution order. When an actual device or client product is executed, it can be executed in the order of the method shown in this embodiment or the accompanying drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0103] like Figure 6 As shown, an embodiment of the present application further provides a data distillation model training device for continuous learning, the device comprising:

[0104] Acquisition module 601 is used to obtain a first image classification model; wherein the first image classification model is obtained by iteratively training an initial model based on a first task sample set, and is used to complete a first image classification task corresponding to the first task sample; the first task sample set includes multiple groups of first task samples, and the first task sample includes a first image to be classified and a first classification hard label.

[0105] The distillation module 602 is used to input the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network to obtain a first classification soft label; wherein the first sample to be distilled is part of the task samples in the memory buffer of the first image classification model; the memory buffer of the first image classification model is used to store part of the first task samples that have been used for training; the target distillation network is used to extract the relationship between different image categories from the predicted probability distribution vector of the old task sample, and generate corresponding classification soft labels containing rich category information.

[0106] The classification training module 603 is used to iteratively train the first image classification model based on the second task sample set, the first sample to be distilled, and the first classification soft label to obtain a second image classification model; wherein the second task sample includes a second image to be classified and a second classification hard label, the second task sample corresponds to a different image classification task from the first task sample, the memory data is the data in the memory buffer of the first image classification model, and the second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task sample.

[0107] The beneficial effects and specific implementation methods of the present device embodiment can be referred to the aforementioned method embodiment, and will not be described in detail here.

[0108] Some modules in the apparatus described herein may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0109] The devices or modules described in the above application embodiments can be implemented by computer chips or physical devices, or by products with certain functions. For ease of description, the above devices are described separately by function in various modules. When implementing the embodiments of this application, the functions of each module can be implemented in the same or multiple software and / or hardware. Of course, a module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.

[0110] The methods, devices, or modules described in this application can be implemented in the form of computer-readable program code. The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to implement the same function of the controller in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions may be considered to be both a software module for implementing the method and a structure within a hardware component.

[0111] An embodiment of the present application further provides a device, comprising: a processor; a memory for storing processor-executable instructions; and when the processor executes the executable instructions, the method described in the embodiment of the present application is implemented.

[0112] The embodiments of the present application also provide a non-volatile computer-readable storage medium having a computer program or instruction stored thereon. When the computer program or instruction is executed, the method described in the embodiments of the present application is implemented.

[0113] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist independently, or two or more modules may be integrated into one module.

[0114] The above-mentioned storage medium includes, but is not limited to, random access memory (RAM), read-only memory (ROM), cache, hard disk drive (HDD), or memory card. The memory can be used to store computer program instructions.

[0115] It can be seen from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of the present application can essentially or the part that contributes to the prior art can be embodied in the form of a software product, or it can be embodied through the implementation process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0116] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. All or part of this application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, mobile communication terminals, multi-processor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0117] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit the present application. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present application.

Claims

1. A data distillation model training method for continuous learning, characterized in that: include: Obtaining a first image classification model; The first image classification model is obtained by iteratively training an initial model based on a first task sample set, and is used to complete a first image classification task corresponding to the first task sample; the first task sample set includes multiple groups of first task samples, and the first task samples include a first image to be classified and a first classification hard label; Input the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network to obtain the first classification soft label; The first samples to be distilled are part of the task samples in the memory buffer of the first image classification model; the memory buffer of the first image classification model is used to store part of the first task samples that have been used for training; the target distillation network is used to extract the relationship between different image categories from the predicted probability distribution vector of the old task samples and generate corresponding classification soft labels containing rich category information; Iteratively training the first image classification model based on the second task sample set, the first to-be-distilled sample, and the first classification soft label to obtain a second image classification model; Among them, the second task sample includes a second image to be classified and a second classification hard label. The image classification task corresponding to the second task sample is different from that corresponding to the first task sample. The memory data is the data in the memory buffer of the first image classification model. The second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task sample.

2. The method according to claim 1, characterized in that The first sample to be distilled is any batch of old task samples in the memory buffer of the first image classification model.

3. The method according to claim 2, characterized in that The method further comprises: Iteratively training the target distillation network based on the first sample to be distilled and the second sample to be distilled to obtain a target distillation network with updated parameters; The second samples to be distilled are part of the task samples in the memory buffer of the second image classification model, and the memory buffer of the second image classification model is used to store part of the second task samples that have been used for training.

4. The method according to claim 2, characterized in that In the process of iteratively training the first image classification model based on the second task sample set, the first sample to be distilled, and the first classification soft label to obtain the second image classification model, each time an iterative training is completed, the first sample to be distilled is updated, and the first classification soft label is updated through the target distillation network.

5. The method according to claim 1, wherein The target distillation network includes a first MLP unit and a second MLP unit. The predicted probability distribution vector input to the target distillation network is processed by the first MLP unit, activated using ReLU, and then processed by the second MLP unit to obtain the corresponding classification soft label.

6. The method according to claim 1, characterized in that In the process of iteratively training the first image classification model, the objective function used is shown in the following formula: Among them, θ * (ω) represents the optimal parameters of the second image classification model when the target distillation network parameters ω are fixed, θ represents the current parameters of the second image classification model, argmin represents the minimum operator, represents the cross entropy loss function, f θ represents the output of the first image classification model, represents the data of the second task sample, represents the data of the first sample to be distilled, and α represents the first loss trade-off value.

7. The method according to claim 3, characterized in that In the process of iteratively training the target distillation network, the objective function used is shown in the following formula: Among them, ω * represents the optimal parameters of the target distillation network, ω represents the current parameters of the target distillation network, argmin represents the minimum operator, represents the cross entropy loss function, f θ*(ω) represents the output of the second image classification model, represents the data of the first sample to be distilled, represents the data of the second sample to be distilled, and β represents the second loss trade-off value.

8. The method according to claim 1, characterized in that The method further comprises: Based on a test set, the image classification accuracy of the second image classification model is evaluated using the average classification accuracy index and the precision decay index. The test set includes multiple images to be classified and classification labels corresponding to the first image classification task, and multiple images to be classified and classification labels corresponding to the second image classification task.

9. A data distillation model training device for continuous learning, characterized in that: include: An acquisition module is configured to acquire a first image classification model; wherein the first image classification model is obtained by iteratively training an initial model based on a first task sample set, and is configured to complete a first image classification task corresponding to the first task sample; the first task sample set includes multiple groups of first task samples, each of which includes a first image to be classified and a first classification hard label; A distillation module is configured to input the predicted probability distribution vector corresponding to the first sample to be distilled into the target distillation network to obtain a first classification soft label; wherein the first sample to be distilled is a portion of the task samples in the memory buffer of the first image classification model; the memory buffer of the first image classification model is used to store a portion of the first task samples that have been used for training; the target distillation network is configured to extract the relationship between different image categories from the predicted probability distribution vector of the old task samples to generate corresponding classification soft labels containing rich category information; A classification training module is used to iteratively train the first image classification model based on a second task sample set, the first sample to be distilled, and the first classification soft label to obtain a second image classification model; wherein, the second task sample includes a second image to be classified and a second classification hard label, the second task sample corresponds to a different image classification task from the first task sample, the memory data is the data in the memory buffer of the first image classification model, and the second image classification model is used to complete the first image classification task and the second image classification task corresponding to the second task sample.

10. A device for performing a data distillation model training method for continuous learning, characterized in that include: processor; a memory for storing processor-executable instructions; When the processor executes the executable instructions, the method according to any one of claims 1 to 8 is implemented.