Dynamic Encoder Transducer: A Flexible Solution for Trading Off Accuracy for Latency

Yangyang Shi, Varun Nagaraja, Chunyang Wu, Jay Mahadeokar, Duc Le, Rohit Prabhavalkar, Alex Xiao, Ching-Feng Yeh, Julian Chan, Christian Fuegen, Ozlem Kalinli, Michael L. Seltzer

Abstract

The Dynamic Encoder Transducer (DET) addresses the challenge of deploying on-device Automatic Speech Recognition (ASR) across diverse hardware with varying computational constraints. By employing collaborative learning and layer dropout, DET enables a single model to dynamically adjust its complexity. This flexibility allows for high-accuracy performance on powerful devices and low-latency "burst" processing on resource-constrained hardware, all without the need for multiple specialized models.

Introduction

On-device ASR often requires a difficult trade-off between accuracy and latency. While high-end smartphones can support large, accurate models, low-end wearables require lightweight versions to maintain responsiveness. Traditionally, this necessitates training and maintaining multiple models for different hardware tiers. Furthermore, "audio bursting"—where buffered audio is processed rapidly after a wake-word trigger—creates significant computational spikes that can lead to perceived lag. The Dynamic Encoder Transducer (DET) offers a unified solution that can scale its depth on-the-fly to meet these varying demands.

Methods

The DET architecture builds upon the Emformer Transducer, a popular streaming ASR framework. To achieve a dynamic encoder, the researchers explored two primary training strategies:

Layer Dropout

During training, encoder layers are randomly "dropped." This forces the remaining layers to become more robust, allowing the model to be pruned (e.g., from 20 layers down to 14) at inference time to save power and computation without requiring retraining.

Collaborative Learning

This is the core innovation of the DET. Multiple encoders of different depths—a "teacher" and several "students"—are trained jointly within a single model.

  • Weight Sharing: The students share all their layers with the teacher, except for the final output projection layer.
  • Knowledge Distillation: Auxiliary losses, specifically Cross-Entropy and Kullback–Leibler (KL) divergence, are used to "distill" knowledge from the full-size teacher encoder into the smaller student encoders.
Collaborative learning architecture for the Dynamic Encoder Transducer.

Dynamic Inference and Switching

A unique capability of DET is the ability to switch encoder depths mid-utterance. This is particularly useful for handling audio bursts. For instance, a system can use a fast 14-layer student encoder to process the initial 0.8 to 1.5 seconds of buffered audio and then seamlessly switch to a 20-layer teacher encoder for the remainder of the query to ensure maximum accuracy.

Visualizing layer dropout, pruned decoding, and dynamic encoder switching.

Key Results

The researchers evaluated DET on LibriSpeech and large-scale in-house datasets (up to 1.5 million hours of video data). Key findings include:

  • Improved Teacher Performance: Collaborative training actually improved the performance of the full-size model. On LibriSpeech, the DET teacher reduced the Word Error Rate (WER) by over 8% compared to a standard baseline of the same size (9.04% vs 9.86%).
  • Efficiency: A 14-layer student trained via collaborative learning was 25% smaller than the baseline but achieved nearly identical accuracy.
  • Latency Reduction: In dynamic switching scenarios on in-house data, using a small encoder for the first 1.5s of audio reduced the Speech Perceived Latency (SPL) from 756ms to 714ms with minimal accuracy loss.
  • Method Superiority: Collaborative learning consistently outperformed simple layer dropout for creating high-quality pruned models.

Conclusion

DET provides a scalable, single-model solution for diverse ASR deployment needs, effectively trading off accuracy for latency as required by the hardware or the specific audio context. Future work will explore more "intelligent" switching triggers based on audio content and extending dynamic scaling to other architectural parameters like model width.

Summary updated

BibTeX
@inproceedings{shi2021dynamic,
  author = {Yangyang Shi and Varun Nagaraja and Chunyang Wu and Jay Mahadeokar and Duc Le and Rohit Prabhavalkar and Alex Xiao and Ching-Feng Yeh and Julian Chan and Christian Fuegen and Ozlem Kalinli and Michael L. Seltzer},
  title = {{Dynamic Encoder Transducer: A Flexible Solution for Trading Off Accuracy for Latency}},
  booktitle = {Interspeech},
  year = {2021},
  doi = {10.21437/interspeech.2021-1272},
}
Figure