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.
Human-in-the-Loop Machine Learning ebook for free