Big Model only for Hard Audios: Sample Dependent Whisper Model Selection for Efficient Inferences

Hugo Malard, Salah Zaiem, Robin Algayres

TL;DR

This paper tackles the computational cost of large Automatic Speech Recognition (ASR) models like Whisper by proposing a "decider" module that intelligently selects a smaller, faster model for easier audio samples. This approach significantly reduces inference costs with minimal accuracy loss, offering a practical way to balance performance and efficiency.

What Problem Does This Paper Address?

Modern ASR models, particularly large transformer-based architectures like OpenAI's Whisper, have achieved remarkable accuracy. However, this performance comes at a steep computational price, with massive models requiring significant resources for inference. While smaller versions of these models exist, they often sacrifice accuracy. The core problem is how to leverage the power of large models only when necessary, without incurring their full computational cost for every audio sample. The authors observe that smaller models are surprisingly effective for a substantial portion of audio data, suggesting an opportunity to dynamically switch between models based on the difficulty of the input.

Methods

The proposed solution centers around a two-stage pipeline: a feature extractor and a decider module.

  1. Feature Extractor: The authors use the encoder of the Whisper Small model as their feature extractor. This choice is motivated by the observation that the bulk of computational cost in transformer-based ASR models lies in the beam search decoding phase, not the initial encoding. Using a pre-trained, powerful encoder allows for rich, high-level representations of the audio.
  2. Decider Module: This module takes the features from the extractor and predicts whether the audio sample is "hard" or "easy." For "easy" samples, it recommends using a smaller model (Whisper Tiny), and for "hard" samples, it recommends the larger model (Whisper Small). The decider itself is a lightweight, one-dimensional small ResNet architecture. This choice is crucial for efficiency, as the decider's cost is incurred for every inference. The decider is trained to predict whether the Word Error Rate (WER) of Whisper Tiny would be higher than Whisper Small for a given audio sample.

Datasets

The experiments were conducted on two primary datasets:

  • LibriSpeech: A standard ASR corpus for read English speech, used for training and evaluating the decider.
  • Common Voice 7.0: A large, diverse, and multilingual speech corpus collected from worldwide users, used for evaluating the overall pipeline's performance and trade-offs.

Key Insights and Ideas

  • Small models are surprisingly capable: A significant portion of audio samples can be transcribed by smaller models (like Whisper Tiny) with comparable or even better performance than larger models (like Whisper Small), despite having far fewer parameters.
  • Decoding is the bottleneck: The majority of computational cost in large ASR models comes from the beam search decoding process, not the initial feature encoding. This insight justifies using a powerful encoder as a feature extractor for the decider.
  • Model-internal features are key: Using high-level features extracted from a pre-trained ASR encoder (like Whisper Small's) as input to the decider yields much better accuracy than low-level acoustic features (like Mel spectrograms) or external metrics like SNR. This suggests that the difficulty of transcribing an audio sample is intrinsically tied to how the ASR model itself processes it.
  • Efficient decider design is critical: The decider module must be computationally inexpensive, as its cost is added to every inference. A small ResNet is preferred over more complex architectures like transformers.

Key Results

  • Significant MACs reduction: The proposed method, using the Whisper Small encoder and a ResNet decider, achieved a substantial reduction in Multiply-Accumulate operations (MACs), a measure of computational cost. For instance, at a threshold of 0.5, it resulted in a 35% decrease in MACs compared to using Whisper Small alone, with only a 16% increase in WER. At a threshold of 0.3, the MACs reduction was 12% with a mere 0.37 absolute point increase in WER.
  • Competitive with intermediate models: The performance (WER/MACs trade-off) of the proposed selection approach was comparable to using an intermediate model like Whisper Base, but without the need for costly additional training.
  • Baseline limitations: Simple baselines like SNR estimation or accent detection proved ineffective for predicting audio difficulty, achieving accuracies close to random chance. Logit entropy from Whisper Tiny showed better results but was still outperformed by model-internal features.

Limitations and Future Work

  • Focus on two models: The current work focuses on selecting between only two Whisper model sizes (Tiny and Small). Extending this to a larger range of models or different ASR architectures is a natural next step.
  • Decider complexity: While the ResNet decider is efficient, further research into even lighter decider architectures or alternative decision strategies could yield further improvements.
  • Oracle performance: The "oracle" topline, which assumes perfect knowledge of WER, demonstrates the theoretical maximum savings, highlighting the potential for future work to approach this ideal.
  • Model-specific features: The success of using Whisper's own encoder features suggests that optimal deciders might be model-specific. Investigating how to generalize this approach across different ASR architectures remains an open question.

Summary updated

BibTeX
@inproceedings{malard2023big,
  author = {Hugo Malard and Salah Zaiem and Robin Algayres},
  title = {{Big Model only for Hard Audios: Sample Dependent Whisper Model Selection for Efficient Inferences}},
  booktitle = {EUSIPCO},
  year = {2023},
  doi = {10.48550/arxiv.2309.12712},
}
Figure