Overview

9 Advanced data annotation and augmentation

The chapter explains how annotation quality becomes more complex when tasks are subjective, ambiguous, or expensive to label. Rather than assuming a single correct answer, it shows how to estimate which labels are genuinely viable by asking annotators what they expect others to choose, measuring agreement in a more nuanced way, and using methods such as Bayesian Truth Serum to combine actual and expected judgments. It also emphasizes that annotation bias can come from context, culture, personal experience, language, and power dynamics, so quality control must be designed to capture diverse but valid interpretations instead of forcing artificial consensus.

Building on that foundation, the chapter shows how machine learning can improve annotation quality control itself. It presents ways to estimate whether a label is correct, whether it agrees with other annotations, or whether an annotator may be unreliable or even a bot. In parallel, it treats model predictions as a form of annotation: confident predictions can be accepted automatically, reviewed by humans, or incorporated as one annotator among many. The chapter also describes how to use embeddings and contextual representations from related tasks, pretrained models, or self-supervised signals to reduce annotation burden and improve downstream models.

The later sections broaden the toolkit with search-based and rule-based workflows, light supervision, synthetic data creation, and data augmentation. Rules and search can help experts find relevant examples quickly, but they can also introduce bias or scope creep, so the book recommends masking rule-derived features and validating carefully. When data is scarce or expensive, the chapter suggests creating synthetic or human-generated examples, augmenting existing items through transformations like back translation, and using adjacent tasks or metadata as free labels for representation learning. Finally, it shows how to incorporate annotation uncertainty directly into modeling by filtering, weighting, or encoding annotator identity and label confidence, so downstream systems can learn from noisy but informative data rather than discarding it outright.

A copy of an image from chapter 8, showing how task 3 might have multiple valid interpretations because of the ambiguity between “Pedestrian” and “Cyclist.”
Asking people what they expect other annotators to choose for answers. Here, the annotator has indicated that they think that the image is a pedestrian and that 90% of annotators will agree with them, but 10% will think that it is a cyclist. This approach motivates people to give honest responses and provides data to help you decide when multiple responses are valid. In turn, we can capture more diversity in correct answers than the ones offered by any one annotator.
Testing whether a subjective label is viable. Here, the five annotators reported their annotation for the label and what percentage of people they think would choose each label. Blake thinks that the label is “Pedestrian”, that 90% of people would choose “Pedestrian,” and that 5% each would choose “Cyclist” and “Animal.” Taking the product of the complement gives us the probability that we should have encountered this label with this number of annotations, which we can compare with whether we have seen the label.
The accuracy of one annotator to estimate the range of responses across all annotators by comparing the actual fraction of annotations for a given label with the number of annotations expected by an annotator. For our example data, this would correspond to Cameron’s expectation that 65% of people would choose “Cyclist” for this task, compared with the 40% of people who actually chose it.
Calculating the accuracy of each annotator’s estimate as the adjusted score and then averaging those scores to get a per-annotator score for this task. Cameron is 80% accurate in estimating how close the expected distribution was to the actual distribution. Evan is the most accurate, with a score of 97%, and Blake is the least accurate, with a score of 73%.
BTS combines the person’s actual annotation with the predictions for expected annotations into a single score. Info is the information theoretic score (Expected × log(Actual / Expected)). The scores for each annotator show Cameron with the highest score. For both the expected and the actual annotations, the scores are based on information theory. The score is not only about the accuracy of each annotator; it is also about how much information each annotator is providing.
A subjective task with an additional question that is objective. This example allows easier quality control by assuming that if a person gets the objective question correct, their subjective judgment is also correct and not an error.
Using performance on the ground truth data to calculate model confidence as an optimization task. On the ground truth data, when Alex annotated items as “Pedestrian,” they were actually “Pedestrians” 91% of the time, “Signs” 1% of the time, “Cyclists” 4% of the time, and “Animals” 4% of the time. When we see that Alex has annotated some new item as “Pedestrian,” we can assume the same probability distribution. When Dancer annotates an item as “Cyclist,” we know that it is actually a “Pedestrian” 72% of the time, showing confusion about these categories.
Sparse feature representation, with ground truth data as training data. We can take every annotation on the ground truth dataset, and use the actual annotations as features and the ground truth labels as the labels for a machine learning model. Then we have a model that can predict the correct label and give a confidence associated with that prediction.
Dense (aggregate) feature representation, with ground truth data as training data. The features are the count of each label, thereby ignoring the identity of the annotator. We can take every annotation on the ground truth dataset, count each annotation as the features, and use the ground truth labels as the labels for a machine learning model. This example is more robust than the one shown in figure 9.9 when you don’t have many ground truth labels for many of your annotators.
Treating the most confident predictions as labels. A model predicts the items as being Label A or Label B, and the most confidently predicted items are treated as the correct label. This example allows us to build a model quickly but has a shortcoming: the model is built from items away from the decision boundary, which leaves a large amount of error for where that boundary might be.
A workflow for using confident predictions as annotations. The model is used to predict the labels of a large number of unlabeled items (potentially all of them). Human annotators review some of the labels, and the accepted labels become annotations for the training data. The human annotators also use this process to tune the threshold at which the labels can be confidently turned into annotations.
Incorporating predictions from a model as though they were annotations. From our example data, we can assume that Evan was in fact a predictive model, not a human annotator. For any of our methods that take into account the accuracy of each annotator, it is generally fine to incorporate model predictions as human annotations in this part of the workflow.
An example of transfer learning. We have the task of predicting whether an item is “A” or “B,” and we think that our existing model that predicts “X,” “Y,” or “Z” will have useful information because of similarities between the two tasks. So we can use the neurons from the “X,” “Y,” or “Z” model as features (a representation) in our model predicting “A” or “B.” This example is similar to the examples earlier in the book that use the hidden layers as features for clustering and use transfer learning to adapt an existing model to a new task. In some cases, we might ignore the inputs “A” and “B,” using only the pretrained model as a representation for our new model.
An example of how transfer learning can be used to make a model more accurate and how it might influence the annotation strategy. Here, three other models are feeding into a semantic segmentation model. The top example is adapting a model trained on ImageNet, which is the most common type of transfer learning. The second model is trained on 300,000 image-level labels for the objects we care about. The third model uses the timestamps of the images to train a model to predict the time of day. Because the top three models have been trained on much more data than the semantic segmentation model, with only 10,000 training items, they should have richer representations of the image that can help with the semantic segmentation task.
An example of light supervision. The data is clustered, and a small number of items are sampled from each cluster. For every cluster in which all the labels are the same, the entire cluster is given that label. A supervised model can be built on all the items, ignoring the items that did not get a label in clusters where there was disagreement.

Summary

  • Subjective tasks have items with multiple correct annotations. You can elicit the set of valid responses that people might give from the annotators and then use methods such as BTS to discover all the valid responses and avoid penalizing correct but rarer annotations.
  • Machine learning can be used to calculate the confidence of a single annotation and to resolve disagreements among annotators. For many annotation tasks, simple heuristics are not enough to accurately calculate annotation quality or to aggregate the annotations of different people, so machine learning gives us more powerful ways to create the most accurate labels from human annotations.
  • The predictions from a model can be used as the source of annotations. By using the most confident predictions from a model or by treating a model as one annotator among other annotators, you can reduce the overall number of human annotations that are needed. This technique can be especially helpful when you want to take the predictions from an old model and use them in a new model architecture and when annotation is a time-consuming task compared with accepting or rejecting model predictions.
  • Embeddings and contextual representations allow you to adapt the knowledge from existing models into your target model as feature embeddings or tuning pretrained models. This approach can inform your annotation strategy. If you can find a related task that is 10 times or 100 times faster to annotate than your target task, for example, you might get a more accurate model if you devote some resources to the simpler task and use the simpler task as an embedding in the actual task.
  • Search-based and rule-based systems allow you to quickly filter and possibly label your data. These systems are especially useful for annotating a model quickly with noisy data and finding important low-frequency data to annotate.
  • Light supervision on unsupervised models are common ways that annotators, especially SMEs, bootstrap a model from a small number of labels or perform exploratory data analysis when the goal is improved human understanding of the data, not necessarily a supervised model.
  • Synthetic data, data creation, and data augmentation are related strategies that create novel data items, especially useful when the available unlabeled data does not contain the required diversity of data, often because data is rare or sensitive.
  • There are several ways to incorporate annotation uncertainty into a downstream model: filtering out or de-weighting items with uncertain label accuracy, including the annotator identities in the training data, and incorporating the uncertainty into the loss function while training. These methods can help prevent annotation errors from becoming unwanted biases in your models.

FAQ

What makes annotation quality difficult to assess for subjective tasks?Subjective tasks may have more than one valid answer, so simple agreement or accuracy metrics can be misleading. Differences can come from context, personal experience, language, social norms, ordering effects, or genuine ambiguity, so quality control must account for multiple plausible interpretations.
How can you discover what counts as a valid label when multiple answers may be correct?A practical approach is to ask annotators what they think other annotators would choose. This captures the expected distribution of responses, reduces pressure to conform, and helps reveal which labels are genuinely viable versus clearly invalid.
What is Bayesian Truth Serum, and why is it useful for subjective annotations?Bayesian Truth Serum combines an annotator’s actual answer with their prediction of how others will answer. It rewards responses that are more informative than expected, which can help identify surprisingly informative minority answers and detect when annotators are not fully representative.
How can machine learning help with annotation quality control?Machine learning can model annotator behavior and predict whether an annotation is likely correct, likely to agree with others, or likely to come from a bot. It can also estimate confidence distributions over labels, helping decide which annotations to keep, review, or discard.
What is the difference between treating model predictions as annotations and using them as trusted labels?As trusted labels, model predictions are accepted automatically above a confidence threshold. As annotations, model predictions are treated like one annotator among many, so they can be combined with human annotations and weighted by the model’s estimated accuracy.
Why would you use embeddings or contextual representations in annotation workflows?Embeddings let you transfer knowledge from related or pretrained tasks into your annotation pipeline. They are useful when direct annotation is expensive, because a model trained on adjacent or inherent labels can provide richer features for downstream tasks.
How can search-based or rule-based systems help create training data?Search and rules can help experts find relevant examples quickly, filter data into useful subsets, or bootstrap labels from heuristics. They are especially helpful for exploratory data analysis and for building initial datasets when full manual annotation would be too slow.
When is synthetic data or data augmentation a good idea?Synthetic data is useful when real data is scarce, costly, sensitive, or unavailable, and when the problem is constrained enough to generate realistic examples. Data augmentation is useful for expanding a dataset by transforming existing examples, such as flipping images or back-translating text.
How can annotation confidence be incorporated into downstream machine learning models?You can filter out low-confidence items, weight uncertain labels less heavily, include annotator identity as a feature, or encode the label uncertainty directly in the loss function. These methods let the model learn from noisy data without treating every label as equally certain.
What are the main risks of relying too heavily on automated or weakly supervised annotation methods?The biggest risks are bias amplification, overfitting to rule patterns or model confidence, and trusting noisy auto-labels too much. Weak supervision can speed up annotation, but it should usually be paired with human review, validation data, and careful sampling to avoid systematic errors.

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