Continuous learning method based on pseudo sample extraction

By extracting representative and boundary pseudo-samples from the classification model and combining with new category data training, the catastrophic forgetting problem of continuous learning model when learning new categories is solved, and more efficient and adaptive continuous learning is achieved, avoiding old samples Disadvantages of storage and additional model complexity.

CN119202876APending Publication Date: 2024-12-27CETC DIGITAL INTELLIGENCE TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411266556.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing continuous learning model is prone to forget the learned category characteristics when learning new categories, and due to data security and privacy issues, it is difficult to store old samples, and traditional methods are complex and computationally expensive.

Method used

By extracting representative pseudo-samples and boundary pseudo-samples from trained classification models, using knowledge distillation ideas to replace real old samples, and training in combination with new category data to avoid catastrophic forgetting.

Benefits of technology

It realizes efficient pre-category decision space without relying on old samples, improves performance and adaptability of continuous learning, and avoids the shortcomings of old sample storage and additional model complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202876A_ABST
    Figure CN119202876A_ABST
Patent Text Reader

Abstract

The invention provides a continuous learning method based on pseudo sample extraction, and aims to improve the ability of coping with disastrous forgetting when an existing continuous learning model learns a new classification category. In order to cope with disastrous forgetting, an existing continuous learning model needs to retain part of training samples of previous categories, old sample storage needs a large amount of hardware space, and the previous training samples cannot be obtained in many actual scenes at all. The invention provides a method for extracting a pseudo sample from a trained classification model, and the pseudo sample is used for replacing an old training sample to complete the training of a new category. The extracted pseudo samples comprise two types, namely representative pseudo samples and boundary pseudo samples, the representative pseudo samples represent typical features of one type, and the boundary pseudo samples highlight boundary features between different types. The combination of the two types of samples can effectively represent the decision space of the previous type learned by the classifier so as to help the model to avoid forgetting the important features of the previous type when learning the new type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of continuous learning models, and more specifically, particularly relates to a continuous learning method based on pseudo sample extraction. Background Art

[0002] The classification model is one of the basic models of machine learning and is also a core component of many complex intelligent tasks, such as recommendation systems, autonomous driving, face recognition, etc. With the development of deep learning, current classification models are mostly composed of neural networks; these models map the original samples to a complex high-dimensional latent space through nonlinear encoding of multi-layer neural networks, and then use the discriminant network to learn the decision space of different samples in the latent space to achieve classification; and with the development of technology, the classification model must not only be able to distinguish existing categories, but also need to be able to recognize new categories to adapt to changes in tasks; therefore, the continuous learning model is committed to not forgetting the characteristics of the learned categories when learning new categories, that is, to avoid catastrophic forgetting;

[0003] Existing continuous learning models usually adopt constraint-based strategies and memory replay-based methods to avoid catastrophic forgetting. The core basis of the constraint-based method is that each neuron in the neural network has different importance for different category recognition. Therefore, the main technology of this type of method is to quantify the importance of a single neuron to the recognition of a specific category, and in subsequent tasks, give priority to optimizing the weights of neurons that are not important to the existing categories. However, since neural networks usually amplify small disturbances and thus affect the final decision, it is very difficult to analyze and quantify the impact of neurons on decisions, and since neurons affect decisions in different categories in different ways, it is also difficult to develop a universal quantitative indicator.

[0004] Another type of method uses memory replay, that is, when learning new categories, old training samples are added back to the training to ensure that the classification model can retain the characteristics of the learned categories. Compared with constraint-based methods, this type of method can usually better alleviate the catastrophic forgetting problem and has better adaptability to different types of classification tasks. The core goal of this type of method is how to obtain high-quality old training data. The current common practice is to design specific sample importance measurement indicators in advance, directly find important old training samples according to the indicators during old category classification training and store them on the hard disk, and then add the above old samples to the subsequent training of new tasks to ensure the classification effectiveness of the old categories. However, this method usually requires the storage of more old samples to ensure that subsequent training does not destroy the decision space of the previous classification task. At the same time, considering the security and privacy of the data, the storage of old samples is not supported in many practical scenarios. Other methods use the training data to train a generative model for the category separately while training the classifier, and then use the generative model to generate samples of the category. However, training an additional generative model usually requires greater model complexity and higher computational overhead than training a classifier. At the same time, the performance of the generator itself will be greatly affected by the uneven classification of the training data. Therefore, we propose a continual learning method based on extracting pseudo samples from a trained classifier to avoid the above defects. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and propose a continuous learning method based on pseudo sample extraction, which takes a new perspective to improve the performance of continuous learning. That is, when old samples are not needed, specific pseudo samples are extracted from the trained classification model to replace the real old samples using a similar idea of ​​knowledge distillation to help learn new tasks; in order to ensure that the decision space of the previous category can be better preserved, the extracted pseudo samples are used to replace the real old samples to avoid catastrophic forgetting of the previous task in the learning process of the new category.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A continuous learning method based on pseudo sample extraction includes the following steps:

[0008] Step 11, initial definition of pseudo samples, defining the data format and type of pseudo samples;

[0009] Step 12, extracting representative pseudo samples from the classification model, extracting pseudo samples with representative features of the previous category from the trained classification model;

[0010] Step 13, extracting boundary pseudo samples from the classification model, extracting boundary pseudo samples representing boundary features between different categories from the trained classification model;

[0011] Step 14, training the new category based on the classification loss function, by generating representative pseudo samples and marginal pseudo samples of the previous classification model, combining the training data of the new category, and training the classification model to recognize the new category without forgetting the old category.

[0012] Preferably, in step S11, the data format and type of the pseudo sample are defined as follows:

[0013] The classification model of continuous learning is represented as y = f(x), x∈R n is n-dimensional input sample data, f(*) is a classification model for continuous learning, the model is composed of a deep neural network, and y is the category output by the classification model;

[0014] The pseudo sample is defined as the same format as the real sample, and the pseudo sample is defined as the same format as the real sample, expressed as x and In the same n-dimensional vector space, the expression is:

[0015] Preferably, the pseudo sample with representative features of the previous category extracted from the trained classification model in step S12 has the characteristic requirement of a representative sample in the decision space of the classifier, that is, not only the representative sample belongs to the category, but also other samples within a certain interval around it belong to the category;

[0016] Gaussian random sampling plus generator structure to extract representative pseudo samples;

[0017] The center of the Gaussian distribution corresponds to the representative pseudo sample, and the interval of the Gaussian distribution corresponds to other samples of the same category as the representative pseudo sample.

[0018] Preferably, the pseudo samples having representative features of the previous category are extracted from the trained classification model, specifically:

[0019] First, the latent vector z∈R is randomly sampled from the Gaussian distribution in the low-dimensional space m ,m <n;

[0020] Generator g(*) generates pseudo samples according to input z Right now The design of g(*) depends on the specific classification scenario. For example, image classification uses multi-layer convolutional neural networks, fully connected networks, or attention networks, and text classification uses pre-trained language models, recurrent neural networks, etc.

[0021] In order to ensure that most of the pseudo images generated by the generator g(*) are recognized as the target category by the trained classifier, the corresponding optimization objective function is s = argmin g ‖f(g(z))-y‖ p, where y is the target category label;

[0022] The optimization process of the model is: 1) randomly sample a set of z from the m-dimensional standard normal distribution;

[0023] 2) Generate corresponding pseudo samples for input z through g(z)

[0024] 3) Minimize the objective function and y to optimize g(*).

[0025] Preferably, in step S13, the boundary samples are close to the decision boundary, and slight disturbances cause the boundary samples to change into samples of another category. The boundary samples reflect the complex decision boundary of the classification model in the high-dimensional space, and the boundary pseudo-sample extraction method is used to ensure the diversity of the boundary pseudo-samples.

[0026] Preferably, the boundary pseudo sample extraction method comprises:

[0027] Generate a random pseudo sample and a noise ε;

[0028] The optimization goal is to identify the pseudo sample as y by the trained classifier. 1 ;

[0029] After adding noise, the classifier recognizes it as y 2 The objective function is By minimizing the noise, the pseudo samples Approaching y 1 and 2 The decision boundary of .

[0030] Preferably, the boundary pseudo sample extraction method comprises:

[0031] Randomly generate two pseudo samples and The goal of optimization is Recognized by the classifier as y 1 , Recognized by the classifier as y 2 ,at the same time and The gap becomes smaller, and the corresponding objective function is By minimizing the difference between two different categories of pseudo samples, the pseudo samples Approximately classifier f(*) for category y 1 and 2 The decision boundary of .

[0032] Preferably, in step S14, representative pseudo samples and boundary pseudo samples are generated according to the statistical characteristics of the actual data, and the pseudo samples and new category data are mixed and trained in proportion to ensure that the classification model can achieve a good balance between overfitting of new categories and underfitting of old categories (i.e., catastrophic forgetting).

[0033] Technical effects and advantages of the present invention: The present invention provides a continuous learning method based on pseudo sample extraction. Compared with the prior art, the present invention helps continuous learning solve the problem of catastrophic forgetting when learning new categories by extracting pseudo samples;

[0034] Through specially designed two types of objective functions, representative pseudo samples are extracted to extract the common and significant features of the categories that the classification model has learned, and boundary pseudo samples are used to represent the subtle differences between the two learned categories;

[0035] By extracting pseudo samples, the continuous learning model can avoid dependence on old samples, while more completely retaining the decision space of previously learned categories, thereby achieving a more efficient and adaptable continuous learning method. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a flow chart of the continuous learning method based on pseudo sample extraction of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0038] The present invention provides a continuous learning method based on pseudo sample extraction, which takes a new perspective to improve the performance of continuous learning, that is, when old samples are not needed, specific pseudo samples are extracted from the trained classification model to replace the real old samples, so as to help the learning of new tasks;

[0039] In order to ensure that the decision space of the previous category can be well preserved, the present invention designs two different pseudo sample extraction methods: 1) representative pseudo samples, which reflect the common and significant characteristics of a single category; 2) boundary pseudo samples, which show the subtle differences between samples of different categories. The extracted pseudo samples are used to replace the real old samples to avoid catastrophic forgetting of the previous task in the learning process of the new category.

[0040] like Figure 1 As shown, the method comprises the following steps:

[0041] Step 11, initial definition of pseudo samples;

[0042] In this step, the data format and type of the pseudo sample are defined as follows:

[0043] The classification model of continuous learning is represented as y = f(x), x∈R n is n-dimensional input sample data, f(*) is a classification model for continuous learning, the model is composed of a deep neural network, and y is the category output by the classification model;

[0044] The pseudo sample is defined as the same format as the real sample, and the pseudo sample is defined as the same format as the real sample, expressed as x and In the same n-dimensional vector space, the expression is:

[0045] Step 12, extracting representative pseudo samples from the classification model;

[0046] In this step, pseudo samples with representative features of the previous category are extracted from the trained classification model. In the decision space of the classifier, the feature requirement of the representative sample is that not only the representative sample belongs to the category, but also other samples within a certain interval around it belong to the category. According to the above requirements, pseudo samples with representative features of the previous category are extracted from the trained classification model, specifically:

[0047] First, the latent vector z∈R is randomly sampled from the Gaussian distribution in the low-dimensional space m ,m <n;

[0048] Generator g(*) generates pseudo samples according to input z ; The design of g(*) depends on the specific classification scenario. For example, image classification uses multi-layer convolutional neural networks, fully connected networks or attention networks, and text classification uses pre-trained language models, recurrent neural networks, etc.;

[0049] In order to ensure that most of the pseudo images generated by the generator g(*) will be recognized as the target category by the trained classifier, the corresponding optimization objective function is s = argmin g ‖f(g(z))-y‖ p , where y is the target category label;

[0050] The optimization process of the model is: 1) randomly sample a set of z from the m-dimensional standard normal distribution;

[0051] 2) Generate corresponding pseudo samples for input z through g(z)

[0052] 3) Minimize the objective function and y to optimize g(*).

[0053] Step 13, extracting boundary pseudo samples from the classification model;

[0054] In this step, boundary pseudo samples representing subtle differences between different categories are extracted from the trained classification model. Unlike representative samples, boundary samples are close to the decision boundary, and slight disturbances will turn boundary samples into samples of another category. Therefore, boundary samples can reflect the complex decision boundary of the classification model in high-dimensional space to a certain extent. In order to ensure the diversity of boundary pseudo samples, the present invention designs two different boundary pseudo sample extraction methods. For the convenience of explanation, it is assumed that the boundary pseudo samples to be generated can reflect the category y 1 and 2 characteristic differences.

[0055] Method 1: Randomly generate a pseudo sample and a noise ε, the optimization goal is to identify the pseudo sample as y by the trained classifier 1 , but after adding noise, the classifier recognizes it as y 2 The corresponding objective function is This method can be understood as gradually removing pseudo samples by minimizing noise. Pull to y 1 and 2 on the decision boundary.

[0056] Method 2: Randomly generate two pseudo samples and The goal of optimization is Recognized by the classifier as y 1 , Recognized by the classifier as y 2 ,at the same time and The gap is very small; this method can be understood as minimizing the difference between two pseudo samples of different categories and pulling them to y 1 and 2 on the decision boundary.

[0057] Unlike representative pseudo samples, which can generate a large number of samples through the generator, boundary pseudo samples can only generate a pair of samples in one training. In actual use, different pseudo samples can be extracted through multiple different random initializations. and

[0058] Step 14, training the new category based on the classification loss function;

[0059] In this step, by generating representative pseudo samples and marginal pseudo samples of the previous classification model and combining them with the training data of the new category, the classification model is trained to recognize the new category without forgetting the old category. This step needs to adjust the proportion and distribution of pseudo samples representing the previous category information and the new category data according to the characteristics of the actual data to ensure that the classification model can achieve a good balance between overfitting and underfitting.

[0060] Comparative Example 1

[0061] Existing continual learning models use two approaches to avoid catastrophic forgetting;

[0062] The first method uses constraints to control the degree of change in the model's neurons when learning new categories. This method first quantifies the importance of different neurons in the neural network in recognizing previous categories, and then learns new categories while minimizing the impact of neurons that are important to previous categories.

[0063] The second method uses old sample retraining to retain some important samples that performed well in previous task training. Then, in the training of the new task, these old samples are added to the training set of the new category to avoid catastrophic forgetting. Considering that the scale of training data is generally large, this type of method needs to screen out the most effective old samples to ensure the accuracy and timeliness of subsequent new category training.

[0064] By comparing Comparative Example 1 with the present application, it can be seen that the present application helps continuous learning to solve the problem of catastrophic forgetting when learning new categories by extracting pseudo samples; through two specially designed objective functions, representative pseudo samples can be extracted to extract the common and significant features of the categories that the classification model has learned, and boundary pseudo samples can be extracted to represent the subtle differences between the two learned categories; by adding pseudo samples to the training of subsequent categories, the continuous learning model can avoid dependence on old samples, while more completely retaining the decision space of previously learned categories, thereby achieving a more efficient and adaptable continuous learning method.

[0065] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A continuous learning method based on pseudo sample extraction, characterized in that: The steps include: Step 11, initial definition of pseudo samples, defining the data format and type of pseudo samples; Step 12, extracting representative pseudo samples from the classification model, extracting pseudo samples with representative features of the previous category from the trained classification model; Step 13, extracting boundary pseudo samples from the classification model, extracting boundary pseudo samples representing boundary features between different categories from the trained classification model; Step 14, training the new category based on the classification loss function, by generating representative pseudo samples and marginal pseudo samples of the previous classification model, combining the training data of the new category, and training the classification model to recognize the new category without forgetting the old category.

2. The continuous learning method based on pseudo sample extraction according to claim 1, characterized in that: In step S11, the data format and type of the pseudo sample are defined as follows: The classification model of continuous learning is represented as y = f(x), x∈R n is n-dimensional input sample data, f(*) is a classification model for continuous learning, the model is composed of a deep neural network, and y is the category output by the classification model; The pseudo sample is defined as the same format as the real sample, and the pseudo sample is defined as the same format as the real sample, expressed as x and In the same n-dimensional vector space, the expression is:

3. The continuous learning method based on pseudo sample extraction according to claim 1, characterized in that: The pseudo sample with representative features of the previous category extracted from the trained classification model in step S12 is required to have the characteristics of a representative sample in the decision space of the classifier, that is, not only the representative sample belongs to the category, but also other samples within a certain interval around it belong to the category; Gaussian random sampling plus generator structure to extract representative pseudo samples; The center of the Gaussian distribution corresponds to the representative pseudo sample, and the interval of the Gaussian distribution corresponds to other samples of the same category as the representative pseudo sample.

4. The continuous learning method based on pseudo sample extraction according to claim 3 is characterized in that: The method of extracting pseudo samples with representative features of the previous category from the trained classification model is as follows: First, the latent vector z∈R is randomly sampled from the Gaussian distribution in the low-dimensional space m ,m <n; Generator g(*) generates pseudo samples according to input z Right now The design of g(*) depends on the specific classification scenario. Image classification uses a multi-layer convolutional neural network, a fully connected network, or an attention network; In order to make most of the pseudo images generated by the generator g(*) be recognized as the target category by the trained classifier, the corresponding optimization objective function is s = argmin g ||f(g(z))-y|| p , where y is the target category label; The optimization process of the model is: 1) randomly sample a set of z from the m-dimensional standard normal distribution; 2) Generate corresponding pseudo samples for input z through g(z) 3) Minimize the objective function and y to optimize g(*).

5. The continuous learning method based on pseudo sample extraction according to claim 1, characterized in that: In step S13, the boundary samples are close to the decision boundary, and slight disturbances cause the boundary samples to change into samples of another category. The boundary samples reflect the complex decision boundary of the classification model in the high-dimensional space. At the same time, the boundary pseudo sample extraction method is used to ensure the diversity of the boundary pseudo samples.

6. The continuous learning method based on pseudo sample extraction according to claim 5 is characterized in that: The boundary pseudo sample extraction method (noise minimization) comprises: Generate a random pseudo sample and a noise δ; The optimization goal is that the pseudo sample is recognized as y1 by the trained classifier, and after adding noise, the classifier recognizes it as y2; The objective function is By minimizing the noise δ, we ensure that the pseudo samples Approaching the decision boundary of y1 and y2.

7. The continuous learning method based on pseudo sample extraction according to claim 5 is characterized in that: The boundary pseudo sample extraction method (distance minimization) comprises: Randomly generate two pseudo samples and The goal of optimization is is identified by the classifier as y1, is identified as y2 by the classifier, and and The distance becomes smaller, and the corresponding objective function is By minimizing the difference between two different categories of pseudo samples, the pseudo samples and Approaching the decision boundary of the classifier f(*) for categories y1 and y2.

8. The continuous learning method based on pseudo sample extraction according to claim 1, characterized in that: In step S14, representative pseudo samples and boundary pseudo samples are generated according to the statistical characteristics of the actual data, and the pseudo samples and new category data are mixed and trained in proportion to ensure that the classification model can achieve a good balance between overfitting of new categories and underfitting of old categories (i.e., catastrophic forgetting).