E-PANNs: Sound Recognition Using Efficient Pre-trained Audio Neural Networks

Arshdeep Singh, Haohe Liu, Mark D. Plumbley

Abstract

Large-scale Convolutional Neural Networks (CNNs) have set benchmarks in audio tagging but remain computationally prohibitive for edge deployment. This paper discusses E-PANNs (Efficient Pre-trained Audio Neural Networks), a framework developed by researchers at the University of Surrey to reduce the complexity of the PANNs-CNN14 model. By employing filter pruning on the most parameter-heavy layers, the researchers achieved a 70% reduction in memory footprint and a 36% reduction in computational operations while improving the Mean Average Precision (mAP) from 0.431 to 0.440 on the AudioSet benchmark.

Introduction

Audio tagging—the automated identification of sound events such as speech, music, or environmental noise—is a critical component in applications ranging from smart home devices to environmental monitoring. Currently, the field is dominated by large-scale models like PANNs (Pre-trained Audio Neural Networks). While these models offer high accuracy, their deployment is often limited by their massive size and high energy consumption. This paper explores E-PANNs, a streamlined architecture designed to make high-performance sound recognition both leaner and more environmentally sustainable.

The Computational Burden of Audio Tagging

The industry-standard PANNs-CNN14 model consists of approximately 81 million parameters. Processing just 10 seconds of audio requires over 50 billion multiply-accumulate operations (MACs). This resource intensity presents two primary challenges:

  1. Deployment Constraints: Edge devices, including smartphones, IoT sensors, and hearing aids, lack the memory and battery capacity to run such heavy models in real-time.
  2. Environmental Impact: The energy required to train and execute these models is significant. The authors note that a 48-hour training session on a high-end GPU can produce $CO_2$ emissions equivalent to driving a car for 13 miles.

Methodology: Filter Pruning

To address these inefficiencies, the researchers utilized a filter pruning approach. This technique is based on the observation that deep neural networks often contain redundant filters that contribute little to the final output.

The E-PANNs Pipeline

The development of E-PANNs followed a structured four-step process:

  1. Baseline Selection: The researchers utilized the pre-trained PANNs-CNN14 model as their starting point.
  2. Importance Ranking: Filters were ranked based on their "importance," defined by the magnitude of their activations. The hypothesis was that filters with higher activations capture more essential features for sound recognition.
  3. Pruning: The pruning targeted the final six convolutional layers (C7 through C12), which account for nearly 99% of the model's total parameters. The team tested three pruning intensities: 25%, 50%, and 75%.
  4. Fine-tuning: To recover performance lost during pruning, the models underwent a fine-tuning phase, allowing the remaining weights to adapt to the reduced architecture.

Experimental Setup and Results

The models were evaluated using AudioSet, a large-scale dataset containing over 2 million 10-second audio clips across 527 categories.

Performance Gains and Efficiency

The results demonstrated that significant pruning does not necessarily lead to performance degradation. The E-PANNs (50% pruned) model emerged as a particularly effective configuration:

  • Memory Efficiency: Parameters were reduced from 81M to 24M, a 70% decrease.
  • Computational Speed: MACs were reduced by 36%.
  • Accuracy Improvement: The Mean Average Precision (mAP) rose from 0.431 to 0.440.
  • Storage Footprint: The physical model size was reduced from approximately 312 MB to 92 MB.

Even at 75% pruning, the model maintained an mAP of 0.420. While this represented a slight dip below the baseline, it remained highly competitive with other full-sized architectures while requiring a fraction of the resources.

Discussion: The Benefits of Sparsity

The success of E-PANNs highlights several key insights into neural network architecture for audio:

  • Redundancy: A vast majority of parameters in state-of-the-art models are redundant. Removing them can refine the model rather than damage it.
  • Regularization: Pruning appears to act as a form of regularization. By removing low-activation filters, the model may be shedding "noise," allowing it to generalize better to unseen data.
  • Training Efficiency: Fine-tuning a pruned model proved significantly faster than training from scratch, reaching baseline performance levels in one-third the iterations.

Conclusion

E-PANNs demonstrate that it is possible to achieve state-of-the-art audio recognition performance with a fraction of the traditional computational cost. By reducing the memory and power requirements, this research paves the way for sophisticated sound recognition on low-power edge devices. Future work may involve applying similar pruning techniques to Transformer-based architectures and exploring performance in specialized domains such as bioacoustic monitoring.

Summary updated

Abstract

Sounds carry an abundance of information about activities and events in our everyday environment, such as traffic noise, road works, music, or people talking. Recent machine learning methods, such as convolutional neural networks (CNNs), have been shown to be able to automatically recognize sound activities, a task known as audio tagging. One such method, pre-trained audio neural networks (PANNs), provides a neural network which has been pre-trained on over 500 sound classes from the publicly available AudioSet dataset, and can be used as a baseline or starting point for other tasks. However, the existing PANNs model has a high computational complexity and large storage requirement. This could limit the potential for deploying PANNs on resource-constrained devices, such as on-the-edge sound sensors, and could lead to high energy consumption if many such devices were deployed. In this paper, we reduce the computational complexity and memory requirement of the PANNs model by taking a pruning approach to eliminate redundant parameters from the PANNs model. The resulting Efficient PANNs (E-PANNs) model, which requires 36% less computations and 70% less memory, also slightly improves the sound recognition (audio tagging) performance. The code for the E-PANNs model has been released under an open source license.
BibTeX
@inproceedings{singh2023e,
  author = {Arshdeep Singh and Haohe Liu and Mark D. Plumbley},
  title = {{E-PANNs: Sound Recognition Using Efficient Pre-trained Audio Neural Networks}},
  booktitle = {NOISE-CON},
  year = {2023},
  doi = {10.3397/in\_2023\_1083},
}
Figure