Improving Neural Biasing for Contextual Speech Recognition by Early Context Injection and Text Perturbation

Ruizhe Huang, Mahsa Yarmohammadi, Sanjeev Khudanpur, Daniel Povey

TL;DR

This paper introduces two simple yet highly effective techniques to improve contextual Automatic Speech Recognition (ASR): early context injection into intermediate encoder layers and text perturbation using similar-sounding words during training. Together, these methods achieve state-of-the-art results on LibriSpeech, reducing the rare word error rate by up to 60% compared to non-biased models and 25% compared to standard shallow fusion.

What Problem Does This Paper Address?

Standard end-to-end (E2E) ASR models excel at recognizing common words but often stumble on "long-tail" entities—rare words, technical jargon, or specific names (e.g., from a user's contact list). Contextual biasing aims to fix this by providing the model with a "cheat sheet" of relevant terms.

However, existing neural biasing methods face two main hurdles:

  1. Late Integration: Most models only inject context at the very last layer, meaning the information doesn't influence the model's internal feature extraction.
  2. Overfitting: During training, ASR models often become so good at predicting the ground-truth text that they learn to ignore the provided context altogether. When faced with truly unfamiliar words in the real world, they lack the "habit" of looking at the context list for help.

Methods

The authors propose a neural biasing architecture based on a stateless transducer with a Zipformer encoder. Their two key innovations are:

1. Early Context Injection

Instead of only applying biasing at the final encoder layer, the authors use cross-attention to inject contextual embeddings into intermediate layers (specifically layers 9 and 15 in their 15-layer model). As shown in Figure 1, this allows the contextual information to be processed by subsequent self-attention layers, having a "far-reaching impact" on the model's internal representations.

Figure 1: The transducer model (left) and its contextual biasing module (right). The red/blue dots mark the locations where the contexts can be injected to the main model, by plugging in the contextual biasing module. During training, the gray modules can be frozen, while only the yellow modules are trained.

2. Text Perturbation with Alternative Spellings

To force the model to rely on the context, the authors intentionally "break" the training data. They replace rare words in the reference transcript and the context list with similar-sounding alternatives (e.g., replacing "Klein" with "Klane") using roughly 200 hand-crafted linguistic rules. This prevents the model from relying solely on its internal language model and forces it to attend to the provided context to resolve the correct spelling.

Datasets

The researchers evaluated their methods on three distinct datasets:

  • LibriSpeech: The standard benchmark for ASR.
  • SPGISpeech: A large-scale dataset of transcribed financial audio.
  • ConEC: A recent, challenging dataset consisting of real-world earnings calls. Unlike synthetic benchmarks, ConEC uses actual supplementary materials (like presentation slides and participant lists) as the biasing context.

Key Insights and Ideas

  • Self-Attention is the Key: Injecting context early works because the encoder's self-attention mechanism can then propagate that contextual information across all time frames, rather than treating each frame independently at the final output.
  • Training vs. Inference Gap: The authors observed that on training data, the model's error rate is so low that it rarely needs context. Text perturbation artificially creates a need for context during training, which translates to better performance on unseen rare words during inference.
  • Efficiency: Despite adding cross-attention at multiple layers, the computational overhead is negligible. For a biasing list of 500 words, decoding a 5.3-hour test set only increased from 2.6 minutes to 3.4 minutes on a single GPU.

Key Results

The combination of early injection and text perturbation yielded significant gains, particularly in B-WER (Bias Word Error Rate, specifically for rare words).

  • LibriSpeech: On the test-other set (with 500 distractors), the B-WER dropped from 21.83% (no biasing) to 8.19% with the proposed techniques. This outperformed both standard Shallow Fusion and recent neural biasing architectures like PromptASR.
  • ConEC: The model showed strong improvements in recognizing specific entity types, particularly PERSON names, where it outperformed the baseline by a wide margin (35.72% vs 45.9% WER).

Detailed results for LibriSpeech across different distractor list sizes ($N$) can be seen in Table 2.

Table 2: Contextual ASR on LibriSpeech. Each cell is formatted as WER (U-WER / B-WER). N is the number of distractors added to the biasing words list. NO (no biasing), SF (shallow fusion), NB (neural biasing), TP (text perturbation), “@Layers: 9,15” means to which layers contexts are injected. †: This row shares the same results as there is no context for “no biasing”, so N is irrelevant.

Ablation studies in Table 4 confirmed that injecting at both the 9th and 15th layers provided the best balance of accuracy and runtime.

Table 4: Context injection to different encoder layers on Lib- riSpeech (N = 500)

Limitations and Future Work

While effective, the current text perturbation relies on hand-crafted linguistic rules. The authors suggest that using more advanced, automated generators (like Grapheme-to-Grapheme models) could further improve results. Additionally, while the runtime overhead is small for lists of 500 words, the model's performance does degrade as the number of "distractor" words in the context list increases to 1,000. Future work will focus on making the model more robust to these large, noisy biasing lists.

Summary updated

BibTeX
@inproceedings{huang2024improving,
  author = {Ruizhe Huang and Mahsa Yarmohammadi and Sanjeev Khudanpur and Daniel Povey},
  title = {{Improving Neural Biasing for Contextual Speech Recognition by Early Context Injection and Text Perturbation}},
  booktitle = {Interspeech},
  year = {2024},
}
Figure