BMdataset: A Musicologically Curated LilyPond Dataset
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.
The following analysis is generated by AI and may contain errors. It is separate from the authors’ abstract and is not peer review.
Research summary
The main contribution of this paper is the introduction of BMdataset and LilyBERT, which together provide a robust framework for symbolic music representation learning, demonstrating that expert-curated datasets can outperform larger, noisier datasets in music classification tasks. This work significantly advances the field by addressing a gap in the use of text-based music formats and establishing a new baseline for future research.
Methodology
The paper presents a novel approach to music representation learning by introducing BMdataset, a carefully curated dataset of LilyPond scores, and LilyBERT, a CodeBERT-based model specifically adapted for symbolic music. The methodology includes a unique tokenizer that preserves musical semantics by treating LilyPond-specific commands as atomic units. The two-stage training process, combining broad pre-training on a large corpus with domain-specific fine-tuning, is well-justified and effectively demonstrated through rigorous experiments.
Results & evaluation
The experiments conducted are comprehensive, utilizing linear probing to assess the effectiveness of the proposed model. The results indicate that the curated dataset significantly outperforms larger, less curated datasets for composer and style classification tasks. The systematic evaluation on the Mutopia corpus provides a solid benchmark for future research, and the findings are statistically significant, showcasing the advantages of expert curation in training datasets.
Reproducibility
The authors have made their dataset, model weights, and code publicly available, which enhances reproducibility. The detailed descriptions of the dataset creation process, model architecture, and training procedures allow other researchers to replicate the study. However, the paper could benefit from clearer documentation of the training environment and hyperparameter settings.
Limitations
The dataset is skewed towards certain composers, particularly Vivaldi, which may limit its generalizability. Additionally, the reliance on automatically converted data from the PDMX corpus for pre-training may introduce artifacts that could affect the model's performance. The authors acknowledge these limitations and suggest future work to expand the dataset and explore more robust model architectures.
Broader impact
This work has significant implications for the field of music information retrieval and generative AI, particularly in enhancing the understanding and generation of symbolic music. The introduction of a domain-specific model like LilyBERT could pave the way for more nuanced applications in music analysis, composition, and education, fostering greater engagement with less-represented composers in the Baroque period. The main contribution of this paper is the introduction of BMdataset and LilyBERT, which together provide a robust framework for symbolic music representation learning, demonstrating that expert-curated datasets can outperform larger, noisier datasets in music classification tasks. This work significantly advances the field by addressing a gap in the use of text-based music formats and establishing a new baseline for future research.
Author of this paper? Send a correction.