LEAF: A Learnable Frontend for Audio Classification

Neil Zeghidour, Olivier Teboul, Félix de Chaumont Quitry, Marco Tagliasacchi

For decades, the gold standard for processing audio in machine learning has been the mel-filterbank. These hand-engineered features are designed to mimic human hearing, utilizing a logarithmic scale for pitch and loudness. However, their undeniable utility is counterbalanced by two fundamental limitations:

  1. Human Bias: Mel-filterbanks are optimized for human auditory perception (primarily speech and music), making them potentially sub-optimal for tasks like detecting high-frequency animal vocalizations or industrial noise.
  2. Fixed Nature: Because they are static, they cannot adapt to the specific nuances of a dataset during training.

While researchers have previously attempted to build "learnable" frontends, these alternatives often require hundreds of thousands of parameters, making them prone to overfitting, or they are too specialized to generalize across different audio domains. To address this, researchers introduced LEAF (Learnable Audio Frontend), a lightweight, fully learnable architecture designed as a drop-in replacement for mel-filterbanks.

The LEAF Architecture

LEAF breaks down the audio feature extraction pipeline into three learnable stages that mirror the traditional mel-filterbank process, but with fully differentiable components.

Comparison of audio frontends, highlighting LEAF's pipeline of Gabor filtering, Gaussian lowpass pooling, and sPCEN compression.
  1. Filtering (Gabor 1D-Convolutions): Instead of using standard, unconstrained convolutional layers—which possess too many degrees of freedom—LEAF employs Gabor filters. These are mathematically constrained to be efficient in both time and frequency domains. The model only needs to learn two parameters per filter: the center frequency and the bandwidth.
  2. Pooling (Gaussian Lowpass): Traditional systems typically use max-pooling or fixed windowing. LEAF introduces learnable Gaussian lowpass filters, allowing the model to learn the optimal amount of temporal smoothing for each frequency channel before downsampling.
  3. Compression & Normalization (sPCEN): To handle the massive dynamic range of audio, LEAF utilizes a learnable version of Per-Channel Energy Normalization called sPCEN. This replaces the rigid logarithmic compression of traditional systems with a flexible function that adapts to varying noise levels and loudness.

Because the entire frontend is differentiable, it can be trained end-to-end via backpropagation alongside the rest of the neural network.

Key Insights

  • The Power of Constraints: By utilizing Gabor filters instead of generic convolutions, LEAF maintains a strong inductive bias. It forces the model to look for meaningful frequency bands while letting the data dictate which bands are most important.
  • Extreme Efficiency: LEAF adds only about 448 parameters to a model. For comparison, other learnable frontends can use upwards of 300,000 parameters. This makes LEAF incredibly lightweight and easy to integrate into existing architectures like EfficientNet.
  • Mel-Scale Initialization: LEAF is initialized on the mel-scale. During training, it stays relatively close to that initialization but deviates at the frequency extremes (e.g., focusing on lower frequencies for environmental sounds), providing a crucial performance edge.
  • Noise Resilience: LEAF demonstrates significant robustness to synthetic noise compared to traditional mel-filterbanks, likely because the learnable sPCEN normalization adapts effectively to the noise floor.

Performance and Results

The authors evaluated LEAF across a massive variety of tasks to prove its general-purpose capabilities, including speech (keyword spotting, speaker ID), music (instrument and pitch classification), environmental sounds, and the large-scale AudioSet dataset.

Multi-task evaluation results showing LEAF outperforming Mel-filterbanks and other baselines across diverse audio tasks.

In a multi-task setting across eight diverse datasets, LEAF achieved an average accuracy of 79.3%, outperforming the 77.8% baseline of traditional mel-filterbanks. Furthermore, when paired with a CNN14 backbone, LEAF matched or outperformed the current state-of-the-art on AudioSet, doing so while using 670x fewer parameters than previous learnable frontends. It stands as the first learnable frontend shown to outperform mel-filterbanks across a wide range of non-speech tasks using a single, unified architecture.

Limitations and Future Work

While highly effective, LEAF still relies on fixed hyperparameters for filter length and stride (the window size). The authors suggest that making these parameters learnable could be a promising next step. Additionally, while LEAF utilizes a convolutional structure, exploring its integration with newer architectures like Transformers remains an open area of research. Finally, the core principles of LEAF—learnable filtering, pooling, and compression—hold potential for application to other one-dimensional signals, such as seismic data or medical physiological recordings like ECGs and EEGs.

Summary updated

BibTeX
@inproceedings{zeghidour2021leaf,
  author = {Neil Zeghidour and Olivier Teboul and Félix de Chaumont Quitry and Marco Tagliasacchi},
  title = {{LEAF: A Learnable Frontend for Audio Classification}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=jM76BCb6F9m},
}
Figure