Adaptive active learning method based on diversity and uncertainty dynamic balance
An adaptive active learning method using dynamic weights and multi-dimensional evaluation solves the problem of balancing diversity and uncertainty in active learning, optimizes sample selection, improves model accuracy and generalization ability, and reduces annotation costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing active learning methods, when balancing diversity and uncertainty, suffer from poor policy performance due to fixed weights or empirical rules, and insufficient uncertainty assessment makes it difficult to meet model requirements at different training stages, thus affecting model accuracy and generalization ability.
An adaptive active learning method with dynamic weights and multi-dimensional evaluation is adopted. Through unsupervised feature extraction and evidence neural networks, combined with Dirichlet distribution parameters, the sample selection strategy is dynamically adjusted to optimize the sample screening process by comprehensively considering diversity and uncertainty.
It improves sample screening efficiency, reduces annotation costs, enhances the model's generalization ability and prediction accuracy in complex scenarios, and provides high-quality labeled data assurance.
Smart Images

Figure CN121880852A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine learning and deep learning technology, and in particular relates to an adaptive active learning method based on a dynamic balance between diversity and uncertainty. Background Technology
[0002] Active learning is a machine learning method that improves model performance by selectively labeling the most valuable samples. Its core value lies in reducing labeling costs with limited labeling budgets, making it a key technology for solving the labeling bottleneck in deep learning. Currently, active learning methods mainly focus on two dimensions for sample selection: first, uncertainty, which prioritizes samples with the most ambiguous model predictions, as these samples help the model optimize its judgment criteria; and second, diversity, which prioritizes samples with significant feature differences to ensure the model covers a more comprehensive distribution of data features.
[0003] However, many active learning methods focus on only a single dimension: either they only focus on uncertainty, repeatedly selecting samples whose model predictions are fuzzy, resulting in highly similar features and limited coverage of the selected samples, which cannot fully reflect the data distribution; or they only focus on diversity, simply pursuing the differences in sample features, but ignoring the boundary samples that are most critical to improving model performance, and ultimately failing to improve model accuracy due to a lack of targeted optimization.
[0004] Currently, some methods are attempting to integrate uncertainty and diversity, but most methods use fixed weights or empirical rules to balance the two, ignoring the changing needs at different stages of model training. In the early stages of labeling, the model has limited understanding of the data distribution and needs to prioritize covering the feature space with diverse samples; later, once the model has grasped the basic patterns, it needs to focus on optimizing the decision boundary with uncertain samples, and fixed weights lead to poor strategy performance at different stages. On the other hand, existing methods often rely on a single indicator to assess uncertainty, failing to distinguish the sources of uncertainty and resulting in insufficient sampling accuracy, making it difficult to fully leverage the advantages of the fusion strategy. Therefore, designing a dynamic, balanced, and comprehensively evaluated active learning strategy has become an urgent problem to be solved. Summary of the Invention
[0005] The problem this invention aims to solve is how to provide an active learning method that can dynamically balance diversity and uncertainty, comprehensively evaluate the value of sample information, and is both efficient and generalizable.
[0006] To address the aforementioned technical problems, the technical solution adopted by this invention is: an adaptive active learning method based on a dynamic balance between diversity and uncertainty, comprising the following steps: Step 1: Dataset Preparation Data was collected from publicly available online datasets, and after preprocessing and data cleaning, a classification dataset was constructed. The classification dataset was divided into a labeled sample pool and an unlabeled sample pool, and a labeling budget and number of iterations were set for each round.
[0007] The labeled sample pool is divided into training, validation, and test sets.
[0008] Step 2: Train the unsupervised feature extractor: The unsupervised feature extractor was trained using unsupervised contrastive learning on all the image data obtained in step 1.
[0009] Step 3 Training Optimization: The unsupervised feature extractor trained in step 2 is used to extract features from the labeled image data obtained in step 1; the obtained features are processed by an evidence neural network to generate evidence; the evidence is mapped to Dirichlet distribution parameters and combined with the classification labels in the dataset of step 1, and the objective function in evidence deep learning is used as the loss function to train the above evidence neural network; after training, the accuracy on the validation set is saved. Step 4: Selection of unlabeled samples: First, calculate the uncertainty of each sample in the unlabeled sample pool; then use the unsupervised feature extractor trained in step 2 to extract features of the unlabeled samples, select samples with high diversity and assign diversity scores; use dynamic weights to sum the uncertainty and diversity scores to calculate the comprehensive value score of each unlabeled sample, and select the samples with the highest scores for manual labeling. Step 5: Add newly labeled samples to training: Add labeled samples to the training set and return to step 2 until the required number of iterations is reached. This results in a better classification model while reducing labeling costs.
[0010] Beneficial effects This invention optimizes the sample value evaluation logic in traditional active learning methods, improving the efficiency of selecting high-value training samples and enhancing the cost-effectiveness and practicality of machine learning sample annotation. The sample selection mechanism in this invention effectively reduces the annotation cost and time investment in machine learning model training. Accurate determination of sample value significantly improves the model's generalization ability and prediction accuracy in complex scenarios. As an efficient machine learning sample annotation solution, it can provide high-quality labeled data for the iterative upgrade of various AI models. Attached Figure Description
[0011] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a flowchart illustrating the unlabeled sample selection process of this invention; Figure 3 This is an overall block diagram of the present invention. Detailed Implementation
[0012] Figure 1 This invention provides a flowchart of the active learning process for measuring image uncertainty and diversity, calculating sample value scores using dynamic weights, selecting unlabeled samples, and manually labeling them.
[0013] Figure 2 This is a flowchart illustrating the unlabeled sample selection process of this invention.
[0014] Figure 3 This is an overall block diagram of the present invention.
[0015] An adaptive active learning method based on a dynamic balance between diversity and uncertainty includes the following steps (e.g.) Figure 1 ) Step 1, Dataset Preparation; Image data and corresponding labels were collected from hospitals and public datasets. After preprocessing and data cleaning, a classification dataset was constructed. The classification dataset was then divided into an initial annotation set. and unlabeled sample pool .
[0016] The initial annotation set is divided into training set, validation set and test set.
[0017] The initial annotation set size is ,Include Class category. Total number of iterations: .
[0018] Step 2, based on the initial annotation set and unlabeled sample pool The feature extractor is trained using an unsupervised contrastive learning method.
[0019] Each sample in the training batch is used as a query sample; the data augmentation result of the query sample, after flipping, cropping, and brightness / contrast adjustment, is used as a positive sample for that query sample; the other samples in the training batch are used as negative samples for that query sample. The contrastive learning loss function is as follows: in To query samples, for The corresponding positive samples, In the current batch, excluding External samples.
[0020] Step 3, based on the annotation set Train the evidence neural network.
[0021] In this embodiment, the evidence neural network uses the Softplus activation function instead of the Softmax activation function of a regular neural network. The loss function adopts the objective function commonly used in Evidential Deep Learning (EDL): in For cross-entropy loss, For the sample one-hot tag, Dirichlet strength, For the Digamma function; in the KL divergence term (i.e., removing evidence of the correct category) These are the hyperparameter coefficients.
[0022] After training is complete, the accuracy of the trained evidence neural network is evaluated on the validation set.
[0023] Step 4, for the unlabeled sample pool Each sample The specific steps for calculating uncertainty are as follows: Step 4.1 Use the evidence neural network trained in Step 3 to predict unlabeled samples, calculate cognitive uncertainty and accidental uncertainty, and obtain the total uncertainty: The evidence neural network model takes samples as input and outputs evidence vectors. ,calculate and Dirichlet strength .
[0024] Computational cognitive uncertainty: ,in This represents the total number of categories.
[0025] Calculate random uncertainty: First, calculate the quality of beliefs for each class. Then, the random uncertainty of the sample is calculated: The relative belief mass balance function for: Then calculate the total uncertainty. ,in λ The uncertainty balance coefficient is the ratio of the number of labeled samples to the total number of samples.
[0026] Step 4.2 Calculate the diversity score: Adopted in and The feature extractor performs unsupervised contrastive learning to extract sample features. , is the dimension of the feature space.
[0027] calculate Similarity matrix ,in .
[0028] Based on the calculated similarity matrix, a fast k-DPP algorithm based on a greedy algorithm is used to filter out dissimilar samples and output diversity scores. =1 (selected sample) or 0 (unselected sample).
[0029] Step 4.3 Calculate the dynamic weights and overall value score. The specific steps are as follows: Based on the current iteration round Accuracy on previous rounds of validation sets Calculate the diversity weight: in For truncation functions: Uncertainty weights .
[0030] Calculate the composite value score for each sample. And select the top scorers The samples (of which a manually specified number) are labeled to obtain the current labeled set. .
[0031] Step 5: Update the labeled sample pool after manual labeling. Unlabeled sample pool “ "" represents the difference between two sets.
[0032] Retrain the model based on the newly labeled sample pool, and repeat steps 3 to 4 until the manually set number of iterations is reached.
[0033] Example First, a deep feature extractor is trained using unsupervised contrastive learning with all image data (including both labeled and unlabeled portions). This module can capture discriminative features in the images without relying on labels, forming high-quality feature representations, and its feature extraction weights remain fixed in subsequent steps.
[0034] During the training phase, an evidence neural network is constructed. Labeled samples are processed by a feature extraction module to obtain high-dimensional feature vectors, which are then input into an evidence generation module to produce evidence values for each category. Further, these evidence values are mapped to Dirichlet distribution parameters, and the objective function in evidence deep learning is calculated in conjunction with the real labels. The network parameters are then optimized through backpropagation. After each training round, the classification accuracy on the validation set is recorded for subsequent dynamic weighted calculations.
[0035] In the sample selection phase, a trained evidence neural network is used to predict unlabeled samples, calculating their cognitive uncertainty and accidental uncertainty separately, and fusing them to obtain the total uncertainty. Simultaneously, an unsupervised feature extractor is used to extract sample features, and the diversity of the sample set is evaluated based on a matrix-determinant process algorithm, assigning a diversity score to each sample. Next, dynamic weights are calculated based on the validation set accuracy, and the uncertainty score and diversity score are weighted and fused to generate a comprehensive value score for each sample. The N samples with the highest scores are selected for manual labeling. Newly labeled samples are then incorporated into the training set for the next training iteration. This process is repeated until a preset number of iterations T is reached, ultimately yielding a high-performance classification model.
[0036] This embodiment was tested on the CIFAR-10 dataset and compared with mainstream active learning methods, including: random, DBAL, BALD, Coreset, BADGE, Entropy, TypiClust, BalEntAcq, and GauSS.
[0037] Among them, the random method randomly selects samples for labeling; DBAL, BALD, Entropy, and BalEntAcq are methods based on uncertainty; Coreset and TypiClust are methods based on diversity; BADGE is a method that combines uncertainty and diversity; and GauSS is a method based on Gaussian processes.
[0038] The comparison metric is classification accuracy. The results are shown in Table 1. It is evident that the proposed method consistently achieves higher accuracy than other comparative methods across different numbers of labeled samples. The method of this invention demonstrates significant advantages.
[0039] Table 1 Comparison Test Results The above description is merely a description of preferred embodiments of this application and is not intended to limit the scope of this application in any way. Any changes or modifications made by those skilled in the art based on the above-disclosed technical content should be considered as equivalent and valid embodiments and fall within the scope of protection of the technical solution of this application.
Claims
1. An adaptive active learning method based on a dynamic balance between diversity and uncertainty, characterized in that, Includes the following steps: Step 1: Dataset Preparation Data was collected from publicly available online datasets, and after preprocessing and data cleaning, a classification dataset was constructed. The classification dataset is divided into a labeled sample pool and an unlabeled sample pool, and the labeling budget and iteration rounds are set for each round. Divide the labeled sample pool into training, validation, and test sets; Step 2: Train the unsupervised feature extractor: The unsupervised feature extractor was trained using unsupervised contrastive learning on all the image data obtained in step 1. Step 3 Training Optimization: The unsupervised feature extractor trained in step 2 is used to extract features from the labeled image data obtained in step 1; the obtained features are processed by an evidence neural network to generate evidence; the evidence is mapped to Dirichlet distribution parameters and combined with the classification labels in the dataset of step 1, and the objective function in evidence deep learning is used as the loss function to train the above evidence neural network; after training, the accuracy on the validation set is saved. Step 4: Selection of unlabeled samples: First, calculate the uncertainty of each sample in the unlabeled sample pool; then use the unsupervised feature extractor trained in step 2 to extract features of the unlabeled samples, select samples with high diversity and assign diversity scores; use dynamic weights to sum the uncertainty and diversity scores to calculate the comprehensive value score of each unlabeled sample, and select the samples with the highest scores for manual labeling. Step 5: Add newly labeled samples to training: Add labeled samples to the training set and return to step 2 until the required number of iterations is reached. This results in a better classification model while reducing labeling costs.
2. The adaptive active learning method based on a dynamic balance between diversity and uncertainty as described in claim 1, characterized in that, Step 1 specifically involves collecting image data and corresponding labels from hospitals and public datasets, and constructing a classification dataset after preprocessing and data cleaning; the classification dataset is then divided into an initial annotation set. and unlabeled sample pool ; The initial annotation set is divided into training, validation, and test sets; The initial annotation set size is ,Include Class category, total number of iterations is .
3. The adaptive active learning method based on a dynamic balance between diversity and uncertainty as described in claim 2, characterized in that, Step 2 specifically involves, based on the initial annotation set... and unlabeled sample pool The feature extractor is trained using an unsupervised contrastive learning method. Each sample in the training batch is used as a query sample; the data augmentation result of the query sample after flipping, cropping, and adjusting brightness and contrast is used as a positive sample for that sample; the other samples in the training batch are used as negative samples for that query sample; the contrastive learning loss function is as follows: in To query samples, for The corresponding positive samples, In the current batch, excluding External samples.
4. The adaptive active learning method based on a dynamic balance between diversity and uncertainty as described in claim 3, characterized in that, In step 3, The evidence neural network uses the Softplus activation function, and the loss function is: in For cross-entropy loss, For the sample one-hot tag, Dirichlet strength, For the Digamma function; in the KL divergence term (i.e., removing evidence of the correct category) These are hyperparameter coefficients; After training is complete, the accuracy of the trained evidence neural network is evaluated on the validation set.
5. The adaptive active learning method based on a dynamic balance between diversity and uncertainty as described in claim 4, characterized in that, Step 4 is detailed below: Step 4.1 Use the evidence neural network trained in Step 3 to predict unlabeled samples, calculate cognitive uncertainty and accidental uncertainty, and obtain the total uncertainty: The evidence neural network model takes samples as input and outputs evidence vectors. ,calculate and Dirichlet strength ; Computational cognitive uncertainty: ,in This represents the total number of categories; Calculate random uncertainty: First, calculate the quality of beliefs for each class. Then, the random uncertainty of the sample is calculated: The relative belief mass balance function for: Then calculate the total uncertainty. ,in λ The uncertainty balance coefficient is the ratio of the number of labeled samples to the total number of samples. Step 4.2 Calculate the diversity score: Adopted in and The feature extractor performs unsupervised contrastive learning to extract sample features. , The dimension of the feature space; calculate Similarity matrix ,in ; Based on the calculated similarity matrix, a fast k-DPP algorithm based on a greedy algorithm is used to filter out dissimilar samples and output diversity scores. =1 or 0, corresponding to selected and unselected samples, respectively; Step 4.3 Calculate the dynamic weights and overall value score. The specific steps are as follows: Based on the current iteration round Accuracy on previous rounds of validation sets Calculate the diversity weight: in For truncation functions: Uncertainty weights ; Calculate the composite value score for each sample. and select the top scorers The samples were labeled to obtain the current label set. .
6. The adaptive active learning method based on a dynamic balance between diversity and uncertainty as described in claim 5, characterized in that, Step 5 is as follows: The labeled sample pool is updated after manual labeling. Unlabeled sample pool " " represents the difference between two sets; Retrain the model based on the newly labeled sample pool, and repeat steps 3 to 4 until the manually set number of iterations is reached.