Sub topic 8
Spotting Label Noise and Ambiguous Annotations
This chapter assumes that you have trained and evaluated an NLP classifier or sequence tagger. You should also know accuracy, precision, recall, F1, pandas, and train, validation, and test splits.
A model error is a prediction that differs from the recorded label. That difference does not always mean the model is wrong. The recorded label may be noisy, inconsistent, or unclear. Label noise is an incorrect label in the dataset. An ambiguous annotation is a case where two careful annotators could reasonably choose different labels.
Separate model errors from label problems
Start by reading a sample of errors without changing anything. For each example, record whether:
- The model prediction is clearly wrong.
- The dataset label is probably wrong.
- Both labels are defensible.
- The example cannot be judged without missing context.
For example, a sentiment dataset might label “The battery is impressive, but the screen is disappointing” as positive because the annotator focused on the first clause. Another annotator might choose negative because the final judgment is negative. This is ambiguity, not necessarily a model failure.
A useful review table contains the original text, recorded label, prediction, confidence, reviewer decision, and reason.
| Review decision | Meaning | Possible action |
|---|---|---|
| Model wrong | The gold label is clear | Improve the model or features |
| Label likely wrong | The prediction matches the text better | Correct or remove the example |
| Ambiguous | Multiple labels are reasonable | Clarify guidelines or add an uncertain label |
| Missing context | The text cannot be judged alone | Add context or exclude the example |
Measure annotation agreement
If multiple annotators label the same examples, compare their decisions before looking at model predictions. Agreement is the proportion of examples on which annotators select the same label. Low agreement can indicate unclear label definitions, overlapping categories, or insufficient context.
Do not treat agreement as a perfect truth measure. Annotators can agree on the same incorrect interpretation. Also, raw agreement can be misleading when one class dominates. For a formal study, consider a statistic such as Cohen’s kappa for two annotators or Krippendorff’s alpha for multiple annotators and missing labels.
Inspect disagreement with code
The following example finds items where two annotators disagree. In a real project, review these rows with the text hidden from the model team first when you want to reduce confirmation bias.
import pandas as pd
reviews = pd.DataFrame({
"text": [
"The package arrived early.",
"The product works, but the design is ugly.",
"Support never replied.",
"It is fine, I suppose.",
],
"annotator_a": ["pos", "neg", "neg", "neu"],
"annotator_b": ["pos", "pos", "neg", "neg"],
})
reviews["agree"] = reviews["annotator_a"] == reviews["annotator_b"]
print(reviews.groupby("agree").size())
print(reviews.loc[~reviews["agree"]].to_string(index=False))After review, calculate the rate of suspected noise separately from genuine model mistakes. If many errors share the same annotation reason, update the labeling guide and relabel a targeted sample. Keep a versioned record of changed labels so that later evaluations remain reproducible.
Decide whether to act
Prioritize label investigation when errors are concentrated in one category, when annotators disagree often, or when confident model predictions conflict with labels. Do not remove difficult examples merely because they lower the score. Difficult examples may represent important real-world cases.
Exercise
A classifier predicts “positive” for an example labeled “negative,” but three reviewers independently say both labels are reasonable. How should you record this case?
Show answer
Record it as ambiguous, preserve the original label, document the reasoning, and decide through revised guidelines or an explicit uncertainty policy rather than treating it as a clear model error.