Abstract
We describe a technique to minimize weighted tree automata (WTA), a powerful formalisms that subsumes probabilistic context-free grammars (PCFGs) and latent-variable PCFGs. Our method relies on a singular value decomposition of the underlying Hankel matrix defined by the WTA. Our main theoretical result is an efficient algorithm for computing the SVD of an infinite Hankel matrix implicitly represented as a WTA. We provide an analysis of the approximation error induced by the minimization, and we evaluate our method on real-world data originating in newswire treebank. We show that the model achieves lower perplexity than previous methods for PCFG minimization, and also is much more stable due to the absence of local optima.
Introduction
In Natural Language Processing, models like Probabilistic Context-Free Grammars (PCFGs) are essential for capturing the hierarchical structure of language. However, as these models incorporate latent variables to improve accuracy, the state space grows significantly, leading to high computational costs during parsing. To maintain efficiency, it is necessary to "minimize" these models—reducing the number of states while preserving their expressive power.
Traditional minimization techniques often rely on tensor decomposition. While useful, these methods frequently suffer from convergence to local optima, leading to unstable performance. This paper proposes a spectral approach based on the Singular Value Decomposition (SVD) of the Hankel matrix associated with a Weighted Tree Automaton (WTA). This approach provides a globally convergent alternative for model compression.
The Hankel Matrix and Singular Value Tree Automata
The core of the proposed method is the relationship between a WTA and its Hankel matrix. The Hankel matrix maps contexts (trees with a hole) to trees, capturing the structural dependencies defined by the automaton. The rank of this matrix corresponds to the number of states in a minimal WTA.
The authors introduce the Singular Value Tree Automaton (SVTA), a canonical representation where states are ordered by their singular values. This ordering reflects each state's contribution to the model's output, allowing for principled truncation.
The SVTA Algorithm
Computing the SVD of the Hankel matrix is challenging because the matrix is infinite. The authors overcome this by proving that for "strongly convergent" functions (where the total weight of all trees is finite), a valid SVD exists and can be computed using finite Gram matrices.
The algorithm, ComputeSVTA, iteratively solves for the fixed points of a non-linear operator to find the Gram matrices $G_C$ and $G_T$. Once these matrices are obtained, the model is transformed into SVTA form, and compression is achieved by retaining only the top $\hat{n}$ states.
Experimental Evaluation
The method was evaluated on the NEGRA corpus, a dataset of German newspaper text. A PCFG with 211 non-terminals was extracted and trained on approximately 18,600 sentences. The SVTA method was compared against standard tensor decomposition algorithms (mu and qn).
Key Results
- Stability and Performance: The SVTA method consistently outperformed tensor-based methods in terms of perplexity and $\ell_2$ distance to the original model. Crucially, the performance curves were smoother, indicating the absence of local optima issues.
- Parsing Accuracy: While standard SVTA minimization can be biased toward shorter, more frequent trees, a weighted variant (SVTA*) achieved competitive F-scores on parsing tasks, demonstrating its practical utility.
- Theoretical Error Bounds: The paper provides a rigorous analysis showing that the approximation error is bounded by the sum of the discarded singular values, though this error can accumulate with tree size.
Conclusion
This work provides a robust, spectral framework for the low-rank approximation of Weighted Tree Automata. By leveraging the SVD of the infinite Hankel matrix, the authors offer a globally convergent minimization algorithm that surpasses traditional tensor-based approaches in stability and accuracy. Future work includes integrating this technique into spectral learning algorithms to learn compressed models directly from data.
Summary updated