Structured Prediction and Parsing Evaluation › Error Analysis That Teaches You Something
Language AI HandbookAll chapters Error analysis locates errors that an aggregate metric cannot identify. The following techniques help organize that inspection. Align the gold and predicted sentences and words before using these helpers on new outputs. Check that each scored word has one prediction. For a label confusion matrix, list each observed gold or predicted relation once in the label inventory.
Confusion Matrices
A confusion matrix over labels shows which relations the model confuses and in which direction. Asymmetry matters. Compare conditional error rates as well as raw counts: unequal class support can produce asymmetric counts even with symmetric conditional errors. A word-order explanation requires a separate test.
For non-root attachments, group by the reference POS tags of the gold head and its dependent. Build a relation confusion matrix for each group and report how many attachments it contains. Confusions between prep and pobj are different from confusions between nsubj and dobj, even if both show up as label errors.
Distance, Direction, and Length
The simulation illustrates an imposed distance effect. To determine whether a real system has that effect, measure its outputs, including support counts in each bucket. Two further breakdowns can be useful:
- Direction. Compare leftward and rightward gold attachments. Any difference can depend on the data, encoder, and decoder; a fully bidirectional graph scorer does not have to delay a decision in the same way as an incremental transition parser.
- Sentence length. Group sentences by length and examine their relation and distance composition. Lower exact match can arise simply from having more opportunities for error, whereas causal error propagation is an additional claim about the parser that needs evidence.
Report these as buckets, not as single numbers. A parser that wins on aggregate but loses on long sentences may be the wrong choice for a downstream task that cares about complex syntax.
Oracle Analysis
A candidate-set oracle chooses the output with the highest evaluation score against gold among a nonempty family of feasible candidates. For top- head lists, the fraction of scored words whose gold head appears in its list upper-bounds oracle UAS when the lists admit a legal tree. Even then, keeping all individually available gold heads may violate a tree constraint. If the lists admit no legal tree, the legal-tree oracle has no output. Applying the metric oracle to a beam can reveal whether it contains a useful parse.
Suppose a candidate-set oracle has 98 UAS and the model-selected output from that same family has 92 UAS, both against the same reference on the same scored words. That gap can reflect the scoring function ranking a worse candidate above a better one, approximate search failing to find the model-score optimum, or both. It does not by itself show that six points are search error. A better-scoring legal candidate demonstrates a search error under the same model score and feasible set. Compare with the exact maximum to measure the full search gap. An exact decoder may still have low gold accuracy because its objective ranks the wrong tree highest.
With the selected parse in the oracle’s candidate family and both evaluated against the same reference with the same scoring protocol, a small accuracy gap means little additional head accuracy is available within that family. It does not prove that the encoder, score model, or annotation scheme is the sole bottleneck. Candidate generation, pruning, and the distinction between per-token and whole-tree oracles should all be recorded. These experiments guide a repair only when the oracle answers the question you actually intend to ask.
Annotation Noise and Agreement
Gold trees are reference annotations produced under a scheme, sometimes with adjudication. Disagreements can reflect ambiguity, different analyses, or mistakes, so manual error inspection should separate clear system errors from defensible alternatives. Report an agreement study's population, protocol, and scorer if you use it as context; there is no universal agreement percentage for all dependency or constituency treebanks.
Inter-annotator agreement is not a mathematical ceiling on matching a fixed reference. For a simple counterexample, suppose annotators A and B disagree on 10 of 100 scored decisions, and the chosen reference is A's annotation. Their agreement is 90%, but a system that reproduces that fixed reference scores 100%. This hypothetical example does not describe a real corpus; it shows why agreement cannot be used as a universal numerical upper bound on parser accuracy.
Annotation uncertainty can still affect what a score means and what a model learns. An observed disagreement rate is not automatically a proportion of randomly corrupted labels, and it does not determine a training-loss floor: a sufficiently flexible model could memorize its training annotations. On held-out data, document disputed cases, assess adjudication where available, and measure whether conclusions survive reasonable annotation choices. Such analysis complements attachment scores without replacing them by an unsupported “human ceiling.”
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!