Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
Human-in-the-Loop Machine Learning
Robert Munro
  • MEAP began July 2019
  • Publication in Spring 2020 (estimated)
  • ISBN 9781617296741
  • 325 pages (estimated)
  • printed in black & white

I've learned a lot of new things about Machine Learning I would never even have considered before.

Michiel Trimpe
Most machine learning systems that are deployed in the world today learn from human feedback. However, most machine learning courses focus almost exclusively on the algorithms, not the human-computer interaction part of the systems. This can leave a big knowledge gap for data scientists working in real-world machine learning, where data scientists spend more time on data management than on building algorithms. Human-in-the-Loop Machine Learning is a practical guide to optimizing the entire machine learning process, including techniques for annotation, active learning, transfer learning, and using machine learning to optimize every step of the process.
Table of Contents detailed table of contents

Part 1: First Steps

1 Introduction to Human-in-the-Loop Machine Learning

1.1 The Basic Principles of Human-in-the-Loop Machine Learning

1.2 Introducing Annotation

1.2.1 Simple and more complicated annotation strategies

1.2.2 Plugging the gap in data science knowledge

1.2.3 Quality human annotations: why is it hard?

1.3 Introducing Active Learning: improving the speed and reducing the cost of training data

1.3.1 Three broad Active Learning sampling strategies: uncertainty, diversity, and random

1.3.2 What is a random selection of evaluation data?

1.3.3 When to use Active Learning?

1.4 Machine Learning and Human-Computer Interaction

1.4.1 User interfaces: how do you create training data?

1.4.2 Priming: what can influence human perception?

1.4.3 The pros and cons of creating labels by evaluating Machine Learning predictions

1.4.4 Basic principles for designing annotation interfaces

1.5 Machine Learning-Assisted Humans vs Human-Assisted Machine Learning

1.6 Transfer learning to kick-start your models

1.6.1 Transfer Learning in Computer Vision

1.6.2 Transfer Learning in Natural Language Processing

1.7 What to expect in this text

1.8 Summary

2 Getting Started with Human-in-the-Loop Machine Learning

2.1 Beyond “Hack-tive Learning:” your first Active Learning algorithm

2.1.1 The architecture of your first HuML system

2.2 Interpreting model predictions and data to support Active Learning

2.2.1 Confidence ranking

2.2.2 Identifying outliers

2.2.3 What to expect as you iterate

2.3 Building an interface to get human labels

2.3.1 A simple interface for labeling text

2.3.2 Managing Machine Learning data

2.4 Deploying your first Human-in-the-Loop Machine Learning system

2.4.1 Always get your evaluation data first!

2.4.2 Every data point gets a chance

2.4.3 Select the right strategies for your data

2.4.4 Retrain the model and iterate

2.5 Summary

Part 2: Annotating Data for Machine Learning

3 Uncertainty Sampling

3.1 Interpreting Uncertainty in a Machine Learning Model

3.1.1 Why look for uncertainty in your model?

3.1.2 Interpreting the scores from your model

3.1.3 “Score”, “Confidence”, and “Probability”: Do not trust the name!

3.1.4 SoftMax: converting the model output into confidences

3.2 Algorithms for Uncertainty Sampling

3.2.1 Least Confidence sampling

3.2.2 Margin of Confidence sampling

3.2.3 3.2.3 Ratio of Confidence sampling

3.2.4 Entropy (classification entropy)

3.2.5 A Deep Dive on Entropy

3.3 Identifying when different types of models are confused

3.3.1 What is the best activation function for Active Learning?

3.3.2 Uncertainty sampling with Logistic Regression and MaxEnt models

3.3.3 Uncertainty sampling with Support Vector Machines

3.3.4 Uncertainty sampling with Bayesian Models

3.3.5 Uncertainty sampling with Decision Trees & Random Forests

3.4 Measuring uncertainty across multiple models

3.4.1 Uncertainty sampling with Ensemble models

3.4.2 Query by Committee and Dropouts

3.5 Selecting the right number of items for human-review

3.5.1 Budget-constrained uncertainty sampling

3.5.2 Time-constrained uncertainty sampling

3.5.3 When do I stop if I’m not time or budget constrained?

3.6 Evaluating the success of uncertainty sampling

3.6.1 Do I need new test data?

3.6.2 Do I need new validation data?

3.7 Uncertainty Sampling cheatsheet and further reading

3.7.1 Further Reading for Least Confidence Sampling

3.7.2 Further Reading for Margin of Confidence Sampling

3.7.3 Further Reading for Ratio of Confidence Sampling

3.7.4 Further Reading for Entropy-based Sampling

3.7.5 Further Reading for Uncertainty Sampling for Other Machine Learning models

3.7.6 Further Reading for Ensemble-based Uncertainty Sampling

3.8 Summary

4 Diversity Sampling

4.1 Knowing what you don’t know: identifying where your model is blind

4.1.1 Example data for Diversity Sampling

4.1.2 Interpreting neural models for Diversity Sampling

4.1.3 Getting information from hidden layers in PyTorch

4.2 Model-based outlier sampling

4.2.1 Use validation data to rank activations

4.2.2 Which layers should I use to calculate model-based outliers?

4.2.3 The limitations of model-based outliers

4.3 Cluster-based sampling

4.3.1 Cluster members, centroids and outliers

4.3.2 Any clustering algorithm in the universe

4.3.3 K-Means clustering with cosine similarity

4.3.4 Reduced feature dimensions via embeddings or PCA

4.3.5 Other clustering algorithms

4.4 Representative Sampling

4.4.1 Representative Sampling is rarely used in isolation

4.4.2 Simple Representative Sampling

4.4.3 Adaptive Representative Sampling

4.5 Sampling for real-world diversity

4.5.1 Common problems in training data diversity

4.5.2 Stratified sampling to ensure diversity of demographics

4.5.3 Represented and Representative: which matters?

4.5.4 Limitations of sampling for real-world diversity

4.6 Diversity Sampling with different types of models

4.6.1 Model-based outliers with different types of models

4.6.2 Clustering with different types of models

4.6.3 Representative Sampling with different types of models

4.6.4 Sampling for real-world diversity with different types of models

4.7 Evaluating models for Diversity Sampling

4.7.1 Micro and Macro Precision, Recall, and F-Score

4.7.3 Macro and Micro AUC

4.8 Deciding on the right number of items for human review

4.8.1 Adaptive Cluster-based Sampling

4.8.2 Adaptive Representative Sampling

4.8.3 Deciding on the right ratio of samples from Diversity Sampling and Uncertainty Sampling

4.9 Diversity Sampling Cheatsheet and Further Reading

4.9.1 Further Reading for Diversity Sampling

4.10 Summary

5 Other Active-Learning Sampling Strategies

Part 3: Annotating Data for Machine Learning

6 Who are the right people to annotate your data?

7 Quality control for data annotation

8 User interfaces for data annotation

Part 4: Transfer Learning and Embeddings

9 What are Embeddings?

10 What is Transfer Learning?

Part 5: Adaptive Learning: putting it all together

11 Machine-Learning for aiding human annotation

12 Advanced Human-in-the-Loop Machine Learning

About the Technology

“Human-in-the-Loop machine learning” refers to the need for human interaction with machine learning systems to improve human performance, machine performance, or both. Most machine learning projects do not have the time or budget for human input on every data point, and so need strategies for deciding which data points are the most important for human review. Ongoing human involvement with the right interfaces expedites the efficient labeling of tricky or novel data that a machine can’t process, reducing the potential for data-related errors.

About the book

Human-in-the-Loop Machine Learning is a guide to optimizing the human and machine parts of your machine learning systems, to ensure that your data and models are correct, relevant, and cost-effective. 20-year machine learning veteran Robert Munro lays out strategies to get machines and humans working together efficiently, including building reliable user interfaces for data annotation, Active Learning strategies to sample for human feedback, and Transfer Learning. By the time you’re done, you’ll be able to design machine learning systems that automatically select the right data for humans to review and ensure that those annotations are accurate and useful.

What's inside

  • Active Learning to sample the right data for humans to annotate
  • Annotation strategies to provide the optimal interface for human feedback
  • Techniques to select the right people to annotate data and ensure quality control
  • Supervised machine learning design and query strategies to support Human-in-the-Loop systems
  • Advanced Adaptive Learning approaches that use machine learning to optimize each step in the Human-in-the-Loop process
  • Real-world use cases from well-known data scientists

About the author

Robert Munro has built Annotation, Active Learning, and machine learning systems with machine learning-focused startups and with larger companies including Amazon, Google, IBM, and most major phone manufacturers. If you speak to your phone, if your car parks itself, if your music is tailored to your taste, or if your news articles are recommended for you, then there is a good chance that Robert contributed to this experience.

Robert holds a PhD from Stanford focused on Human-in-the-Loop machine learning for healthcare and disaster response, and is a disaster response professional in addition to being a machine learning professional. A worked example throughout this text is classifying disaster-related messages from real disasters that Robert has helped respond to in the past.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $59.99 pBook + eBook + liveBook
MEAP eBook $47.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks