TL;DR
The Patchout Audio Transformer (PaSST) is a highly efficient model that learns powerful, general-purpose audio representations by pre-training on the massive AudioSet dataset. By introducing "Patchout" regularization and disentangled positional encodings, the authors created a model that outperforms traditional CNNs and previous transformers across 19 diverse audio tasks while being significantly faster and more memory-efficient to train.
What Problem Does This Paper Address?
Deep learning in audio often hits a wall: high-quality labeled data is expensive and scarce for specific niche tasks. The standard solution is "transfer learning"—taking a model pre-trained on a massive dataset like AudioSet and using it as a feature extractor.
However, the field has faced a dilemma. Convolutional Neural Networks (CNNs), the long-standing workhorse, struggle to capture long-range dependencies in audio. Transformers, which excel at these dependencies, are notoriously "data-hungry" and computationally expensive because their complexity grows quadratically with the length of the audio sequence. Furthermore, standard transformers struggle with variable-length audio inputs. This paper introduces PaSST to solve these efficiency and generalization hurdles.
Methods
The authors build upon the Vision Transformer (ViT) architecture but introduce two critical innovations:
- Patchout Regularization: During training, the model randomly "drops" parts of the input spectrogram patches (either randomly or in entire rows/columns). This serves two purposes: it acts as a strong regularizer (forcing the model to learn from incomplete data) and it drastically reduces the sequence length, making training much faster and less memory-intensive.
- Disentangled Positional Encodings: Unlike standard transformers that use a single 2D positional bias, PaSST separates time and frequency encodings. This allows the model to handle audio clips of different lengths during inference by simply cropping the time encoding, eliminating the need for complex interpolation or retraining.
The researchers also investigated which "level" of the model produces the best features for downstream tasks: High-level (final classification logits), Mid-level (embeddings from the transformer blocks), or Low-level (raw Mel-spectrogram features).
Datasets
- Pre-training: The models were trained on AudioSet, a massive collection of ~2 million 10-second YouTube clips covering 527 sound classes.
- Evaluation: To test "general-purpose" utility, the authors used the HEAR 2021 (Holistic Evaluation of Audio Representations) benchmark. This includes 19 tasks across three domains:
- Speech: e.g., Speech Commands, emotion recognition (CREMA-D).
- Music: e.g., pitch detection (NSynth), genre classification (GTZAN).
- General: e.g., environmental sound (ESC-50), sound event detection (FSD50K).
Key Insights and Ideas
- Efficiency is a Feature: Patchout isn't just a speed hack; it's a performance booster. By reducing the sequence length, PaSST-S achieves state-of-the-art results on AudioSet while being 4x faster to train than previous transformer models like AST.
- The "Goldilocks" Feature Level: Mid-level features generally provide the best representations for downstream tasks. High-level logits are often too specialized to the 527 AudioSet classes, losing information useful for unrelated tasks like speech or music.
- Music Needs Low-Level Detail: For tasks requiring fine-grained temporal or frequency information (like pitch estimation in the MAESTRO dataset), adding low-level Mel features to the embeddings significantly improved results.
- Resolution Matters (to a point): Increasing the temporal resolution (using a smaller STFT hop size) helps with speech and environmental sounds but hits diminishing returns at very high resolutions (e.g., 3ms), where the computational cost outweighs the marginal gains.
Key Results
PaSST demonstrated superior performance compared to established CNN-based models like PANNs and OpenL3.
- AudioSet Performance: PaSST-S achieved a mean Average Precision (mAP) of 0.471, outperforming both CNN14 and the original AST model.
- Speed: As shown in the figure below, PaSST variants occupy the "sweet spot" of high performance and high training speed.
- HEAR Benchmark: The improved PaSST version (using mid-level features and 5ms hop size) ranked among the top models in the HEAR 2021 challenge, proving its versatility across speech, music, and general audio.
Limitations and Future Work
- The 10-Second Ceiling: Because the model was trained on 10-second clips, the learned time encodings only cover that duration. For longer audio, the authors currently use a windowing and averaging approach. Developing native support for much longer sequences is a target for future research.
- Complexity vs. Resolution: While higher temporal resolution helps, it leads to a quadratic increase in memory and compute. Finding more efficient ways to handle high-resolution spectrograms remains a challenge.
- Self-Supervised Learning: This work focused on supervised pre-training. The authors suggest that combining PaSST with self-supervised objectives (which don't require labels) could further improve representation quality.
Summary updated