Streaming Transformer-Based Acoustic Models Using Self-Attention with Augmented Memory

Chunyang Wu, Yongqiang Wang, Yangyang Shi, Ching-Feng Yeh, Frank Zhang

Introduction

Transformers have revolutionized natural language processing and are increasingly dominant in automatic speech recognition (ASR). However, their application to real-time, streaming scenarios remains challenging. Standard Transformer architectures are inherently "global," requiring access to the entire input sequence to compute self-attention. This requirement introduces unacceptable latency for live applications such as voice assistants or real-time captioning. Furthermore, the quadratic computational complexity of self-attention relative to sequence length makes processing long audio files prohibitively expensive.

The Context Gap in Streaming Transformers

To enable streaming, researchers often employ "block processing," where audio is divided into small, independent chunks. While this solves the latency and complexity issues, it introduces a "context gap." Because each block is processed in isolation, the model cannot capture long-range dependencies—for instance, an acoustic cue at the beginning of a sentence that influences the interpretation of a word seconds later. Previous attempts to bridge this gap, such as Transformer-XL, carry over hidden states from the immediate past, but this approach often fails to capture the broader, global context of the entire utterance.

The Augmented Memory Transformer (AMTrf)

This paper introduces the Augmented Memory Transformer (AMTrf), an architecture designed to provide the accuracy of global Transformers with the efficiency required for streaming. The AMTrf architecture relies on three primary components:

  1. Segmented Processing with Context: Audio is processed in fixed-size blocks. To ensure smooth transitions and local context, each block includes a small amount of "left context" (historical frames) and "right context" (look-ahead frames).
  2. The Augmented Memory Bank: This is the central innovation. Instead of storing every raw hidden state from the past, the model generates a "summarization query" for each segment. This query aggregates the segment's embeddings into a compact memory slot, which is then stored in a persistent memory bank.
  3. Memory-Augmented Self-Attention: During the self-attention phase, the model attends not only to the current audio frames but also to the entire history of summarized memory slots. This allows the model to maintain a "global view" of the audio history without the computational burden of attending to every individual past frame.

Experimental Results

The researchers evaluated AMTrf against industry-standard baselines, including Latency-Controlled Bidirectional LSTMs (LC-BLSTM) and other streaming Transformer variants.

Benchmark Performance

On the LibriSpeech "test-other" dataset—a benchmark known for its challenging, noisy audio—the AMTrf achieved a Word Error Rate (WER) of 7.6%. This represents a 15-18% relative improvement over the LC-BLSTM baseline (9.9% WER). Notably, AMTrf also outperformed Transformer-XL, suggesting that the summarized memory bank is more effective for ASR than carrying over raw hidden states.

Robustness to Real-World Noise

To test the model's performance in "wild" environments, the authors utilized large-scale internal datasets of German and Russian social media videos. These datasets are significantly noisier than academic benchmarks. The AMTrf demonstrated a 5-12% improvement in WER on these tasks. The results suggest that the global context provided by the memory bank helps the model distinguish speech from background noise by understanding the broader acoustic environment.

Discussion and Limitations

While AMTrf offers significant gains, the authors identify key areas for further development. The study primarily focuses on "algorithmic latency"—the delay inherent in the model's look-ahead window. In production environments, "computational latency" (the time required for hardware to execute the operations) is equally critical and requires further optimization for edge devices.

Additionally, while summarized memory is efficient, an "unlimited" memory bank will eventually grow for very long recordings. For such cases, the authors suggest a "limited memory" strategy—retaining only the most recent $N$ memory slots—which maintains high performance while capping resource usage.

Conclusion

The Augmented Memory Transformer provides a scalable and accurate solution for streaming ASR. By combining block-based processing with a summarized memory bank, the architecture achieves state-of-the-art performance on both clean and noisy datasets, bridging the gap between high-latency global models and low-accuracy streaming baselines.

Summary updated

BibTeX
@inproceedings{wu2020streaming,
  author = {Chunyang Wu and Yongqiang Wang and Yangyang Shi and Ching-Feng Yeh and Frank Zhang},
  title = {{Streaming Transformer-Based Acoustic Models Using Self-Attention with Augmented Memory}},
  booktitle = {Interspeech},
  year = {2020},
  url = {https://openreview.net/forum?id=QMZK4AecgMn},
}
Figure