The Chu-Liu/Edmonds algorithm is a combinatorial optimization procedure that finds a maximum spanning arborescence—a directed tree rooted at a specific node with a path to every other vertex—in a weighted, directed graph. In graph-based dependency parsing, it decodes the highest-scoring dependency tree by selecting the optimal set of directed arcs where each word has exactly one syntactic head, efficiently handling non-projective structures with crossing edges that linear transition-based parsers cannot capture.
Glossary
Chu-Liu/Edmonds Algorithm

What is Chu-Liu/Edmonds Algorithm?
A combinatorial optimization algorithm used in graph-based dependency parsing to find the maximum spanning tree in a directed graph, enabling the efficient decoding of non-projective dependency structures.
The algorithm operates recursively in two phases: contraction and expansion. It first greedily selects the maximum-weight incoming edge for each non-root node. If this forms a tree, it is optimal. If cycles exist, the algorithm contracts each cycle into a single super-node, adjusts the edge weights of nodes entering the cycle to reflect the opportunity cost of breaking it, and recursively solves the reduced graph before expanding the cycles back into the final maximum spanning tree.
Key Characteristics
The Chu-Liu/Edmonds algorithm is a combinatorial optimization technique that finds a maximum spanning tree in a directed graph, enabling efficient decoding of non-projective dependency structures.
Maximum Spanning Tree (MST) Objective
The algorithm finds the directed spanning tree rooted at a designated node that maximizes the sum of arc weights. In dependency parsing, each word is a node, and arc weights represent the score of a head-dependent relationship. The MST ensures the globally optimal parse tree is selected, rather than a locally greedy sequence of decisions.
Non-Projective Parsing Capability
Unlike transition-based parsers constrained to projective structures, the Chu-Liu/Edmonds algorithm naturally handles crossing dependencies. This is critical for languages with free word order, such as Czech, Dutch, and Turkish, where non-projective arcs are frequent and syntactically necessary.
Algorithmic Mechanism
The algorithm operates in two phases:
- Contraction Phase: Iteratively selects the highest-weight incoming arc for each node. If a cycle is detected, it contracts the cycle into a single super-node and adjusts edge weights.
- Expansion Phase: Recursively expands super-nodes, breaking cycles by removing the minimum-weight arc in each cycle to form a valid tree. This guarantees an O(E + V log V) runtime with Tarjan's implementation.
Arc-Factored Model Integration
The Chu-Liu/Edmonds algorithm is the standard decoder for arc-factored graph-based parsers. In these models, the score of a dependency tree decomposes into the sum of individual arc scores. The algorithm efficiently finds the highest-scoring tree under this independence assumption, making it compatible with neural scoring functions like biaffine attention.
Historical Context and Origin
The algorithm was independently discovered by Yoeng-Jin Chu and Tseng-Hong Liu (1965) and Jack Edmonds (1967). Edmonds framed it within matroid theory, establishing it as a foundational result in combinatorial optimization. It is sometimes called the Edmonds' algorithm for optimum branchings.
Comparison to Eisner's Algorithm
For projective dependency parsing, the Eisner algorithm provides an O(n³) dynamic programming solution that enforces projectivity constraints. The Chu-Liu/Edmonds algorithm is preferred when non-projectivity is required, as it imposes no crossing-arc restrictions. Modern parsers often select between them based on the target language's syntactic properties.
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.
Frequently Asked Questions
Explore the core mechanics of the Chu-Liu/Edmonds algorithm, the combinatorial optimization engine that powers non-projective dependency parsing by finding the maximum spanning tree in a directed graph.
The Chu-Liu/Edmonds algorithm is a combinatorial optimization procedure for finding a maximum spanning tree (or minimum arborescence) in a directed, weighted graph. In the context of graph-based dependency parsing, it serves as the exact decoding algorithm that identifies the highest-scoring syntactic tree for a given sentence. The algorithm operates by first greedily selecting the highest-scoring incoming arc for each vertex. If this selection forms a tree, the algorithm terminates. If cycles exist, it contracts each cycle into a single super-node, recursively solves the problem on the contracted graph, and then expands the cycles back, breaking them at the optimal point to form a valid tree. This guarantees a globally optimal solution without relying on approximate search heuristics, making it essential for handling non-projective dependency structures where crossing arcs are permitted.
Related Terms
Core concepts and algorithms that contextualize the Chu-Liu/Edmonds algorithm within graph-based and transition-based parsing paradigms.
Graph-Based Parsing
A parsing paradigm that scores all possible dependency arcs in a sentence simultaneously to find the highest-scoring maximum spanning tree. Unlike transition-based methods, graph-based parsing performs global optimization over the entire sentence. The Chu-Liu/Edmonds algorithm is the standard decoder for non-projective graph-based parsing, guaranteeing the optimal tree in O(n²) time. This approach excels at capturing long-distance dependencies and is the foundation for modern deep biaffine parsers.
Non-Projective Parse
A dependency tree structure containing crossing arcs that cannot be drawn without lines intersecting when the sentence is written linearly. Non-projectivity is essential for accurately representing:
- Wh-movement in English (e.g., 'What did you see?')
- Free word order in morphologically rich languages like Czech, Turkish, and Latin
- Long-distance dependencies across clause boundaries
The Chu-Liu/Edmonds algorithm is specifically required to decode non-projective trees, as projective constraints like the Eisner algorithm cannot handle crossing arcs.
Arc-Factored Model
A first-order parsing model where the score of a complete dependency tree is the sum of the scores of its individual arcs, assuming independence between edges. This factorization makes the global optimization problem tractable:
- Each arc (head, dependent) receives an independent score
- The total tree score = Σ score(head_i, dependent_i)
- The Chu-Liu/Edmonds algorithm finds the maximum spanning tree over these arc scores
Higher-order models incorporate sibling or grandparent features but require approximate decoding, making arc-factored models the standard for exact non-projective inference.
MSTParser
An early and influential graph-based dependency parser developed by Ryan McDonald that uses the maximum spanning tree algorithm to find the globally optimal dependency tree. Key characteristics:
- Supports both projective (Eisner algorithm) and non-projective (Chu-Liu/Edmonds) decoding
- Uses online large-margin learning (MIRA) for training
- Demonstrated that global inference outperforms greedy transition-based methods on non-projective languages
MSTParser established the graph-based paradigm and directly motivated the integration of the Chu-Liu/Edmonds algorithm into neural parsing architectures.
Deep Biaffine Parser
A neural dependency parser architecture introduced by Dozat and Manning (2017) that uses deep biaffine attention over BiLSTM-encoded word representations. The biaffine layer computes scores for all O(n²) possible head-dependent pairs simultaneously:
- A feedforward network produces head and dependent representations for each token
- A biaffine transformation scores every possible arc
- The Chu-Liu/Edmonds algorithm decodes the maximum spanning tree from the scored complete graph
This architecture achieves state-of-the-art accuracy and is the standard graph-based neural parser.
Transition-Based Parsing
A deterministic parsing paradigm that processes a sentence left-to-right using a stack and buffer, applying shift-reduce actions to incrementally build a dependency tree. Contrasts with graph-based parsing:
- Greedy or beam search decoding vs. global maximum spanning tree
- Linear O(n) time complexity vs. O(n²) for Chu-Liu/Edmonds
- Susceptible to error propagation but faster for production
- Cannot naturally handle non-projective structures without swap operations
Modern libraries like spaCy use transition-based parsing for speed, while graph-based methods using Chu-Liu/Edmonds prioritize accuracy.

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