Inferensys

Glossary

Chu-Liu/Edmonds Algorithm

A combinatorial optimization algorithm that finds a maximum spanning tree in a directed graph, used in graph-based dependency parsing to decode the highest-scoring syntactic structure, including non-projective trees.
Knowledge engineer constructing knowledge base on laptop, document hierarchy visible, casual office setup.
Maximum Spanning Arborescence

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 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.

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.

Algorithmic Foundations

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.

01

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.

02

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.

03

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.
04

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.

05

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.

06

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.

GRAPH-BASED DEPENDENCY PARSING

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.

Prasad Kumkar

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.