Low-Resource and Endangered Languages › Active Learning

Michael BrenndoerferNovember 26, 20267 min read
Language AI HandbookAll chapters
Part 26 of 67Multilingual Language Models and Cross-Lingual Transfer
Chapter 187Low-Resource and Endangered Languages › Active Learning
Reading section 8 of 14 · Active Learning · 7 minSection 8 of 14 · 7 min

Section 8 of 14 · 7 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

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 UU, a small labeled set LL, a labeling budget BB, a batch size kk, and a model trained on LL. The loop is:

  1. Train a model on LL.
  2. Score every x∈Ux \in U with an acquisition function a(x)a(x).
  3. Select the top kk (with diversity constraints) and send them to annotators.
  4. Add the returned labels to LL, remove those items from UU, repeat.

Choose a budget unit before comparing strategies. For a team with limited annotator time, measure BB 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:

x∗=arg⁡max⁡x∈U(1−p^(ymax⁡∣x))x^* = \arg\max_{x \in U} \left(1 - \hat{p}(y_{\max} \mid x)\right)

Here UU is the unlabeled pool, x∗x^* is the selected example, ymax⁡y_{\max} is the most probable class for candidate xx, and p^\hat{p} 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:

x∗=arg⁡min⁡x∈U(p^(y1∣x)−p^(y2∣x))x^* = \arg\min_{x \in U} \left(\hat{p}(y_1 \mid x) - \hat{p}(y_2 \mid x)\right)

Here y1y_1 and y2y_2 are the two highest-probability classes for candidate xx. The selected item x∗x^* has the smallest probability gap in UU. 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 3.003.00 and 0.690.69 nats. Margin measures the gap between the top two. Entropy uses all the predicted probabilities.

Entropy measures uncertainty over the whole distribution:

H(y∣x)=−∑cp^(c∣x)log⁡p^(c∣x)H(y \mid x) = -\sum_{c} \hat{p}(c \mid x) \log \hat{p}(c \mid x)

where:

  • H(y∣x)H(y \mid x): the entropy of the model's predicted class distribution for input xx
  • p^(c∣x)\hat{p}(c \mid x): the model's predicted probability for class cc given input xx
  • cc: 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..

I(y;θ∣x,D)=H(y∣x,D)−Ep(θ∣D)[H(y∣x,θ,D)]I(y; \theta \mid x,D) = H(y \mid x,D) - \mathbb{E}_{p(\theta \mid D)}\left[H(y \mid x,\theta,D)\right]

where:

  • I(y;θ∣x,D)I(y; \theta \mid x,D): mutual information between the label yy and parameters θ\theta for a fixed candidate xx, given labeled data DD
  • H(y∣x,D)H(y \mid x,D): entropy of the predictive label distribution after averaging over the posterior given DD
  • Ep(θ∣D)[H(y∣x,θ,D)]\mathbb{E}_{p(\theta \mid D)}[H(y \mid x,\theta,D)]: mean entropy of the conditional prediction for candidate xx over parameter draws from the posterior given DD

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:

min⁡S⊆U, ∣S∣=kmax⁡x∈Umin⁡s∈S∥ϕ(x)−ϕ(s)∥\min_{S \subseteq U,\ |S| = k} \max_{x \in U} \min_{s \in S} \lVert \phi(x) - \phi(s) \rVert

where:

  • SS: the selected batch, a subset of the unlabeled pool UU with size kk
  • xx: an unlabeled example in the pool UU
  • ss: an already selected example in SS
  • ϕ(⋅)\phi(\cdot): an embedding function mapping a sentence to a vector
  • ∥ϕ(x)−ϕ(s)∥\lVert \phi(x) - \phi(s) \rVert: the distance between the embeddings of xx and ss

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 kk scores can produce batches of near-duplicates. If each of kk items costs the same to label and the labels are fully redundant for the task, the batch pays for kk 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 UU, 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 f(b)f(b) is test accuracy after bb labels, the summary statistic is

AULC=1B−b0∫b0Bf(b) db\text{AULC} = \frac{1}{B-b_0}\int_{b_0}^B f(b)\,db

where:

  • f(b)f(b): the test accuracy of the model after being trained with bb labeled examples
  • b0b_0 and BB: the initial and final observed budgets, with b0<Bb_0 < B, measured in labels
  • AULC\text{AULC}: 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 bb?

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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy