Personalization for BERT-based Discriminative Speech Recognition Rescoring

Jari Kolehmainen, Yile Gu, Aditya Gourav, Prashanth Gurunath Shivakumar, Ankur Gandhe, Ariya Rastrow, Ivan Bulyko

Abstract

Modern Automatic Speech Recognition (ASR) systems often utilize a two-pass architecture where a second-pass neural rescorer evaluates hypotheses generated by a first-pass model. However, standard neural rescorers like RescoreBERT are typically "context-blind," lacking access to user-specific information such as contact lists or personal playlists. This often leads to errors in recognizing personalized named entities, particularly homophones. This paper explores three distinct methods—natural language prompting, gazetteers, and cross-attention mechanisms—to integrate user-specific context into BERT-based rescorers. Our findings demonstrate that these techniques can achieve over a 10% relative improvement in Word Error Rate (WER) on personalized data while maintaining or slightly improving performance on general speech tasks.

Introduction

In voice-assisted technology, the ability to accurately recognize personalized entities—such as the names of a user's friends, specific song titles, or local businesses—is critical for a seamless user experience. While first-pass ASR models often incorporate some level of user context, the second-pass rescoring phase frequently relies on large-scale, general-purpose language models. These models are statistically biased toward common words found in massive datasets, often overriding correct personalized hypotheses from the first pass with more generic alternatives. For example, a system might incorrectly favor a common noun over a phonetically similar but less frequent name found in a user’s contact list.

To address this "context gap," we investigate methods to inject a user’s personalized entity list directly into the RescoreBERT architecture, allowing the model to make informed decisions based on the specific context of the speaker.

Methodology

We propose and evaluate three primary architectural approaches for context injection:

1. Natural Language Prompting

This method leverages the inherent linguistic understanding of BERT. When a word in an ASR hypothesis matches an entry in the user’s personalized entity list, a natural language prompt (e.g., "as i need to contact [name]") is appended to the input sequence. This provides a semantic hint to the model that the specific token is likely a relevant entity, steering the rescorer toward the personalized choice without requiring architectural changes.

2. Gazetteer-Based Fusion

Gazetteers use "slot embeddings" to tag tokens that match the user's personal list. We explored two variations:

  • Early Fusion: Slot embeddings are added to the input token embeddings before they are processed by the BERT layers.
  • Late Fusion: These embeddings are injected just before the final classification layer. This approach explicitly signals the presence of a personalized entity to the model's internal representations.

3. Cross-Attention Encoder-Decoder

This architecture utilizes a separate encoder to process the list of personalized entities. A cross-attention mechanism then allows the main RescoreBERT model to dynamically "attend" to relevant entities in the list while processing the hypothesis. This is the most computationally complex method but offers a sophisticated way to handle large entity lists.

Experimental Setup

The models were trained and evaluated using de-identified en-US Alexa data. The training set comprised approximately 91,000 hours of general audio and 131 hours of personalized entity data. To ensure the models remained robust, we evaluated them on two distinct sets:

  • Personalized Test Set: 43 hours of audio containing specific named entities.
  • General Test Set: 141 hours of audio to monitor for performance degradation in everyday speech.

Results and Discussion

Our experiments revealed that the baseline RescoreBERT model actually performed worse than the first-pass model on personalized data, confirming that context-blind rescoring can be detrimental. However, all three proposed personalization methods successfully reversed this trend.

Performance Gains

Both the Gazetteer and Cross-Attention methods achieved relative WER improvements of over 10%. Notably, the Early Fusion Gazetteer emerged as the most robust solution, providing a 13% improvement on personalized data and a 1% improvement on the general test set. This suggests that the model not only learned to recognize names better but also improved its overall linguistic judgment.

The Efficacy of Prompting

One of the most significant findings was the success of untrained natural language prompting. By simply appending a text hint, we observed a 7% improvement in WER. This suggests that BERT-based models possess a latent ability to utilize context even without specialized training on those specific prompts, offering a low-cost path to personalization.

Balancing Data and Scaling

We observed that training exclusively on personalized data leads to "catastrophic forgetting," where the model loses its ability to process general speech. Mixing a small fraction of general data into the training process was essential to maintain balanced performance. Furthermore, these benefits were consistent across model sizes, from "Tiny BERT" (5M parameters) to "Big BERT" (170M parameters), indicating that these techniques are viable for various production latency requirements.

Conclusion

Injecting user-specific context into neural rescorers is a highly effective strategy for improving ASR accuracy for personalized commands. While cross-attention provides a powerful mechanism for entity lookup, the Early Fusion Gazetteer offers the best balance of performance and stability. Future work will focus on improving the matching logic to handle phonetic variations and exploring more advanced prompt-tuning techniques to further close the gap between general and personalized speech recognition.

Summary updated

BibTeX
@inproceedings{kolehmainen2023personalization,
  author = {Jari Kolehmainen and Yile Gu and Aditya Gourav and Prashanth Gurunath Shivakumar and Ankur Gandhe and Ariya Rastrow and Ivan Bulyko},
  title = {{Personalization for BERT-based Discriminative Speech Recognition Rescoring}},
  booktitle = {Interspeech},
  year = {2023},
  doi = {10.21437/interspeech.2023-990},
}
Figure