Adaptable End-to-End ASR Models using Replaceable Internal LMs and Residual Softmax

Keqi Deng, Philip C. Woodland · DOI

Introduction

End-to-End (E2E) Automatic Speech Recognition (ASR) models have revolutionized the field by mapping acoustic signals directly to text sequences. However, these models are often treated as "black boxes" where acoustic modeling and language modeling are deeply entangled. This entanglement makes them brittle when faced with domain shift—for instance, a model trained on formal audiobooks (LibriSpeech) typically performs poorly on spontaneous telephone conversations (Switchboard) because its internal language model (LM) is tuned to the wrong linguistic structure.

Traditional adaptation methods, such as "Shallow Fusion" or "Density Ratio" estimation, attempt to integrate external LMs during decoding. However, these methods are often computationally expensive and struggle to effectively subtract the influence of the source domain's internal LM. This paper proposes a more modular approach, introducing the Replaceable Internal Language Model (RILM) for Transformer-based decoders and Residual Softmax (R-softmax) for CTC-based models.

Methodology

1. Replaceable Internal Language Model (RILM)

In a standard Transformer decoder, self-attention (which models word sequences) and cross-attention (which integrates audio features) are interleaved throughout the network. This makes it impossible to isolate the linguistic component.

The RILM architecture restructures the decoder into two distinct functional blocks:

  • The Internal LM: The first $N$ layers consist exclusively of self-attention. This design ensures this section behaves exactly like a standalone Transformer LM.
  • The Acoustic Integrator: The subsequent $M$ layers handle the cross-attention to the encoder's audio features.

Because the first $N$ layers are functionally independent, they can be pre-trained on massive text-only corpora. More importantly, they can be swapped out for a different LM trained on target-domain text during inference, allowing for seamless domain adaptation without retraining the entire ASR system.

2. Residual Softmax (R-softmax)

Connectionist Temporal Classification (CTC) models are frequently used for their speed, but they are often assumed to lack an internal LM. In reality, CTC models learn the unigram frequencies (the probability of individual tokens) of their training data.

To address this, the authors introduced R-softmax. This method mathematically adjusts the model's output logits by calculating the ratio between token frequencies in the source domain and the target domain. By applying this "residual" correction, the model can be biased toward the vocabulary of the new domain on the fly, effectively compensating for the training data's linguistic bias.

Experimental Setup

The researchers evaluated these methods using several standard benchmarks:

  • Source Domain: LibriSpeech (960 hours of read English audiobooks).
  • Target Domains: Switchboard (SWBD) and Fisher transcripts (spontaneous telephone speech), and AESRC2020 (accented English).
  • Metrics: Word Error Rate (WER) was used to measure performance across both source and target domains.

Key Insights and Results

Modularity and Performance

The experiments demonstrated that modularity does not come at the cost of accuracy. In fact, the RILM and R-softmax combination achieved a 2.6% absolute reduction in WER on the Switchboard dataset. For accented speech (AESRC2020), the methods provided a 1.0% absolute WER reduction.

Efficiency Gains

Unlike traditional fusion techniques that require running an external LM in parallel with the ASR model, RILM simply replaces existing layers. This makes the inference process significantly more computationally efficient, as the total number of parameters being processed remains constant.

The Importance of "Highway Connections"

The authors found that incorporating a "highway connection"—which adds the internal LM's output directly to the final prediction layers—was crucial. This architectural choice helped the model retain semantic information from the LM layers as it passed through the acoustic integration stages.

Conclusion and Future Work

This research proves that E2E ASR models can be made modular and adaptable. By separating the internal LM from the acoustic components, researchers can treat the linguistic portion of the model as a "plug-and-play" component.

While the current R-softmax implementation focuses on unigram frequencies, future work could extend this to n-gram or sequence-level adjustments to capture more complex linguistic patterns. Additionally, the authors suggest that these modular principles could be adapted for other popular architectures, such as Neural Transducers (RNN-T), further expanding the flexibility of modern speech recognition systems.

Summary updated

BibTeX
@inproceedings{deng2023adaptable,
  author = {Keqi Deng and Philip C. Woodland},
  title = {{Adaptable End-to-End ASR Models using Replaceable Internal LMs and Residual Softmax}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=_KRTEpqMWW},
}
Figure