Cascaded encoders for unifying streaming and non-streaming ASR

Arun Narayanan, Tara N. Sainath, Ruoming Pang, Jiahui Yu, Chung-Cheng Chiu, Rohit Prabhavalkar, Ehsan Variani, Trevor StrohmanOpenReview 2020 · DOI

Abstract

End-to-end (E2E) automatic speech recognition (ASR) models, by now, have shown competitive performance on several benchmarks. These models are structured to either operate in streaming or non-streaming mode. This work presents cascaded encoders for building a single E2E ASR model that can operate in both these modes simultaneously. The proposed model consists of streaming and non-streaming encoders. Input features are first processed by the streaming encoder; the non-streaming encoder operates exclusively on the output of the streaming encoder. A single decoder then learns to decode either using the output of the streaming or the non-streaming encoder. Results show that this model achieves similar word error rates (WER) as a standalone streaming model when operating in streaming mode, and obtains 10% -- 27% relative improvement when operating in non-streaming mode. Our results also show that the proposed approach outperforms existing E2E two-pass models, especially on long-form speech.

Introduction

In the field of Automatic Speech Recognition (ASR), a fundamental trade-off exists between streaming (low-latency, real-time) and non-streaming (high-accuracy, offline) capabilities. Streaming models must be causal, processing audio as it arrives without looking ahead, which inherently limits their accuracy. Conversely, non-streaming models utilize non-causal layers to look at the entire utterance, providing superior performance for tasks like video captioning.

Historically, unifying these modes required separate models or complex "two-pass" systems. Two-pass systems typically use a streaming model for an initial hypothesis and a second, larger model (like an LAS decoder) for rescoring. However, these are difficult to train and often struggle with long-form audio, frequently exhibiting high deletion rates. This paper introduces "cascaded encoders," a single-stage architecture that handles both modes simultaneously, matching standalone streaming performance while significantly boosting offline accuracy.

Methods

The core innovation is the Cascaded Encoder architecture, which stacks a non-streaming encoder directly on top of a streaming encoder.

Architecture of the Cascaded Encoder model

As shown in Figure 1, input features $x_t$ are first processed by a Causal (Streaming) Encoder. The resulting causal embeddings $e^s$ are then passed into a Non-Causal (Non-Streaming) Encoder to produce non-causal embeddings $e^a$. A shared RNN-T decoder, consisting of a Prediction Network and a Joint Layer, is trained to recognize speech from either $e^s$ or $e^a$.

The model is optimized using a dual loss function: $$L = \lambda L_{streaming} + (1 - \lambda) L_{non-streaming}$$

To maintain training efficiency, the authors employ a stochastic sampling method, randomly choosing to process either the streaming path or the full cascaded path for each training example. This framework is flexible and has been successfully implemented with both LSTM and Conformer architectures.

Results

The models were evaluated on a diverse dataset including Voice Search (VS), Non-Voice Search (NVS), and long-form synthesized passages (T-AB).

Comparison of Word Error Rates (WER) across different models and datasets

As detailed in Figure 2, the cascaded model (CASE RNN-T) achieves significant gains:

  • Accuracy Gains: In non-streaming (NC) mode, the model achieved a 10% to 27% relative WER improvement over the streaming baseline.
  • Streaming Parity: In streaming (C) mode, performance remained equivalent to standalone streaming models, indicating that the additional non-causal layers do not negatively impact real-time performance.
  • Long-form Robustness: On the T-AB dataset, the cascaded model significantly outperformed traditional LAS-based two-pass models. While LAS-based rescorers saw WER explode (e.g., 20.5% or 49.9%) due to deletions in long-form audio, the CASE RNN-T maintained stable performance (3.8% - 4.5%).

Conclusion

Cascaded encoders provide a robust, unified solution for streaming and non-streaming ASR. By using a shared RNN-T decoder, the model avoids the deletion issues common in attention-based rescorers for long-form speech. While the second pass introduces additional computational cost compared to simple rescorers, the gains in accuracy and architectural simplicity are substantial. Future work may explore lighter decoders or integration with deliberation models to further enhance performance and efficiency.

Summary updated

BibTeX
@misc{narayanan2020cascaded,
  author = {Arun Narayanan and Tara N. Sainath and Ruoming Pang and Jiahui Yu and Chung-Cheng Chiu and Rohit Prabhavalkar and Ehsan Variani and Trevor Strohman},
  title = {{Cascaded encoders for unifying streaming and non-streaming ASR}},
  year = {2020},
  eprint = {2010.14606},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.14606},
  howpublished = {OpenReview},
}
Figure