Table of Contents
Fetching ...

Algorithms for Weighted Pushdown Automata

Alexandra Butoi, Brian DuSell, Tim Vieira, Ryan Cotterell, David Chiang

TL;DR

This work delivers direct, efficient dynamic programming methods for weighted pushdown automata (WPDAs), addressing a long-standing gap relative to weighted CFGs. By introducing a normal form and two complementary DP frameworks for bottom-up and top-down WPDAs, it achieves substantial space and time improvements over PDA-to-CCFG pipelines and Lang’s algorithm, including factors of $|\Gamma|$ and $|Q|$ in appropriate regimes. The paper also provides concrete speedups through a split-inference approach and demonstrates practical gains via experiments, notably on left-to-right processing tasks. Together, these results advance the theoretical foundations and practical applicability of WPDAs in NLP, with two distinct stringsum algorithms and an allsums approach that significantly reduce resource consumption. The methods rely on semiring continuity and careful transformations (binarization, nullary/unary removal) to enable efficient, scalable computation of all runs over WPDAs.

Abstract

Weighted pushdown automata (WPDAs) are at the core of many natural language processing tasks, like syntax-based statistical machine translation and transition-based dependency parsing. As most existing dynamic programming algorithms are designed for context-free grammars (CFGs), algorithms for PDAs often resort to a PDA-to-CFG conversion. In this paper, we develop novel algorithms that operate directly on WPDAs. Our algorithms are inspired by Lang's algorithm, but use a more general definition of pushdown automaton and either reduce the space requirements by a factor of $|Γ|$ (the size of the stack alphabet) or reduce the runtime by a factor of more than $|Q|$ (the number of states). When run on the same class of PDAs as Lang's algorithm, our algorithm is both more space-efficient by a factor of $|Γ|$ and more time-efficient by a factor of $|Q| \cdot |Γ|$.

Algorithms for Weighted Pushdown Automata

TL;DR

This work delivers direct, efficient dynamic programming methods for weighted pushdown automata (WPDAs), addressing a long-standing gap relative to weighted CFGs. By introducing a normal form and two complementary DP frameworks for bottom-up and top-down WPDAs, it achieves substantial space and time improvements over PDA-to-CCFG pipelines and Lang’s algorithm, including factors of and in appropriate regimes. The paper also provides concrete speedups through a split-inference approach and demonstrates practical gains via experiments, notably on left-to-right processing tasks. Together, these results advance the theoretical foundations and practical applicability of WPDAs in NLP, with two distinct stringsum algorithms and an allsums approach that significantly reduce resource consumption. The methods rely on semiring continuity and careful transformations (binarization, nullary/unary removal) to enable efficient, scalable computation of all runs over WPDAs.

Abstract

Weighted pushdown automata (WPDAs) are at the core of many natural language processing tasks, like syntax-based statistical machine translation and transition-based dependency parsing. As most existing dynamic programming algorithms are designed for context-free grammars (CFGs), algorithms for PDAs often resort to a PDA-to-CFG conversion. In this paper, we develop novel algorithms that operate directly on WPDAs. Our algorithms are inspired by Lang's algorithm, but use a more general definition of pushdown automaton and either reduce the space requirements by a factor of (the size of the stack alphabet) or reduce the runtime by a factor of more than (the number of states). When run on the same class of PDAs as Lang's algorithm, our algorithm is both more space-efficient by a factor of and more time-efficient by a factor of .
Paper Structure (31 sections, 5 theorems, 26 equations, 7 figures, 1 algorithm)

This paper contains 31 sections, 5 theorems, 26 equations, 7 figures, 1 algorithm.

Key Result

Proposition 1

Every WPDA is equivalent to some bottom-up WPDA.

Figures (7)

  • Figure 1: Roadmap of the paper. Solid lines are new results in this paper; dashed lines are old results. We are aware of two existing methods for PDA stringsums, via CFG and via Lang's algorithm; our algorithms are faster and/or more general than both.
  • Figure 2: A push computation is a sequence of transitions that pushes exactly one symbol ($X$) without touching the stack symbols below ($\boldsymbol{\gamma}$). The curly edges indicate sequences of transitions (which are themselves push computations) while the straight edge indicates a single transition.
  • Figure 3: Deductive system for stringsums of bottom-up WPDAs in normal form.
  • Figure 4: Deductive system for Lang's algorithm.
  • Figure 5: Deductive system for stringsums of top-down WPDAs in normal form.
  • ...and 2 more figures

Theorems & Definitions (29)

  • Definition 1
  • Definition 2
  • Definition 3
  • Definition 4
  • Definition 5
  • Definition 6
  • Definition 7
  • Definition 8
  • Proposition 1
  • proof
  • ...and 19 more