Rethinking CNN Models for Audio Classification

Kamalesh Palanisamy, Dipika Singhania, Angela YaoarXiv 2020

Abstract

Audio classification has traditionally relied on specialized architectures designed for signal processing. This study re-evaluates standard deep CNNs (ResNet, DenseNet) pretrained on ImageNet as powerful baselines for this task. By representing audio as Mel-spectrograms, we demonstrate that "visual" features from natural images transfer remarkably well to the audio domain. Our approach, utilizing simple fine-tuning and ensembling, achieves state-of-the-art performance on major benchmarks including ESC-50 and UrbanSound8K, proving that standard computer vision pipelines are highly effective for acoustic data.

Introduction

Identifying environmental sounds, urban noise, or music genres is a fundamental challenge in signal processing. While recent trends have favored complex, custom-built models like 1D CNNs for raw waveforms or hybrid CRNNs, this paper investigates whether standardized, high-performance architectures from the computer vision community can serve as superior alternatives. The core hypothesis is that the massive amount of knowledge contained in ImageNet-pretrained weights is useful for spectrograms, which represent temporal and frequency data as 2D images.

Methods

The proposed pipeline converts raw audio into log-scaled Mel-spectrograms. These 2D representations are then fed into standard CNN architectures originally designed for image recognition.

DenseNet architecture for audio classification using spectrogram inputs.

The researchers evaluated three primary architectures: Inception-v3, ResNet-50, and DenseNet-201. To handle the 3-channel (RGB) requirement of these models, spectrograms were either replicated across channels or generated using multiple window sizes to provide a multi-resolution view. Performance was further optimized through deep ensembling, where the outputs of five independently trained models were averaged to produce a more robust final prediction.

Key Insights and Ideas

A critical part of this work is understanding the dynamics of transfer learning across disparate domains.

The "Edge" Hypothesis and Layer Dynamics

Using Singular Vector Canonical Correlation Analysis (SVCCA), the authors measured how much weights changed during fine-tuning. They found that initial layers (e.g., conv1) changed very little, suggesting that low-level visual features like edges and textures are universal enough to describe spectrogram patterns.

Analysis of weight changes and freezing effects across network layers.

As shown in the analysis above, the middle layers (specifically Block 3 in DenseNet) undergo the most significant adaptation. This indicates that while early layers extract general shapes, the middle layers learn audio-specific structures like harmonics or percussive transients. Furthermore, freezing weights beyond the initial blocks leads to a significant drop in validation accuracy, confirming that adaptation of deeper layers is necessary for optimal performance.

The Power of Pretraining

For smaller datasets like ESC-50, pretraining provided a massive ~20% accuracy boost over random initialization. This underscores that the feature extraction logic learned from ImageNet is highly transferable, even when the target domain (audio) differs significantly from the source (natural images).

Results

The ensemble models achieved state-of-the-art (SOTA) results across three major datasets at the time of publication:

Dataset Model (Ensemble) Accuracy Improvement over Random Init
ESC-50 DenseNet-201 92.89% +20.39%
UrbanSound8K DenseNet-201 87.42% +11.10%
GTZAN ResNet-50 91.99% +4.09%

These results demonstrate that a well-tuned standard CNN can outperform more complex, specialized architectures that use multi-stream networks or attention mechanisms.

Conclusion

This research demonstrates that standard computer vision models are exceptionally strong candidates for audio classification. The "visual" nature of spectrograms allows for effective transfer learning from ImageNet, particularly in the early feature-extraction layers. While ensembling increases computational cost, the performance gains suggest that rethinking standard CNNs is a vital step for the audio community.

Summary updated

BibTeX
@misc{palanisamy2020rethinking,
  author = {Kamalesh Palanisamy and Dipika Singhania and Angela Yao},
  title = {{Rethinking CNN Models for Audio Classification}},
  year = {2020},
  eprint = {2007.11154},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.11154},
}
Figure