Few-shot Drum Transcription in Polyphonic Music

Yu Wang, Justin Salamon, Mark Cartwright, Nicholas J. Bryan, Juan Pablo Bello

Abstract

Automatic Drum Transcription (ADT) in polyphonic music is typically limited by the fixed vocabularies of supervised models and the scarcity of annotated data for rare percussion. This paper introduces a few-shot learning approach using Prototypical Networks to address these challenges. By training on synthetic audio to learn a class-agnostic discriminative embedding space, the model can transcribe novel drum sounds using only a handful of user-provided examples. Our results show that this method matches or outperforms state-of-the-art supervised models on standard vocabularies while maintaining robust performance on novel, unseen drum classes.

Introduction

Automatic Drum Transcription (ADT) involves detecting the onset times of percussion instruments within an audio signal. Traditional supervised learning methods for ADT face a significant bottleneck: they are restricted to small, predefined vocabularies (e.g., kick, snare, hi-hat) due to the lack of large-scale annotated datasets for diverse percussion. Consequently, these models fail on out-of-vocabulary (OOV) sounds like congas or maracas and struggle with the high intra-class variance found across different musical genres.

To overcome these limitations, we propose a shift from learning specific drum categories to a "learn to match" paradigm. By framing ADT as a few-shot learning problem, we enable the system to adapt to the specific timbres of a given track using minimal human input.

Methodology

The core of our approach is a Prototypical Network architecture designed for episodic training on synthetic data.

System Overview

As illustrated in Figure 1, the system requires minimal human intervention. A user provides a few "target examples" of a specific drum sound from the track. The model then processes the entire audio track to generate a likelihood curve, which is subsequently processed via peak-picking to produce an onset list.

Figure 1: High-level overview of the few-shot ADT system, showing the transition from audio track and human input to the final onset list.

Embedding and Inference

We utilize a 4-block Convolutional Neural Network (CNN) to project 250ms log-Mel-spectrogram frames into a 1024-dimensional embedding space. During episodic training on the Slakh2100 synthetic dataset, the network learns to cluster similar percussive events regardless of their specific class.

At inference time, the model performs binary classification. A "positive prototype" is created by averaging the embeddings of the user-selected examples (e.g., 5-shot). A "negative prototype" is formed from the remaining frames. The model then scores every frame in the track based on its proximity to these prototypes in the embedding space.

Results and Discussion

We evaluated our model on three real-world polyphonic datasets: ENST-Drums, MDB-Drums, and RBMA13.

Performance on Fixed and Open Vocabularies

The few-shot model demonstrated remarkable robustness. In a fixed 18-class vocabulary setting, it matched or exceeded the performance of state-of-the-art Convolutional Recurrent Neural Networks (CRNN). Notably, on the challenging RBMA13 dataset, our model achieved a macro F-measure of 0.81, significantly higher than the CRNN's 0.64.

Furthermore, the model's performance remained stable when moving to an "Open Vocabulary" setting, where it was required to transcribe instruments never seen during training, such as maracas or specific toms.

Figure 3: F-measure comparison across various drum classes for both Fixed 18-class and Open Vocabulary settings. The model maintains high performance even for rare or unseen instruments.

Key Insights

  • Adaptability: By using examples from the track itself, the model bypasses the issue of intra-class variance. It does not need a universal definition of a "snare"; it only needs to find sounds that match the specific snare used in that recording.
  • Polyphony Dynamics: A critical finding is the "Polyphony Rule of Thumb." The model performs best when the polyphony level of the user-provided examples matches the query frames. If a match is not possible, providing "clean" (low polyphony) examples to find "messy" (high polyphony) targets is the more effective strategy.

Conclusion

This work demonstrates that few-shot learning is a viable and powerful alternative to traditional supervised ADT. By requiring only minimal human input, the system gains the ability to transcribe an open vocabulary of percussion instruments with high accuracy. Future work will focus on automating the selection of optimal support sets to further reduce the human-in-the-loop requirement and maximize transcription precision.

Summary updated

BibTeX
@inproceedings{wang2020few,
  author = {Yu Wang and Justin Salamon and Mark Cartwright and Nicholas J. Bryan and Juan Pablo Bello},
  title = {{Few-shot Drum Transcription in Polyphonic Music}},
  booktitle = {ISMIR},
  year = {2020},
}
Figure