Text Injection for Neural Contextual Biasing

Zhong Meng, Zelin Wu, Rohit Prabhavalkar, Cal Peyser, Weiran Wang, Nanxin Chen, Tara N. Sainath, Bhuvana Ramabhadran

Abstract

End-to-end (E2E) Automatic Speech Recognition (ASR) models often struggle with "long-tail" entities—rare words like specific contact names or song titles that appear infrequently in training data. While contextual biasing helps by providing the model with relevant phrases at inference time, training these components typically requires expensive paired audio-transcript data. This paper introduces Contextual Text Injection (CTI), a method that leverages massive corpora of unpaired text to train neural biasing components. By converting text into speech-like phoneme representations and employing a specialized Minimum Word Error Rate (MWER) training objective, the proposed approach achieves up to a 43.3% relative reduction in Word Error Rate (WER) over state-of-the-art baselines.

Introduction

Modern ASR systems are highly capable but face a significant hurdle: the recognition of context-specific, rare entities. For instance, a user saying "Call Zelin" or "Play Houdini" expects the system to recognize those specific names, even if they were never encountered during the model's primary training phase.

Contextual biasing addresses this by supplying the model with a list of "bias phrases" (e.g., the user's contact list). However, the neural components that integrate these phrases are usually trained on paired audio-text data. Because human-transcribed audio is scarce compared to the vast amount of available text, these models often fail to generalize to the full diversity of real-world entities. The challenge lies in teaching a neural biasing component to recognize rare words it has never "heard" by using abundant, unpaired text data.

Methodology

Contextual Text Injection (CTI)

The core innovation of this work is the CTI framework, which allows the model to treat text as a proxy for speech. The process involves several key steps:

  1. Modality Matching: Unpaired text is converted into phoneme sequences using a Text-to-Phoneme (TTP) system. These sequences are then randomly upsampled to mimic the temporal duration and characteristics of actual speech signals.
  2. Encoder Injection: These "speech-like" representations are processed by a phoneme encoder and injected directly into the ASR's acoustic encoder. This forces the latent space of the text representations to align with the latent space of acoustic features.
  3. Two-Pass Biasing (Deferred NAM): To handle large lists of potential bias phrases, the authors utilize a hierarchical approach. In the first pass, the model identifies the top-K most likely phrases via correlation. In the second pass, a fine-grained cross-attention mechanism is applied between the encoder features and the selected phrases.
  4. Masking for Robustness: To prevent the model from becoming overly dependent on the "perfect" nature of text inputs, portions of the text-based embeddings are masked during training. This encourages the model to learn robust biasing patterns that translate well to noisy, real-world audio.

CTI Minimum Word Error Rate (MWER) Training

Standard ASR training typically minimizes cross-entropy loss. However, this does not always correlate perfectly with the final metric of interest: Word Error Rate. The authors implement CTI-MWER training, which minimizes the expected number of word errors across an "N-best" list of hypotheses. This optimization is applied to both audio and injected text, specifically teaching the model to ignore "distractor" phrases—irrelevant bias terms that may sound similar to the target word.

Experimental Setup

The model was trained using a massive dataset comprising 520 million multi-domain English audio-transcript pairs (approximately 490,000 hours) from Google Voice Search traffic. For the text injection component, the authors utilized 100 billion anonymized sentences from sources including Google Maps, Play, the Web, and YouTube.

Evaluation was conducted on several sets:

  • Voice Search (VS): A 12K utterance set representing common queries.
  • Multi-context Biasing Corpus: This included sets with rare entities in isolation (NO PRE), entities within carrier phrases like "call..." (PRE), and sets containing only distractor phrases (ANTI) to test for over-biasing tendencies.

Key Results and Insights

Performance Gains

The implementation of CTI resulted in a 43.3% relative WER reduction on in-context test sets compared to the state-of-the-art Deferred Neural Associative Memory (NAM) baseline. The addition of MWER training was particularly impactful, providing an additional 23.5% relative improvement over the basic CTI model.

Robustness to Distractors

A significant strength of the CTI-MWER approach is its scalability. In tests where the number of bias phrases was increased to 3,000, the model maintained a WER below 1.8%. This significantly outperformed supervised baselines, which often struggle when the "search space" of potential bias phrases becomes crowded with irrelevant distractors.

Generalization and Over-biasing

Unlike previous text-injection methods (such as JOIST), which sometimes degraded performance on utterances without relevant context (the "ANTI" set), CTI improved performance across the board. This suggests that the joint optimization of the biasing component and the acoustic encoder allows the model to better discern when to apply biasing and when to rely on the standard acoustic signal.

Conclusion

Text Injection for Neural Contextual Biasing represents a significant step forward in making ASR systems more adaptable. By successfully using text as a proxy for speech, the CTI framework allows models to learn from the world's vast textual knowledge, ensuring that even the rarest names and phrases are recognized accurately. Future work may explore expanding this framework to multilingual contexts or incorporating other modalities, such as visual cues, to further refine contextual awareness.

Summary updated

BibTeX
@inproceedings{meng2024text,
  author = {Zhong Meng and Zelin Wu and Rohit Prabhavalkar and Cal Peyser and Weiran Wang and Nanxin Chen and Tara N. Sainath and Bhuvana Ramabhadran},
  title = {{Text Injection for Neural Contextual Biasing}},
  booktitle = {Interspeech},
  year = {2024},
  doi = {10.21437/interspeech.2024-1471},
}
Figure