Introduction
Natural language is inherently hierarchical, with words forming phrases, clauses, and sentences. While standard Hidden Markov Models (HMMs) are effective for sequence labeling, their linear nature fails to capture these nested structures. Hierarchical HMMs (HHMMs) were developed to address this, but they often suffer from high computational complexity and significant data requirements. This paper proposes a "best of both worlds" approach by optimizing HHMMs through state merging and a novel "partial flattening" technique based on statistical dependency.
Methodology
The proposed framework introduces three primary modifications to the standard HHMM to balance structural accuracy with computational efficiency.
1. State Merging
To reduce model complexity, the author identifies repeated patterns within the hierarchy. Instead of maintaining multiple identical sub-trees, the model merges them under a single internal state. This reduction in the total number of states streamlines the model without losing structural information.
2. Sub-model Calculation
To facilitate efficient inference, each internal state is transformed into a trio of production states: entry ($s_{in}$), stay ($s_{stay}$), and exit ($s_{out}$). This transformation allows the complex hierarchy to be processed similarly to a linear HMM during the Viterbi search, significantly accelerating the decoding process.
3. Partial Flattening
The most significant contribution is the use of statistical dependency measures—specifically Mutual Information and Log-Likelihood—to prune the hierarchy. If a child state exhibits high dependency on its parent, the branch is "flattened," moving the child to become a sibling of the parent. This reduces tree depth while preserving the most informative structural relationships.
Experimental Evaluation
The models were evaluated on two standard NLP tasks:
- Text Chunking (CoNLL-2004): Identifying non-overlapping noun groups and verb phrases across 8,936 sentences.
- Grammar Parsing (Lancaster Treebank): Assigning syntactic roles in a sub-corpus of 1,473 hand-labeled sentences.
Key Results
The Merged HHMM (MHHMM) consistently outperformed both the standard HMM and the baseline HHMM in text chunking. In grammar parsing, the Partially Flattened HHMM (PFHHMM) achieved a micro-average F1-score of 0.809, a substantial improvement over the standard HHMM (0.701) and the HMM (0.793). Notably, flattening based on observation sequences (actual words/tags) proved more effective than flattening based on hidden state sequences.
Discussion and Conclusion
The research demonstrates that while hierarchy is essential for language modeling, a full, deep hierarchy can be a computational burden. Partial flattening serves as an effective pruning mechanism, retaining structural benefits where they provide the most statistical value. Furthermore, merging repeated sub-models can make the MHHMM more efficient than a standard HMM by focusing on generalized structures rather than every unique linear path.
Future work will explore recursive formations—where grammar rules refer back to themselves—and formalize the mathematical optimization of the flattening threshold.
Summary updated