Dependency Syntax and Universal Dependencies › The Dependency Tree
Language AI HandbookAll chapters Dependency Syntax and Universal Dependencies › The Dependency TreeSection view · Sections in this chapter3 / 13 ↓
Reading tools Definitions, links & notes
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
A dependency structure is a labelled directed graph over the syntactic words of a sentence. Here we first define the basic-tree representation. Enhanced UD graphs, introduced later, need not be trees. The axioms are not arbitrary formalities. They are the conditions that guarantee the structure can be read as a hierarchy of heads and dependents, with no word belonging to two places at once and no word floating outside the sentence.
Nodes and Arcs
The nodes here are syntactic words, not necessarily whitespace-delimited strings or language-model subword pieces. UD can split an orthographic contraction into multiple syntactic words. It records inflectional morphology on the word rather than creating a node for every morpheme. The code below uses the name tokens for lists of syntactic-word records; it does not apply an LLM tokenizer. UD word segmentation defines that boundary.
Given a sentence with syntactic words , a dependency tree is a set of arcs
where is a finite label set. The special index denotes the artificial root, a virtual node that sits above the sentence and has no word of its own. Every token has exactly one incoming arc, called its head arc: is the head and is the dependent.
The arc labels come from a closed vocabulary. In UD the core set has 37 universal relations, with language-specific subtypes permitted. A shared vocabulary supplies targets for supervised label learning and direct comparison. Unrelated one-off labels would require an additional mapping before they could serve those purposes. An inventory gives annotators shared categories; applying them consistently also requires definitions and construction-specific guidance.
The Single-Head Axiom
For every word , there must be exactly one incoming labelled arc , counting the head and label together. This is the single-head axiom, and it is a necessary condition for a basic dependency tree. It does not by itself exclude cycles or guarantee a single root.
The axiom rules out multi-parent structures in the basic tree. In She wants to leave, for example, She is the subject of wants in that tree, while an enhanced graph can also relate it to leave as an externally supplied subject. We will meet this enhanced dependency layer later. An ordinary fronted wh-object is different: in Who did you see?, Who can already be the obj dependent of see in the single-headed basic tree. No additional filler-to-specifier arc is part of that UD analysis. The basic tree gives parsers a well-defined object to predict and evaluators a well-defined object to score.
Every syntactic word has one incoming arc in the representation that includes artificial node 0. Exactly one word has head 0; this is the sentence root. If the artificial node and its arc are omitted from a drawing, that word appears to have no parent.
The Root
Exactly one token has head . Call it the root . The sentence root is typically its main predicate, which may be verbal or nonverbal. Ellipsis and fragments need construction-specific choices, including promotion when a predicate is missing.
Root selection is not always obvious. In She is a doctor the root is doctor (a predicate nominal), not is, because UD treats the copula as a dependent (cop). In Who came? the root is came even though who is prominent. In Hello! the root is Hello. Root selection affects the structural targets used for parser training. For two analyses of the same sentence with different roots, every root-to-leaf path begins with a different word; the remaining attachments need not all change. A parser trained under different root conventions may learn different structural priors.
The root also serves as the anchor for connectivity. Once the root is fixed, every other word must be reachable from it along head-to-dependent arcs. That requirement is what turns a collection of local head decisions into a single connected structure.
Acyclicity and Connectivity
Two more axioms ensure the structure really is a tree:
- Acyclicity. No token is its own ancestor. Following head pointers from any token must terminate.
- Connectivity. Every word is reachable from artificial node 0 by following head-to-dependent arcs. Equivalently, following parent pointers from any word eventually reaches 0.
Connectivity follows from single-head plus acyclicity plus a finite sentence: if you follow heads from any token you cannot loop forever, so you eventually hit artificial node 0, the only node without an incoming arc. This argument assumes that every head index is a valid word index or 0. The extra requirement that exactly one word has head 0 is UD's sentence-root convention.
It is worth seeing why these conditions matter in practice. Without acyclicity, a parser could produce a cycle such as a heads b, b heads c, and c heads a. Such a structure has no natural root and cannot be drawn as a hierarchy. Without connectivity, a token could be attached to a head that is not connected to the rest of the sentence, producing a forest rather than a tree. UD treebanks are required to be connected, so a validation check for connectivity is a useful sanity check on any parser output.
These conditions specify the basic tree used here. Projectivity is an additional restriction on the relationship between tree structure and word order, not a requirement for all UD basic trees.
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!