Introduction
In representation learning, disentanglement aims to identify independent factors of variation within data, such as the shape versus the color of an object. For musical audio, the primary factors are pitch (the specific note) and timbre (the characteristic quality of the instrument). While supervised methods can achieve this separation using labeled datasets, obtaining such labels is often labor-intensive. This research proposes a completely unsupervised framework to disentangle pitch and timbre using a Variational Auto-Encoder (VAE) and self-supervised signals derived from pitch-shifting.
Methodology
Architecture
The proposed model utilizes a VAE architecture with a bifurcated latent space. The input audio is processed by two distinct encoders:
- Pitch Encoder: Maps the input to a categorical latent variable, reflecting the discrete nature of musical notes.
- Timbre Encoder: Maps the input to a continuous latent variable, capturing the fluid spectral characteristics of instrument textures.
To facilitate disentanglement, the timbre encoder receives Mel-frequency cepstral coefficients (MFCCs), which emphasize the spectral envelope over fine harmonic structures. The Gumbel-Softmax trick is employed to allow gradient flow through the discrete pitch categories.
Self-Supervised Objectives
To enforce the desired separation without ground-truth labels, the authors introduce four auxiliary tasks based on artificial pitch-shifting:
- Latent Regression: Ensures the timbre representation ($z$) remains invariant when the input is pitch-shifted.
- Contrastive Learning: Encourages similarity between the timbre representations of an original sound and its pitch-shifted version while distancing them from unrelated samples.
- Cycle-consistency: Requires the encoders to accurately recover the original pitch and timbre values from audio generated by the decoder.
- Surrogate Label Loss: Uses the known relative pitch shift (e.g., +2 semitones) as a target for the pitch encoder, providing a concrete anchor for learning relative pitch relationships.
Experimental Results
The model was evaluated using a subset of the Studio-On-Line (SOL) dataset, containing 1,885 samples across 12 instruments and 82 pitches. An ablation study was conducted to assess the impact of the four auxiliary losses ($\lambda_1$ to $\lambda_4$).
As shown in the results table, the "M6" configuration—utilizing all four auxiliary losses—demonstrated superior performance across several metrics:
- Disentanglement Quality: The timbre latent space achieved high instrument classification accuracy (86.44%) while maintaining low pitch leakage (14.57%), indicating successful separation.
- Unsupervised Pitch Clustering: The pitch encoder achieved approximately 80% accuracy in clustering notes correctly without any prior labels.
- Synthesis and Controllability: The model outperformed standard unsupervised VAEs in reconstruction quality (measured by FID) and showed high consistency in pitch manipulation (measured by the Consistency-Diversity Score, CDS).
Conclusion
This work demonstrates that inductive biases, such as the distinction between discrete pitch and continuous timbre, combined with self-supervised pitch-shifting tasks, can effectively disentangle musical attributes without manual labeling. While current results are limited to static spectral frames and require human mapping to absolute note names, they provide a robust foundation for future work involving temporal dynamics and more complex acoustic environments.
Summary updated