Graph-based parsing is a syntactic analysis paradigm that defines the parsing problem as finding the highest-scoring directed spanning tree over all possible dependency arcs in a sentence. Unlike transition-based methods that process words sequentially, graph-based parsers score every potential head-dependent relationship globally and decode the optimal structure using the Chu-Liu/Edmonds algorithm for maximum spanning trees.
Glossary
Graph-Based Parsing

What is Graph-Based Parsing?
A parsing paradigm that scores all possible dependency arcs in a sentence simultaneously to find the highest-scoring maximum spanning tree.
This approach naturally handles non-projective parses with crossing arcs, making it suitable for languages with free word order. First-order arc-factored models assume edge independence for tractability, while higher-order parsing incorporates sibling and grandparent features to capture richer syntactic contexts at increased computational cost.
Key Characteristics of Graph-Based Parsing
Graph-based parsing defines dependency parsing as a search for the maximum spanning tree over a complete directed graph, scoring all possible arcs simultaneously rather than making incremental greedy decisions.
Maximum Spanning Tree Decoding
The core algorithmic insight: treat every word as a node and every possible directed arc as a scored edge. The parser's job is to find the tree that maximizes the sum of arc scores. This is solved efficiently using the Chu-Liu/Edmonds algorithm for directed graphs, guaranteeing the globally optimal tree under the arc-factored model. Unlike transition-based methods, this avoids error propagation from early greedy decisions.
Arc-Factored Score Decomposition
Graph-based parsers typically assume first-order factorization: the score of a complete dependency tree is simply the sum of its individual arc scores. This independence assumption makes global search computationally tractable.
- Arc score: Computed via a learned function (e.g., biaffine attention) over head-dependent pairs
- Trade-off: Enables exact inference but cannot capture sibling or grandparent interactions
- Higher-order extensions: Add factors for adjacent arcs to model richer syntactic contexts
Non-Projectivity Handling
A major advantage of graph-based parsing is native support for non-projective trees. The Chu-Liu/Edmonds algorithm finds the maximum spanning tree in a general directed graph without enforcing projectivity constraints.
- Crossing arcs: Required for languages with free word order (Czech, Dutch, German)
- Projective variants: Eisner's algorithm provides O(n³) decoding when projectivity is enforced
- Practical impact: Graph-based parsers consistently outperform transition-based systems on non-projective treebanks
Biaffine Attention Scoring
Modern neural graph-based parsers use deep biaffine attention to compute arc scores. For each token pair (i, j), a bilinear transformation scores how likely word j is to be the head of word i:
- Architecture: BiLSTM or Transformer encodes each word into a contextualized vector
- Head and dependent representations: Separate feedforward layers produce distinct vectors for each role
- Biaffine classifier:
score(i→j) = h_i^T · U · d_j + W · [h_i; d_j] + b - Label prediction: A second biaffine layer assigns dependency relation labels (nsubj, dobj, etc.)
Deep Biaffine Parser (Dozat & Manning)
The canonical neural graph-based architecture that achieved state-of-the-art results across multiple treebanks. Key design choices:
- No feature engineering: Learns everything from word embeddings and character-level CNNs
- Deep biaffine scoring: Replaces simple dot-product attention with learned bilinear transformations
- Dropout on embeddings and hidden states: Critical regularization for small treebank sizes
- Performance: Achieved 95.7% UAS and 94.1% LAS on English Penn Treebank, setting a new standard for dependency parsing accuracy
Graph-Based vs. Transition-Based Trade-offs
The two parsing paradigms represent a fundamental accuracy-efficiency trade-off:
- Graph-based strengths: Global optimization, natural non-projectivity, higher accuracy on standard benchmarks
- Transition-based strengths: Linear-time O(n) complexity, incremental processing suitable for streaming, easier integration with dynamic oracles
- Convergence: Modern neural transition-based parsers with beam search approach graph-based accuracy while maintaining speed advantages
- Production choice: spaCy uses transition-based for speed; Stanza offers graph-based for accuracy
Graph-Based vs. Transition-Based Parsing
A technical comparison of the two dominant approaches to data-driven dependency parsing, contrasting their decoding strategies, computational properties, and architectural assumptions.
| Feature | Graph-Based Parsing | Transition-Based Parsing |
|---|---|---|
Decoding Strategy | Global optimization over all possible arcs; finds the Maximum Spanning Tree (MST) via Chu-Liu/Edmonds algorithm | Greedy or beam-search sequence of local shift-reduce actions (SHIFT, LEFT-ARC, RIGHT-ARC) |
Scoring Model | Arc-factored or higher-order; scores all O(n²) possible arcs simultaneously | History-based classifier; scores the next action given the current parser state (stack, buffer, partial arcs) |
Complexity (Inference) | O(n³) for naive projective; O(n²) for Eisner algorithm; O(n²) for Chu-Liu/Edmonds non-projective | O(n) for greedy deterministic; O(n * B) for beam search with beam width B |
Non-Projectivity Handling | Native support via Chu-Liu/Edmonds; non-projective arcs are scored and selected naturally | Requires explicit SWAP action or pseudo-projective transformations; greedy decoders struggle with crossing arcs |
Error Propagation | Low; all arcs are scored globally, so a single local error does not cascade to subsequent decisions | High in greedy mode; an early incorrect action corrupts the parser state for all subsequent decisions |
Training Objective | Margin-based or max-likelihood over correct tree vs. all possible trees; often uses hinge loss on tree scores | Multi-class classification of oracle action sequences; dynamic oracles allow exploration of non-gold states |
Representative Implementations | MSTParser, Deep Biaffine Parser (Dozat & Manning), TurboParser | MaltParser, spaCy Dependency Parser, Arc-Eager/Arc-Standard systems |
Feature Representation | Dense neural embeddings (BiLSTM, Transformer) with biaffine attention over all head-dependent pairs | Sparse indicator features (word, POS, arc labels) over parser state history; modern variants use neural state embeddings |
Frequently Asked Questions
Clear, technical answers to common questions about graph-based dependency parsing, covering the core algorithms, evaluation metrics, and architectural decisions that define this NLP paradigm.
Graph-based parsing is a syntactic analysis paradigm that scores all possible dependency arcs in a sentence simultaneously to find the highest-scoring maximum spanning tree. Unlike transition-based methods that process words sequentially, a graph-based parser constructs a complete, weighted directed graph where nodes represent words and edges represent potential head-dependent relationships. A factored model assigns a score to each possible arc based on extracted features, and a decoding algorithm—typically the Chu-Liu/Edmonds algorithm—finds the tree that maximizes the sum of these scores. This global optimization allows the parser to consider long-range dependencies without the error propagation issues inherent in greedy left-to-right decisions, making it particularly effective for languages with free word order.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts, algorithms, and neural architectures that define the graph-based approach to dependency parsing, where the optimal tree is selected from all possible arcs simultaneously.
Chu-Liu/Edmonds Algorithm
The foundational combinatorial optimization algorithm that finds the maximum spanning tree in a directed graph. In graph-based parsing, it decodes the highest-scoring dependency tree from the complete graph of all possible arcs. The algorithm works by:
- Greedily selecting the best incoming arc for each node
- Identifying and contracting cycles
- Recursively solving the reduced graph
- Expanding cycles by removing the minimum-weight arc This enables efficient non-projective parsing for languages with free word order.
Arc-Factored Model
A first-order parsing model where the score of a complete dependency tree decomposes into the sum of its individual arc scores. This assumes independence between edges for computational tractability. Key characteristics:
- Each arc (head, dependent) receives a score independently
- The total tree score is simply the sum of selected arcs
- Enables exact decoding via maximum spanning tree algorithms
- Cannot capture sibling or grandparent interactions
- Serves as the baseline for more complex higher-order models
Biaffine Attention
A neural mechanism that computes scores for all possible head-dependent pairs using a bilinear transformation. Introduced by Dozat and Manning, it applies:
- Two separate feedforward networks to produce head and dependent representations
- A learned bilinear weight matrix between them
- A deep variant adds a multi-layer perceptron before the biaffine operation This enables efficient global arc prediction over the entire sentence in a single operation, replacing exhaustive pairwise scoring.
Deep Biaffine Parser
A neural graph-based parser architecture that combines BiLSTM-encoded word representations with deep biaffine attention for both arc and label prediction. Core components:
- Stacked BiLSTMs produce contextualized token representations
- Deep biaffine arc scorer computes head-dependent probabilities
- Separate biaffine label classifier predicts relation types
- Trained with cross-entropy loss on gold-standard treebanks Achieved state-of-the-art Labeled Attachment Score (LAS) across multiple languages upon introduction.
MSTParser
An early and influential graph-based dependency parser that uses the maximum spanning tree algorithm to find the globally optimal parse. Key design decisions:
- Scores arcs using linear classifiers with hand-engineered features
- Supports both projective (Eisner's algorithm) and non-projective (Chu-Liu/Edmonds) decoding
- Trained using the margin-infused relaxed algorithm (MIRA) for structured prediction
- Demonstrated that global optimization outperforms greedy transition-based approaches on long-distance dependencies
- Established the graph-based paradigm as a viable alternative to transition-based methods.
Higher-Order Parsing
An extension beyond arc-factored models that incorporates features from sibling arcs, grandparent arcs, or tri-sibling configurations. These richer contexts capture:
- Coordination structures where conjuncts share a head
- Prepositional phrase attachment ambiguities
- Clause boundary identification Trade-offs include:
- Improved accuracy on complex syntactic phenomena
- Increased computational complexity (NP-hard for exact decoding)
- Requires approximate inference like belief propagation or cube pruning Modern neural approaches implicitly capture higher-order features through contextualized embeddings.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us