Few-Shot Musical Source Separation

Yu Wang, Daniel Stoller, Rachel M. Bittner, Juan Pablo Bello

Abstract

Deep learning-based approaches to musical source separation are often limited to the instrument classes that the models are trained on and do not generalize to separate unseen instruments. To address this, we propose a few-shot musical source separation paradigm. We condition a generic U-Net source separation model using few audio examples of the target instrument. We train a few-shot conditioning encoder jointly with the U-Net to encode the audio examples into a conditioning vector to configure the U-Net via feature-wise linear modulation (FiLM). We evaluate the trained models on real musical recordings in the MUSDB18 and MedleyDB datasets. We show that our proposed few-shot conditioning paradigm outperforms the baseline one-hot instrument-class conditioned model for both seen and unseen instruments. To extend the scope of our approach to a wider variety of real-world scenarios, we also experiment with different conditioning example characteristics, including examples from different recordings, with multiple sources, or negative conditioning examples.

Introduction

Musical Source Separation (MSS) is the task of isolating individual instruments from a complete audio mixture. While deep learning has significantly advanced this field, most current models operate within a "fixed-vocabulary" framework. They are typically trained as specialized experts for specific categories like vocals, drums, or bass. Consequently, these models often fail when tasked with extracting rare instruments—such as a bassoon or sitar—because they lack the specific labels or training data for those classes. This research addresses the challenge of zero-shot generalization by proposing a system capable of separating instruments it has never encountered, provided it is given a few audio examples as a reference.

Methodology: Few-Shot Conditioning

The proposed paradigm utilizes a standard U-Net architecture enhanced by a few-shot conditioning mechanism. The system consists of two primary components:

  1. Conditioning Encoder: A convolutional neural network (CNN) that processes $n$ short audio snippets (the "shots") of the target instrument. These are encoded into vectors and averaged to create a single "conditioning vector."
  2. Conditioned U-Net: This component performs the actual separation. The conditioning vector is integrated into the U-Net using Feature-wise Linear Modulation (FiLM).

FiLM acts as a technical bridge, applying a learned linear transformation (scaling and shifting) to the features at the U-Net's bottleneck. This reconfigures the network's internal state dynamically to target the instrument described by the audio query.

Architecture of the few-shot musical source separation model, showing the conditioning encoder and the FiLM-conditioned U-Net.

The researchers also explored Negative Conditioning, where the model is provided with examples of instruments to exclude, helping it refine the separation mask in complex mixtures.

Experimental Setup

The models were trained on a diverse dataset including real-world multitracks ($D_{real}$), synthetic MIDI-based tracks (Slakh2100-redux), and solo instrument recordings ($D_{solo}$). Evaluation was conducted on the industry-standard MUSDB18 and MedleyDB datasets. MedleyDB was crucial for testing flexibility, as it contains 14 distinct instrument classes compared to the standard four in MUSDB18.

Results and Discussion

The few-shot approach demonstrated significant improvements over traditional class-conditioned baselines.

Performance on Seen and Unseen Instruments

On the MUSDB18 dataset, the 5-shot model outperformed the one-hot baseline for known instruments, achieving a Signal-to-Distortion Ratio (SDR) of 4.72 dB for vocals (vs. 4.07 dB baseline). More impressively, the model maintained robust performance on "unseen" instruments—those held out during training. While the baseline model failed (near 0 dB SDR) on unseen vocals and bass, the 5-shot model achieved 3.22 dB and 2.88 dB, respectively.

Generalization Across Diverse Instruments

Testing on MedleyDB revealed that the 5-shot model outperformed the baseline on 13 out of 14 instrument classes. The acoustic query method proved particularly effective for "long-tail" or rare instruments like the accordion or woodwinds, where providing a direct acoustic example is more informative than relying on a sparse class prior.

SDR performance comparison across 14 instrument classes in MedleyDB, showing the 5-shot model's advantage over the baseline.

The Impact of Shot Count

Increasing the number of examples from 1-shot to 5-shot significantly boosted performance. While a single snippet might capture a specific articulation, five snippets provide enough variance in pitch and texture for the model to construct a robust profile of the target instrument.

Conclusion

This few-shot paradigm shifts the focus from memorizing instrument labels to understanding acoustic characteristics. While challenges remain—such as handling the high variance of drum kits or requiring clean reference snippets—the ability to generalize to unseen instruments marks a significant step toward more flexible and universal musical source separation tools.

Summary updated

BibTeX
@inproceedings{wang2022few,
  author = {Yu Wang and Daniel Stoller and Rachel M. Bittner and Juan Pablo Bello},
  title = {{Few-Shot Musical Source Separation}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
}
Figure