NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Count the Notes: Histogram-Based Supervision for Automatic Music Transcription

Jonathan Yaffe, Ben Maman, Meinard Müller, Amit BermanoISMIR 2025

Introduction

Automatic Music Transcription (AMT)—the computational process of converting raw audio into a symbolic representation like MIDI—is a foundational challenge in music information retrieval. Traditionally, high-performance AMT models have relied on "strongly aligned" datasets where every note onset, offset, and pitch is precisely labeled down to the millisecond. However, creating such datasets is labor-intensive and often impossible for complex musical genres or historical recordings.

To address this, researchers have explored "weakly supervised" learning, which uses less precise labels (like a list of notes present in a recording). Yet, existing weakly supervised methods often rely on Dynamic Time Warping (DTW) to align audio to scores. DTW is computationally expensive and assumes a strict chronological correspondence between the score and the performance—an assumption that fails when performers use rubato, arpeggiate chords, or deviate from the written score. This paper introduces CountEM, a framework that bypasses the alignment problem entirely by treating transcription as a counting task.

The CountEM Framework

CountEM replaces complex temporal alignment with a simple histogram-based supervision strategy combined with an Expectation-Maximization (EM) loop. The core idea is that while the exact timing of a note may be uncertain, the total number of times a specific pitch occurs within a given time window is a robust and easily obtainable piece of information.

1. Histogram-Based Supervision

Instead of providing the model with a sequence of notes, the supervisor provides a "count" for each pitch (e.g., "the note C4 occurs 3 times in this 30-second segment"). This histogram approach removes the requirement for the model to match notes in a specific order, making it inherently more flexible than DTW-based methods.

2. The Iterative EM Loop

The model improves its transcription capabilities through a two-step iterative process:

  • The E-Step (Label Refinement): The current neural network generates a "posteriorgram"—a heatmap indicating the likelihood of note onsets across the audio. For a pitch that appears $K$ times in the histogram, the algorithm identifies the $K$ highest local peaks in the heatmap. These peaks serve as "pseudo-labels" for the next iteration.
  • The M-Step (Model Update): The network is retrained using these newly identified peak positions as the ground truth.

As the model becomes more adept at identifying onsets, the pseudo-labels become increasingly accurate, creating a virtuous cycle of improvement.

Experimental Evaluation

The researchers tested CountEM across a diverse range of instruments and recording conditions using several key datasets:

  • MAESTRO: A large-scale piano dataset used to simulate varying levels of weak supervision.
  • GuitarSet & GAPS: Used for cross-dataset evaluation of guitar transcription.
  • MusicNet & URMP: Challenging datasets featuring multi-instrument ensembles where labels are often imperfectly aligned.

Key Insights

  • Onsets as Anchors: The framework leverages the fact that note onsets are prominent, detectable features in audio. If a score indicates a note occurs $K$ times, there are almost certainly $K$ detectable onsets, regardless of the note's duration or intensity.
  • Robustness to Noise: One of the most striking findings was the system's resilience to errors in the supervision data. When histograms were intentionally corrupted with 20% random noise (simulating an inaccurate musical score), the transcription accuracy dropped by a negligible 3%.
  • Computational Efficiency: By avoiding the $O(N^2)$ complexity associated with DTW alignment, CountEM is significantly faster and more scalable, particularly for long-form recordings.

Results

CountEM demonstrated state-of-the-art performance for weakly supervised transcription:

  • Piano: On the MAESTRO dataset, CountEM achieved an F-score of 91.3% using only full-track histograms. This represents a significant improvement over the 84.6% baseline and nears the performance of models trained with full, strong supervision.
  • Guitar: On the GAPS dataset, the model reached an F-score of 93%, substantially outperforming previous weakly supervised methods like NoteEM (86.6%).

Limitations and Future Directions

While CountEM is highly effective, it faces a "single frame" limit; if the supervision window is too small (under 100ms), the model's performance degrades as the histogram effectively becomes a frame-level label sensitive to minor misalignments. Additionally, the current implementation relies on simple time-based windowing. Future research could explore more sophisticated audio segmentation techniques or extend the histogram approach to other tasks, such as instrument identification or lyric transcription.

By shifting the focus from "when" a note happens to "how many" times it happens, CountEM provides a robust, efficient, and highly accurate path forward for training music transcription models on readily available, weakly labeled data.

Summary updated

BibTeX
@inproceedings{yaffe2025count,
  author = {Jonathan Yaffe and Ben Maman and Meinard Müller and Amit Bermano},
  title = {{Count the Notes: Histogram-Based Supervision for Automatic Music Transcription}},
  booktitle = {ISMIR},
  year = {2025},
  doi = {10.5281/zenodo.17706488},
}

Loading related content...

Figure