Human judgment, preference, and annotation measurement · Human judgment, annotation, and latent measurement · HME005 · Model
Dawid–Skene annotator-error model
Infer latent categorical labels and worker-specific confusion matrices from overlapping annotations. It replaces equal voting with an explicit model of different error patterns.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page.
- Annotator models (Dawid–Skene, GLAD, MACE) Verified in Python and R
Do it in CodeSplash Run it on your own data, in Python or R.
- Availability
- Runs in CodeSplash
- Code example
- Complete calculation
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through agreement.dawid_skene. The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review, on this exact code. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Infer latent categorical labels and worker-specific confusion matrices from overlapping annotations. It replaces equal voting with an explicit model of different error patterns.
Question / hypotheses
Which latent labels and confusion patterns explain the observed annotations? Agreement alone does not identify correctness, and the model is not a hypothesis test of an annotator’s honesty.
Architecture / computational structure
A latent class is drawn from a prevalence vector. Conditional on that class, each observed annotator label follows a row of that annotator’s confusion matrix. EM alternates posterior class probabilities with weighted class/confusion counts.
Assumptions
Annotations are conditionally independent given the true class, and each annotator’s error matrix is stable over the modeled items. Sufficient worker/item overlap and class support are needed. Missing labels may be ignored only under a justified observation/assignment mechanism. Copying and shared model assistance can violate independence.
Formula / computational definition
Parameters and notation
Estimated: class prevalence π and K-by-K confusion matrices Θ_j. Latent quantities: item class probabilities q_i. Choices: K, initialization, restarts, convergence criterion, smoothing/prior, gold anchors, and missing-data policy. Complexity is approximately proportional to observed annotations times K per EM iteration.
Fitting, fine-tuning, and adaptation
Fit on training annotation records, preserve full likelihood traces, and compare initializations. New workers need overlaps or calibration items. Re-estimate after guidelines or worker populations change. Gold labels can anchor class meaning but must be separated from final validation labels.
How to use and calibrate
Check class permutation, row normalization, low-support worker/class cells, and posterior calibration against independent adjudicated data. Report confusion estimates with uncertainty and sample support. Python route: Crowd-Kit; the paired workflow here implements EM directly.
Example application
Aggregate noisy categorical labels on image clips, using a separate small gold calibration set to identify latent class meaning and a final gold test set to assess accuracy and log loss.
Interpretation / pitfalls
Watch out
Conditional dependence makes redundant votes look like independent evidence. A global label permutation can have identical likelihood. Diagonal initialization does not prove identification. A high posterior may reflect a wrong model or shared worker bias.
Python and R code examples
Scope: One exact E-step for known parameters on a single item. Full fitting and held-out inference are in the companion lab. Python NumPy; R base.
Validation: Python executed successfully; native R reviewed but not executed.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Complete calculation — One exact E-step for known parameters on a single item. Full fitting and held-out inference are in the companion lab. Python NumPy; R base. · needs numpy
import numpy as np
prior=np.array([.4,.6]); C=np.array([[[.9,.1],[.2,.8]],[[.8,.2],[.3,.7]]]); labels=[0,1]
q=prior.copy()
for j,l in enumerate(labels):q*=C[j,:,l]
q/=q.sum(); assert np.isclose(q.sum(),1)
print(q)
Complete calculation — One exact E-step for known parameters on a single item. Full fitting and held-out inference are in the companion lab. Python NumPy; R base.
prior <- c(.4,.6)
C <- list(rbind(c(.9,.1),c(.2,.8)),rbind(c(.8,.2),c(.3,.7))); labels <- c(1,2)
q <- prior
for (j in seq_along(labels)) q <- q*C[[j]][,labels[j]]
q <- q/sum(q);stopifnot(abs(sum(q)-1)<1e-12);print(q)
Sources
- Source 1doi.org
- Source 2crowd-kit.readthedocs.io
From the CodeSplash reference, entry HME005.