A small sample continual learning method and system

By constructing a continuous differential optimizer and using enhanced sampling techniques, the problems of historical knowledge forgetting and insufficient training data in small-sample continuous learning were solved, thereby improving the stability and accuracy of the model in recognizing new and old categories.

CN121600350BActive Publication Date: 2026-04-10JIANGXI CLOUD EYE VISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing small-sample continuous learning relies on discrete batch optimization, which leads to the forgetting of historical knowledge and a very small number of new session samples, resulting in insufficient training data and reduced recognition accuracy.

Method used

By acquiring guiding features and augmented samples, a continuous differential optimizer is constructed. The model parameters of the continuous differential optimizer are continuously optimized. Combined with augmented sampling techniques, diverse training data is constructed to achieve continuous dynamic updates of model parameters.

Benefits of technology

While ensuring category consistency, this method improves the recognition accuracy reduction caused by insufficient training data, significantly alleviates catastrophic forgetting, and enhances the stability and accuracy of the model in recognizing new and old categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600350B_ABST
    Figure CN121600350B_ABST
Patent Text Reader

Abstract

The application provides a small sample continuous learning method and system, and the method comprises the following steps: obtaining a plurality of new sample data comprising picture samples and text samples, and obtaining guide features based on the new sample data; performing enhanced sampling on the picture samples to obtain a plurality of enhanced samples, and extracting enhanced features of the enhanced samples; combining the guide features and the plurality of enhanced features into a training set, and constructing a continuous differential optimizer to continuously optimize model parameters of the continuous differential optimizer. By obtaining the enhanced samples, diversified training data can be constructed under the premise of ensuring the consistency of the categories, and the reduction of the recognition accuracy caused by the insufficient training data in the small sample continuous learning process is improved; by continuously optimizing the model parameters through the plurality of training sets, the parameter updating process is modeled as a continuous dynamic system, the parameter optimization is smoothly and stably performed in a continuous dynamic law, the historical knowledge structure is effectively maintained, and the catastrophic forgetting is significantly alleviated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a small sample continual learning method and system. BACKGROUND

[0002] With the development of deep learning technology, image classification, target recognition and other tasks have made significant progress. However, the traditional deep learning model usually relies on large-scale, static and fully labeled data sets, and obtains fixed model parameters through one-time training. When the model encounters new classes or new distribution data in the subsequent stage, it often needs to be retrained or fine-tuned, so that the model is difficult to adapt to the new knowledge continuously generated in the real scene. At the same time, directly updating the model on the new task is easy to cause "catastrophic forgetting", that is, the model will significantly reduce the recognition ability of the learned classes when learning new classes.

[0003] To solve this problem, continual learning has gradually attracted attention. Among many continual learning scenarios, few-shot continual learning (FSCL) is a more challenging task, which requires the model to have relatively sufficient basic class data in the initial stage, and only a small amount of samples per class can be obtained in the subsequent incremental session, so that the model can extract effective features from limited new samples while maintaining old knowledge.

[0004] However, the existing small sample continual learning still has the following defects: 1. The model relies on discrete batch optimization process in the incremental session, which cannot depict the continuous evolution law of learning behavior, resulting in unstable optimization trajectory and causing historical knowledge forgetting; 2. The number of new session samples is very small, and repeated use of a small amount of data for training will cause single training signal and reduce recognition accuracy. SUMMARY

[0005] In view of the defects of the prior art, the purpose of the present application is to provide a small sample continual learning method and system, which aims to solve the technical problems of the prior art that the small sample continual learning relies on discrete batch optimization process in the incremental session, cannot depict the continuous evolution law of learning behavior, causes forgetting of historical knowledge, and the number of new session samples is very small and the training data is insufficient.

[0006] In order to achieve the above purpose, in a first aspect, the embodiments of the present application provide a small sample continual learning method, comprising the following steps:

[0007] Obtain a plurality of new sample data arriving in the order of sessions, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtain guided features based on the new sample data;

[0008] enhancement sampling is performed on the picture sample to obtain a plurality of enhancement samples, and an enhancement feature of the enhancement sample is extracted, the enhancement feature corresponding to the guide feature;

[0009] The guide feature and a plurality of the enhancement features are combined into a training set, and a continuous differential optimizer is constructed. Model parameters of the continuous differential optimizer are continuously optimized based on a plurality of the training sets, so that the continuous differential optimizer has recognition ability for a plurality of new samples.

[0010] Further, the step of obtaining a guide feature based on the new sample data comprises:

[0011] Obtaining a picture feature corresponding to the picture sample and obtaining a text feature corresponding to the text sample;

[0012] The picture feature and the text feature are combined into a guide feature based on a conditional generator.

[0013] Further, the step of performing enhancement sampling on the picture sample to obtain a plurality of enhancement samples comprises:

[0014] Extracting an original latent space feature of the picture sample, and applying random disturbance to the original latent space feature to obtain an updated latent space feature;

[0015] The guide feature is used as a first conditional signal of a noise prediction network model, and the updated latent space feature is used as an input value of the noise prediction network model to obtain a predicted noise feature;

[0016] Based on the updated latent space feature and the predicted noise feature, an enhancement sample is obtained.

[0017] Further, the step of continuously optimizing the model parameters of the continuous differential optimizer based on a plurality of the training sets comprises:

[0018] The guide feature of one of the training sets is used as a second conditional signal of the continuous differential optimizer, and the enhancement feature of the training set is used as an input value of the continuous differential optimizer to obtain a dynamic rule of the model parameters of the continuous differential optimizer;

[0019] Based on the dynamic rule, the model parameters are continuously updated to complete a single stage update, and a stage model parameter is obtained.

[0020] Further, after the step of continuously updating the model parameters based on the dynamic rule to complete a single stage update and obtain a stage model parameter, it further comprises:

[0021] The stage model parameters are taken as model parameters of a next training set to repeat the single-stage update and complete continuous optimization to obtain final model parameters.

[0022] Further, the step of taking the enhanced features of the training set as input values of the continuous differential optimizer to obtain a dynamic rule of model parameters of the continuous differential optimizer comprises:

[0023] A prediction loss of each enhanced feature in the training set is obtained, and an average loss is obtained based on a plurality of prediction losses;

[0024] The average loss is back-propagated to obtain an average gradient;

[0025] A dynamic rule corresponding to the model parameters is obtained based on the average gradient.

[0026] Further, the formula for obtaining the prediction loss is:

[0027] ,

[0028] wherein, represents a prediction loss of an i-th enhanced feature in a t-th training set at a m-th time point, represents the i-th enhanced feature in the t-th training set, represents a guide feature, represents model parameters of a continuous differential optimizer corresponding to the t-th training set at the m-th time point, represents a real label corresponding to the t-th training set, represents prediction by the continuous differential optimizer, represents a loss function;

[0029] The expression of the dynamic rule is:

[0030] ,

[0031] wherein, represents a dynamic rule of model parameters of a continuous differential optimizer corresponding to the t-th training set at the m-th time point, represents a learning rate, represents an average gradient of the t-th training set at the m-th time point.

[0032] Further, the formula for obtaining the stage model parameters is:

[0033] ,

[0034] wherein, represents model parameters of a continuous differential optimizer corresponding to the t-th training set at the m-th time point, a stage model parameter of the continuous differential optimizer corresponding to the mth time point of the tth training set, denotes a model parameter of the continuous differential optimizer corresponding to the mth time point of the tth training set, denotes a dynamic law of a model parameter of the continuous differential optimizer corresponding to the mth time point of the tth training set, denotes a time step.

[0035] In a second aspect, the embodiments of the present application provide a small sample continual learning system, which is applied to the small sample continual learning method as described in the first aspect above, and the system comprises:

[0036] The identification module is configured to obtain a plurality of new sample data arriving in a session order, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtain guide features based on the new sample data.

[0037] The expansion module is configured to perform enhanced sampling on the picture samples to obtain a plurality of enhanced samples, and extract enhanced features of the enhanced samples, the enhanced features corresponding to the guide features.

[0038] The execution module is configured to combine the guide features and the plurality of enhanced features into training sets, construct a continuous differential optimizer, and continuously optimize model parameters of the continuous differential optimizer based on the plurality of training sets, so that the continuous differential optimizer has recognition capability for the plurality of new samples.

[0039] In a third aspect, the embodiments of the present application provide a computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the small sample continual learning method as described in the first aspect above when executing the computer program.

[0040] In a fourth aspect, the embodiments of the present application provide a storage medium having a computer program stored thereon, and the computer program is executable by a processor to implement the small sample continual learning method as described in the first aspect above.

[0041] Compared with the prior art, the present application has the beneficial effects that by obtaining the enhanced samples, diversified training data can be constructed under the premise of ensuring category consistency in the case of a small number of picture samples, and the reduction of recognition accuracy caused by insufficient training data in the small sample continual learning process is improved; by continuously optimizing the model parameters through the plurality of training sets, the parameter updating process is modeled as a continuous dynamic system, the parameter optimization is performed in a continuous dynamic law, the historical knowledge structure is effectively maintained, and the catastrophic forgetting is significantly alleviated. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 Flow chart of the small sample continual learning method in the first embodiment of the present application;

[0043] Figure 2 Confusion matrix visualization comparison of the respective recognition results of the small sample continual learning method in the first embodiment of the present application and the traditional method, where a is the traditional method and b is the method in the first embodiment;

[0044] Figure 3 Structural block diagram of the small sample continual learning system in the second embodiment of the present application;

[0045] The following detailed description will further illustrate the present application in combination with the above-mentioned drawings. DETAILED DESCRIPTION

[0046] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. Several embodiments of the present application are shown in the drawings. However, the present application can be realized in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.

[0047] It should be noted that when an element is referred to as being "fixed to" another element, it can be directly on the other element or there can be a middle element. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or there can be a middle element. The terms "vertical", "horizontal", "left", "right", and similar expressions used herein are for illustrative purposes only.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terminology used in the description of the present application herein only for the purpose of describing specific embodiments and is not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the associated listed items.

[0049] Referring to Figure 1 The first embodiment of the present application provides a small sample continual learning method, which comprises the following steps:

[0050] S10: Obtain a plurality of new sample data arriving in the order of conversation, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtain guide features based on the new sample data;

[0051] The new sample data refers to a category that needs to be newly learned. The picture sample and the text sample represent the same content. For example, the picture sample is a picture of a dog, and the text sample is a dog. The purpose of small sample continual learning is to have the ability to recognize pictures of dogs after training.

[0052] The step S10 includes:

[0053] S110: Obtain picture features corresponding to the picture sample and text features corresponding to the text sample;

[0054] S120: Combine the picture features and the text features into guide features based on a condition generator;

[0055] In this embodiment, the picture sample is converted into picture features by an image encoder, and the text sample is converted into text features by a text encoder. Then, the two are combined into guide features by the condition generator. The guide features include semantic-level features and image-level features, forming a comprehensive representation of the new sample data.

[0056] S20: Perform enhanced sampling on the picture sample to obtain a plurality of enhanced samples, and extract enhanced features of the enhanced samples, the enhanced features corresponding to the guide features;

[0057] In small sample continual learning, the number of picture samples in the new sample data is small. Therefore, in order to have more accurate recognition and classification ability, the picture samples need to be expanded based on a small number of picture samples to ensure sufficient training data. The step S20 includes:

[0058] S210: Extract the original latent space features of the picture sample, and apply random disturbance to the original latent space features to obtain updated latent space features;

[0059] The random disturbance refers to a small amount of noise added to the original latent space features, which is different from the original latent space features.

[0060] S220: Take the guide features as a first condition signal of a noise prediction network model, and take the updated latent space features as an input value of the noise prediction network model to obtain predicted noise features;

[0061] The noise prediction network model is used to predict the noise that needs to be removed to make the picture represented by the updated latent space features clearer based on the first condition signal, i.e., the predicted noise features.

[0062] S230: Obtain enhanced samples based on the updated latent space features and the predicted noise features;

[0063] The guiding feature is set as the first conditional signal to ensure that the output result of the noise prediction network model can make the subsequently acquired updated latent space feature semantically faithful to the original latent space feature, but different from the picture sample at the pixel level. In this way, more rich and diverse data can be provided to train the continuous differential optimizer under the premise of ensuring semantic alignment, ensuring the accuracy of its identification. Understandably, by subtracting the predicted noise feature from the updated latent space feature, an enhanced space feature is obtained, and by inputting the enhanced space feature into the decoder, it is converted to the pixel space to form the enhanced sample.

[0064] S30: Combine the guiding feature and a plurality of the enhanced features into a training set, and construct a continuous differential optimizer. The model parameters of the continuous differential optimizer are continuously optimized based on a plurality of the training sets, so that the continuous differential optimizer has identification capability for a plurality of new samples;

[0065] It should be noted that each of the new sample data corresponds to one of the training sets.

[0066] The step S30 comprises:

[0067] S310: The guiding feature of one of the training sets is used as the second conditional signal of the continuous differential optimizer, and the enhanced feature of the training set is used as the input value of the continuous differential optimizer to obtain the dynamic law of the model parameters of the continuous differential optimizer;

[0068] Specifically, the prediction loss of each enhanced feature in the training set is obtained, and the average loss is obtained based on a plurality of the prediction losses.

[0069] The formula for obtaining the prediction loss is:

[0070]

[0071] wherein, represents the prediction loss of the i-th enhanced feature in the t-th training set at the m-th time point, represents the i-th enhanced feature in the t-th training set, represents the guiding feature, represents the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, represents the true label corresponding to the t-th training set, represents the prediction by the continuous differential optimizer, represents the loss function.

[0072] The average loss is backpropagated to obtain an average gradient;​

[0073] After obtaining the average loss, starting from the average loss, the chain rule is used to perform a reverse chain of derivatives to obtain the average gradient.

[0074] The dynamic patterns corresponding to the model parameters are obtained based on the average gradient.

[0075] The expression for the dynamic law is:

[0076] ,

[0077] in, This represents the dynamic behavior of the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point. Indicates the learning rate. Let represent the average gradient of the t-th training set at the m-th time point.

[0078] S320: Based on the dynamic law, the model parameters are continuously updated to complete a single stage update and obtain the stage model parameters;

[0079] The formula for obtaining the stage model parameters is as follows:

[0080] ,

[0081] in, This indicates that the t-th training set is in the t-th position. The stage model parameters of the continuous differential optimizer at each time point This represents the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point. This represents the dynamic behavior of the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point. Indicates the time step.

[0082] Preferably, step S30 further includes:

[0083] S330: Use the model parameters of the stage as the model parameters of the next training set to repeat the single stage update and complete continuous optimization to obtain the final model parameters;

[0084] That is, when processing several training sets (new sample data), each time a new identifiable category is learned, the parameters are updated based on the model parameters after the previous learning to ensure its ability to continuously memorize old knowledge.

[0085] By acquiring the enhanced samples, diversified training data can be constructed under the premise of ensuring category consistency in the case of a small number of picture samples, and the reduction of recognition accuracy caused by insufficient training data in the small sample continuous learning process is improved; the model parameters are continuously optimized by a plurality of training sets, the parameter updating process is modeled as a continuous dynamic system, and the parameter optimization is smoothly and stably performed in a continuous dynamic rule, so that the historical knowledge structure is effectively maintained, and the catastrophic forgetting is significantly alleviated.

[0086] The application is verified on the commonly used data sets CIFAR100, CUB200 and miniImageNet in the classification task, and compared with other learning methods, specifically:

[0087] For CIFAR100 and miniImageNet datasets, first, all training classes are divided into 60 base classes and 40 new classes, the base stage uses all base class samples to train the initial model, and then the 40 new classes are divided into eight consecutive sessions, each session inputs new class samples in the form of 5-way 5-shot to simulate the few-shot incremental learning environment. On the CUB200 dataset, all 200 classes are divided into 100 base classes and 100 new classes, and the new classes are introduced in the form of ten 10-way 5-shot sessions to verify the generalization ability of the method in the fine-grained scene. In terms of network structure, ResNet20 is used as the base feature extraction network for CIFAR100, and ResNet18 is used as the feature extraction network for miniImageNet and CUB200 to ensure that different datasets have stable and unified encoding methods. The continuous differential optimizer is built by three layers of multilayer perception mechanism, which is used to model the gradient flow in the model parameter update process in continuous time to ensure the smooth and stable evolution trajectory of the model parameters between different sessions. The pre-trained StableDiffusionV1.4 is used as the enhanced sampling model in this embodiment, and all its parameters are frozen, and the conditional control is performed through the prompt word "The image depicts a {}", to construct a stable reconstruction prior from the latent space. The balance coefficient γ and the learning rate λ are set to 0.4 and 0.6 respectively, the continuous differential solving time step M is set to 10, and the enhanced sampling strategy includes random cropping, scaling and horizontal flipping strategies. During the training process, the system first trains the initial model parameters using the base classes, and then inputs limited new class samples in each incremental session. After training, the system calculates the Avg, ΔFinal and KR three indicators based on the Top-1 accuracy of each session, where Avg represents the cross-session average performance, ΔFinal represents the performance difference between the final session and the initial session, and KR = AccT / Acc1 represents the knowledge retention rate. The experimental results are shown in Table 1 (miniImageNet), Table 2 (CIFAR100), and Table 3 (CUB200),

[0088] Table 1

[0089] ,

[0090] Table 2

[0091] ,

[0092] Table 3

[0093] ,

[0094] According to the above table, the method of the present application achieves better performance than the prior art in various data sets, proving that the synergistic mechanism of continuous differential optimizer and enhanced sampling can significantly improve the stability and generalization ability of small sample continual learning.

[0095] Ablation experiments were performed on the continuous differential optimizer and enhanced sampling respectively. The experiments were conducted under the same small sample continual learning setting, and the network structure, incremental session division and training strategy were kept consistent to ensure fairness. The results are shown in Table 4 as follows:

[0096] Table 4

[0097] ,

[0098] The ablation results show that when only the basic continual learning model is used, the model performance decreases significantly with the increase of the number of sessions, especially in the later sessions, it is difficult to maintain the recognition ability of the old categories. When the continuous differential optimizer (CDO) is added, the model achieves significant improvement in average performance and knowledge retention rate, indicating that parameter continuous evolution can effectively alleviate the shock and knowledge forgetting caused by discrete optimization, so that the model can integrate new information in a more stable way when new categories come. Further, only adding enhanced sampling (ECS) can also bring obvious benefits. When both are enabled, the model achieves the best performance. The average performance and knowledge retention rate are significantly higher than the results of enabling any single module, indicating that there is complementarity between continuous differential optimization and enhanced sampling: the former provides a stable parameter evolution trajectory, and the latter provides stronger data diversity, and the synergy of the two can maximize the reduction of forgetting and improve the efficiency of absorbing new knowledge.

[0099] Please refer to Figure 2To further analyze the behavior difference of the application in the recognition accuracy of new and old categories, the confusion matrix visualization comparison of the final session classification results of the basic small sample continuous learning and the small sample continuous learning in the application is performed. The diagonal area of the confusion matrix reflects the classification accuracy, the non-diagonal area represents the confusion degree, and the last few categories in the matrix correspond to the new categories introduced in the incremental process. From the comparison of the confusion matrix, it can be observed that the method of the application shows a more obvious, clear and concentrated diagonal line structure in the new category area, indicating that it can accurately identify new category samples under the condition of very few samples, and the prediction distribution is concentrated and the classification boundary is clear. In contrast, the basic model shows obvious scattering phenomenon in this area, and there are more non-diagonal elements, which indicates that it is insufficient to learn new categories, and there is a high confusion rate. In the old category area, the application also shows stronger stability. The confusion matrix shows that the application can maintain the topological structure of the old category feature space, so that it still maintains a high accuracy in the last session, and the non-diagonal misclassification is significantly reduced. Overall, the confusion matrix shows that the application has higher discriminability and lower confusion in the new and old category areas, proving that the application can improve the new category adaptation ability and the old category knowledge retention ability at the same time, further verifying the stability and reliability of the small sample continuous learning method in the application.

[0100] Referring to Figure 3 The second embodiment of the application provides a small sample continuous learning system, which is applied to the small sample continuous learning method in the above-mentioned embodiments, and the description of which has been omitted. As used below, the terms "module", "unit", "sub-unit" and the like can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.

[0101] The system comprises:

[0102] The recognition module 10 is configured to obtain a plurality of new sample data arriving in a session order, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtain guide features based on the new sample data;

[0103] The recognition module 10 comprises:

[0104] The first unit is configured to obtain picture features corresponding to the picture samples and text features corresponding to the text samples;

[0105] The second unit is configured to combine the picture features and the text features into guide features based on a conditional generator;

[0106] An extension module 20 is configured to perform up-sampling on the picture sample to obtain a plurality of enhanced samples, and extract an enhanced feature of the enhanced sample, the enhanced feature corresponding to the guide feature;

[0107] The extension module 20 comprises:

[0108] A third unit is configured to extract an original latent space feature of the picture sample, and apply a random disturbance to the original latent space feature to obtain an updated latent space feature;

[0109] A fourth unit is configured to use the guide feature as a first condition signal of a noise prediction network model, and use the updated latent space feature as an input value of the noise prediction network model to obtain a predicted noise feature;

[0110] A fifth unit is configured to obtain an enhanced sample based on the updated latent space feature and the predicted noise feature.

[0111] An execution module 30 is configured to combine the guide feature and a plurality of the enhanced features into a training set, and construct a continuous differential optimizer, and continuously optimize model parameters of the continuous differential optimizer based on a plurality of the training sets to enable the continuous differential optimizer to have an identification capability for a plurality of new samples.

[0112] The execution module 30 comprises:

[0113] A sixth unit is configured to use a guide feature of one of the training sets as a second condition signal of the continuous differential optimizer, and use an enhanced feature of the training set as an input value of the continuous differential optimizer to obtain a dynamic rule of the model parameters of the continuous differential optimizer.

[0114] The sixth unit is specifically configured to obtain a predicted loss of each of the enhanced features in the training set, obtain an average loss based on a plurality of the predicted losses, perform back propagation on the average loss to obtain an average gradient, and obtain the dynamic rule corresponding to the model parameters based on the average gradient.

[0115] A seventh unit is configured to continuously update the model parameters based on the dynamic rule to complete a single-stage update and obtain a stage model parameter.

[0116] The execution module 30 further comprises:

[0117] An eighth unit is configured to use the stage model parameter as a model parameter of a next training set to repeatedly perform the single-stage update and complete continuous optimization to obtain a final model parameter.

[0118] The application further provides a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the small sample continual learning method as described in the above technical solution when executing the computer program.

[0119] The application further provides a storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the small sample continual learning method as described in the above technical solution.

[0120] In the description of the present specification, the description of the terms ''one embodiment'', ''some embodiments'', ''an example'', ''a specific example'', or ''some examples'' etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0121] The above-described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A small sample continual learning method, characterized in that, The method comprises the following steps: Obtain a plurality of new sample data arriving in a session order, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtain guidance features based on the new sample data, comprising: Obtain picture features corresponding to the picture samples and text features corresponding to the text samples; Combine the picture features and the text features into guidance features based on a conditional generator; Perform enhanced sampling on the picture samples to obtain a plurality of enhanced samples, and extract enhanced features of the enhanced samples, the enhanced features corresponding to the guidance features; Combine the guidance features and a plurality of the enhanced features into a training set, and construct a continuous differential optimizer, continuously optimize model parameters of the continuous differential optimizer based on a plurality of the training set, so that the continuous differential optimizer has recognition ability for a plurality of new samples; The step of continuously optimizing the model parameters of the continuous differential optimizer based on a plurality of the training set comprises: Taking the guidance features of one of the training set as a second conditional signal of the continuous differential optimizer, and taking the enhanced features of the training set as input values of the continuous differential optimizer, to obtain a dynamic rule of the model parameters of the continuous differential optimizer, comprising: Obtain the prediction loss of each enhanced feature in the training set, and obtain the average loss based on a plurality of the prediction loss; The formula for obtaining the prediction loss is: , wherein, represents the predicted loss of the i-th enhanced feature in the t-th training set at the m-th time point, represents the i-th enhanced feature in the t-th training set, represents the guide feature, represents the model parameter of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, represents the true label corresponding to the t-th training set, represents the prediction by the continuous differential optimizer, represents the loss function; Backpropagate the average loss to obtain the average gradient; Obtain the dynamic rule corresponding to the model parameters based on the average gradient; The expression of the dynamic rule is: , wherein, denotes the dynamic law of the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the learning rate, denotes the average gradient of the t-th training set at the m-th time point; Continuously update the model parameters based on the dynamic rule to complete a single stage update, and obtain a stage model parameter.

2. The small sample continual learning method of claim 1, wherein, The step of performing enhanced sampling on the picture samples to obtain a plurality of enhanced samples comprises: Extract the original latent space features of the picture samples, and apply random disturbance to the original latent space features to obtain updated latent space features; Take the guidance features as a first conditional signal of a noise prediction network model, and take the updated latent space features as input values of the noise prediction network model to obtain predicted noise features; Obtain enhanced samples based on the updated latent space features and the predicted noise features.

3. The small sample continual learning method of claim 1, wherein, After the step of continuously updating the model parameters based on the dynamic rule to complete a single stage update and obtain a stage model parameter, it further comprises: Take the stage model parameter as the model parameter of the next training set to repeat the single stage update and complete continuous optimization to obtain a final model parameter.

4. The small sample continual learning method of claim 1, wherein, The formula for obtaining the stage model parameter is: , wherein, denotes the stage model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the stage model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the time step.

5. A small sample continual learning system, applied to the small sample continual learning method of any one of claims 1-4, characterized in that, The system comprises: An identification module for obtaining a plurality of new sample data arriving in a session order, the new sample data comprising picture samples and text samples corresponding to the picture samples, and obtaining guidance features based on the new sample data; The identification module comprises: A first unit for obtaining picture features corresponding to the picture samples and text features corresponding to the text samples; The second unit is configured to combine the picture features and the text features into guide features based on the condition generator. The expansion module is configured to perform enhanced sampling on the picture samples to obtain a plurality of enhanced samples, and extract enhanced features of the enhanced samples, the enhanced features corresponding to the guide features. The execution module is configured to combine the guide features and the enhanced features into a training set, construct a continuous differential optimizer, and perform continuous optimization on model parameters of the continuous differential optimizer based on the training set, so that the continuous differential optimizer has the recognition ability for a plurality of new samples. The execution module includes: The sixth unit is configured to take a guide feature of one of the training sets as a second condition signal of the continuous differential optimizer, and take an enhanced feature of the training set as an input value of the continuous differential optimizer, to obtain a dynamic rule of the model parameters of the continuous differential optimizer. The sixth unit is specifically configured to obtain a prediction loss of each enhanced feature in the training set, obtain an average loss based on a plurality of the prediction losses, perform back propagation on the average loss to obtain an average gradient, and obtain the dynamic rule corresponding to the model parameters based on the average gradient. The formula for obtaining the prediction loss is: , wherein, represents the predicted loss of the i-th enhanced feature in the t-th training set at the m-th time point, represents the i-th enhanced feature in the t-th training set, represents the guide feature, represents the model parameter of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, represents the true label corresponding to the t-th training set, represents the prediction by the continuous differential optimizer, represents the loss function; The expression of the dynamic rule is: , wherein, denotes the dynamic law of the model parameters of the continuous differential optimizer corresponding to the t-th training set at the m-th time point, denotes the learning rate, denotes the average gradient of the t-th training set at the m-th time point; The seventh unit is configured to perform continuous update on the model parameters based on the dynamic rule to complete a single-stage update, and obtain a stage model parameter.

6. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the small sample continuous learning method in any one of claims 1-4.

Citation Information

Patent Citations

  • Road surface accumulated water detection method and device based on incremental learning, medium and equipment

    CN116311103A

  • Method for automatically generating parameters of audio equalizer based on deep learning

    CN119832925A