CopyNE: Better Contextual ASR by Copying Named Entities

Shilin Zhou, Zhenghua Li, Yu Hong, Min Zhang, Zhefeng Wang, Baoxing Huai · OpenReview

Abstract

End-to-end Automatic Speech Recognition (ASR) systems frequently struggle with "contextual" entities—specific names, places, or organizations that appear infrequently in training data. CopyNE is a novel framework that treats named entities (NEs) as indivisible units rather than sequences of individual tokens. By introducing a "copying" mechanism similar to pointer networks, the model can directly pull complete entities from a contextual dictionary, significantly reducing homophonic errors and incomplete transcriptions in personalized ASR scenarios.

The Challenge of Contextual Entities

Standard ASR decoders generate text token-by-token. When transcribing a rare name like "Tongling" (铜陵), a model might correctly predict the first character but then get "distracted" by a more common homophone for the second character, resulting in "copper bell" (铜铃).

Figure 1: Illustration of a homophone error where a standard ASR system incorrectly transcribes a named entity.

Previous attempts to fix this, such as Contextual LAS (CLAS) or Contextual Bias Adapter (CBA), used external dictionaries to bias the model toward certain tokens. However, they still treated entities as a collection of independent parts. If the model makes a mistake on just one token in the sequence, the entire entity is corrupted.

The CopyNE Framework

The authors propose CopyNE, which integrates a systematic copying mechanism into a standard CTC-Transformer ASR architecture. The architecture consists of several key components:

  1. NE Encoder: A multi-layer LSTM encodes each entity in a contextual dictionary into a fixed-length vector representation.
  2. Copy Probability: At each decoding step, the model uses a dot-product attention mechanism between the current decoder state and the encoded entities to determine the probability of "copying" a specific entity.
  3. Unified Search Space: During inference, the model looks at a combined probability space: it can either predict a single token from the standard vocabulary or "jump" and copy an entire multi-token entity from the dictionary in one go.
  4. Copy Loss ($L_{copy}$): A new loss function is added during training that explicitly penalizes the model if it fails to attend to the correct entity in the dictionary when that entity appears in the ground-truth transcript.
Figure 3: The CopyNE architecture, highlighting the NE Encoder and the Dot-product Attention mechanism used for the copying process.

To prevent the model from "hallucinating" entities when it's unsure, a confidence threshold ($\gamma$) is introduced. If the maximum copy probability is too low, the model is forced to stick to the standard vocabulary.

Experimental Evaluation

The researchers evaluated CopyNE on both Mandarin (Aishell, ST-cmds) and English (a 150-hour composite dataset) benchmarks. They created specific "*-NE" subsets containing only utterances with named entities to specifically measure contextual performance.

Key Results

CopyNE demonstrated substantial gains over previous state-of-the-art methods like CLAS and CBA:

  • Mandarin Accuracy: On the Aishell-NE test set, CopyNE achieved a 55.4% relative reduction in Named Entity Character Error Rate (NE-CER) compared to the baseline.
  • English Accuracy: When integrated with OpenAI’s Whisper, CopyNE showed a 16.8% relative reduction in NE-WER on the English test set.
  • Robustness: The model remained effective even when the dictionary size was quadrupled with "noisy" (irrelevant) entities, demonstrating its viability for real-world applications with large, messy dictionaries.

Discussion and Future Work

The core insight of CopyNE is that treating an entity as an indivisible unit provides a natural "error correction" for homophones. By copying the whole string, the model bypasses the token-level ambiguity that plagues traditional decoders. Furthermore, the mechanism is backbone-agnostic, as shown by its successful integration with pre-trained models like Whisper.

However, the authors acknowledge that an excessive number of noisy entities in the dictionary can eventually degrade performance. Future work will explore dynamic filtering methods—a "pre-selection" step—to prune the dictionary down to the most relevant entities before the decoding process begins, further enhancing robustness in large-scale deployments.

Summary updated

BibTeX
@inproceedings{zhou2024copyne,
  author = {Shilin Zhou and Zhenghua Li and Yu Hong and Min Zhang and Zhefeng Wang and Baoxing Huai},
  title = {{CopyNE: Better Contextual ASR by Copying Named Entities}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=7ZpQ5QDBNU},
}
Figure