Automated Audio Captioning (AAC) involves generating natural language descriptions for audio clips. While performance has improved significantly, it has come at the cost of massive model sizes. Current state-of-the-art (SOTA) models often rely on heavy architectures like HTSAT and BART, totaling hundreds of millions of parameters. This research, presented at Interspeech 2024, introduces a highly efficient approach to AAC using encoder-level knowledge distillation.
The Efficiency Bottleneck
The researchers identified that the audio encoder, rather than the text decoder, is the primary performance bottleneck when shrinking audio captioning models. While model compression is common in audio classification, it hasn't been deeply explored for the more complex encoder-decoder structures used in captioning. Current models are often "over-parameterized" for the task, making them impossible to run on mobile phones or embedded sensors like a Raspberry Pi.
Methodology: Encoder-Level Distillation
The authors propose a Knowledge Distillation (KD) framework where a large "Teacher" model (HTSAT-BART, 169M parameters) trains a small "Student" model (EffNet-Trm, 11M parameters). The student uses an EfficientNet-B2 encoder and a shallow 2-layer Transformer decoder.
The core innovation is the training loss function, which combines three levels:
- Supervised Loss: Standard training using ground-truth captions.
- Sequence-Level KD: The student matches word probability distributions from the teacher's decoder.
- Encoder-Level KD ($L_{enc}$): The student's audio embeddings are forced to align with the teacher's. The researchers tested Mean Squared Error ($KD_{mse}$) and a contrastive loss ($KD_{contra}$), finding that contrastive learning better teaches the student to distinguish between different audio clips.
Additionally, the team utilized unlabeled audio-only data from AudioSet and Freesound. The teacher generated "pseudo-captions" for these clips, providing a much larger pool of data for the student to learn from.
Key Insights
- Encoder vs. Decoder: Bottleneck analysis showed that replacing a large decoder with a small one caused a negligible performance drop, whereas shrinking the encoder caused a significant drop. This proves that audio feature quality is more critical than language model complexity for AAC.
- Contrastive Advantage: In data-scarce environments like the Clotho dataset, $KD_{contra}$ significantly outperformed simple MSE by forcing the model to learn discriminative features—essentially teaching the student why two sounds are different.
Results and Efficiency
The student model achieved a 19x speedup in inference latency on a Raspberry Pi 4 (2.4s vs. 45.2s for the teacher). It uses only 3.8 GFLOPs, which is just 2.3% of the teacher’s computational requirement.
Despite having 158 million fewer parameters, the student model achieved a FENSE score of 63.7 on AudioCaps, nearly matching the teacher's 64.2. As shown in the performance comparison, the proposed model occupies a unique niche of high performance with minimal parameter count compared to other common architectures like PANNs-BART or ACT.
Conclusion
This work enables high-quality audio captioning on resource-constrained edge devices by focusing on the encoder as the primary source of performance. While a gap remains compared to billion-parameter models in data-scarce scenarios, the massive gains in efficiency pave the way for real-time AAC applications. Future work may involve exploring more aggressive compression techniques like quantization or pruning.
Summary updated