TL;DR
This paper introduces a streaming version of the Transformer architecture for automatic speech recognition (ASR), overcoming the "offline" limitation of standard self-attention. By combining time-restricted self-attention in the encoder with a triggered attention (TA) mechanism in the decoder, the authors achieved a new state-of-the-art for streaming end-to-end ASR on the LibriSpeech benchmark, reaching a Word Error Rate (WER) as low as 2.8%.
What Problem Does This Paper Address?
While Transformer models have revolutionized ASR by outperforming traditional Recurrent Neural Networks (RNNs), they have a major drawback: they are typically "offline." Standard self-attention requires looking at the entire speech utterance at once to calculate context. This is a deal-breaker for real-time applications like live captioning or voice assistants, where the system must generate text shortly after a word is spoken.
Existing streaming solutions often rely on RNN-Transducers (RNN-T), which are efficient but generally lag behind Transformers in accuracy. The challenge addressed here is: How do we adapt the high-performance Transformer architecture to work in a streaming fashion without sacrificing its accuracy gains?
Methods
The authors propose a "Streaming Transformer" that modifies both the encoder and the decoder to handle incremental input:
- Encoder: Time-Restricted Self-Attention: Instead of allowing each frame to attend to the entire sequence, the authors limit the "future context." Each layer in the encoder can only look ahead by a fixed number of frames ($\epsilon_{enc}$). Because this look-ahead is applied at every layer, the total theoretical latency grows with the number of layers.
- Decoder: Triggered Attention (TA): The decoder uses a "trigger" mechanism to decide when to generate an output. The model is jointly trained with a Connectionist Temporal Classification (CTC) objective. The CTC module predicts an alignment that "triggers" the attention-based decoder to process the acoustic information only after enough relevant frames have been seen.
- Joint Decoding: The system uses a frame-synchronous one-pass decoding algorithm. It combines scores from the CTC, the Transformer decoder, and an external RNN Language Model (LM) to pick the best hypothesis in real-time.
Datasets
The model was evaluated on LibriSpeech, a standard large-scale corpus of approximately 960 hours of English audiobooks. The data is split into "clean" (high-quality recordings) and "other" (noisier or more challenging recordings) sets to test robustness.
Key Insights and Ideas
- Tunable Latency: The system allows for a direct trade-off between accuracy and delay. By adjusting the look-ahead parameters ($\epsilon_{enc}$ for the encoder and $\epsilon_{dec}$ for the decoder), developers can optimize the model for different hardware or user experience requirements.
- The Power of Joint Training: The CTC objective isn't just a "helper" for training; it's fundamental to the streaming logic. It provides the timing signals (triggers) that allow the attention mechanism to work incrementally.
- Decoder Efficiency: Unlike the encoder, the decoder's look-ahead delay does not grow with the number of layers because every decoder layer attends to the same encoder output sequence. This makes the decoder latency much easier to manage.
Key Results
The Streaming Transformer set a new benchmark for end-to-end streaming ASR:
- Top Accuracy: With a larger look-ahead (total delay of ~2.2 seconds), the model achieved 2.8% WER on "test-clean" and 7.2% on "test-other".
- Latency Trade-off: A more responsive configuration with a total delay of ~1.2 seconds still achieved an impressive 3.0% / 7.8% WER.
- Comparison: As shown in the results table below, the joint CTC-attention approach significantly outperforms using CTC or attention mechanisms in isolation.
Limitations and Future Work
- Theoretical vs. Perceived Latency: The paper focuses on theoretical algorithmic latency. In practice, a lattice-based implementation might feel faster to a user because it can show intermediate results before they are finalized. The authors note that a thorough study of "user-perceived latency" is still needed.
- Computational Cost: While Transformers are parallelizable during training, the incremental nature of streaming decoding can be computationally intensive. Future work might look into further optimizing the inference speed of these models for edge devices.
Summary updated