Abstract
We report on a method for compiling decision trees into weighted finite-state transducers. The key assumptions are that the tree predictions specify how to rewrite symbols from an input string, and the decision at each tree node is stateable in terms of regular expressions on the input string. Each leaf node can then be treated as a separate rule where the left and right contexts are constructable from the decisions made traversing the tree from the root to the leaf. These rules are compiled into transducers using the weighted rewrite-rule rule-compilation algorithm described in (Mohri and Sproat, 1996).
Introduction
In speech and natural language processing (NLP), researchers often face a choice between data-driven machine learning models and formal linguistic frameworks. In the mid-1990s, Classification and Regression Trees (CART) were widely used to learn phonetic patterns from data, while Weighted Finite-State Transducers (WFSTs) provided a robust mathematical foundation for representing lexicons and grammars.
Integrating these two paradigms was historically difficult, requiring specialized tree interpreters to be bolted onto FST-based systems. This paper introduces an algorithm to bridge this gap by compiling decision trees directly into WFSTs. This allows for a unified architecture where data-learned models can be composed with hand-crafted grammars using standard finite-state operations.
Methodology
The core innovation lies in treating a decision tree as a collection of context-dependent rewrite rules. The compilation process follows four primary steps:
- Leaf as a Rule: Every leaf in the tree represents a specific prediction. It is treated as a rule $\phi \to \psi / \lambda \_\_ \rho$, where $\phi$ is the input phoneme and $\psi$ is the set of output allophones with their associated probabilities (weights).
- Context Construction: The left context ($\lambda$) and right context ($\rho$) for each rule are derived by intersecting the logical decisions made at every node along the path from the root to that leaf.
- Compilation: These rules are transformed into individual WFSTs using a weighted rewrite-rule algorithm.
- Intersection: The final transducer is the intersection of all leaf-level transducers. Because decision trees partition the input space uniquely, this intersection produces a single, deterministic mapping for any input string.
Evaluation and Results
The method was evaluated using the TIMIT database to train 40 phonetic decision trees and the Resource Management (RM) task for verification. The authors confirmed that the WFST-based model produced phonetic realizations and weights identical to a traditional tree interpreter, achieving 100% accuracy in the conversion process.
However, the conversion reveals a significant trade-off in terms of complexity. As shown in the table below, even relatively small trees can result in transducers with a massive number of states and arcs. For instance, the phoneme /ah/ with only 7 leaf nodes compiles into a transducer with over 40,000 arcs.
Discussion and Conclusion
By converting trees to WFSTs, the resulting model becomes a "first-class citizen" in the speech recognition pipeline. It can be seamlessly composed with dictionaries ($D$) and grammars ($G$), eliminating the need for custom ad-hoc code.
The primary limitation is the "state space explosion" observed during compilation. While the one-time offline compilation cost is manageable, the memory footprint of the resulting transducers can be substantial. Future work suggests exploring "on-the-fly" composition to construct only the necessary portions of the transducer at runtime, potentially mitigating these memory constraints while maintaining the benefits of a unified finite-state framework.
Summary updated