Low-Rank Approximation of Weighted Tree Automata

Guillaume Rabusseau, Borja Balle, Shay B. Cohen

Abstract

We describe a technique to minimize weighted tree automata (WTA), a powerful formalism that subsumes probabilistic context-free grammars (PCFGs) and latent-variable PCFGs. Our method relies on a singular value decomposition of an infinite Hankel matrix, providing a globally convergent low-rank approximation.

Introduction

In Natural Language Processing, models like Probabilistic Context-Free Grammars (PCFGs) are essential for understanding the hierarchical structure of sentences. However, as these models become more sophisticated—for instance, by adding latent variables—the number of states or rules explodes. This leads to high computational costs during parsing, which typically scales cubically with the number of states.

To make these models practical for real-time use, they must be "minimized": we seek a smaller model with fewer states that behaves almost identically to the original. Previous attempts often relied on tensor decomposition, which can be unstable, frequently getting stuck in local optima and producing inconsistent results depending on initialization. This paper introduces a mathematically elegant and computationally efficient method for shrinking these complex linguistic models without sacrificing predictive power.

Methodology

The core of the proposed approach is the use of the Hankel matrix, a classic tool in automata theory. A tree function can be represented as a Hankel matrix where rows correspond to "contexts" (trees with a hole) and columns correspond to "subtrees."

Illustration of trees ($t$) and contexts ($c_1, c_2$) used to define the Hankel matrix.

The Singular Value Tree Automaton (SVTA)

The authors prove that for "strongly convergent" functions—where the expected size of a generated tree is finite—a reduced Singular Value Decomposition (SVD) of this infinite matrix exists. They define a Singular Value Tree Automaton (SVTA), a canonical representation where states are decoupled and ranked by their "influence" (singular values).

The algorithm proceeds as follows:

  1. Gram Matrix Computation: The algorithm iteratively computes the Gram matrices of the WTA. These finite matrices capture the essential geometric information of the infinite Hankel matrix.
  2. Low-Rank Approximation: Once computed, a standard SVD is performed on these Gram matrices to find the best low-rank approximation, effectively reducing the state space.
  3. Global Convergence: Unlike gradient-based tensor methods, this iterative approach resembles a power method, ensuring stability and convergence to a global solution.

Experimental Evaluation

The method was evaluated on the NEGRA corpus, a standard dataset of annotated German newspaper texts consisting of 18,602 training sentences and 1,000 sentences each for test and development sets. An initial PCFG with 211 non-terminal states was converted into a WTA for minimization.

Key Results

The SVTA method demonstrated significant improvements over traditional tensor decomposition methods:

  • Perplexity and Error: The SVTA achieved significantly lower perplexity and $\ell_2$ error. In some instances, the error was orders of magnitude lower for the same number of parameters.
  • Stability: The error-vs-model-size curves were remarkably smooth, contrasting with the "jittery" performance of previous methods that suffer from local optima.
  • Parsing Accuracy: While the basic SVTA struggled with very long sentences, a modified version (SVTA*) using a scaling factor ($\gamma$) to weight larger trees achieved competitive parsing accuracy while maintaining stability.

Discussion and Future Work

A key insight of this work is that the number of states in a minimal WTA is exactly equal to the rank of its Hankel matrix. Thus, rank reduction is mathematically equivalent to state-space reduction. However, there is a natural trade-off between language modeling (probability prediction) and parsing (structural assignment).

Future research directions include:

  • Maintaining Sparsity: Minimization often produces dense matrices; finding ways to preserve sparsity could further improve computational efficiency.
  • Theoretical Bounds: Conducting a more thorough theoretical analysis of the exact error bounds introduced by truncating singular values in tree-structured data.

Conclusion

By framing WTA minimization as an SVD problem rather than a tensor optimization problem, this work provides a robust and globally convergent method for model reduction in NLP. The SVTA offers a stable path toward more efficient hierarchical models.

Summary updated

BibTeX
@inproceedings{rabusseau2016low,
  author = {Guillaume Rabusseau and Borja Balle and Shay B. Cohen},
  title = {{Low-Rank Approximation of Weighted Tree Automata}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2016},
  url = {https://openreview.net/forum?id=GsB75qoGQd},
}
Figure