Active Learning: Letting the Model Choose Which Examples Get Labeled

Unlabeled Data Is Cheap, Labels Are Not

Most machine learning projects do not run short of data. They run short of labels. A hospital can have hundreds of thousands of chest X-rays in its archive, and a self-driving car fleet records more video in a day than any team could annotate in a year. What is scarce is the time of the person who has to look at each example and say what it is, and in medicine or law that person is expensive.

The usual way to build a training set ignores this. Someone picks a random sample, sends it to annotators, and trains on whatever comes back. Random sampling is fair and simple, but it spends most of the budget on easy, redundant cases. The thousandth clear photo of a cat teaches a classifier almost nothing it did not learn from the first hundred.

Active learning starts from a different question: if the model is allowed to choose which examples get labeled, can it reach the same accuracy with fewer labels? Burr Settles put this premise at the center of his 2009 survey of the field (a technical report from the University of Wisconsin-Madison that is still the standard introduction), and the honest answer is «often, but not always, and the conditions matter more than most papers admit.»

The Loop

The most common setting is pool-based active learning. There is a small labeled set, a large pool of unlabeled examples, and an oracle, usually a human annotator. The procedure repeats the same steps. Train a model on the labeled set. Score every example in the pool with an acquisition function that estimates how useful its label would be. Send the top examples to the oracle. Add the answers to the labeled set and train again.

Everything interesting happens in the acquisition function. It has to predict the value of a label before the label exists, using only the current model and the unlabeled data. Different families of methods make that prediction in different ways, and most of the research in the field is an argument about which guess is best.

Uncertainty Sampling

The oldest and simplest idea is to ask about the examples the model is least sure of. David Lewis and William Gale described it in a 1994 SIGIR paper on text classification and called it uncertainty sampling. On a newswire categorization task, they reported that it reduced the amount of manually classified training data needed to reach a given effectiveness by as much as 500-fold.

There are a few standard ways to measure uncertainty from a classifier’s predicted probabilities. Least confidence picks the example whose top class has the lowest probability. Margin sampling looks at the gap between the two most likely classes and picks the smallest gap. Entropy uses the whole distribution. For a binary problem they all select the same points; with many classes they can disagree.

The weakness is that a model’s probabilities are often badly calibrated, and deep networks are known for being confident on inputs they get wrong. A point near the decision boundary looks uncertain, which is good. But a point that is simply noisy or ambiguous also looks uncertain, and labeling it again and again does not help.

Disagreement Between Models

A second family asks a committee instead of a single model. Query by committee, introduced by Seung, Opper and Sompolinsky at COLT in 1992, trains several models on the same labeled data and queries the examples where they disagree most. The intuition is about the space of hypotheses. Every label rules out the models that would have predicted it wrong, and a point that splits the committee in half rules out the most.

Houlsby and colleagues turned a version of this into an information-theoretic criterion in 2011, called BALD (Bayesian Active Learning by Disagreement). BALD picks the example that maximizes the mutual information between its label and the model parameters. In plain terms, it wants points where each plausible model is confident but the models disagree with each other. That separates uncertainty that comes from not knowing enough (worth labeling) from noise that is in the data itself (not worth labeling).

Yarin Gal, Riashat Islam and Zoubin Ghahramani brought this into deep learning at ICML 2017. They used dropout at test time as a cheap approximation to a Bayesian network, so that a single CNN could act as its own committee. On MNIST, starting from 20 labeled images, their best acquisition function (variation ratios) reached 5% test error with 295 labels and BALD needed 335, while random sampling needed 835. They also ran the method on skin lesion images from the ISIC 2016 challenge.

Batches and Diversity

The classic algorithms assume one query at a time. Deep networks are slow to retrain, so real systems ask for hundreds or thousands of labels per round. That breaks naive uncertainty sampling, because the top thousand uncertain images are often near-duplicates of each other, and labeling all of them wastes most of the batch.

Ozan Sener and Silvio Savarese reframed the problem at ICLR 2018 as core-set selection: choose a subset of points such that a model trained on it is competitive on the rest of the data. Their bound reduces to the k-center problem in the network’s feature space, so the method picks points that cover the pool geometrically and ignores uncertainty entirely. They also reported that many uncertainty heuristics from the literature did not work well for CNNs in the batch setting.

BADGE, from Jordan Ash and coauthors at ICLR 2020, combines both ideas. For each unlabeled point, it computes the gradient of the loss with respect to the last layer, using the model’s own predicted label as if it were true. The size of that gradient is large when the model is unsure, and the direction says what kind of update the point would cause. BADGE then runs k-means++ seeding on these vectors, which favors points that are both large and far from each other, without an extra parameter to balance the two.

The Cold Start Problem

Almost every method above depends on a model that is already somewhat good. At the very beginning, with ten or twenty labels, the model’s uncertainty estimates are close to meaningless, and choosing by them can be worse than choosing at random.

Guy Hacohen, Avihu Dekel and Daphna Weinshall studied this at ICML 2022 in a paper titled «Active Learning on a Budget: Opposite Strategies Suit High and Low Budgets.» Their argument is that with a tiny budget you should label typical examples, the ones from dense regions that represent the data well, and only later switch to hard, atypical ones. Their method, TypiClust, clusters the data in a self-supervised embedding and picks the densest point in each cluster. With 10 labeled CIFAR-10 images chosen this way, a semi-supervised learner reached 93.2% accuracy, which the authors report as a 39.4% improvement over random selection.

The result reverses the intuition of uncertainty sampling. Early on, the best question to ask is the easiest one.

Case: Pedestrians at Night

Active learning has been tested at industrial scale in autonomous driving, where data is plentiful and labeling every frame is impossible. Elmar Haussmann and colleagues at NVIDIA described a production system in a paper at the 2020 IEEE Intelligent Vehicles Symposium. It scored unlabeled frames by the uncertainty of an ensemble of object detectors, and the evaluation focused on night-time driving.

They compared two ways of choosing new frames to label: their active learning pipeline and a selection made by human experts. Both improved the detector, but for pedestrians the actively selected data raised weighted mean average precision by 3.3%, against 1.1% for the manually curated data. For bicycles, the gain from active learning was 4.4 times the gain from manual selection. The difference was largest on large objects. Engineers who knew the domain well still picked less useful frames than an uncertainty score did.

Random Sampling Is a Hard Baseline

The literature has a reproducibility problem, and researchers inside the field have pointed it out. Munjal and coauthors, at CVPR 2022, reran several active learning methods (uncertainty-based, diversity-based and committee-based) under identical conditions. With a well-regularized model, every method improved, random sampling included, and the differences between methods became negligible. Many earlier gains were partly an artifact of weak baselines.

Lowell, Lipton and Wallace raised a different issue at EMNLP 2019. A labeled set built by active learning is tied to the model that selected it. When they trained a different model on that data, which is what happens when a team upgrades its architecture a year later, it often did no better than the same model trained on a random sample, and sometimes worse. Since a labeled dataset usually lives longer than any single model, that matters.

Active learning still pays off in many settings, but the benefit depends on the budget, the model, the regularization and the data, and a paper that shows a gain on one benchmark says less than it seems.

A Final Observation

A random sample is a neutral description of the world. An actively acquired dataset is not. It records what one particular model found confusing at one particular moment, and every downstream use inherits that point of view, including the test set if anyone is careless enough to draw it the same way. The practical consequence is simple. Whatever selection strategy a team uses for training labels, it should keep a slice of the budget for plain random sampling, because that slice is the only part of the data that can honestly say how the model performs on the world as it is.

By: Max Johnson B.

Comentarios

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *