TL;DR
Myna is a lightweight, contrastive music representation learner that replaces fragile audio augmentations (like pitch shifting) with extreme 90% spectrogram token masking. Using a Vision Transformer backbone and an ingenious dual-patch design (square + full-frequency vertical patches), a 22M-parameter Myna trained on a single GPU matches or outperforms foundation models trained on 16 to 64 GPUs.
What Problem Does This Paper Address?
In self-supervised Music Information Retrieval (MIR), models usually learn general representations through contrastive learning (e.g., SimCLR) or masked language modeling. However, both approaches face fundamental hurdles:
- Destructive augmentations: Contrastive audio frameworks often rely on complex data augmentation chains (such as pitch shifting or time stretching) containing dozens of tuned hyperparameters. Pitch shifting inadvertently destroys harmonic and tonal pitch relationships, crippling downstream performance on tasks like musical key detection.
- Computational overhead: Masked autoencoders (MAE) spend significant compute training a decoder to reconstruct low-level spectral noise rather than learning abstract global semantics. Meanwhile, training raw-audio or unmasked transformer baselines severely limits batch size on standard hardware.
Myna tackles these issues by exploring whether simple patch masking can serve as the sole contrastive augmentation, preserving core musical properties while drastically cutting compute requirements.
Methods
Myna adapts the Vision Transformer (specifically SimpleViT) to log-mel spectrograms extracted from 3-second audio slices:
Audio Slice -> Mel-Spectrogram -> Patchify -> 90% Random Masking -> ViT Encoder -> Contrastive Loss (InfoNCE)
- Token Masking as Data Augmentation: Instead of applying acoustic perturbations, Myna randomly masks 90% of spectrogram tokens. Two distinct masked views from the same audio track form a positive contrastive pair trained via the InfoNCE loss. Because masking merely hides data rather than altering frequencies or tempo, underlying musical properties (pitch, key, BPM) remain uncorrupted.
- Dual-Geometry Hybrid Patching:
- Square Patches ($16 \times 16$): Excel at capturing local time-frequency textures for tagging and genre classification.
- Vertical Patches ($128 \times 2$): Span all 128 frequency bins across narrow time slices, directly capturing instantaneous harmonic/tonal spectra essential for key detection.
- Myna-Hybrid: Employs shared encoder weights with separate patch tokenizers, jointly optimizing the objective: $$\mathcal{L}_{\text{hybrid}} = \frac{1}{2}(\mathcal{L}_{\text{square}} + \mathcal{L}_{\text{vertical}})$$
- High Batch Size Efficiency: Processing only 10% unmasked tokens eliminates ~90% of transformer sequence length overhead, allowing a batch size of 4,096 on a single NVIDIA A100 GPU (an 85× throughput improvement over previous raw-audio contrastive frameworks like CLMR).
Datasets
- Pre-training: Publicly available music subset of AudioSet (~822k 10-second clips; downstream datasets were explicitly excluded).
- Downstream Evaluation (Castellon et al. Benchmark):
- MagnaTagATune (MTT): Top-50 multi-label tag classification (evaluated via ROC-AUC and Average Precision).
- GTZAN: 10-class genre classification (evaluated on the fault-filtered split).
- GiantSteps: Musical key detection across 24 major/minor keys (evaluated via refined accuracy).
- EmoMusic: Continuous music mood regression (valence $R^2_V$ and arousal $R^2_A$).
- No new benchmarks were introduced.
Key Insights and Ideas
- Masking preserves musical semantics: Contrastive learning teaches the model that two masked subsets of the same signal share identity without injecting synthetic acoustic artifacts.
- Why MAE underperforms on music: Masked Auto-Encoding forces the network to predict exact pixel-level spectral details, which rewards fitting local energy variations rather than global tonal structure. Myna's contrastive objective prioritizes high-level semantic invariance.
- Aspect ratios matter in spectrograms: Audio spectrograms are not rotationally symmetric like natural images. Vertical patches ($128 \times 2$) explicitly structure the input around simultaneous pitch intervals, unlocking state-of-the-art key estimation without fine-tuning the backbone.
Key Results
Evaluated with linear probes and shallow MLPs following standard benchmark protocols:
- Myna-Hybrid (22M parameters, 1 GPU): Achieved an overall average benchmark score of 68.6, outperforming MULE (62M, trained on 16 GPUs; 68.2) and public MERT-95M (67.7), while rivaling full MERT-95M (68.9, trained on 64 GPUs).
- Key Detection: Myna-Vertical scored 68.6 and Myna-Hybrid scored 68.0 on GiantSteps, setting a new self-supervised state of the art (surpassing MERT-95M's 67.3 and Jukebox's 66.7).
- Scaling to Myna-85M-Hybrid: Achieved an average score of 70.4, outperforming MuQ$_{\text{m4a}}$ (70.2) to establish the highest score among models trained exclusively on open data, and rivaling multi-hundred-million-to-billion parameter private-data models (MERT-330M at 69.7; Jukebox at 69.9).
Limitations and Future Work
- Emotion Regression: Myna lags behind on EmoMusic (arousal and valence prediction). The authors suggest that heavy masking and 10-second training snippets obscure the subtle, long-term temporal dynamics needed to gauge emotional evolution.
- Uniform Masking: Patches are currently dropped uniformly at random; structured or learned masking policies (e.g., temporal block masking) could improve efficiency and feature extraction.
- Task Scope: Myna is tailored for global music understanding and was not evaluated on fine-grained audio processing tasks such as source separation, transcription, or beat tracking.
Summary updated