AI Compass
Compass

Annotation and labelling

How raw data becomes training data: writing the guideline, measuring agreement, estimating cost, and letting models help.

·2 min read·By Fachredaktion Technik
DETAIL
3 sections

The idea

A model learns from examples with correct answers. Someone has to assign those answers. That is annotation, and in most projects it is the single largest cost.

The flow

  1. 01

    Write the guideline

    With examples, especially for borderline cases. Definitions alone are not enough.

  2. 02

    Pilot run

    Have 50 to 100 cases annotated independently by two people.

  3. 03

    Measure agreement

    Where agreement is low, revise the guideline, not the people.

  4. 04

    Main run with sampling

    Have five to ten percent double-annotated to monitor quality continuously.

A usable guideline

  • One page per class: definition, three unambiguous examples, three borderline cases with reasoning.
  • A decision order for cases where several classes apply.
  • An explicit "cannot be decided" category so nobody has to guess.
  • A change log. Every adjustment mid-run affects the cases already collected.

Estimating cost

TaskTime per unit10,000 units
Text classification, 3 classes5 to 15 s14 to 42 h
Text classification, 20 classes20 to 60 s56 to 167 h
Marking entities in text1 to 4 min167 to 667 h
Object boxes in an image20 to 60 s56 to 167 h
Instance segmentation3 to 15 min500 to 2,500 h

That table belongs at the start of every project. It leads to a change of task definition more often than to a budget request.

Active learning

Rather than annotating at random, you pick the cases the current model is least certain about.

Selection by uncertainty

margin(x) = p₁ − p₂ (small value = uncertain) entropy(x) = − Σᵢ pᵢ log pᵢ (large value = uncertain)

Cases are chosen where the gap between the two best classes is small or the entropy is high.

p₁, p₂
the two highest class probabilities
H(p)
the entropy of the prediction

Empirically, active learning reaches the same quality with 30 to 60 percent of the annotations. Two caveats:

  • The resulting dataset is no longer representative and is unsuitable as a test set. The test set is always drawn at random.
  • Pure uncertainty selection favours edge cases and outliers. Blending in 20 to 30 percent random cases keeps the dataset healthy.

Pre-annotating with a model

StepEffect
Model proposes, human confirms or correctsFactor 3 to 5 faster
Only present cases below a confidence thresholdFactor 5 to 20, with risk
Accept without reviewModel errors become training data

The third row is the mistake that quietly ruins projects: the model learns its own errors and confirms them. Sampling at least five percent of all automatically accepted labels is the floor.

For high-risk systems, Art. 10 requires among other things information on data collection procedures, provenance, and assumptions about what the data is meant to represent. The annotation guideline, the measured agreement and the change log are therefore part of the technical documentation. Keeping them properly discharges that obligation as a by-product. See Preparing for audit.

Related courses and sources

PaperFreeEN

Segment Anything

Segmentation without task-specific training, steered by points and boxes. Changes the preparatory work in image analysis considerably.

For image analysis with little data of your own; it changes the preparatory work noticeably.

ToolFreeEN

spaCy

A library for classical language processing. For recognising names, parts of speech and structure it is often faster, cheaper and more checkable than a language model.

When names, parts of speech or structure are needed: often faster, cheaper and more checkable than a language model.

Was this page helpful?
Annotation and labelling