Structured Prediction and Parsing Evaluation › Summary
Michael BrenndoerferNovember 17, 20263 min read
Language AI HandbookAll chapters Structured prediction chooses a legal combination of related output components, such as arcs that form a parse tree. Parsing is the canonical instance, and the lessons transfer.
- Exhaustive enumeration grows rapidly. A 20-token sentence has roughly unlabeled dependency trees, of which roughly are projective. At this length, exhaustive enumeration is impractical as a general decoding method.
- Factorization specifies the scored parts. Score the structure as a sum over parts. The choice of parts controls which output interactions receive scores; the chart states and algorithm determine the computational cost.
- Eisner's algorithm decodes projective dependency trees in by combining complete and incomplete spans. The displayed recurrences combine contiguous spans and retain the boundary information required by their factorization.
- CKY combines licensed child constituents in a chart. In log-score space, replacing alternative maxima by log-sum-exp computes a log-partition function; inside-outside gives marginals under the stated factorization.
- Exact constrained decoding. With masks, exact inference excludes forbidden parts and selects a highest-scoring legal output when a finite-scoring completion exists. Coupled constraints may need additional chart states, another exact optimizer, or approximate search.
- Labels decouple from structure when scores and legal label choices factor over arcs. Preparing labels for all candidate lexical arcs costs ; labeling a fixed tree costs . Coupled output-label constraints need inference that accounts for the coupling.
- Independent head choices need a tree constraint. They may contain cycles even when each local choice has a high score. A decoder must also use the target root convention.
- Training objectives differ from evaluation metrics. Log-likelihood, hinge loss, and F1 measure different things. Decoding for the evaluation metric can change the score even when the trained model is fixed.
- UAS and LAS measure attachment accuracy. With the same scored words, UAS minus LAS is the fraction with a correct head and a wrong relation label. Declare punctuation, root, label, and token-alignment conventions before comparing the numbers.
- PARSEVAL F1 gives partial credit for constituents and can remain high despite complete-tree disagreement. Sentence exact match separately reports complete scored agreement.
- Error analysis by distance, direction, relation, and sentence length exposes effects hidden by aggregates. Candidate-set oracles assess available accuracy; a search-error claim requires comparing model scores under the same feasible set. Annotation agreement contextualizes a reference but is not a strict ceiling.
- The questions generalize. Sequence labeling, semantic parsing, coreference, and constrained generation all require clear output spaces, objectives, inference procedures, and evaluation targets. They do not all admit the same dynamic program.
The next part moves from form to meaning, starting with lexical semantics and word senses. Some meaning-related tasks also couple several decisions, while others are introduced as local classification problems. The distinction between local scores, joint constraints, and the evaluation target will remain useful as we move into that material.
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!