A batch active learning method based on multiple candidate sets
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本发明提出了一种基于多候选集的批量式主动学习方法,用于解决单候选集混合策略主动学习方法中难以衡量两种策略使用比例的问题
[0031]本发明的有益效果:本发明通过使用多组预候选集的方式实现对基于混合策略的主动学习中两类方法的平衡;通过综合多组预候选集筛选结果增强主动学习策略的鲁棒性和稳定性;通过使用卷积神经网络提取特征并贪婪寻找样本的方式增强主动学习策略中多样性筛选的有效性;通过投票筛选的方式避免排序算法对主动学习策略带来的影响。
Smart Images

Figure CN116049718B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of active learning technology, specifically to a batch active learning method based on multiple candidate sets. Background Technology
[0002] Deep learning model training typically requires massive amounts of labeled data. However, in real-world scenarios, labeling is costly, making it impossible to label all samples; only a limited number of labeled samples can be used. Active learning is a viable solution, aiming to maintain model performance using a limited number of labeled samples. The core issue of this type of method is how to design sample selection strategies. In the context of deep learning, active learning methods first select a batch of samples in each iteration, label them, and then retrain. Research on strategies mainly stems from two ideas: sample diversity and sample uncertainty. The former usually involves designing an evaluation metric, such as the distance from a sample to the classification boundary or Bayesian uncertainty, to score and rank unlabeled samples. The latter focuses more on the distribution of sample data, avoiding sample redundancy, and using sample features to select representative samples.
[0003] Existing strategies, aiming to ensure both diversity and uncertainty in the selected samples and avoid the shortcomings of a single strategy, combine these two approaches: first, using an uncertainty-based pre-screening method, and then refining the screening results with a diversity strategy. However, these methods only use a single candidate set, making it difficult to balance the proportion of the two strategies used in different scenarios, potentially leading to worse screening results than random strategies. Furthermore, the data requirements of the model vary across different datasets and network structures. A small pre-candidate set may result in redundancy in the selected set, while a large candidate set may lead to insufficient information. Summary of the Invention
[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0005] This invention proposes a batch active learning method based on multiple candidate sets to solve the problem of difficulty in measuring the ratio of the two strategies used in single-candidate set hybrid strategy active learning methods.
[0006] To solve the above technical problems, the present invention provides the following technical solution: a batch active learning method based on multiple candidate sets, comprising: training a classification model using labeled pool samples, extracting sample features using the classification model, and using an optimal minus suboptimal edge strategy to filter samples to obtain a pre-candidate set;
[0007] The pre-candidate set is filtered based on the distance between samples to obtain a sub-core candidate set;
[0008] The sub-core candidate sets are voted on and filtered to obtain the sample sets that meet the sample budget as the candidate sets to be labeled.
[0009] The samples in the candidate set to be labeled are labeled, and the sample screening steps are repeated after adding the samples to the labeling pool until the active learning screening target is reached or the labeling budget is exhausted, so as to obtain the final screening set and classification model.
[0010] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, the step of extracting sample features using a classification model includes: after training the classification model is completed, using the classification model f L For all samples in the unlabeled pool, perform data prediction, extract the softmax layer and hidden layer vectors for each sample, and then use the classification model f. L Data prediction is performed on the labeled samples, and the feature vector of the labeled set is extracted using the hidden layer in the classification model.
[0011] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, the step of using the optimal minus suboptimal edge strategy to screen samples and obtain a pre-candidate set includes: calculating the uncertainty of each sample using the optimal minus suboptimal edge strategy, sorting the uncertainty results of each sample according to the following order, and selecting (k0+n)b with the highest uncertainty. once A large sample set is formed from b samples. once This represents the budget for a single screening, where a total of (n+1) pre-candidate sets are selected, with the size of these pre-candidate sets increasing by b in sequence. once The minimum is k0 times the single budget, and the maximum is (k0+n) times.
[0012] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, the step of using the optimal minus suboptimal edge strategy to filter samples and obtain a pre-candidate set further includes: performing cyclic training on the large sample set, removing the b with the lowest uncertainty each time. once For each sample, after looping n times, n+1 pre-candidate sets are obtained. in, U represents the unlabeled pool, k0 represents the minimum single budget of the pre-candidate set, i represents the number of filtering iterations, and M() represents the uncertainty-based filtering strategy, which is used to filter out the batch of samples with the highest uncertainty from the sample set.
[0013] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, wherein: the filtering of the pre-candidate set based on the distance between samples includes:
[0014] Calculate the distance of each unlabeled sample from the current labeled set and record it in the distance array D;
[0015] Sort the distance array D and select the candidate set. The farthest sample x in the mid-distance labeled set L u and x u Add to the new candidate set S';
[0016] Compute candidate set From each sample to sample x u The distance is compared with the distance in the distance array D. If the candidate set... From a certain sample to sample x u If the distance is smaller than the distance in distance array D, then update the distance array D with the smaller distance.
[0017] Sort the updated distance array D, and then select the sample x that is furthest away from it. u As samples to be added to the new candidate set; repeat (b) once -1) times, obtain samples of size b selected based on sample diversity. once Sub-core candidate set;
[0018] For the pre-candidate set Each sample in Calculate the distance between samples and repeat the above steps until you obtain (n+1) samples of size b. once The sub-core candidate set.
[0019] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, wherein: calculating the distance of each unlabeled sample to the current labeled set includes:
[0020] From the candidate set Selected samples Calculate its relationship with each sample in the labeled set L. Cosine similarity, which is the distance between samples, is calculated using the following formula:
[0021] Sort the calculated distances and select the smallest distance as the sample. Distance to the labeled set L;
[0022] Repeat the above steps to calculate the candidate set. The distance from each sample to the labeled set L is calculated and recorded in the distance array D.
[0023] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, the step of voting on the sub-core candidate set includes: selecting the final (n+1) candidates of size b. once The sub-core candidate set in the pre-candidate set In the online voting, the count is incremented by 1 for each selected sample, resulting in a length of (k0+n)b. once The voting result vector V vote .
[0024] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, wherein: obtaining the candidate set to be labeled includes: processing V vote Sort the voting results and select b with the most votes. once b samples are used as the screening results; if there is a tie, multiple random samplings are performed on these tied samples to ensure that the number of selected samples is b. once , which serves as the final selected candidate set S to be labeled.
[0025] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, it further includes: measuring the performance of the classification model using an error function, wherein the error function is expressed as:
[0026]
[0027] In the formula, It is used to evaluate whether the training results are consistent with the truth. Test represents the test set.
[0028] As a preferred embodiment of the batch active learning method based on multiple candidate sets described in this invention, the active learning selection target is represented as:
[0029]
[0030] In the formula, The final selection target is a set of b ideal samples that yield the best results. This indicates the model obtained after selecting a batch of b samples and training it.
[0031] The beneficial effects of this invention are as follows: This invention achieves a balance between the two types of methods in active learning based on a hybrid strategy by using multiple sets of pre-candidate sets; enhances the robustness and stability of the active learning strategy by integrating the screening results of multiple sets of pre-candidate sets; enhances the effectiveness of diversity screening in the active learning strategy by using convolutional neural networks to extract features and greedily search for samples; and avoids the influence of ranking algorithms on the active learning strategy by using a voting screening method. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0033] Figure 1 A flowchart illustrating an overall process for a batch active learning method based on multiple candidate sets, provided as an embodiment of the present invention;
[0034] Figure 2 A model structure diagram of the MNIST dataset provided in one embodiment of the present invention;
[0035] Figure 3 This diagram illustrates the experimental results of three image datasets provided in one embodiment of the present invention, as well as the comparison results with other methods. In the diagram, a, b, and c represent the experimental results on the MNIST, FashionMNIST, and CIFAR-10 datasets. The horizontal axis represents the number of samples used by the strategy, and the vertical axis represents the prediction accuracy of the corresponding trained model. Different curves represent different selection strategies.
[0036] Figure 4 The figure shows experimental results on different imbalanced CIFAR-10 datasets, as provided in one embodiment of the present invention.
[0037] Figure 5 The figure shows the comparison results of the multi-candidate set strategy and the single-candidate set strategy provided by an embodiment of the present invention on image datasets. The figures show the comparative experimental results of the BMMC and DRAL methods with different hyperparameter settings on the MNIST, FashionMNIST and CIFAR-10 datasets. Detailed Implementation
[0038] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0041] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0042] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0043] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0044] Example 1
[0045] Reference Figure 1As an embodiment of the present invention, a batch active learning method based on multiple candidate sets is provided, comprising:
[0046] S1: Train a classification model using labeled pool samples, extract features from unlabeled pool samples based on the classification model, and use the optimal minus suboptimal edge strategy to filter samples and obtain a pre-candidate set.
[0047] Specifically, a classification model f is trained using all the image data in the label pool. L And through the error function: Err(f L )=∑ (x,y)∈Test [1-equal(f L The performance of a classification model is measured using [x, y)]. It is used to evaluate whether the training results are consistent with the truth. Test represents the test set.
[0048] Furthermore, once the training is complete, the classification model f can be used... L For all samples in the unlabeled pool, perform data prediction, extract the softmax layer and hidden layer vectors for each sample, and then use the classification model f. L Predict the labeled set and extract the feature vector of the labeled set using the hidden layer in the classification model.
[0049] It should be noted that the set of labeled samples in the label pool is defined as the label set, and the label set corresponds one-to-one with the labeled sample.
[0050] Furthermore, the uncertainty of each sample is calculated using the optimal minus suboptimal margin strategy, expressed as:
[0051]
[0052] It should be noted that this type of strategy evaluates the results by calculating the probability difference between the two classes with the highest classification probabilities in the prediction results. The smaller the difference between the two classes, the more difficult it is to distinguish the samples.
[0053] Furthermore, the uncertainty results of each sample are sorted from highest to lowest according to the criteria, and the sample with the highest uncertainty (k0+n)b is selected. once There are samples, of which b once This represents the budget for a single screening, where a total of (n+1) pre-candidate sets are selected, with the size of these pre-candidate sets increasing by b in sequence. once The minimum is k0 times the single budget, and the maximum is (k0+n) times.
[0054] Furthermore, the selected (k0+n)b has the greatest uncertainty. once A large sample set is constructed from a group of samples. This large sample set is then used for iterative training, with each iteration removing the sample with the lowest uncertainty (b).once After iterating through each sample n times, n+1 candidate sets are obtained. in,
[0055]
[0056] S2: Filter the pre-candidate set based on the distance between samples to obtain the sub-core candidate set.
[0057] Furthermore, the distance of each unlabeled sample to the current labeled set is calculated, and the specific steps are as follows:
[0058] Step 1: From the candidate set Selected samples Calculate its relationship with each sample in the labeled set L. Cosine similarity, which is the distance between samples, is calculated using the following formula:
[0059] Step 2: Sort the distances calculated in Step 1 in descending order, and select the smallest distance as the sample. Distance to the labeled set L;
[0060] Step 3: Repeat steps 1 and 2 to calculate the candidate set. The distance from each sample to the labeled set L is calculated and recorded in the distance array D.
[0061] Furthermore, the numbers in the distance array D are sorted to select the candidate set. The farthest sample x in the mid-distance labeled set L u and x u Add to the second candidate set S'.
[0062] Furthermore, calculate the candidate set. From each sample to sample x u The distance is compared with the distance in the distance array D. If the candidate set... From a certain sample to sample x u If the distance is smaller than the distance in distance array D, then the smaller distance is updated in distance array D to update distance array D.
[0063] Furthermore, sort the updated distance array D and select the sample x that is furthest away. u , as samples to be added to the new candidate set.
[0064] Furthermore, for each new sample x acquired... u Adding a sample to the candidate set requires calculating the distance between the candidate set and the new sample, updating the distance array, and repeating this process (b). onceAfter -1) times, obtain the sub-core candidate set of size b, which is selected based on sample diversity. once .
[0065] Furthermore, for the pre-candidate set Each sample in Calculate the distance between samples and repeat the above steps until you obtain (n+1) samples of size b. once The sub-core candidate set.
[0066] S3: Combine the sub-core candidate sets and perform voting on the largest pre-candidate set to obtain the sample set that meets the sample budget as the candidate set to be labeled.
[0067] Furthermore, the final (n+1) elements of size b once The sub-core candidate set in In the online voting, the count is incremented by 1 for each selected sample, resulting in a length of (k0+n)b. once The voting result vector V vote .
[0068] Furthermore, regarding V vote Sort the voting results and select b with the most votes. once A sample is used as the screening result; if a tie occurs, these tied samples are randomly sorted, and the remaining samples to be screened are selected. This process is repeated multiple times, and the samples selected most frequently are selected. It is guaranteed that the number of selected samples is b. once , which serves as the final selected candidate set S to be labeled.
[0069] It should be noted that the reason for conducting multiple random samplings of some of the flat ticket samples is to avoid the sorting algorithm affecting the screening results and to ensure the reliability of the sample set.
[0070] S4: Label the samples in the candidate set to be labeled, and add the samples to the labeling pool to obtain new labeling pool samples. Repeat the sample screening steps until the active learning screening target is reached or the labeling budget is exhausted.
[0071] Furthermore, the obtained candidate set to be labeled is removed from the unlabeled pool; and all samples in the candidate set to be labeled are labeled and added to the label pool L after labeling.
[0072] Furthermore, the above-mentioned candidate set selection steps are repeated using the updated label pool L, and the candidate set S is updated to the selection result S. result This continues until the active learning selection target is reached or the labeling budget is exhausted, resulting in the final selection set and the final classification model.
[0073] The active learning selection objective can be represented as:
[0074]
[0075] In the formula, The final selection target is a set of b ideal samples that yield the best results. This indicates the model obtained after selecting a batch of b samples and training it.
[0076] It should be noted that when the selected sample set meets the active learning selection objective, it indicates that the selected batch of b samples can minimize the error of the trained classification model, and the obtained classification model has good performance.
[0077] It should also be noted that the final selected set is the target result of the active learning selection strategy. Labeling only this portion of the samples is sufficient to train the theoretically best-performing model. The resulting classification model is trained using this selected set, which is also the final output of the active learning strategy. Using the selected samples, a task model with good classification performance can be obtained.
[0078] Example 2
[0079] Reference Figures 1-5 As an embodiment of the present invention, a batch active learning method based on multiple candidate sets is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0080] Experiments were conducted on the MNIST, FashionMNIST, and CIFAR-10 datasets. The network model used in the MNIST dataset experiments was as follows: Figure 2 The diagram shows a simple two-layer neural network where a linear layer of length 50 is added before the final softmax layer to extract hidden features from the samples. The networks for the other two datasets are based on ResNet18, with linear hidden layers added before the softmax layer used for output to represent the feature vectors of the samples.
[0081] Experimental results on the three original datasets are as follows Figure 3As shown in the figure, the horizontal axis represents the number of samples, and the vertical axis represents the prediction accuracy of the corresponding filtered model on the test set. Compared with the most commonly used random sampling strategy, the BMMC method improves the training accuracy of the final sample set on the three datasets by 2.74%, 2.21%, and 4.22%, respectively. Comparing the performance change curves, it can be found that when using a smaller budget, the accuracy of the general method increases rapidly, but the slope of the curve drops rapidly in the later stages. Although the BMMC method does not reach optimal performance in the early stages, it can still ensure stable performance growth in the later stages of iteration due to the higher quality of the multiple pre-candidate sets it uses. This experiment verifies that on basic image tasks, the BMMC method has better screening performance than general baseline methods.
[0082] In addition to verifying the final screening effect of the method, to verify whether the selected samples are sufficiently representative, the finally trained model was used again to predict the samples in the unlabeled pool after screening, and the accuracy of the prediction results was calculated. The higher the accuracy, the better the representativeness of the currently screened sample set is, and the more representative it is of the entire dataset. As shown in Table 1, it can be seen that the model trained on the samples selected using the BMMC method performs most representatively on the remaining unselected samples, especially on the MNIST dataset, where the actual prediction accuracy is close to 100%. This indicates that under the same budget, it is difficult to further improve the model performance using the remaining unlabeled data after screening with the BMMC method.
[0083] Table 1. Prediction accuracy of each screening strategy in the remaining unlabeled pool.
[0084]
[0085] Experiments were conducted on the four imbalanced CIFAR10 datasets described in Table 2, and the results are as follows: Figure 4As shown in the diagram. Comparing the performance of several methods, it can be seen that the BMMC method significantly outperforms the other baseline methods in prediction accuracy throughout the entire process. Compared with uncertainty methods, the prediction accuracy is improved by 2.8%, 1.09%, 2.5%, and 4.93%, respectively; compared with diversity methods, the accuracy is improved by 3.8%, 0.67%, 2.3%, and 1.75%, respectively. First, observe the CIFAR10-IM0 experiment. This part of the data setting is the closest to the complete dataset, and because the data deletion is relatively small, it can also provide the most information. On this dataset, it can be seen that the BMMC method achieves the greatest lead, while other methods, which originally performed well on the complete dataset, show a significant performance drop on this slightly missing data. This also reflects the good adaptability of the BMMC method. On other imbalanced datasets, due to the deletion of too many samples, a lot of information is lost, causing the performance ceiling of the dataset itself to drop too much, making it impossible for any strategy to achieve good screening performance. The BMMC method combines the advantages of two types of strategies. Because it is a two-stage strategy, it can take into account the sample distribution. Because it aggregates multiple screening results and fully considers the needs of the model, this experiment shows that the BMMC method is less affected by the distribution of sample data, performs well on different imbalanced datasets, and has strong robustness.
[0086] Table 2. Category Distribution of Imbalanced CIFAR10 Sample Data
[0087]
[0088] Finally, the performance of the general two-stage method with a single pre-candidate set and the BMMC method were compared on different datasets, such as... Figure 5As shown, the DRAL and BMMC methods are compared. DRAL is a two-stage method based on sample redundancy. It first uses an uncertainty method to select a large pre-candidate set, and then uses a redundancy method for further selection. On the MNIST dataset, DRAL4 performs relatively well, approaching the BMMC method. On the other two datasets, DRAL6 performs better, but ultimately, DRAL's performance is inferior to BMMC on all three datasets. This shows that DRAL with fixed parameters is not applicable to all datasets because the data features and training models differ on each dataset, resulting in different suitable hyperparameters that cannot be determined through hyperparameters alone. BMMC, on the other hand, integrates information from different pre-candidate sets. While its performance is slightly worse than DRAL4 in the early stages of iteration, it becomes more effective in later training stages when the model requires more diverse samples. Since simpler samples have already been sufficiently trained, the function of multiple pre-candidate sets becomes apparent. This experiment demonstrates that the BMMC strategy, by considering high-confidence samples that are difficult to train, achieves relatively stable results on different datasets for challenging tasks, making it more reliable than the typical single-candidate-set two-stage method.
[0089] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A batch active learning method based on multiple candidate sets, characterized in that, Applied to image classification tasks, including: A classification model is trained using labeled pool samples, sample features are extracted using the classification model, and a pre-candidate set is obtained by filtering samples using the optimal suboptimal edge reduction strategy. The pre-candidate set is filtered based on the distance between samples to obtain a sub-core candidate set; The sub-core candidate sets are voted on and filtered to obtain the sample sets that meet the sample budget as the candidate sets to be labeled. The samples in the candidate set to be labeled are labeled, and the samples are added to the labeling pool. The sample screening steps are repeated until the active learning screening target is reached or the labeling budget is exhausted, and the final screening set and classification model are obtained. The step of using the optimal minus suboptimal edge strategy to screen samples and obtain a pre-candidate set includes: calculating the uncertainty of each sample using the optimal minus suboptimal edge strategy, sorting the uncertainty results of each sample, and selecting the sample with the highest uncertainty. A large sample set is formed from these samples. This represents the budget for a single screening, selecting a total of n+1 pre-candidate sets, with the sizes of these pre-candidate sets increasing sequentially. The minimum is the single-time budget. Times, the largest is +n times; The step of using the optimal minus suboptimal edge strategy to screen samples and obtain a pre-candidate set further includes: performing iterative training on the large sample set, removing samples with the lowest uncertainty each time. Given n samples, iterate n times to obtain n+1 pre-candidate sets. ,in, , Indicates the unlabeled pool. This represents the minimum single-round budget for the pre-candidate set. Indicates the number of filtering iterations. This represents a screening strategy based on uncertainty, used to select the batch of samples with the highest uncertainty from the sample set; The distance between samples is the distance of each unlabeled sample from the current labeled set.
2. The batch active learning method based on multiple candidate sets as described in claim 1, characterized in that: Extracting sample features using the classification model includes: after training the classification model is complete, using the classification model... For all samples in the unlabeled pool, perform data prediction, extract the softmax layer and hidden layer vectors for each sample, and then use a classification model. Data prediction is performed on the labeled samples, and the feature vector of the labeled set is extracted using the hidden layer in the classification model.
3. The batch active learning method based on multiple candidate sets as described in claim 2, characterized in that: The filtering of the pre-candidate set based on the distance between samples includes: Calculate the distance of each unlabeled sample from the current labeled set and record it in the distance array D; Sort the distance array D and select the candidate set. The farthest sample in the mid-distance labeled set L and will Add to the new candidate set S'; Compute candidate set From each sample to the sample The distance is compared with the distance in the distance array D. If the candidate set... A certain sample to a sample If the distance is smaller than the distance in distance array D, then update the distance array D with the smaller distance. Sort the updated distance array D, and then select the sample with the furthest distance. As samples to be added to the new candidate set; repeat the process. After that, obtain samples of different sizes based on sample diversity. Sub-core candidate set; For the pre-candidate set Each sample in Calculate the distance between samples and repeat the above steps to finally obtain... The size is The sub-core candidate set.
4. The batch active learning method based on multiple candidate sets as described in claim 3, characterized in that: The calculation of the distance of each unlabeled sample from the current labeled set includes: From the candidate set Selected samples Calculate its relationship with each sample in the labeled set L. Cosine similarity, which is the distance between samples, is calculated using the following formula: ; Sort the calculated distances and select the smallest distance as the sample. Distance to the labeled set L; Repeat the above steps to calculate the candidate set. The distance from each sample to the labeled set L is calculated and recorded in the distance array D.
5. The batch active learning method based on multiple candidate sets as described in claim 1 or 4, characterized in that: The sub-core candidate set is voted on and filtered, including: the final obtained... The size is The sub-core candidate set in the pre-candidate set Voting is conducted online, and the count is incremented by 1 for each selected sample, resulting in a length of... Voting result vector .
6. The batch active learning method based on multiple candidate sets as described in claim 5, characterized in that: Obtaining the candidate set to be labeled includes: Sort the voting results and select the one with the most votes. One sample is used as the screening result; if there is a tie, multiple random samplings are performed on these tied samples to ensure that the number of selected samples is [number missing]. , which serves as the final selected candidate set S to be labeled.
7. The batch active learning method based on multiple candidate sets as described in claim 1, characterized in that: Also includes: The performance of a classification model is measured using an error function, which is expressed as: ; In the formula, Used to evaluate whether the training results are consistent with reality. This represents the test set.
8. The batch active learning method based on multiple candidate sets as described in claim 6 or 7, characterized in that: The active learning selection target is represented as: ; In the formula, The final selection target is a set of b ideal samples that yield the best results. This indicates the model obtained after selecting a batch of b samples and training it.
Citation Information
Patent Citations
Sample screening method and system, equipment and medium
CN112508092A
Active learning sample selection method for target detection
CN115393664A