cs.SDApr 12, 2026

BMdataset: A Musicologically Curated LilyPond Dataset

Authors: Matteo Spanio, Ilay Guler, Antonio Rodà

Organizations: Department of Information Engineering, University of Padua, Padua, Italy · Boston University, Boston, USA

Abstract

Symbolic music research has relied almost exclusively on MIDI-based datasets; text-based engraving formats such as LilyPond remain unexplored for music understanding. We present BMdataset, a musicologically curated dataset of 393 LilyPond scores (2,646 movements) transcribed by experts directly from original Baroque manuscripts, with metadata covering composer, musical form, instrumentation, and sectional attributes. Building on this resource, we introduce LilyBERT (weights can be found at https://huggingface.co/csc-unipd/lilybert), a CodeBERT-based encoder adapted to symbolic music through vocabulary extension with 115 LilyPond-specific tokens and masked language model pre-training. Linear probing on the out-of-domain Mutopia corpus shows that, despite its modest size (~90M tokens), fine-tuning on BMdataset alone outperforms continuous pre-training on the full PDMX corpus (~15B tokens) for both composer and style classification, demonstrating that small, expertly curated datasets can be more effective than large, noisy corpora for music understanding. Combining broad pre-training with domain-specific fine-tuning yields the best results overall (84.3% composer accuracy), confirming that the two data regimes are complementary. We release the dataset, tokenizer, and model to establish a baseline for representation learning on LilyPond.

Figures & tables

Explore similar work

CardsList
  1. Can LLMs understand LilyPond? A benchmark for symbolic music generation and understanding

    Jun 7, 2026Matteo Spanio, Mohammad Torabi, Andrea Poltronieri +1Music Generation EvaluationLLM Evaluation

  2. PianoCoRe: Combined and Refined Piano MIDI Dataset

    May 7, 2026Ilya BorovikMusic Information Retrieval

  3. HumMusQA: A Human-written Music Understanding QA Benchmark Dataset

    Mar 29, 2026Benno Weck, Pablo Puentes, Andrea Poltronieri +2Music UnderstandingAudio-Language Model Evaluation