Improving Synthetic Data Training for Contextual Biasing Models with a Keyword-Aware Cost Function

Kwok Chin Yuen, Jia Qi Yip, Eng Siong Chng

Abstract

Automatic Speech Recognition (ASR) systems frequently encounter difficulties with rare words such as proper names or technical terms. Contextual biasing addresses this by utilizing external "bias lists," but training these modules on synthetic data often leads to overfitting to acoustic artifacts. This paper introduces a keyword-aware cost function that separates the biasing task into two distinct objectives: determining when to bias via binary classification and what to bias via masked cross-entropy. Our approach achieves a significant reduction in overfitting, resulting in up to a 16.6% relative improvement in Word Error Rate (WER) on real-world datasets.

Introduction

ASR systems often struggle with "rare words"—names, technical terms, or specific addresses—because they appear infrequently in standard training corpora. Contextual biasing attempts to resolve this by providing the model with a "bias list" (e.g., a contact list) to prioritize during decoding.

To train these modules, researchers frequently rely on synthetic audio generated by Text-to-Speech (TTS) systems due to the scarcity of real recordings for rare words. However, synthetic audio contains artifacts like unnatural prosody or acoustic distortions. Biasing modules often overfit to these artifacts, leading to poor performance on natural human speech. Standard training objectives, such as vanilla cross-entropy, fail to explicitly direct the model's focus toward biased keywords, resulting in inefficient learning.

Methodology

The proposed method builds upon the Tree-constrained pointer generator (TCPGen), a component integrated into an ASR model's decoder. TCPGen generates two primary outputs: a distribution over the bias words ($P^{ptr}$) and an interpolation weight ($P^{gen}$) that determines the balance between the bias list and the base model's predictions.

The TCPGen architecture integrated with a Whisper-based ASR system, showing the interpolation between the base model and the pointer network.

Keyword-Aware Cost Function

The core innovation is a dual-component loss function designed to force the model to learn the mechanics of biasing explicitly:

  1. Binary Classification Loss ($\ell_{gen}$): This loss trains the model to perform binary classification at each token position, explicitly deciding whether the current step requires biasing.
  2. Masked Cross-Entropy Loss ($\ell_{ptr}$): This loss optimizes the pointer network to predict the correct rare word only at time steps where a biased word is present. This prevents the model from wasting capacity on common words already handled by the base ASR model.
An illustration of the biasing process where $P^{gen}$ decides when to bias and $P^{ptr}$ decides which token to select from the bias list.

Additionally, the researchers implemented Masked Probabilities during inference. They found that high confidence in biasing ($P^{gen} \approx 1$) could accidentally suppress the base model's valid knowledge for non-bias tokens. The adjusted formula ensures the base model's knowledge is preserved when appropriate.

Experimental Setup

The method was evaluated on several datasets:

  • NSC-Part-2 (National Speech Corpus): A Singapore English dataset featuring road names and addresses. Training involved 20 hours of real audio and 10 hours of synthetic (TTS) audio.
  • DSTC2: A human-machine dialogue dataset used to validate cross-domain generalization.
  • Rare Word Lists: Words outside a "10K common word list" were treated as rare. The NSC set included 3,856 rare words in training and 1,106 in the test set.

Results and Analysis

The keyword-aware cost function significantly improved performance across different architectures:

  • Whisper-small on NSC: The unadapted model's WER was 29.71%. The proposed TCPGen-2L method reduced this to 11.81%, representing a 16.6% relative reduction compared to the previous state-of-the-art baseline (AGEM + vanilla TCPGen).
  • Qwen-Audio on DSTC2: The method reduced the Biased Word Error Rate (B-WER) from 87.9 to 72.9, a 17.1% relative improvement, demonstrating robustness across model architectures.

Key Insights

By splitting the task into "When" (binary) and "What" (masked CE), the model becomes more robust to the differences between synthetic and real audio. Foundation models like Whisper are often "lazy" during standard training because they already achieve low loss on synthetic data without truly learning to use the bias list. The new loss functions force the module to learn specific biasing mechanics, which also improves interpretability by allowing researchers to measure the False Acceptance Rate (FAR).

Conclusion

This research demonstrates that explicit "when and what" training targets can overcome the limitations of training contextual biasing modules on synthetic data. While the system remains dependent on the accuracy of the provided bias list, the keyword-aware cost function provides a clear path forward for making large-scale ASR models more adaptable to rare and domain-specific vocabulary. Future work may extend this explicit training logic to other multi-modal tasks requiring a choice between internal knowledge and external context.

Summary updated

BibTeX
@inproceedings{yuen2025improving,
  author = {Kwok Chin Yuen and Jia Qi Yip and Eng Siong Chng},
  title = {{Improving Synthetic Data Training for Contextual Biasing Models with a Keyword-Aware Cost Function}},
  booktitle = {Interspeech},
  year = {2025},
  doi = {10.21437/interspeech.2025-173},
}
Figure