GLR-Parsing of Word Lattices Using a Beam Search Method

Steffen Staab

Introduction

In the mid-1990s, the field of spoken language processing faced a significant hurdle: the transition from parsing simple text strings to interpreting the complex, ambiguous outputs of speech recognizers. Unlike text, speech recognition systems generate a word lattice—a directed acyclic graph representing multiple competing hypotheses of what was spoken over specific time intervals.

This paper, published in 1995, introduces a revised version of Tomita’s Generalized LR (GLR) parsing algorithm. By transforming the parser into an "agenda-driven" system, the authors enabled the use of beam search heuristics, allowing the parser to navigate the massive search space of word lattices efficiently without being tethered to a strict chronological processing order.

The Problem: Navigating Lattice Ambiguity

Traditional GLR parsers were designed for formal languages and text, where the input is a linear sequence of tokens. When applied to speech, these parsers struggled with the inherent ambiguity of word lattices. A single utterance could generate hundreds of word hypotheses, many of which overlap in time.

Standard GLR parsers required processing the lattice in a strict left-to-right, chronological order. This rigidity made it impossible to implement "best-first" search strategies. In real-world scenarios where a lattice might contain over 500 hypotheses, a standard GLR parser would often succumb to exponential search space growth. The authors identified the need for a more flexible framework that could prioritize the most likely paths based on acoustic and linguistic evidence.

The Revised GLRP Algorithm

The core innovation of this research is the Revised GLRP, which decomposes the monolithic parsing process into three atomic, order-independent actions:

  1. Shift: Constructs new elements in the Graph-Structured Stack (GSS).
  2. Search: Initiates searches for non-terminal categories.
  3. NewHypo: Handles the introduction of new word hypotheses (terminals) from the lattice.

By decoupling these actions, the authors moved away from a fixed execution sequence. Instead, these actions are placed on an Agenda (a priority queue). This architectural shift allows the parser to process hypotheses in any order, facilitating the integration of heuristic search methods.

Beam Search and Scoring

To manage the complexity, the authors implemented a Beam Search guided by a multi-faceted scoring metric. This metric combines:

  • Acoustic Scores: Derived from Hidden Markov Models (HMMs).
  • Language Model Scores: Derived from a bigram model.

To ensure the parser considers the "left context" (the history of the derivation), they utilized an Inside/Outside evaluation. The "inside" score represents the probability of the current partial derivation, while the "outside" score estimates the probability of the context leading up to it.

To keep the search tractable, the system employs Pruning. Actions with scores falling below a specific threshold (the "beam") are relegated to a PrunedAgenda. These pruned paths are only revisited if the primary search fails to yield a valid parse, ensuring that the system remains efficient while maintaining a fallback for difficult cases.

Experimental Setup and Results

The authors evaluated the Revised GLRP using a substantial Context-Free Grammar (CFG) consisting of 1,560 rules. The test set included 10 word lattices, with each lattice containing between 56 and 202 word hypotheses.

Key Findings

  • Efficiency: The system successfully parsed 80% of the test lattices. On 1995-era hardware, the parsing time was remarkably low, with most structures processed in less than 4 seconds.
  • Architectural Clarity: The revised implementation was approximately 15% smaller in code size than the original GLR implementation. This suggests that the agenda-based approach not only added functionality but also resulted in a more modular and maintainable design.
  • Sparsity in Natural Language: While GLR parsing can theoretically reach exponential complexity, the authors demonstrated that natural language grammars are not "densely ambiguous" enough to trigger this in practice. Their 1,560-rule grammar resulted in only about 4,500 states, keeping the GSS manageable.

Discussion and Limitations

The paper highlights a crucial insight for speech system architecture: by turning a parsing algorithm into discrete actions on an agenda, developers gain the freedom to apply various search strategies (such as A* or Beam Search) without modifying the underlying parsing logic.

However, the authors noted several areas for improvement. The method for normalizing HMM scores (by time frames) and Bigram scores (by number of operations) was somewhat ad-hoc. Finding the optimal balance between these scores required manual tuning of a weight parameter (λ). Additionally, the evaluation was limited to a small sample of 10 lattices, which, while promising, necessitated further testing on larger, more diverse datasets to prove robust across different acoustic environments.

Conclusion

This work represents a pivotal moment in the integration of symbolic parsing and probabilistic speech recognition. By making the GLR parser agenda-driven, the authors provided a blueprint for handling the "messy" reality of spoken language, paving the way for more sophisticated and efficient speech-to-text systems.

Summary updated

BibTeX
@inproceedings{staab1995glr,
  author = {Steffen Staab},
  title = {{GLR-Parsing of Word Lattices Using a Beam Search Method}},
  booktitle = {EUROSPEECH},
  year = {1995},
  url = {https://openreview.net/forum?id=OMJF74WEWew},
}
Figure