Joint decoding method for controllable contextual speech recognition based on Speech LLM

Fang Yang, Jing Peng, Xi Yu, Xu Li, Haoyu Li, Chengwei Zhang, Guohui Zhong, Kai YuarXiv 2025 · DOI

Abstract

Contextual speech recognition refers to the ability to identify preferences for specific content based on contextual information. Recently, leveraging the contextual understanding capabilities of Speech LLM to achieve contextual biasing by injecting contextual information through prompts has emerged as a research hotspot. However, the direct information injection method via prompts relies on the internal attention mechanism of the model, making it impossible to explicitly control the extent of information injection. To address this limitation, we propose a joint decoding method to control the contextual information. This approach enables explicit control over the injected contextual information and achieves superior recognition performance. Additionally, our method can also be used for sensitive word suppression recognition. Furthermore, experimental results show that even Speech LLM not pre-trained on long contextual data can acquire long contextual capabilities through our method.

Introduction

Contextual Automatic Speech Recognition (ASR) is the process of biasing a model toward specific keywords, such as names, places, or technical terms, that are likely to appear in a given audio segment. In the era of Speech Large Language Models (Speech LLMs), this is typically achieved through "prompting," where keywords are listed in the text prompt preceding the audio.

However, this approach relies on the model's internal attention mechanism—a "black box" that offers no explicit control over how strongly the context influences the output. If the model ignores the prompt, it misses critical entities; if it over-focuses, it may hallucinate keywords where they do not belong, degrading overall accuracy. This research introduces a joint decoding method to explicitly control the fusion intensity of contextual information.

Methodology

The proposed method maintains two parallel "decoding bundles" simultaneously during inference:

  1. Context-Dependent: The model predicts the next token given both the audio and the contextual prompt.
  2. Context-Independent: The model predicts the next token given only the audio.
Overview of the joint decoding architecture for controllable contextual speech recognition.

At each step of the decoding process, the probabilities from these two paths are merged using a balance coefficient ($\alpha$). The joint probability ($P_{joint}$) is calculated as a weighted linear blend:

$$P_{joint} = \frac{\alpha}{1+\alpha} \cdot P(y|x,c) + \frac{1}{1+\alpha} \cdot P(y|x)$$

By adjusting $\alpha$, developers can precisely control the influence of the context. Interestingly, by setting $\alpha$ to a negative value, the method can be used for sensitive word suppression, effectively instructing the model not to output certain words.

Experimental Setup

Experiments were conducted using the AISHELL-1 dataset. Evaluation focused on several contextual scenarios:

  • NE-GT (Ground Truth): Entity words extracted directly from the target sentence.
  • NE-Common & NE-Rare: Test sets derived from public data containing 400 common and 233 rare entity words (names, places, etc.).
  • NE-Short vs. NE-Long: Training tasks where the context contains either a few relevant words or a long list (5 to 50 words) of "distractor" entity words.

Key Insights and Results

The "Goldilocks" Zone

Researchers found that a fusion coefficient ($\alpha$) of 0.7 was generally optimal. At this level, the model achieves the best balance—improving entity recognition without causing the Character Error Rate (CER) to spike due to over-biasing.

Performance metrics across different context coefficients, highlighting the optimal balance at α=0.7.

Precision vs. Recall

As the fusion coefficient increases, the "Recall" of entity words improves as the model identifies them more frequently. However, "Precision" eventually drops as the model begins to hallucinate entities. Joint decoding allows engineers to select the exact point on this curve that meets their requirements.

Negative Biasing and Suppression

One of the most innovative applications of this method is using a negative $\alpha$ (e.g., -1.0) to suppress sensitive words. This approach dropped the recall rate of unwanted words to near zero (0.01) with only a minor impact on overall CER.

Generalizing to Long Context

A significant finding was that models trained only on short contexts could handle long lists of entity words effectively using this joint decoding method, bridging a capability gap that usually requires expensive retraining.

Conclusion

The joint decoding method provides a robust framework for controllable contextual ASR. While it significantly improves performance and adds features like word suppression, it does increase computational cost by requiring parallel decoding paths. Future work will explore more efficient mechanisms to achieve this explicit control without doubling the decoding overhead, making it more viable for real-time applications.

Summary updated

BibTeX
@misc{yang2025joint,
  author = {Fang Yang and Jing Peng and Xi Yu and Xu Li and Haoyu Li and Chengwei Zhang and Guohui Zhong and Kai Yu},
  title = {{Joint decoding method for controllable contextual speech recognition based on Speech LLM}},
  year = {2025},
  eprint = {2508.08585},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.08585},
  howpublished = {arXiv},
}
Figure