Lattention: Lattice-Attention in ASR Rescoring

Prabhat Pandey, Sergio Duarte Torres, Ali Orkan Bayer, Ankur Gandhe, Volker Leutnant

TL;DR

"Lattention" introduces a novel way to improve speech recognition by having the system "re-think" its guesses using lattices—compact graphs representing multiple possible transcriptions. By applying an attention-based encoder-decoder model directly to these lattices (rather than just a simple list of top guesses), the researchers achieved a 6-8% relative improvement in word error rate, outperforming traditional rescoring methods.

What Problem Does This Paper Address?

Automatic Speech Recognition (ASR) typically happens in two passes. The first pass is fast and generates a set of hypotheses. The second pass, called rescoring, uses a more powerful (but slower) neural language model to pick the best one.

Most rescorers look at an "n-best list"—a flat list of the top 5 or 10 guesses. However, n-best lists are inefficient; they often contain redundant words and miss out on the rich "uncertainty" information found in the first pass. Lattices are a better alternative: they are directed graphs where paths represent different word sequences. While lattices are more informative, they are topologically complex, making them difficult to feed into standard neural networks like LSTMs or Transformers. This paper tackles how to effectively encode these graph structures and their associated weights to improve rescoring accuracy.

Methods

The authors propose an attention-encoder-decoder architecture that can "attend" to different types of input: audio features, n-best lists, or lattices.

The Lattice Encoder

To handle the graph structure, they use a LatticeLSTM (a variant of a TreeLSTM). Since standard LSTMs expect a linear sequence, the LatticeLSTM allows a node to "sum" information from multiple predecessor nodes in the graph.

Incorporating Weights

A key contribution is how they handle lattice weights (the scores the first-pass model assigned to different paths). They experimented with four mechanisms:

  1. Weighted Child-Sum (WCS): Scaling the hidden states of previous nodes by their transition weights.
  2. Biased Forget Gate (BFG): Using weights to tell the LSTM which previous information to "forget."
  3. Biasing Attention (BATT): Directly adding the lattice weights to the attention scores.
  4. Weighted Encoder Output (WEO): A simplified method proposed by the authors that scales the final encoder hidden states by the probability of that node being reached.

The model was trained using the Minimum Word Error Rate (MWER) criterion, which directly optimizes for the metric we care about (accuracy) rather than just predicting the next word.

Datasets

The study used de-identified internal speech data from voice-controlled far-field devices (likely Amazon Alexa data).

  • Training: A large internal dataset (roughly 25% of the size used for the first-pass models).
  • Evaluation: An internal test set containing approximately 140 hours of audio.
  • Baselines: They compared their results against standard Hybrid HMM-ASR and end-to-end RNN-T models.

Key Insights and Ideas

  • Weights are Mandatory: Using a "raw" unweighted lattice encoder actually hurt performance (-8.4% WERR). Without weights, the attention mechanism gets "confused" by low-probability, nonsensical paths in the lattice. Adding weights acts as a guide, telling the model which parts of the graph are actually worth looking at.
  • Lattices > N-best: A 5-best lattice encoder outperformed a 5-best "deliberation" encoder (which sees the same hypotheses but in list form). This suggests the graph structure itself provides useful cues that a flat list loses.
  • Efficiency Gains: Because lattices are compact, the LatticeLSTM required 52% fewer forward passes on average compared to encoding an equivalent n-best list.
  • The "Lattention" Synergy: The best results came from attending to both the audio features and the lattice. This allows the model to reconcile the acoustic evidence with the structural uncertainty of the first-pass decoding.

Key Results

The researchers measured success using Relative Word Error Rate Reduction (WERR) compared to the first-pass model:

  • Lattice-only rescoring: Achieved a 4-5% WERR.
  • Audio + Lattice rescoring: Achieved the best performance with a 6-8% WERR.
  • Comparison: The Lattice-based approach consistently beat the "Deliberation" approach (n-best list rescoring) across both Hybrid and RNN-T architectures.

Limitations and Future Work

  • Lattice Depth: The authors noted that 69% of the lattices in their dataset were "shallow" (having 2 or fewer alternate hypotheses). They found that the gains from lattice encoding were much higher on "deep" lattices. This suggests that in noisier environments where the ASR is less certain, this method would be even more valuable.
  • Architecture: While this paper focused on LSTMs, the authors mention that Transformers are a natural next step for lattice encoding, though they are more complex to implement for graph structures.
  • Real-time Latency: While the paper mentions computational efficiency in terms of forward passes, it doesn't provide a detailed breakdown of the wall-clock latency required to construct and encode the node-labeled lattices in a production environment.

Summary updated

BibTeX
@inproceedings{pandey2022lattention,
  author = {Prabhat Pandey and Sergio Duarte Torres and Ali Orkan Bayer and Ankur Gandhe and Volker Leutnant},
  title = {{Lattention: Lattice-Attention in ASR Rescoring}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
  doi = {10.1109/icassp43922.2022.9746737},
}
Figure