Overview

10 Annotation quality for different machine learning tasks

This chapter explains that annotation quality control becomes more complicated as machine learning tasks move beyond simple image or document labels. It argues that the same core ideas—ground truth, agreement, subjectivity, and aggregation—still apply, but they must be adapted to the structure of each task. Continuous values, object detection, semantic segmentation, sequence labeling, language generation, information retrieval, and other tasks all need different definitions of correctness and different ways to handle uncertainty.

For continuous tasks, the chapter shows how to treat correctness as an acceptable range rather than an exact value, and how to measure agreement and accuracy within that range. It discusses when to use the average of multiple judgments versus selecting the best individual judgment, emphasizing that “wisdom of the crowds” only works well when there are enough annotators and the data distribution supports it. It also recommends machine-learning-based quality control for continuous data, using regression models, absolute or relative encodings, and carefully chosen features to predict annotation quality and support better aggregation.

For object detection and semantic segmentation, the chapter focuses on review workflows, expert adjudication, and metrics such as IoU, with attention to chance correction, dimensionality effects, and ambiguity at boundaries. It extends these ideas to sequence labeling by separating token-level labeling from span-level evaluation, using review tasks and expert correction for difficult cases. For language generation, it emphasizes expert evaluation, multiple acceptable outputs, and the difficulty of aggregating generated text into a single gold answer. Across all tasks, the main message is to tailor quality control to the task structure, use workflows to break complex annotation into simpler subtasks, and combine human judgment with machine assistance when possible.

Two ways of calculating the expected agreement in a continuous task: the chance that a random number falls in that range, and the percentage of annotations across the entire dataset that fall into the range
An example of deterministic and nondeterministic continuous tasks: estimating the speed of a car from an image of the odometer. Imagine that you had two annotations, 73 and 78. For the left image, the image is digital, so you know that there is a correct answer. Perhaps the image is blurry, which made the 3 look like an 8. So the correct strategy is to pick the better annotation (73 or 78). But for the analog odometer on the right, 73 and 78 are both reasonable estimates, and the average of 75.5 is probably better. So the correct strategy is to aggregate the annotations.
An example of wisdom of the crowds. Although the average score of the 20 annotators (the dashed line) is not correct, it is closer to the correct (ground truth) score than 15 of the 20 annotators’ individual scores. Therefore, the average number is more accurate than most annotators.
For wisdom of the crowds, you need the crowds. This graph shows how often the average score of the annotators is closer to the ground truth score than most annotators. If there are three annotators, about 70% of the time, the average score of those annotators will be closer to the actual score than at least two of those annotators. It is rare to have more than ten annotators for each item when creating training data, and this graph shows that the average annotation is better than most annotators about 90% of the time when there are ten annotators.
A comparison of absolute and relative encodings when using machine learning to predict the correct number from the annotations. Here, Alex, Blake, and Cameron have annotated 0.3, 0.4, and 0.8 for a ground truth item for which the actual value is 0.55. We can encode the absolute values of the annotations with the ground truth as the label (target value) for this training-data item. Alternatively, we can take the average of the annotators, which is 0.5, and encode the fact that this value should be 0.05 higher. We similarly encode each annotation by how much it differs from the average. Another way to think of the relative encoding is that it is encoding the error of our average instead of the values.
A review task in which an annotator is evaluating whether a bounding box (typically created by a different annotator) is correct or incorrect. Review tasks form the backbone of many quality control strategies when programmatic quality control is difficult or will take more resources.
Extending the review task in figure 10.6 so that an expert annotator can edit the bounding box created by nonexpert annotators. This approach is one way to create ground truth data.
An example of IoU for measuring the accuracy of a bounding box (location accuracy). The accuracy is calculated as the area that intersects the annotator’s bounding box with the ground truth bounding box, divided by the area that is the union of the two boxes.
An example of multiple bounding boxes from multiple annotators. Overall agreement is calculated as the average pairwise IoU of all boxes.
An example of overlapping bounding boxes. It is difficult to distinguish which box from different annotators applies to the same object. One annotator (long dashes) has annotated two objects. The other annotator (short dashes) has annotated three objects.
Relative encodings for bounding boxes. The image is cropped and stretched so that every training item has identical dimensions and position. The relative encoding addresses the problem with objects being in different locations within the image and lets the model focus on a smaller number of features to make the predictions.
An example of semantic segmentation in which every pixel is labeled as “Person,” “Plant,” “Ground,” “Bicycle,” “Bird,” or “Sky.” This kind of colored photograph is what a lot of semantic segmentation tools look like: a coloring-in exercise. We’ll cover those tools in chapter 11. If you’re looking at this image in black and white, the contrastive shades of gray should give you a good idea of what the image would look like in color. If the different objects of the same class receive a label (the four trees are labeled separately, for example), the task is known as instance segmentation.
An example of semantic segmentation aggregation via workflows. Two annotators disagreed about a region, and that region is passed to a third annotator to review and adjudicate. There are two interface options: the adjudicator can select one of the two regions from the first two annotators, or they might annotate directly on the image, where the region with disagreement is presented as unannotated.
Table 10.1 Types of sequence labels: POS; keyword detection; and two types of named entities, diseases, and locations. The POS labels are one per token and can be treated similarly to labeling tasks for quality control. “B” (Beginning) is applied to the beginning of the span, and “I” (Inside) is applied to the other words within the span. Marking the start explicitly allows us to unambiguously distinguish spans that are next to each other, such as “San Francisco” and “supermarket.” This encoding technique is called IOB tagging, in which “O” (Outside) is the nonlabel. (“O” is omitted from this table for readability.) For multispan tasks, such as keywords and entities, quality control is more complicated than for labeling tasks.
An example of a labeling task that asks whether a sequence is present in the text without asking the annotator to label that sequence. This approach is especially useful for quickly ensuring that no text is missed for potential entities, and it can use a broader workforce that might not be as accurate in identifying the entity boundaries.
An example of a labeling task that asks whether a sequence is present in the text, which creates a model that can be used as an embedding within the sequence labeling task. This approach is especially useful when there is a much larger volume of data with annotations for the labeling task than for the sequence task (ten times or more) which can be the byproduct of workflows aimed at reducing bias and engaging nonexpert annotators.
A workflow for generating data in contexts where no unlabeled data exists. This workflow looks similar to the other human-in-the-loop workflows, but there is no automation on the data-creation side. Humans look at existing examples and are given instructions about the types of examples that they need to create (Type A and Type B here). Those examples are added to the training data.

Summary

  • All machine learning tasks can take advantage of annotation strategies such as ground truth data, interannotator agreement, breaking tasks into subtasks, expert review and adjudication tasks, synthetic data, and (semi)automation via machine learning. Each approach has strengths and weaknesses, depending on the task, the data, and the problem that you are addressing.
  • Continuous tasks can accept a range of acceptable answers and in some cases can use wisdom of the crowds to determine whether it is better to accept the annotation of the best annotator instead of the average annotation value for an item.
  • Object detection tasks should track localization accuracy and label accuracy separately. Be cautious that IoU will produce lower scores in higher dimensions for the same general level of annotator performance.
  • Semantic segmentation can take advantage of review tasks in which expert annotators can adjudicate regions of disagreement instead of reannotating the entire image.
  • Sequence labeling tasks typically use human-in-the-loop systems to generate candidates, especially when the important sequences are relatively rare.
  • Language generation tasks typically have multiple acceptable answers. These answers can be evaluated against multiple ground truth examples per item or evaluated by humans who rate the output and are in turn evaluated on the accuracy and agreement of their ratings.
  • Other machine learning tasks, such as information retrieval, often use human-in-the-loop annotation systems, especially when a random sample of data would rarely surface relevant items.

FAQ

How should ground truth be defined for continuous annotation tasks?Ground truth for continuous tasks is often defined as an acceptable range of responses rather than a single exact value. For example, on a 0–100 sentiment scale, values in an 80–100 range might be treated as correct for a positive item. The exact range depends on the task: some tasks require exact matches, while others allow a broader tolerance.
How can annotator accuracy be measured on continuous tasks?You can measure annotator accuracy by checking how often each annotation falls within the acceptable ground-truth range. This works similarly to labeling tasks, except the “correct” answer is a range instead of one discrete label. If the task is ordinal, you can also adapt agreement metrics such as Krippendorff’s alpha by changing the label weights.
When should you aggregate continuous annotations, and when should you pick one annotator’s value?If the task is subjective or inherently nondeterministic, averaging multiple annotations can be useful because it often produces a better estimate. But if the task is deterministic and one annotator is more accurate, selecting the best annotation can be better than averaging. With only a small number of annotators, the average is not always optimal, so the right choice depends on the data and your confidence in each annotator.
How is object detection quality usually controlled?Object detection quality is often managed through review workflows rather than fully automated checks, because reviewing a bounding box is much faster than drawing one. Object labeling uses the same methods as image labeling, while localization quality is often checked by comparing boxes to ground truth using metrics such as intersection over union (IoU). Expert review is especially helpful when bounding boxes are expensive to create or ambiguous.
What is the most common metric for evaluating bounding box accuracy?Intersection over union, or IoU, is the standard metric for bounding-box accuracy. It measures the overlap between the predicted box and the ground-truth box divided by their union. In some cases, you may also adjust IoU for random chance, but this is less common in practice.
How should semantic segmentation quality be evaluated?Semantic segmentation is usually evaluated at the pixel level, much like image labeling but for every pixel. Ground truth and agreement are typically measured by the percentage of pixels labeled correctly, sometimes allowing a small buffer near boundaries. Because boundary errors and tool-assisted selection errors are common, review or adjudication is often used to resolve disagreements.
How do you handle subjectivity in sequence labeling tasks?For sequence labeling, subjectivity is usually handled with review and adjudication, especially when spans are ambiguous or multiple interpretations are valid. You can evaluate both label accuracy and span accuracy separately: label accuracy can be measured per token, while span accuracy requires the full span to match. This helps distinguish between label confusion and boundary disagreement.
What is the best way to create ground truth for language generation tasks?Language generation ground truth often includes multiple acceptable outputs, such as several valid translations or summaries. Automated evaluation typically compares a generated output against all valid references and uses the best match, often with metrics like BLEU. Because generation is subjective and expensive to evaluate, expert review is still an important part of quality control.
How can machine learning help with annotation quality control?Machine learning can help predict which annotations are likely to be correct or incorrect, allowing you to prioritize review. For continuous and vision tasks, models can predict scores such as IoU or predict whether a pixel or annotation is wrong. These predictions can be used to route high-confidence items automatically and send uncertain items to experts.
How should quality control be adapted for tasks like information retrieval or video annotation?For information retrieval, quality is often measured with ranked-list metrics such as DCG or NDCG, rather than simple accuracy. For video annotation, quality control is usually broken into subtasks such as labeling, object detection, and sequence labeling, and each is evaluated separately. In both cases, workflows, sampling strategy, and agreement methods should be chosen based on the structure of the task.

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