arXiv:2610.39255cs.SDOct 2026

Manuscript Offprint

arXiv:2610.39255

A learning-based method of automatic music transcription

Phu-Anh-Tai Do, Huu-Hoang Nguyen, Duc-Hoang Nguyen, Thanh-Hai Le

Phu-Anh-Tai Do*

Department of Information Technology

FPT University

Ho Chi Minh City, Vietnam

Huu-Hoang Nguyen*

Department of Information Technology

FPT University

Ho Chi Minh City, Vietnam

Duc-Hoang Nguyen*

Department of Information Technology

FPT University

Ho Chi Minh City, Vietnam

Thanh-Hai Le†

Faculty of Information Technology

Ho Chi Minh City Open University

Ho Chi Minh City, Vietnam

October 30, 2026

ABSTRACT

Automatic Music Transcription (AMT) seeks to convert acoustic music recordings into symbolic musical notation, a process that remains remarkably difficult for polyphonic piano due to concurrent polyphony, harmonic partial interference, expressive timing, and severe pitch activation sparsity. In this paper, we formulate polyphonic piano transcription as a frame-level multi-label classification problem across the standard 88 piano pitches (MIDI notes 21 to 108). Raw audio waveforms are processed using the Constant-Q Transform (CQT) to construct a geometrically spaced log-frequency time-frequency representation that aligns with the chromatic musical scale across seven octaves (252 frequency bins per frame). We systematically investigate recurrent sequence models, contrasting unidirectional Long Short-Term Memory (LSTM) with Bidirectional LSTM (BiLSTM) backbones, and propose two architectural adaptations tailored to recurrent temporal representations: a modified additive attention module and a modified multihead attention mechanism equipped with hyperbolic tangent activation and head-wise summation. Furthermore, to mitigate the severe class imbalance between inactive and active notes (approximately 41:1), we evaluate Weighted Binary Cross-Entropy (WBCE) alongside standard Binary Cross-Entropy (BCE). Rigorous empirical evaluations on the MAPS and MAESTRO datasets demonstrate steady, compounding gains from bidirectionality and attention mechanisms. Our proposed Multihead Attention–BiLSTM architecture attains an F1-score of 88.20%, an accuracy of 78.90%, a precision of 0.89, and a recall of 0.86, substantially outperforming the baseline unidirectional LSTM (F1-score of 71.20%) while maintaining a compact parameter budget of 4.43M. Qualitative piano-roll visualizations confirm that our model generates faithful transcriptions even in complex harmonic passages.

Keywords Automatic Music Transcription · Polyphonic Piano Transcription · Constant-Q Transform · Bidirectional LSTM · Attention Mechanism · Multihead Attention · Weighted Binary Cross-Entropy

1 Introduction

The transcription of acoustic music into written symbolic notation represents a remarkable feat of human intelligence, uniting psychoacoustic perception (auditory scene analysis), cognition (auditory object identification), formal knowledge

*Equal contribution.

†Corresponding author / Project Supervisor.

representation (musical syntax and harmony), and probabilistic inference (evaluating competing musical hypotheses) [1]. Automatic Music Transcription (AMT) aims to automate this complex translation process by designing computational algorithms capable of converting acoustic signals into symbolic representations such as MIDI or digital sheet scores. AMT constitutes a cornerstone of Music Information Retrieval (MIR), offering foundational primitives for downstream applications including musicological analysis, audio search, automated accompaniment, cover-song identification, and computational music education [2, 1].

Despite decades of active research, polyphonic AMT—and polyphonic piano transcription in particular—remains an inherently ill-posed and challenging problem. This difficulty arises from four primary acoustic and structural phenomena:

  1. Polyphony and Overlapping Mixtures: In polyphonic music, multiple notes are excited simultaneously. The observed acoustic signal is a linear mixture of vibrational modes produced by multiple strings, resulting in composite, intertwined spectro-temporal profiles.

  2. Harmonic Interference: Musical harmony relies heavily on consonant musical intervals (e.g., octaves, perfect fifths, perfect fourths), whose fundamental frequencies adhere to small integer ratios. As a consequence, the overtone series of simultaneously sounding notes heavily overlap in the frequency domain, obscuring individual fundamental frequencies and complicating source separation [3, 4].

  3. Temporal Dynamics and Acoustic Reverberation: Real-world piano performance exhibits complex temporal non-stationarity, including percussive hammer strikes, sustain pedal resonances, string coupling, and room reverberation. The decay phase of preceding notes lingers across subsequent frames, frequently violating assumptions of temporal independence [5, 6].

  4. Acute Class Imbalance: A modern standard acoustic piano spans 88 keys. Even in virtuosic performances, human pianists rarely strike more than 8 to 10 keys simultaneously. Consequently, in any given analysis frame, only a very small fraction of the 88 pitches are active, resulting in an extreme sparsity ratio of active to inactive notes (empirically measured at approximately 1:41 in benchmark training corpora). Standard classification objectives heavily bias predictors toward inactive predictions unless explicitly countered.

To address these hurdles, this paper presents a learning-based framework for polyphonic piano transcription. As illustrated in Figure 1, we formulate the problem as a frame-level multi-label classification task over the 88 canonical piano pitches (MIDI notes 21 through 108). Recognizing the logarithmic frequency organization of musical pitch perception, we employ the Constant-Q Transform (CQT) [7] over 7 octaves with 36 bins per octave, yielding a 252-dimensional spectral feature vector per time frame.

To model the temporal dynamics of music, we explore recurrent neural network architectures, contrasting unidirectional Long Short-Term Memory (LSTM) [8] networks against Bidirectional LSTMs (BiLSTM). Furthermore, we propose two novel attention extensions designed to operate harmoniously with recurrent temporal representations: a Modified Attention Mechanism that incorporates explicit bias terms and hyperbolic tangent activation, and a Modified Multihead Attention mechanism utilizing parallel attention projections combined with element-wise summation and non-linear compression. To address the 1:41 class imbalance, we formulate a Weighted Binary Cross-Entropy (WBCE) loss that penalizes false negatives on active notes.

Through extensive experiments on the MAPS [9] and MAESTRO [10] benchmark datasets, we systematically evaluate 7 distinct model configurations. Our best proposed model—a Multihead Attention-Bidirectional LSTM network—achieves an F1-score of 88.20% and an overall accuracy of 78.90% with only 4.43M trainable parameters, establishing an effective, lightweight solution for polyphonic music transcription.