Stateful Conformer with Cache-Based Inference for Streaming Automatic Speech Recognition

Vahid Noroozi, Somshubra Majumdar, Ankur Kumar, Jagadeesh Balam, Boris Ginsburg

TL;DR

Researchers at NVIDIA have introduced a "Stateful Conformer" that bridges the performance gap between offline and streaming speech recognition. By implementing an activation caching mechanism and a hybrid CTC/RNNT architecture, they achieved higher accuracy and lower latency than traditional buffered streaming methods while eliminating redundant computations.

What Problem Does This Paper Address?

Streaming Automatic Speech Recognition (ASR) is inherently difficult because the model must transcribe audio in real-time without seeing the "future" of the utterance. Offline models, which process the entire audio at once, can use global context to achieve high accuracy.

To mimic this in streaming, developers often use "buffered" inference, where the model processes overlapping chunks of audio. However, this is computationally expensive because the overlapping parts are recomputed multiple times. Furthermore, there is often a "training-inference disparity": models trained on full sequences behave differently when forced to work on small chunks during deployment, leading to significant accuracy drops.

Methods

The authors adapted the FastConformer architecture for streaming through three primary innovations:

  1. Causal Architecture: They modified the encoder to be fully causal by replacing Batch Normalization with Layer Normalization and using specific left-padding for convolutions. This ensures the model only relies on past and limited future context.
  2. Activation Caching: To avoid recomputing the past, they introduced a caching mechanism. During inference, the model stores intermediate activations (for both self-attention and convolutions) from previous chunks. This allows a non-autoregressive model to function autoregressively in production with zero redundant computation. Caching schema for self-attention and convolution layers
  3. Chunk-aware Look-ahead: Traditional look-ahead in deep networks causes latency to accumulate with every layer. The authors used a chunk-aware approach where the look-ahead is fixed for the entire chunk, preventing latency from exploding as the network gets deeper. Comparison of regular vs. chunk-aware look-ahead
  4. Hybrid CTC/RNNT Architecture: The model uses a single shared encoder that feeds into both a Connectionist Temporal Classification (CTC) decoder and an RNN-Transducer (RNNT) decoder. Hybrid CTC/RNNT model architecture
Caching schema for self-attention and convolution layers
Comparison of regular vs. chunk-aware look-ahead
Hybrid CTC/RNNT model architecture

Datasets

The models were evaluated on two major benchmarks:

  • LibriSpeech (LS): The standard 960-hour benchmark for ASR.
  • NeMo ASRSET 3.0: A massive, 26,000-hour multi-domain dataset comprising various public datasets (e.g., GigaSpeech, Common Voice, VoxPopuli) to test robustness across different accents and environments.

Key Insights and Ideas

  • Eliminating the Accuracy Gap: By constraining the context during training to match the streaming inference conditions, the authors eliminated the performance degradation typically seen when moving from offline training to streaming deployment.
  • Efficiency through Caching: The caching mechanism makes streaming inference as computationally efficient as offline inference. It removes the need for overlapping buffers, which are the primary source of "wasted" FLOPs in streaming ASR.
  • The Hybrid Advantage: Training with both CTC and RNNT losses simultaneously acts as a form of regularization. It speeds up the convergence of the CTC decoder and improves the final Word Error Rate (WER) for both decoders.
  • Multi-Latency Robustness: The authors found that training a single model on a variety of chunk sizes (randomly sampled during training) actually makes the model more accurate and robust than training a model for one specific latency.

Key Results

The proposed cache-aware model significantly outperformed the buffered baseline across all metrics.

  • Accuracy: On LibriSpeech (test-other), the chunk-aware RNNT model achieved a 6.3% WER, a massive improvement over the 11.3% WER of the buffered baseline at similar latencies. Accuracy and latency comparison on LibriSpeech
  • Large-Scale Robustness: When tested on the 26k-hour ASRSET, the cache-aware models consistently beat buffered models across diverse benchmarks like Earnings22 and Tedlium. Performance across multi-domain benchmarks
  • Hybrid vs. Non-Hybrid: Hybrid models consistently showed lower WER than their non-hybrid counterparts, proving the value of joint CTC/RNNT training. Hybrid vs. Non-hybrid accuracy
Accuracy and latency comparison on LibriSpeech
Performance across multi-domain benchmarks
Hybrid vs. Non-hybrid accuracy

Limitations and Future Work

While the results are impressive, the authors note a few areas for further exploration:

  • Training Time: Training a model to support multiple latencies (Multi-Lookahead) can require more training steps to reach optimal convergence compared to single-latency models.
  • Architecture Specifics: The study focused on FastConformer. While the principles should apply to the original Conformer, the 2x speed advantage of FastConformer was a key driver for their experiments.
  • Future Directions: The authors suggest that future work could look into even more sophisticated memory mechanisms to handle extremely long-form audio without linear increases in cache size.

Summary updated

BibTeX
@inproceedings{noroozi2024stateful,
  author = {Vahid Noroozi and Somshubra Majumdar and Ankur Kumar and Jagadeesh Balam and Boris Ginsburg},
  title = {{Stateful Conformer with Cache-Based Inference for Streaming Automatic Speech Recognition}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446861},
}
Figure