Active learning method based on variational gradient correction and storage medium
By using variational gradient correctors in active learning to correct historical model deviations and select samples for labeling using uncertainty measurements, the problems of training instability and convergence rate delay in active learning are solved, and higher stability and convergence efficiency are achieved.
Patent Information
- Application Number
- CN202411831346.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing active learning methods have limited small sample size and preference for difficult samples at the beginning of iteration, resulting in bias problems, resulting in training instability and delayed convergence rate.
An active learning method based on variational gradient correction is adopted to correct the deviation of the historical model by training the variational gradient corrector on the unlabeled data, and the unlabeled data with the largest amount of information is selected for labeling using uncertainty measurement methods.
It improves the stability and convergence rate of active learning, alleviates bias problems, and releases the unexplored potential of active learning.
Smart Images

Figure CN119918611A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of data processing technology, and specifically relates to an active learning method and storage medium based on variational gradient correction. Background Art
[0002] Large amounts of labeled data have brought about the remarkable success of most deep neural networks (DNNs) in various tasks, but also brought about the labeling cost that is proportional to the amount of data and the difficulty of labeling. Active Learning (AL) has been committed to achieving the fastest possible convergence rate of DNNs with the smallest possible budget to achieve the expected generalization performance for many years.
[0003] The goal of the AL strategy is to select the "most informative" samples during the human-in-loop process. However, due to the small sample size limitation in the early stages of AL iterations, coupled with active learning's consistent preference for difficult samples, bias issues have emerged. The "bias issue" brings about training instability and a slow convergence rate, which in turn hinders active learning. How to measure and alleviate this bias issue is very important. Summary of the invention
[0004] The technical problem to be solved by the present invention is: in view of the above-mentioned problems in the prior art, the present invention provides an active learning method and storage medium based on variational gradient correction with simple principle, convenient operation and high stability.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: An active learning method based on variational gradient correction, comprising: Step S1: Based on the existing model and its historical version On unlabeled data Training the variational gradient corrector ; Step S2: Model Based on of Train on , correct the deviation of the historical model in the previous active learning iteration and start a new round of iteration; Step S3: Based on and a specific uncertainty measurement method, select the unlabeled data with the largest amount of information from the unlabeled data pool for labeling, and update the labeled data pool .
[0006] As a further improvement of the present invention, in step S1, For After taking measurements and updating via stochastic gradient descent, On training The deviations generated during the period will be "saved" in the memory module; the historical baseline model is averaged using exponential changes Perform a momentum update:
[0007] in, is the EMA decay rate. As a further improvement of the present invention, the correction loss is used renew , the target optimization is as follows: , in, express , express ; and As a correction reference, subject to variational loss Constraints, optimize the following objectives: .
[0008] As a further improvement of the present invention, in step S2, during the correction reception phase, the supervision task loss For update and , optimize the following objectives:
[0009] in, represent , It can also be used as a reference for correction; for classification tasks, is the cross entropy loss. As a further improvement of the present invention, in step S3, during the data selection and labeling phase, the unlabeled samples of The probabilistic prediction is given by:
[0010] in, is the number of classes in the dataset, using To measure Download Sample uncertainty. As a further improvement of the present invention, the samples with the highest uncertainty are sorted and the top samples are selected. Samples are labeled: . As a further improvement of the present invention, a corrector is applied to perform correction to obtain an unlabeled sample. Corrected probability prediction : . As a further improvement of the present invention, based on , measure the sample exist The uncertainty under , and obtain the corrected choice:
[0011] The present invention further provides a storage medium, which can be read by a computer or a processor, and stores a computer program for executing any one of the above methods.
[0012] Compared with the prior art, the advantages of the present invention are: 1. The active learning method and storage medium based on variational gradient correction of the present invention have simple principles, convenient operation and high stability. The present invention proposes an asynchronous alternating iteration framework, which is specifically used to correct the deviations in various uncertainty perception methods, and finally release the untapped potential of active learning.
[0013] 2. The present invention's active learning method and storage medium based on variational gradient correction use latent space state representation to measure the deviation phenomenon and apply training dynamics to the deviation correction process in active learning. Finally, the present invention designs uncertainty consistency adjustment and fluctuation limitation to construct regularization constraints, combining training dynamics with constraints on unlabeled data. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 It is a schematic diagram of the correction process in a specific embodiment of the present invention; Figure 2 It is the overall framework diagram of variational gradient correction in a specific embodiment of the present invention; Figure 3 It is an uncertainty assessment diagram of samples after iteration in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0014] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0015] In the description of the present invention, it should be understood that the terms "side", "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0016] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0017] like Figure 1-Figure 3 As shown, the active learning method based on variational gradient correction of the present invention comprises the following steps: Step S1: Based on the existing model and its historical versions On unlabeled data Training the variational gradient corrector ; Step S2: Model Based on of Train on , correct the deviation of the historical model in the previous active learning iteration and start a new round of iteration; Step S3: Based on and a specific uncertainty measurement method, select the unlabeled data with the largest amount of information from the unlabeled data pool for labeling, and update the labeled data pool .
[0018] like Figure 1 As shown, in each round of correction iteration, the process includes: First, based on the existing model and its historical versions On unlabeled data Training the variational gradient corrector This stage is called the correction memory stage (composed of Figure 1 ).
[0019] Next, the model Based on of Train on , correcting the deviation of the historical model in the previous active learning iteration and starting a new round of iteration. This phase is called the correction reception phase (composed of Figure 1 ).
[0020] Finally, based on and a specific uncertainty measurement method, select the unlabeled data with the largest amount of information from the unlabeled data pool for labeling, and update the labeled data pool This phase is called the data selection and labeling phase (composed of Figure 1 ).
[0021] make Represents the historical baseline model , the grey arrows indicate their historical integration.
[0022] like Figure 1 As shown, the detailed structure of the semi-supervised active learning method based on variational gradient correction of the present invention is shown, wherein By encoder and decoder Similarly, Depend on and The corrector consists of three parts: memory module , bias variable and receiving module .
[0023] The following is a detailed description of the behavior of different modules in the above three stages: Correction memory stage: For After taking measurements and updating via stochastic gradient descent, On training The deviations generated during the period will be "saved" in the memory module. The present invention also uses an exponential change average to historical baseline model Perform a momentum update:
[0024] in is the EMA decay rate. Subsequently, using the modified loss renew Specifically, the target optimization is as follows:
[0025] in express , express . and As a correction reference, subject to variational loss Constraints, specifically optimizing the following objectives: .
[0026] Correction receiving stage: The historical correction information “saved” in the memory module is “received” based on of In a new round of training. Supervision task loss For update and , optimize the following objectives:
[0027] in represent . It can also be used as a reference for correction. For classification tasks, is the cross entropy loss.
[0028] Data selection and labeling phase: The predictions were corrected and the unlabeled samples of The probabilistic prediction is given by:
[0029] in is the number of classes in the dataset. In existing active learning methods, To measure Download Sample The samples with the highest uncertainty are sorted and the top ones are selected. Samples are labeled:
[0030] In the semi-supervised active learning method based on variational gradient correction, the corrector is applied to correct the unlabeled samples. Corrected probability prediction :
[0031] based on , measure the sample exist The uncertainty under , and obtain the corrected choice:
[0032] Leverage the large amount of untapped unlabeled data to approximate the deviation of the distribution of the current labeled data pool from the overall distribution in the data domain. Expressed as latent space variables, the goal is to optimize the following variational lower bound:
[0033] in, express The probability distribution of , KL represents the Kullback-Leibler (KL) divergence. Determine After that, define , , and define The calculation of the corrected prediction distribution in the corrected memory phase is further described as:
[0034] And in the receiving correction stage:
[0035] in, In addition, in order to alleviate the initial stage of correction by The deviation caused by the approximation itself is optimized using the following formula Initialization:
[0036]
[0037] in Represents the parameters for initializing the encoder. The supervised loss Separate the consistency loss from the variational lower bound and finally get the variational loss , expressed as: .
[0038] In a specific application example, the correction loss in the present invention is further It consists of two parts: Uncertainty Consistency Regulation (UCR) and Fluctuation Limitation (FR). UCR is a measure of the consistency of uncertainty levels as an overall metric. For traditional uncertainty metrics that do not employ temporal variance principles (e.g., entropy), samples that exhibit high prediction probabilities for a particular class and low overall instability during the third round of measurements may appear to be easy-to-learn instances with limited utility. However, a closer look at their historical dynamics reveals significant inconsistencies. Traditional semi-supervised methods typically impose distribution-level consistency constraints to enhance model generalization on unlabeled data. In contrast, UCR aims to ensure that the current model and Model The consistency of uncertainty estimates between historical baseline sets is improved, thereby mitigating bias. The following objectives are optimized:
[0039] in, is the inconsistency relaxation coefficient, a small scalar. It should be noted that as the training progresses, exist The overall uncertainty on tends to increase and converge. Therefore, and Should not be strictly aligned uncertainty measure. As a hyperparameter to control convergence. Back-propagation gradients are generated when , because represents the “convergence of the model” and is called “well-behaved inconsistency”. This expectation is relaxed to ,and It is considered a "malignant inconsistency" that needs to be corrected.
[0040] FR is used to measure the consistency at the category level and is a local measure. Even if some samples show consistency in uncertainty measurement, their historical measurements may show different statistical properties or fluctuations. Figure 3 As shown in (c), in three historical iterations, the unlabeled sample is predicted to have consistently low instability, but the results are different. For methods that do not consider training dynamics, even from the perspective of UCR, this sample will not be classified as a hard sample in these rounds. However, as Figure 3 As shown in (d), there is significant fluctuation (standard deviation) between trainings.
[0041] The goal of the present invention is to correct training bias by limiting fluctuations at the classification level. Specifically, the present invention optimizes the following goals:
[0042] in is the volatility relaxation coefficient, a factor similar to In the method of the present invention, we try to limit and In the right Fluctuations in forecasts: When fluctuations occur, even if and Inconsistency, volatility variance It will also present a higher value. When the threshold is exceeded When , the corrected gradient will be back-propagated. Finally, the corrected loss Defined as: (1.21) in and is a hyperparameter used to adjust the scale.
[0043] The present invention further provides a storage medium, which can be read by a computer or a processor and stores a computer program for executing the above method.
[0044] Those skilled in the art should understand that the above-mentioned embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0045] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An active learning method based on variational gradient correction, characterized in that: include: Step S1: Based on the existing model and its historical versions On unlabeled data Training the variational gradient corrector ; Step S2: Model Based on of Train on , correct the deviation of the historical model in the previous active learning iteration and start a new round of iteration; Step S3: Based on and a specific uncertainty measurement method, select the unlabeled data with the largest amount of information from the unlabeled data pool for labeling, and update the labeled data pool .
2. The active learning method based on variational gradient correction according to claim 1, characterized in that: In step S1, For After taking measurements and updating via stochastic gradient descent, On training The deviations generated during the period will be "saved" in the memory module; the historical baseline model is averaged using exponential changes Perform a momentum update: in, is the EMA decay rate.
3. The active learning method based on variational gradient correction according to claim 2, characterized in that: Use Corrected Loss renew , the target optimization is as follows: in, express , express ; and As a correction reference, subject to variational loss Constraints, optimize the following objectives: 。 4. The active learning method based on variational gradient correction according to any one of claims 1 to 3, characterized in that: In step S2, during the correction reception phase, the supervision task loss For update and , optimize the following objectives: in, represent , It can also be used as a reference for correction; for classification tasks, is the cross entropy loss.
5. The active learning method based on variational gradient correction according to claim 4, characterized in that: In step S3, during the data selection and labeling phase, the unlabeled samples of The probabilistic prediction is given by: in, is the number of classes in the dataset, using To measure Download Sample uncertainty.
6. The active learning method based on variational gradient correction according to claim 5, characterized in that: Sort the samples with the highest uncertainty and select the top Samples are labeled: 。 7. The active learning method based on variational gradient correction according to claim 5, characterized in that: Apply the corrector to correct and get the unlabeled sample Corrected probability prediction : 。 8. The active learning method based on variational gradient correction according to claim 7, characterized in that: based on , measure the sample exist The uncertainty under , and obtain the corrected choice: 。 9. A storage medium, which can be read by a computer or a processor, characterized in that: The storage medium stores a computer program for executing any one of the methods in claims 1-8.