The chapter extends active learning from single-method selection into practical combinations that better balance model uncertainty, sample diversity, and domain representativeness. It shows that a simple but powerful workflow is to first collect a broad set of uncertain items and then refine that pool with clustering or outlier filtering, so the final labels are both informative and varied. The text emphasizes that many of these combinations can be implemented in only a few lines of code, and that in real systems the simplest effective method is often preferable to a more elaborate algorithm.
Several hybrid strategies are explored in detail, including pairing least-confidence sampling with clustering, uncertainty sampling with model-based outliers, representative sampling with clustering, and sampling from the cluster with the highest average entropy. Each method is designed to focus annotation effort on items that are either near the decision boundary, unlike the current model’s training data, or concentrated in parts of the feature space where the model is most confused. The chapter also discusses broader ways to combine active learning scores, such as averaging scores, converting them to percentiles, or taking unions and intersections of candidate sets, and it introduces expected error reduction as a theoretically appealing but often impractical approach because of retraining costs and sensitivity to noise.
The second half of the chapter shifts to active transfer learning, where transfer learning is used not just to adapt a model but to build a model that predicts where it is uncertain, wrong, or out of domain. It explains how to train a small classifier on hidden representations so the system can predict its own errors, then use those predictions to choose the most valuable unlabeled items. This idea is extended to representative sampling and to an adaptive approach that repeatedly samples, relabels, and retrains within a single cycle. The chapter closes by weighing the strengths and limitations of these methods: they can be fast, label-efficient, and flexible across architectures, but they can also overfit, underrepresent parts of the feature space, and require careful tuning when data are noisy or highly ambiguous.
One possible result of combining uncertainty sampling and diversity sampling. When these strategies are combined, items near diverse sections of the decision boundary are selected. Therefore, we are optimizing the chance of finding items that are likely to result in a changed decision boundary when they’re added to the training data.
An example combining least confidence and clustering-based sampling. First, uncertainty sampling finds items near the decision boundary; then clustering ensures diversity within that selection. In this figure, the centroids from each cluster are sampled. Alternatively, or in addition, you could select random members of outliers.
This example of combining uncertainty sampling with model-based outliers selects items that are near the decision boundary but that are different from the current training data items and, therefore, different from the model.
An example (bottom) of combining representative sampling and cluster-based sampling. This method samples items that are most like your application domain relative to your current training data and also different from one another. By comparison, the simpler representative sampling method in chapter 4 treats each distribution as a single distribution.
This example of combining cluster-based sampling with entropy (bottom) samples items within the cluster that show the most confusion. You might think of this cluster as being the one that straddles the decision boundary most closely. In this example, random items are sampled in the cluster, but you could experiment by sampling the centroid, outliers, and/or oversampling items within the cluster that have the highest entropy. By comparison, simple clustering (top) samples items from every cluster.
We have a model that predicts a label as “A,” “B,” “C,” or “D” and a separate dataset with the labels “W,” “X,” “Y,” and “Z.” When we retrain only the last layer of the model, the model is able to predict labels “W,” “X,” “Y,” and “Z,” using far fewer human-labeled items than if we were training a model from scratch.
Validation items are predicted by the model and bucketed as “Correct” or “Incorrect” according to whether they were classified correctly. Then the last layer of the model is retrained to predict whether items are “Correct” or “Incorrect,” effectively turning the two buckets into new labels.
More-complicated active transfer learning architectures, using active transfer learning to create a prediction. The top example has a single neuron in the new output layer. The bottom example is a more-complicated architecture, with a new hidden layer that connects with multiple existing hidden layers.
We can build a model to sample the items that are most unlike the current training data. To begin, we take validation data from the same distribution as the training data and give it a “Training” label. Then we take unlabeled data from our target domain and give it an “Application” label. We train a new output layer to predict the “Training” and “Application” labels, giving it access to all layers of the model. We apply the new model to the unlabeled data (ignoring the unlabeled items that we trained on), and sample the items that are most confidently predicted as “Application.”
Because our sampled items will get a human label later, we can assume that they become part of the training data without needing to know what the label is. To begin, we take validation data from the same distribution as the training data and give it a “Training” label. We take unlabeled data from our target domain and give it an “Application” label. We train a new output layer to predict the “Training” and “Application” labels, giving it access to all layers of the model. We apply the new model to the unlabeled data (ignoring the unlabeled items that we trained on) and sample the items that are most confidently predicted as “Application.” We can assume that those items will later get labels and become part of the training data. So we can take those sampled items, change their label from “Application” to “Training,” and retrain our final layer(s) on the new dataset.
Because our sampled items will later get a human label and become part of the training data, we can assume that the model will later predict those items correctly, because models are typically the most accurate on the actual items on which they trained. To begin, validation items are predicted by the model and bucketed as “Correct” or “Incorrect,” according to whether they were classified correctly. The last layer of the model is retrained to predict whether items are “Correct” or “Incorrect,” effectively turning the two buckets into new labels. We apply the new model to the unlabeled data, predicting whether each item will be “Correct” or “Incorrect.” We can sample the most likely to be “Incorrect.” Then we can assume that those items will get labels later and become part of the training data, which will be labeled correctly by a model that predicted on that same data. So we can take those sampled items, change their label from “Incorrect” to “Correct,” and retrain our final layer(s) on the new dataset.
Advanced active learning cheat sheet
Active transfer learning cheat sheet
Summary
- You have many ways to combine uncertainty sampling and diversity sampling. These techniques will help you optimize your active learning strategy to sample the items for annotation that will most help your model’s accuracy.
- Combining uncertainty sampling and clustering is the most common active learning technique and is relatively easy to implement after everything that you have learned in this book so far, so it is a good starting point for exploring advanced active learning strategies.
- Active transfer learning for uncertainty sampling allows you to build a model to predict whether unlabeled items will be labeled correctly, using your existing model as the starting point for the uncertainty-predicting model. This approach allows you to use machine learning within the uncertainty sampling process.
- Active transfer learning for representative sampling allows you to build a model to predict whether unlabeled items are more like your target domain than your existing training data. This approach allows you to use machine learning within the representative sampling process.
- ATLAS allows you to extend active transfer learning for uncertainty sampling so that you are not oversampling items from one area of your feature space, combining aspects of uncertainty sampling and diversity sampling into a single machine learning model.
Human-in-the-Loop Machine Learning ebook for free