liveBook · Manning

Active learning

As explained in Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI

Active learning is a machine learning approach in which a learning system selects data for annotation to improve its learning process.

Active learning selects unlabeled data for human annotation to improve a machine learning model. It is useful when people cannot label everything and a random sample may miss important variation. The goal is to reach a useful model with less annotation effort or in less time. section 1.3 section 1.3.3

A typical cycle samples items, asks people to label them, trains or retrains a model, and uses that model to select the next items. Set aside randomly sampled evaluation data to measure accuracy; also compare selection strategies against a random-sampling baseline. section 1.1 section 1.3.1 section 2.6

Three sampling approaches make a practical starting point:

  • Uncertainty sampling selects items near the model’s decision boundary. In binary classification, these may have similar predicted probabilities for both labels. Their human labels can help change the boundary when the model is wrong. section 1.3.1
  • Diversity sampling selects unusual or underrepresented items, such as those with rare features or from underrepresented demographics. This can help address gaps in the model’s view of the problem. section 1.3.1
  • Random sampling supplies a baseline and data for gauging accuracy. Check what the sample represents: prefiltering and changes over time can make a random sample unrepresentative of the problem. section 1.3.1

Combining uncertainty and diversity can find uncertain items across different parts of the problem. Uncertainty alone may concentrate on one area, while diverse items far from the boundary may not change it much. No single strategy is best for every dataset or task. section 1.3.1 section 1.3

Figure 1.2 Pros and cons of different active learning strategies. Top left: The decision boundary from a machine learning algorithm between items, with some items labeled A and some labeled B. Top right: One possible result from uncertainty sampling. This active learning strategy is effective for selecting unlabeled items near the decision boundary. These items are the most likely to be wrongly predicted, and therefore, the most likely to get a label that moves the decision boundary. If all the uncertainty is in one part of the problem space, however, giving these items labels will not have a broad effect on the model. Bottom left: One possible result of diversity sampling. This active learning strategy is effective for selecting unlabeled items in different parts of the problem space. If the diversity is away from the decision boundary, however, these items are unlikely to be wrongly predicted, so they will not have a large effect on the model when a human gives them a label that is the same as the model predicted. Bottom right: One possible result from combining uncertainty sampling and diversity sampling. When the strategies are combined, items are selected that are near diverse sections of the decision boundary. Therefore, we are optimizing the chance of finding items that are likely to result in a changed decision boundary.

Compare how uncertainty, diversity, and their combination select items around a decision boundary. section 1.3.1

Finding disaster-related messages

A classifier predicts that a message is not disaster-related with a score of about 0.524, versus 0.476 for disaster-related. The close scores make it a candidate for human review. If the prediction is wrong, adding the human label to training data may help the model recognize similar messages. Confidence scores can be unreliable, especially for neural models, so their exact values require care. section 2.3

Choose iteration size with human and machine time in mind: frequent retraining can reveal how selected items change, but waiting for a model to retrain after a small batch adds overhead. Annotation also exposes ambiguous cases that can improve task definitions and instructions. section 2.3.3

Sampling may improve the model without making annotation feel faster. Diverse items may feel less repetitive, but automatically ordering work can also reduce annotators’ sense of agency if they previously chose what to do next. section 11.6.2

How Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI covers it

How deep it goes
Explains an iterative labeling and retraining workflow, compares sampling strategies, and discusses evaluation and iteration tradeoffs.
Examples
Uses disaster-related message classification and autonomous-driving video annotation to illustrate uncertainty and annotation scale.
What it assumes
Assumes some machine-learning familiarity and highlights confidence scores and accuracy metrics as important background.
What you can do after
Build it from scratch as a simple labeling and retraining cycle using confidence and outlier sampling.
How it connects
Connects uncertainty sampling, diversity sampling, random sampling, model evaluation, and human-in-the-loop machine learning.

Also explained in

Compare how 4 books explain active learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI. The section links point to the parts of the book it draws on.