Overview

1 Introduction to human-in-the-loop machine learning

Human-in-the-loop machine learning centers on combining human judgment with machine learning to make AI systems more accurate, faster to improve, and more useful in real workflows. The chapter emphasizes that most modern AI still depends heavily on supervised learning and human feedback, whether the task is autonomous driving, translation, search relevance, or content moderation. It frames annotation, active learning, and transfer learning as the core techniques that let teams build effective systems without labeling everything from scratch.

A major focus of the chapter is annotation: turning raw data into training, validation, and evaluation data through human labeling. The text shows that annotation can be as simple as a web form or as complex as a rich graphical tool for tasks like drawing bounding boxes or polygons. Because label quality is so important, the chapter explains why annotation is hard: humans make mistakes, disagreements are common, subjective tasks are especially difficult, and poor labels can introduce serious bias that no algorithm can fully recover from. It also stresses that good annotation depends on both the right workforce and the right interface design, with attention to usability, keyboard efficiency, and avoiding priming effects.

The chapter also introduces active learning as a way to reduce labeling cost and speed up model improvement by selecting the most informative unlabeled items for annotation. It highlights uncertainty sampling, diversity sampling, and random sampling as the main strategies, and explains that they work best together in iterative cycles of labeling and retraining. Finally, it presents transfer learning as a way to reuse knowledge from pretrained models so that new tasks need fewer labels, especially in computer vision and increasingly in NLP. Throughout, the chapter argues that the best systems treat algorithms, annotation, and human-computer interaction as interconnected parts of one workflow rather than separate problems.

A mental model of the human-in-the-loop process for predicting labels on data
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.
The iterative active learning process. Top left to bottom right: Two iterations of active learning. In each iteration, items are selected along a diverse selection of the boundary, which in turn causes the boundary to move after retraining, resulting in a more accurate machine learning model. Ideally, we requested human labels for the minimum number of items as part of our active learning strategy. This request speeds the time to get an accurate model and reduces the overall cost of human annotation.
An example of transfer learning. A model was built to predict a label as “A,” “B,” “C,” or “D.” Retraining the last layer of the model and using far fewer human-labeled items than if we were training a model from scratch, the model is able to predict labels “Y” and “Z.”
A machine learning knowledge quadrant, covering the topics in this book and expressing them in terms of what is known and unknown for your machine learning models

Summary

  • The broader human-in-the-loop machine learning architecture is an iterative process combining human and machine components. Understanding these components explains how the parts of this book come together.
  • You can use some basic annotation techniques to start creating training data. Understanding these techniques ensures that you are getting annotations accurately and efficiently.
  • The two most common active learning strategies are uncertainty sampling and diversity sampling. Understanding the basic principles of each type helps you strategize about the right combination of approaches for your particular problems.
  • Human–computer interaction gives you a framework for designing the user-experience components of human-in-the-loop machine learning systems.
  • Transfer learning allows us to adapt models trained from one task to another and build more accurate models with fewer annotations.

FAQ

What is human-in-the-loop machine learning?Human-in-the-loop machine learning is a set of strategies for combining human and machine intelligence in AI applications. Its goals include improving model accuracy, reaching target accuracy faster, maximizing accuracy through collaboration, and helping humans work more efficiently with machine learning support.
Why is annotation so important in machine learning?Annotation is the process of labeling raw data so it becomes training data for machine learning. It is important because most supervised machine learning systems depend on high-quality labeled data, and the quality of those labels strongly affects model performance.
What is the difference between annotation and active learning?Annotation is the act of creating labels for data, while active learning is the process of deciding which unlabeled items should be sent to humans for annotation. Together, they help create training data more efficiently and with less cost and effort.
Why is quality human annotation hard?Human annotation is hard because annotators can make mistakes, disagree with each other, and be influenced by context or fatigue. For subjective tasks or continuous data, deciding the “correct” label can require sophisticated statistics rather than simple rules.
What are the main active learning sampling strategies introduced in this chapter?The chapter introduces three broad sampling strategies: uncertainty sampling, diversity sampling, and random sampling. Uncertainty targets items near the model’s decision boundary, diversity targets underrepresented or unfamiliar items, and random sampling provides a baseline and helps measure overall model accuracy.
When should active learning be used?Active learning is especially useful when you can annotate only a small fraction of your data and random sampling would not capture enough diversity. It is common in large-scale, expensive, or fast-changing settings where labeling everything is impractical.
Why is a truly random evaluation set difficult to create?It is difficult because real datasets are often already filtered by keyword, time period, source, or other constraints, which makes them nonrepresentative. In many cases, it is better to create a representative evaluation set or keep a separate out-of-domain dataset for judging generalization.
How does human–computer interaction affect annotation quality?Interface design has a major impact on annotation speed and accuracy. Simple, familiar interfaces such as web forms or keyboard-driven workflows are usually best, while more complex tasks need carefully designed interactions that match user expectations and minimize friction.
What is the role of transfer learning in human-in-the-loop machine learning?Transfer learning lets you start with an existing model or pretrained representation instead of building from scratch. It reduces the amount of human-labeled data needed, speeds up model development, and can improve accuracy, especially in computer vision and NLP.
How do machine-learning-assisted humans and human-assisted machine learning differ?Machine-learning-assisted humans use models to help people do tasks faster or better, such as predictive text or translation support. Human-assisted machine learning uses human labels to improve the model itself. Many real systems do both at once.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Human-in-the-Loop Machine Learning Human-in-the-Loop Machine Learning ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Human-in-the-Loop Machine Learning Human-in-the-Loop Machine Learning ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Human-in-the-Loop Machine Learning Human-in-the-Loop Machine Learning ebook for free