Quality Assurance
How to Measure Inter-Annotator Agreement for Physical AI Data
Inter-annotator agreement tells you how consistently annotators apply the same labels to the same items. For two annotators on a categorical label, Cohen's kappa is κ = (p_o − p_e) / (1 − p_e): the observed agreement p_o, corrected for the agreement p_e expected from each annotator's own label frequencies. Measure it on items that annotators labelled independently. Report how p_e was estimated and how you handled undefined cases. Set any acceptance threshold for your own task: no single kappa cutoff makes robot data fit for every policy. Agreement describes label consistency. Whether to accept a delivered lot is a separate sampling decision, agreed with the supplier.
Quick facts
- Topic
- Measuring inter-annotator agreement
- Audience
- Annotation leads, ML ops, data buyers
- Deliverable
- Worked kappa calculation, reporting fields, and a separate lot-acceptance decision box
What inter-annotator agreement measures, and what it does not
Inter-annotator agreement (IAA) asks one question: when two people label the same item independently, how often do they give the same label, beyond what their label habits alone would produce? For two annotators on a classification task, scikit-learn defines Cohen's kappa as κ = (p_o − p_e) / (1 − p_e). Here p_o is the observed agreement ratio and p_e is the agreement expected if each annotator assigned labels at random according to their own label frequencies[1].
That makes kappa a measure of label consistency. It does not tell you whether the labels are correct, whether the episodes are useful for a particular policy, or whether a delivered batch should be accepted. Lot acceptance is a different procedure. In acceptance sampling, a randomly chosen sample from a lot informs an accept-or-reject decision about that lot, and NIST's handbook stresses that the purpose is "to decide whether or not the lot is likely to be acceptable, not to estimate the quality of the lot"[2]. Keep the two decisions apart: agreement tells you whether your taxonomy and annotators are consistent; your acceptance plan tells you what happens to a lot.
Worked example: computing Cohen's kappa by hand
The three cases below are hypothetical. They exist only to show the arithmetic and were not computed from any real dataset. Two annotators, A and B, each label the same 100 robot episodes with one binary label, "contact made" or "no contact". p_o is the share of episodes where both gave the same label. p_e is Σ over labels of (A's share of that label × B's share of that label), which is the per-annotator prior that scikit-learn describes[1].
Case 1, balanced labels. Each annotator says "contact" on 50 episodes. They agree on 45 "contact" and 45 "no contact". p_o = 0.90 and p_e = 0.5×0.5 + 0.5×0.5 = 0.50, so κ = (0.90 − 0.50) / (1 − 0.50) = 0.80.
Case 2, same raw agreement, skewed labels. Each annotator says "contact" on 90 episodes. They agree on 85 "contact" and 5 "no contact". p_o is still 0.90, but p_e = 0.9×0.9 + 0.1×0.1 = 0.82, so κ = (0.90 − 0.82) / (1 − 0.82) ≈ 0.44. The same 90% raw agreement means much less when one label dominates. This is why you report kappa together with the label distribution.
Case 3, undefined. Both annotators label every episode "contact". p_o = 1 and p_e = 1, so the denominator 1 − p_e is 0 and kappa is undefined. Do not report it as 1 or as 0. scikit-learn's documentation describes undefined cases and, in the 1.9 docs observed for this guide, a `replace_undefined_by` parameter that lets you choose `np.nan` or a stated value[1]. Record which choice you made.
| Case | A says 'contact' | B says 'contact' | Agree on contact / no contact | p_o | p_e | κ |
|---|---|---|---|---|---|---|
| 1 Balanced | 50 | 50 | 45 / 45 | 0.90 | 0.50 | 0.80 |
| 2 Skewed | 90 | 90 | 85 / 5 | 0.90 | 0.82 | ≈0.44 |
| 3 One label only | 100 | 100 | 100 / 0 | 1.00 | 1.00 | undefined (0/0) |
Designing the overlap sample
Agreement can only be measured on items that more than one annotator labelled independently. Write down four things before labelling starts. First, which items get a second label, and how they are drawn from the full set (for example, at random within each task or environment you care about). Second, which annotators are paired, so that you can tell one person's drift from a taxonomy problem. Third, how independence is enforced: annotators do not see or discuss each other's labels until both have submitted. Fourth, where the annotator IDs and timestamps are stored.
There is no universal overlap percentage. How many double-labelled items you need depends on the question you want to answer: an overall estimate, a per-label estimate for rare but important labels, or a per-annotator comparison. Rare labels need enough double-labelled examples to show disagreement at all. Decide the sample from the precision you need, and state it in your report rather than borrowing a percentage from another project.
Choosing the statistic for your label type
Cohen's kappa, as documented in scikit-learn, compares two annotators on a classification problem[1]. If your categories are ordered (for example a 1–5 grasp-quality grade), scikit-learn offers linear or quadratic weighting in addition to the unweighted form, and you should state which one you used[1]. For more than two annotators per item, or for continuous values such as keypoint positions or segment boundaries in time, use a statistic whose own documentation covers that case, and report it under its own name. Do not compare numbers across different statistics as if they were on one scale.
| Field | Example entry (hypothetical) |
|---|---|
| Label and categories | contact_state ∈ {contact, no_contact} |
| Statistic and weighting | Cohen's kappa, unweighted |
| Implementation and version | scikit-learn cohen_kappa_score, version as installed |
| Items and annotators | number of double-labelled episodes; annotator IDs |
| How p_e was estimated | per-annotator label frequencies |
| Undefined cases | replace_undefined_by=np.nan; count of undefined labels |
| Label distribution | share of each category for each annotator |
Agreement is not lot acceptance: the separate decision box
A supplier delivering annotated episodes will often show an agreement score. Treat that as evidence about consistency, then make the acceptance decision with its own plan. The plan names the lot, the unit you sample, how the sample is drawn, what is inspected on each sampled unit, the criterion that decides acceptance, and who decides. In acceptance sampling, the disposition of a lot is decided from a random sample drawn from it[2]. The numbers in that plan belong to your contract and risk, not to this guide.
When agreement is low: finding the cause
Low agreement has a few common sources, and each one leaves a different trace. Look at which label pairs are confused and which annotator pairs disagree before you change anything.
Ambiguous taxonomy. The same two labels are confused by most annotator pairs. Rewrite the definitions with a decision rule and visual examples of each label, then relabel a calibration set together.
One annotator drifting. A single annotator disagrees with everyone else while other pairs agree. Review that annotator's guideline understanding before changing the taxonomy.
Missing edge cases. Disagreement clusters on unusual episodes (occlusion, partial contact, two hands). Add those cases, with the agreed label and the reason, to the guideline.
Genuinely subjective labels. Annotators disagree because the label asks for a judgement. If a measurable signal can replace the judgement, define the label from that signal and document the rule. If not, agree how disagreements are resolved and record that.
After any change, measure agreement again on newly double-labelled items, not on items that annotators have already discussed.
What this guide does not claim
No kappa value certifies that robot data is fit for a downstream policy, and this guide gives no universal "good" threshold or overlap percentage. A threshold is a project decision tied to what an error in that label costs you. The worked cases above are illustrative arithmetic, not measurements of any dataset. For deciding whether an episode is usable at all, see the companion guide on evaluating training data quality, which treats missing evidence as a hold rather than a pass.
Related pages
Use these to move from category-level context into specific task, dataset, format, and comparison detail.
External references and source context
- docs scikit learn cohen kappa score
Cohen's kappa definition κ = (p_o − p_e)/(1 − p_e) for two annotators on a classification problem; p_e from per-annotator empirical priors; weights None/linear/quadratic; replace_undefined_by for undefined cases (added in 1.9)
scikit-learn.org ↩ - docs nist eh pmc21
Acceptance sampling: a random sample from the lot informs an accept/reject disposition; its purpose is lot acceptability, not estimating lot quality
www.itl.nist.gov ↩
FAQ
What is a good inter-annotator agreement score for robotics labels?
There is no universal cutoff that makes labels fit for every robot policy. Choose a threshold for each label from what a labelling error costs you in that task, write it down before you measure, and report the statistic, weighting, sample and label distribution alongside the number. A kappa value on its own, without those details, is hard to interpret.
Why can 90% raw agreement give a low kappa?
Kappa subtracts the agreement you would expect from each annotator's label frequencies. In the hypothetical worked case on this page, both annotators label 90% of episodes "contact", so expected agreement is 0.82, and 90% observed agreement gives κ ≈ 0.44. With balanced labels the same 90% gives κ = 0.80.
What should I do when kappa is undefined?
Kappa is undefined when the denominator 1 − p_e is zero, for example when both annotators use only one label. Report it as undefined, not as 0 or 1. scikit-learn's 1.9 documentation describes a replace_undefined_by option (np.nan or a stated value). Record which option you used and how many labels were affected.
Can I use Cohen's kappa for more than two annotators or for continuous labels?
Cohen's kappa, as scikit-learn documents it, compares two annotators on a classification problem, with optional linear or quadratic weighting for ordered categories. For more annotators per item or for continuous values, use a statistic whose documentation covers that case, and report it under its own name.
Does a high agreement score mean I should accept a delivered lot?
No. Agreement measures label consistency. Lot acceptance is decided from an acceptance plan: a random sample from the lot, an agreed inspection and criterion, and a named decision owner. Attach the agreement score as context, not as the acceptance criterion.
Running your own capture operation?
TrueLabel is the software platform for data providers, labs, and robotics companies that run their own capture operations, taking capture devices through processing to high-quality training and alignment data.