TODM: Train Once Deploy Many Efficient Supernet-Based RNN-T Compression For On-Device ASR Models

Yuan Shangguan, Haichuan Yang, Danni Li, Chunyang Wu, Yassir Fathullah, Dilin Wang, Ayushi Dalmia, Raghuraman Krishnamoorthi, Ozlem Kalinli, Junteng Jia, Jay Mahadeokar, Xin Lei, Mike Seltzer, Vikas Chandra

TL;DR

TODM (Train Once Deploy Many) is a framework that trains a single "Supernet" from which many smaller, hardware-optimized ASR models can be extracted without additional training. By combining adaptive dropout, in-place Alpha-divergence distillation, and the ScaledAdam optimizer, TODM produces a family of models that match or exceed the performance of individually tuned models while keeping training energy costs constant.

What Problem Does This Paper Address?

Deploying Automatic Speech Recognition (ASR) on edge devices—like smartphones, watches, or smart speakers—is a balancing act. Different hardware (CPUs, TPUs, and custom neural accelerators) has different memory and compute constraints. Traditionally, engineers have to manually tune hyperparameters and re-train separate models for every single hardware target.

This "train-per-device" approach is incredibly resource-intensive, consuming massive amounts of GPU-hours and energy (measured in MegaWatt-hours). The researchers at Meta AI sought a way to produce a wide variety of high-quality, hardware-friendly models using the same amount of training resources typically required for just one model.

Methods

The core of TODM is a Supernet: a large weight-sharing neural network graph. Instead of training one fixed architecture, the authors train a Supernet based on a Multi-Head State Space Model (MH-SSM) RNN-T. From this Supernet, they can "slice out" various subnetworks by reducing the width of feed-forward layers or dropping entire encoder layers.

To make this work effectively, they introduced three key technical innovations:

  1. Adaptive Dropout: Smaller subnetworks need less regularization. The authors scale the dropout magnitude based on the current subnetwork's channel width, ensuring that reduced-size modules aren't over-regularized.
  2. Sampled In-place Alpha-divergence Knowledge Distillation (KD): During training, the largest version of the network (the "teacher") teaches the smaller sampled versions (the "students"). They use Alpha-divergence instead of standard KL-divergence to better capture the teacher's uncertainty. To save memory, they only distill the top $j$ output probabilities rather than the entire lattice.
  3. ScaledAdam Optimizer: Different subnetwork sizes contribute vastly different gradient norms. ScaledAdam scales updates based on parameter norms, which improves training stability across the diverse range of architectures within the Supernet.

After training the Supernet, they use an Evolutionary Search on a validation set to find the "Pareto front"—the set of subnetwork architectures that offer the best word error rate (WER) for any given size constraint.

Fig. 1: (a) MH-SSM layer: during Supernet training, subnetworks are created by reducing the output channel sizes of FFN modules (dotted lines) or dropping the entire layer. (b) Encoder channel-and-layer reduction of a 49.6MB Pareto subnetwork for model F. blue: remaining FFN channels, gray: reduced layers and channels.

Datasets

The models were trained and evaluated using the standard LibriSpeech ASR corpus:

  • Training: 960 hours of labeled speech.
  • Architecture Search: The 10.7-hour dev-clean and dev-other sets were used to find the best subnetworks.
  • Evaluation: test-clean and test-other sets were used for final performance reporting.

Key Insights and Ideas

  • Weight Sharing as Regularization: Surprisingly, the largest network in the Supernet often performs better than if it were trained alone. The authors hypothesize that the high-quality subnetworks contribute to the overall performance of the "max" network through weight sharing.
  • Constant Energy Cost: As shown in Figure 2, the energy cost of TODM is flat. Whether you need 3 models or 30, the training cost remains the same, whereas individual training costs scale linearly.
  • Search Space Flexibility: Allowing the search to drop entire layers (not just reduce width) was crucial for finding high-performing medium-sized models.
  • Distillation Efficiency: Subsampling the top logits for KD allowed the authors to maintain large batch sizes, which is critical for training stability and speed, without running out of GPU memory.
Fig. 2: Energy (MWh) consumed by training models at scale.

Key Results

The final TODM Supernet (Model F) produced a family of models that consistently matched or outperformed individually trained baselines.

  • Performance: The TODM subnetworks achieved up to a 3% relative improvement in WER compared to manually tuned models of the same size.
  • Pareto Front: As seen in Figure 3, Model F (black stars) defines a superior accuracy-vs-size curve compared to simpler channel-reduction methods (Model B0).
  • Convergence: Knowledge distillation helped the Supernet converge significantly faster, reaching better accuracy in 120 epochs than the baseline did in 180.
Fig. 3: LibriSpeech test-other WER vs. model sizes. Our proposed method (Model F) produces subnetworks that are on-par with, or exceeds best individually trained models (especially for models ≥50 million parameters).

Limitations and Future Work

  • Training Divergence: The authors noted that while KD helps early convergence, it can cause validation loss to diverge later in training (around 100-120 epochs). They mitigated this by switching to ScaledAdam and reducing the KD weight late in the process.
  • Pre-training: Interestingly, seeding the Supernet with a pre-trained model actually hurt the accuracy of the resulting subnetworks, suggesting that Supernets require a unique co-adaptation of weights from scratch.
  • Hardware Specifics: While the models are "hardware-friendly" because they are dense (avoiding the complexities of sparse kernels), the paper does not provide benchmarks on specific edge chips (e.g., Apple A-series or Google Tensor), which would be a natural next step for deployment testing.

Summary updated

BibTeX
@inproceedings{shangguan2024todm,
  author = {Yuan Shangguan and Haichuan Yang and Danni Li and Chunyang Wu and Yassir Fathullah and Dilin Wang and Ayushi Dalmia and Raghuraman Krishnamoorthi and Ozlem Kalinli and Junteng Jia and Jay Mahadeokar and Xin Lei and Mike Seltzer and Vikas Chandra},
  title = {{TODM: Train Once Deploy Many Efficient Supernet-Based RNN-T Compression For On-Device ASR Models}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10448025},
}
Figure