NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Max-Margin Parsing

Ben Taskar, Dan Klein, Michael Collins, Daphne Koller, Christopher D. Manning

Introduction

Natural language parsing has long relied on generative models like Probabilistic Context-Free Grammars (PCFGs). While robust, these models struggle to incorporate arbitrary, overlapping features of input text. Discriminative models offer a solution but face a massive computational hurdle: the number of possible parse trees for a sentence grows exponentially with its length.

Historically, researchers bypassed this using two main strategies:

  1. Reranking: Using a generative parser to produce a top-N list and then picking the best. However, the gold-standard parse is frequently missing from this list.
  2. Maximum Entropy (CRF-style) Models: Training over the entire parse forest. These models optimize log-likelihood, which fails to distinguish between "nearly correct" and "completely wrong" trees and suffers from extremely slow convergence.

This paper introduces an end-to-end discriminative parser that searches the entire space of trees using a max-margin objective, similar to Support Vector Machines (SVMs), to directly minimize parsing errors with rapid convergence.

Methods: Factoring the Optimization

The primary innovation is the extension of max-margin Markov networks to Context-Free Grammars. A standard SVM approach would require an exponential number of constraints—one for every possible incorrect parse. The authors overcome this by using a factored dual representation.

Since parse trees are composed of local parts (spans and grammar rules), the dual optimization variables are broken down into "marginals" over these local components. By enforcing local consistency constraints—the same logic used in the inside-outside algorithm—the exponential problem is reduced to a polynomial-sized Quadratic Program (QP).

Parse tree and corresponding dynamic programming chart used for factored optimization.

To solve this QP, the authors employ a structured Sequential Minimal Optimization (SMO) algorithm. Unlike CRF training, which requires summing over all possible trees, SMO only needs to find the Viterbi (single best) parse at each step to update model weights, significantly accelerating training.

Key Insights

  • Articulated Loss: The max-margin framework allows for a loss function that scales based on the number of incorrect constituents, penalizing "bad" trees more heavily than "almost right" ones.
  • Lexicalization Without Heads: Traditional parsers track "head words" up the tree, increasing algorithmic complexity. This model demonstrates that simply using span boundary words (the first and last words of a constituent) provides a significant accuracy boost while maintaining standard cubic-time complexity.
  • Training Efficiency: Due to the Viterbi-based updates, the model typically converges in just 10-20 iterations.

Key Results

The model was evaluated on the Penn English Treebank (WSJ), restricted to sentences of 15 words or fewer to manage initial research complexity.

Performance comparison of Max-Margin models against generative and Collins baselines.

As shown in the results table, the Lexical + Aux Max-Margin model achieved an $F_1$ score of 89.12, outperforming the highly tuned, generative Collins 99 parser (88.69) on the same data. Notably, it achieved this without the explicit head-word modeling required by traditional lexicalized parsers.

Limitations and Future Work

While training converges in few iterations, each iteration requires parsing the entire training set, which remains computationally intensive. Additionally, the current evaluation is limited to short sentences ($\le 15$ words). Future work will focus on scaling the model to longer sentences and exploring even richer feature sets enabled by the discriminative framework.

Summary updated

BibTeX
@inproceedings{taskar2004max,
  author = {Ben Taskar and Dan Klein and Michael Collins and Daphne Koller and Christopher D. Manning},
  title = {{Max-Margin Parsing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2004},
}
Figure