TL;DR
Researchers from Meta AI and Rutgers University have developed a novel method to improve Automatic Speech Recognition (ASR) by using Large Language Models (LLMs) for second-pass rescoring. By combining few-shot prompting, multi-task training for entity class prediction, and a "dynamic prompting" mechanism to filter context, they achieved up to a 20% relative reduction in Word Error Rate (WER) for entity-heavy speech tasks.
What Problem Does This Paper Address?
Standard ASR systems often stumble when encountering "long-tail" words—rare named entities like specific contact names, niche locations, or specialized terminology. While these words appear infrequently in general training data, they are often predictable if the system knows the user's context (e.g., their contact list or current location).
Traditional solutions like Weighted Finite State Transducers (WFSTs) or shallow fusion with n-gram models are rigid and struggle to scale to new entity classes. While LLMs are naturally better at handling context, they face two major hurdles in ASR rescoring:
- Efficiency: Biasing lists (like a list of 500 contacts) can be extremely long, confusing the model's attention mechanism and exceeding maximum sequence length limits.
- Integration: Simply "plugging in" an LLM doesn't automatically tell it which part of the context is relevant for the next word it needs to predict.
Methods
The authors propose a three-pronged approach to turn an LLM (specifically LLaMA) into a context-aware rescorer:
-
Contextual Prompting: They feed the LLM a prompt containing a list of biasing entities formatted by class (e.g.,
<NAME> John, Jack </NAME>) followed by the ASR hypothesis. They also utilize few-shot learning, providing a few examples of how these tags relate to sentences in the prompt to help the model "understand" the task without fine-tuning.Examples of how few-shot prompting helps the LLM assign higher probability to correct entities. -
Multi-Task Training: The model is fine-tuned (using LoRA) to perform two tasks simultaneously: predicting the next token and predicting the class of that token (e.g., is the next word a person's name or a regular word?). They use the Gumbel-Softmax trick to make the selection of the highest-probability class differentiable, allowing the entire system to be trained end-to-end.
-
Dynamic Prompting: This is the key innovation for efficiency. Instead of making the LLM look at every single entity in a massive list for every token, the system first predicts the most likely entity class for the next word. It then dynamically subsets the prompt to only include entities from that specific class. This drastically reduces the sequence length and prevents the attention mechanism from getting "distracted" by irrelevant data.
Fig. 2: The flow chart of the proposed multi-task model with dy- namic prompting. Red dashed arrows represent the dynamic prompt- ing process. Black solid arrows represent token prediction given the selected prompts.
Datasets
The researchers evaluated their approach on two distinct datasets:
- CMD (Internal): A large-scale dataset of 460,000 training samples consisting of short "Calling, Messaging, and Dictation" utterances, which are naturally heavy on named entities.
- SLUE-Voxpopuli: A public benchmark for Spoken Language Understanding. The authors reformatted this to include ground-truth entities (names, locations, organizations) to test contextual biasing in a reproducible way.
Key Insights and Ideas
- LLMs are "Prompt-able" Rescorers: Unlike BERT-style models (like RoBERTa), which the authors found did not benefit from prompting, LLaMA-style models can effectively use biasing lists even without fine-tuning.
-
Attention Learns to Bias: Visualization of attention weights shows that as the model gets deeper into its layers, it learns to shift focus from the general sentence structure to the specific relevant entity in the biasing list.
Attention weights showing the model focusing on the correct entity "Strasbourg" in the biasing list. -
Dynamic Filtering is Robust: The ablation studies showed that the multi-task model with dynamic prompting is much less sensitive to the total length of the biasing list compared to standard LLM prompting, making it more viable for real-world applications with huge contact lists.
Key Results
The proposed methods showed significant gains over the "First Pass" ASR baseline:
- On the CMD dataset:
- Simple biasing prompts + few-shot learning: 17.8% relative WER improvement.
- Full multi-task training + dynamic prompting: 20.0% relative WER improvement.
- On the SLUE-Voxpopuli dataset:
- The full system achieved an 11.3% relative WER improvement.
- Entity Class Prediction: The model achieved an F1 score of 95% for predicting the correct entity class, proving the multi-task head is highly effective at identifying when a named entity is about to appear.
Limitations and Future Work
- Ground Truth Dependency: The ablation study (Table 3) showed that while the model is robust, the biggest gains come when the ground-truth entity is actually present in the biasing list. Performance drops significantly (though still stays better than the baseline) if the list is entirely random.
- Sequence Length: While dynamic prompting helps, LLMs still have hard limits on sequence length that might be challenged by extremely diverse contexts.
- Future Directions: The authors suggest that further work could involve more complex prompt engineering or exploring how these LLM-based rescorers can be optimized for lower latency in real-time production environments.
Summary updated