Abstract
The Audio Spectrogram Transformer (AST) recently established state-of-the-art performance in audio classification but relied heavily on supervised pretraining using ImageNet—a cross-modal dependency that is computationally expensive and conceptually mismatched. We present the Self-Supervised Audio Spectrogram Transformer (SSAST), the first patch-based self-supervised learning framework for audio. By employing a Masked Spectrogram Patch Modeling (MSPM) pretext task on massive unlabeled datasets, SSAST eliminates the need for ImageNet pretraining. Our results demonstrate that SSAST achieves a 60.9% average performance boost over training from scratch, matching or exceeding supervised baselines across diverse speech and audio event tasks.
Introduction
In recent years, the Vision Transformer (ViT) has demonstrated that pure self-attention mechanisms can outperform traditional convolutional neural networks (CNNs) when provided with sufficient data. This success was extended to the audio domain via the Audio Spectrogram Transformer (AST). However, AST faces a significant "data hunger" challenge. Due to the scarcity of large-scale labeled audio datasets, researchers have typically relied on a "cross-modal" transfer learning approach: pretraining the model on ImageNet (images) before fine-tuning on audio spectrograms.
This reliance on ImageNet is problematic for several reasons. First, images and audio possess fundamentally different structures; while images are spatially invariant, audio spectrograms have distinct temporal and spectral axes. Second, the supervised pretraining pipeline is computationally intensive and requires millions of manual labels. SSAST addresses these issues by enabling Transformers to learn directly from unlabeled audio and speech data, providing a more scalable and domain-appropriate foundation for audio understanding.
Methods: Masked Spectrogram Patch Modeling
The core innovation of SSAST is the Masked Spectrogram Patch Modeling (MSPM) pretext task. This approach treats an audio spectrogram as a 2D image, splitting it into $16 \times 16$ patches.
Architecture and Masking Strategy
During pretraining, the model randomly masks a portion of the input patches. To increase the difficulty of the task and force the model to learn broader global context, the authors implement "cluster masking," where contiguous blocks of patches are hidden. This prevents the model from simply interpolating from immediate neighbors and encourages the learning of high-level semantic features.
Joint Objective Function
SSAST utilizes a joint objective that combines discriminative and generative tasks:
- Discriminative Task: Using an InfoNCE loss, the model must identify the original patch from a set of masked candidates within the sequence.
- Generative Task: Using Mean Squared Error (MSE), the model must reconstruct the raw pixel-level values of the masked patches.
This dual approach ensures the model learns both categorical representations and fine-grained structural details. Furthermore, SSAST is designed to be domain-agnostic, capable of processing both speech and environmental sounds within the same framework.
Datasets and Experimental Setup
The model was pretrained on a massive combined corpus of unlabeled data totaling approximately 3,000 hours:
- AudioSet-2M: 2 million 10-second YouTube clips covering 527 sound classes.
- Librispeech: 960 hours of English speech from audiobooks.
Evaluation was conducted across six diverse benchmarks to test the model's generalization:
- Audio Event Classification: AudioSet-20K and ESC-50.
- Keyword Spotting: Google Speech Commands V1 and V2.
- Speaker Identification: VoxCeleb 1.
- Emotion Recognition: IEMOCAP.
Key Results and Insights
The introduction of self-supervised pretraining yields dramatic improvements in model performance and training efficiency.
Performance Gains
Compared to training an AST from scratch, SSAST provided an average improvement of 60.9% across all tasks. On the AudioSet-20K benchmark, SSAST achieved 31.0 mAP, more than doubling the 14.8 mAP of the "from-scratch" baseline. In speech-related tasks like keyword spotting (KS2), SSAST reached 98.0% accuracy, matching the performance of models that utilized millions of ImageNet labels.
The Advantage of Multi-Domain Pretraining
A key finding was that pretraining on a mixture of speech (Librispeech) and general audio (AudioSet) led to better generalization than pretraining on either domain in isolation. This suggests that the model learns fundamental acoustic principles that transcend specific categories, effectively becoming a "bilingual" listener.
Scaling and Efficiency
The authors observed that self-supervised pretraining "unlocks" the potential of larger Transformer models. While large models are often difficult to train from scratch on small datasets, SSAST allows them to consistently outperform smaller variants. Notably, these results were achieved using a relatively modest setup of 4 GPUs, demonstrating that high-performance audio modeling can be accessible without industrial-scale compute resources.
Conclusion
SSAST represents a significant step forward in audio machine learning by proving that self-supervised pretraining on spectrogram patches can successfully replace ImageNet-based supervised pretraining. By learning from the inherent structure of unlabeled audio, SSAST achieves state-of-the-art results across both speech and environmental audio tasks, paving the way for more flexible and data-efficient audio AI.
Summary updated