Active Learning for Annotation
What active learning is, when it helps, and which query strategies Potato supports (uncertainty, diversity, BADGE, BALD), so you label fewer items for the same model quality.
Active learning chooses which items to annotate next so a model reaches the same accuracy with far fewer labels. Instead of labeling at random, you label the items the model finds most informative.
See active learning for background. For the feature reference, see Active Learning.
The loop
- Label a small seed set.
- Train a quick model on what you have.
- Score the unlabeled pool and pick the most informative items.
- Annotate those, add them, retrain. Repeat.
Each round spends the annotation budget where the model learns most.
Query strategies Potato supports
- Uncertainty sampling: pick items the model is least confident about (near the decision boundary). The simplest default, and often good enough.
- Diversity sampling: pick items that are different from each other, so you don't waste budget on near-duplicates.
- BADGE: combines uncertainty and diversity using gradient embeddings.
- BALD: Bayesian strategy that selects items expected to most reduce model uncertainty.
- Hybrid: blends strategies.
Annotators get the reordered queue only under assignment_strategy: active_learning. The config below sets both keys:
assignment_strategy: active_learning
active_learning:
enabled: true
schema_names: [sentiment]
query_strategy: uncertainty # or diversity, badge, bald, hybrid
min_instances_for_training: 20Active learning with model training
Potato runs a second active-learning loop through model training, for a study where a transformer or an image model should choose the items. A run of hf-text-classification or hf-image-classification with the acquisition parameter writes a score on each prediction, and assignment_strategy: llm_confidence serves the highest score first. The scores are margin, entropy, bald by Monte Carlo dropout, and coreset, a greedy k-centre selection over the model's embeddings that spreads the queue across the data. auto_retrain starts a new run after every 25 new annotations by default, and each run rescores the unlabeled items.
The scheme has to be in writeback.schemas, and include_unlabeled: true gives the items nobody has labeled a prediction to score:
assignment_strategy: llm_confidence
model_training:
enabled: true
auto_retrain:
enabled: true
trainer: hf-text-classification
schemas: [sentiment]
params: {acquisition: margin}
writeback:
schemas: [sentiment]
include_unlabeled: trueWrite-back also shows annotators the model's answer as a pre-label, and a pre-label pulls answers toward the model. Model in the Loop walks through the loop on a running study, and Model-Assisted Labeling covers reviewing the pre-labels.
When it helps
It helps when labels are expensive, the pool is large, and a useful model can be trained on a small seed. It helps less when:
- The task is so easy that random labeling already saturates quickly.
- You need an unbiased held-out test set. Active learning skews what gets labeled, so keep the evaluation data randomly sampled.
- Labels are cheap relative to engineering effort.