FastAST: Accelerating Audio Spectrogram Transformer via Token Merging and Cross-Model Knowledge Distillation
Swarup Ranjan Behera, Abhishek Dhiman, Karthik Gowda, Aalekhya Satya Narayani
TL;DR
FastAST tackles the efficiency bottleneck of Audio Spectrogram Transformer (AST) by integrating Token Merging (ToMe) to reduce token counts and speed up both inference and training. To preserve accuracy, it further employs Cross-Model Knowledge Distillation (CMKD) using EfficientNet-B2 and PaSST as teachers. Empirical results on ESC-50, Speech Commands V2, and Balanced AudioSet show substantial throughput gains with modest accuracy loss, and CMKD with CNN teachers offers the strongest improvements. These contributions enable near real-time, resource-efficient audio classification without requiring extensive retraining.
Abstract
Audio classification models, particularly the Audio Spectrogram Transformer (AST), play a crucial role in efficient audio analysis. However, optimizing their efficiency without compromising accuracy remains a challenge. In this paper, we introduce FastAST, a framework that integrates Token Merging (ToMe) into the AST framework. FastAST enhances inference speed without requiring extensive retraining by merging similar tokens in audio spectrograms. Furthermore, during training, FastAST brings about significant speed improvements. The experiments indicate that FastAST can increase audio classification throughput with minimal impact on accuracy. To mitigate the accuracy impact, we integrate Cross-Model Knowledge Distillation (CMKD) into the FastAST framework. Integrating ToMe and CMKD into AST results in improved accuracy compared to AST while maintaining faster inference speeds. FastAST represents a step towards real-time, resource-efficient audio analysis.
