Low-Resource and Endangered Languages › Active Learning
Language AI HandbookAll chapters When annotation limits the project, active learning can help decide which examples to annotate next. It can improve performance at a fixed budget when the available pool contains examples that add information. Compare against random selection at matched budgets on the same evaluation set.
The Setup
You have a pool of unlabeled examples , a small labeled set , a labeling budget , a batch size , and a model trained on . The loop is:
- Train a model on .
- Score every with an acquisition function .
- Select the top (with diversity constraints) and send them to annotators.
- Add the returned labels to , remove those items from , repeat.
Choose a budget unit before comparing strategies. For a team with limited annotator time, measure in hours. Ten one-hour examples and ten one-minute examples take different amounts of time. The synthetic example uses a count of labels and makes no estimate of annotation time.
Acquisition Functions
Least confidence picks items where the model's top prediction is weakest:
Here is the unlabeled pool, is the selected example, is the most probable class for candidate , and is the model's predicted class probability. The policy can favor ambiguous or noisy items if they receive low confidence. Each selected item leaves the pool.
Margin sampling uses the gap between the top two classes:
Here and are the two highest-probability classes for candidate . The selected item has the smallest probability gap in . A uniform distribution over 20 classes and a 50/50 split between two classes both give margin zero. Their natural-log entropies differ, at about and nats. Margin measures the gap between the top two. Entropy uses all the predicted probabilities.
Entropy measures uncertainty over the whole distribution:
where:
- : the entropy of the model's predicted class distribution for input
- : the model's predicted probability for class given input
- : an index over all classes
The log is natural, so the score is in nats, and zero-probability terms contribute zero. For a fixed class count the maximum occurs at the uniform distribution. Binary entropy and least confidence rank outcomes in the same order, up to ties. Multiclass entropy can rank items differently because it accounts for the allocation among all classes.
Query by committee compares predictions from several models and can choose the points where they disagree. Budget the cost of fitting and evaluating the committee. Test whether disagreement identifies useful labels on your task.
BALD (Bayesian Active Learning by Disagreement) ranks points by how much observing their labels would tell you about model parameters under a Bayesian model. Monte Carlo dropout is one way to approximate the posterior expectation. Houlsby et al. and Gal et al..
where:
- : mutual information between the label and parameters for a fixed candidate , given labeled data
- : entropy of the predictive label distribution after averaging over the posterior given
- : mean entropy of the conditional prediction for candidate over parameter draws from the posterior given
The first term is the entropy after averaging each model's predicted distribution over the parameter posterior. The second is the mean entropy within individual parameter samples supported by the labeled data. If all samples predict the same uncertain label distribution, the terms cancel. A positive score arises from disagreement among their predictions. Least confidence and predictive entropy have no within-model subtraction, so they can rank items highly even when parameter samples agree.
Core-set selection can prioritize coverage of the input space. The following objective uses a k-center problem in an embedding space:
where:
- : the selected batch, a subset of the unlabeled pool with size
- : an unlabeled example in the pool
- : an already selected example in
- : an embedding function mapping a sentence to a vector
- : the distance between the embeddings of and
Sener and Savarese studied a core-set approach for active learning. The objective measures coverage in the chosen embedding, so its usefulness depends on whether that distance reflects variation in the task. Sener and Savarese.
Expected model change or expected error reduction considers possible labels and their effect on the model. Estimating those effects can require refits or an approximation. Compare the acquisition cost with a simpler policy.
Batch Selection and Diversity
Selecting the top scores can produce batches of near-duplicates. If each of items costs the same to label and the labels are fully redundant for the task, the batch pays for labels and gains information equivalent to one. Near-duplicates can still be worth labeling if they test distinct readings or improve reliability.
Two fixes are common:
- Cluster first, then rank. Partition the pool into nonempty groups and take the highest-scoring item from each. This covers the chosen groups. Test whether the distance used for grouping captures variation that matters to your task.
- Greedy diversity-constrained selection. Add items one at a time, penalizing similarity to already-selected items. BADGE, for instance, combines gradient embeddings with k-means++ seeding. Its gradient embeddings combine the current model's uncertainty and representation before the diversity step.
Cold Start
Inspect early acquisition scores when the initial supervised set is small. If the scores tie, the tie-breaking policy determines the order. Compare an initial random or diversity-based round with uncertainty selection at matched budgets. A flat early curve alone cannot establish which effect limited the policy.
What Active Learning Cannot Fix
Active learning selects which examples to label. It cannot:
- Manufacture examples of a class that does not appear in the pool. If no example of a rare construction exists in , no acquisition function will find one.
- Add dialogue to an all-news pool. Evaluate on dialogue before drawing a transfer conclusion from labels collected from the news pool alone.
- Overcome annotation cost heterogeneity. If 10% of items take an hour each, the right objective is utility per annotator-hour, and the standard algorithms do not know about cost.
- Substitute for a competent annotator. An uncertainty policy can surface ambiguous items or expose gaps in annotation instructions. Compare agreement on actively selected and randomly sampled items before deciding whether the policy makes adjudication harder.
How to Evaluate Your Active Learning
Three rules.
Always compare to random selection at matched budgets. Reporting only the active learning curve tells you nothing about whether the selection strategy did any work.
Run multiple seeds. Compare the observed spread across runs with the acquisition gain at each budget. The example below uses five paired starting sets.
Report area under the learning curve. If is test accuracy after labels, the summary statistic is
where:
- : the test accuracy of the model after being trained with labeled examples
- and : the initial and final observed budgets, with , measured in labels
- : the normalized area, interpreted as average accuracy across the shared budget range
Approximate the integral with trapezoids between measured rounds. Compare strategies over the same budget range and report the variation across seeds. Also report the horizontally-read version, which is what practitioners care about: how many labels does random selection need to reach the accuracy active learning reaches with ?
Report the result for the task, model, and pool you tested. If a strong baseline and the acquisition policy produce the same accuracy within the resolution of that experiment, report the result with the budgets and uncertainty.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!