Adapting a ConvNeXt Model to Audio Classification on AudioSet

Thomas Pellegrini, Ismail Khalfaoui Hassani, Etienne Labbé, Timothée Masquelier

Abstract

In computer vision, convolutional neural networks (CNN) such as ConvNeXt, have been able to surpass state-of-the-art transformers, partly thanks to depthwise separable convolutions (DSC). DSC, as an approximation of the regular convolution, has made CNNs more efficient in time and memory complexity without deteriorating their accuracy, and sometimes even improving it. In this paper, we first implement DSC into the Pretrained Audio Neural Networks (PANN) family for audio classification on AudioSet, to show its benefits in terms of accuracy/model size trade-off. Second, we adapt the now famous ConvNeXt model to the same task. It rapidly overfits, so we report on techniques that improve the learning process. Our best ConvNeXt model reached 0.471 mean-average precision on AudioSet, which is better than or equivalent to recent large audio transformers, while using three times less parameters. We also achieved positive results in audio captioning and audio retrieval with this model.

Introduction

For years, the audio classification community relied on Pretrained Audio Neural Networks (PANNs), which utilize traditional VGG-style convolutional neural network (CNN) architectures. Recently, attention-based Transformers, such as the Audio Spectrogram Transformer (AST) and Patchout faSt Spectrogram Transformer (PaSST), have established new state-of-the-art benchmarks. However, these models often come with high computational costs and massive parameter counts.

This research investigates whether CNNs are truly obsolete for audio or if modern architectural refinements can restore their competitiveness. By adapting "modernization tricks" from the computer vision model ConvNeXt—including depthwise separable convolutions, inverted bottlenecks, and specialized training schedulers—we aim to achieve Transformer-level accuracy with superior efficiency.

Modernizing Convolutional Architectures

Incremental Upgrades with Depthwise Separable Convolutions

The modernization process followed a two-step approach. First, we applied incremental upgrades to existing PANN architectures (CNN14 and CNN6) by replacing standard convolutions with Depthwise Separable Convolutions (DSC). As shown in the results, this modification significantly reduced parameter counts while maintaining or even improving mean Average Precision (mAP).

Performance comparison of standard CNNs vs. versions with Depthwise Separable Convolutions (DSC).

Full ConvNeXt Adaptation

Second, we performed a full adaptation of the ConvNeXt-Tiny architecture. Key modifications were necessary to handle audio data:

  • Stem Layer Tuning: Unlike square vision images, audio spectrograms (e.g., 1000 time frames × 64 frequency bins) have a high aspect ratio. The stem layer was adjusted to produce feature maps better suited for this geometry.
  • Inverted Bottlenecks & GELU: We utilized layers that expand and then contract the channel dimension, paired with GELU activations.
  • Regularization and Training: To combat overfitting on AudioSet, we employed the AdamW optimizer, a "one-cycle" learning rate scheduler, and heavy regularization via Weight Decay and Stochastic Depth (Drop Path). Data augmentation techniques included SpecAugment, Mixup, and Speed Perturbation.

Experimental Results

AudioSet Performance and Efficiency

The primary evaluation was conducted on AudioSet, containing ~2 million 10-second clips. ConvNeXt-Tiny achieved a mAP of 0.471, matching the state-of-the-art PaSST-S Transformer while being significantly more efficient.

Comparison of ConvNeXt-Tiny against state-of-the-art models on AudioSet.

As illustrated in the table above, ConvNeXt-Tiny uses only 28.2M parameters—roughly one-third of the 87.0M used by PaSST-S. Furthermore, it offers a substantial throughput advantage, processing 153.6 samples per second compared to PaSST-S's 88.7 samples per second.

Downstream Tasks: Captioning and Retrieval

The model's versatility was further validated on downstream tasks. In Automated Audio Captioning (AAC) on the AudioCaps dataset, the ConvNeXt-based system achieved a SPIDEr score of 0.471, nearly matching the state-of-the-art (0.475) with a much smaller total parameter footprint (40.6M vs 108M). It also showed strong performance in language-based audio retrieval on the Clotho v2.1 dataset.

Conclusion

This study demonstrates that modernized CNNs remain highly competitive with Transformers for audio tasks. The efficiency gains of ConvNeXt-Tiny make it an attractive choice for resource-constrained applications. Future work will address scaling challenges, as larger ConvNeXt variants currently suffer from overfitting, and explore self-supervised learning paradigms to further enhance performance.

Summary updated

BibTeX
@inproceedings{pellegrini2023adapting,
  author = {Thomas Pellegrini and Ismail Khalfaoui Hassani and Etienne Labbé and Timothée Masquelier},
  title = {{Adapting a ConvNeXt Model to Audio Classification on AudioSet}},
  booktitle = {Interspeech},
  year = {2023},
  url = {https://openreview.net/forum?id=cGsMUwRzSz},
}
Figure