Manuscript Offprint

arXiv:2610.34247

Does Notation Matter? MusicXML Tokenisation for Symbolic Music Generation and Understanding

Andrea Poltronieri, Matteo Spanio, Simone Chieppa, Xavier Serra, Martín Rocamora

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Symbolic music representations encode musical content at varying levels of completeness, from performance-oriented formats such as MIDI to fully notated scores such as MusicXML. Yet the impact of this representational richness on deep learning models remains poorly understood. While tokenisation has been extensively studied for MIDI, score-based formats have received considerably less attention, and MusicXML in particular remains largely unexplored despite being the de-facto standard for score interchange. In this paper, we introduce the first general-purpose tokenisation framework for MusicXML, and conduct a systematic empirical study to determine whether notational richness confers a measurable advantage for deep learning on symbolic music. We train 26 autoregressive and masked language models, comparing MusicXML tokenisation against MIDI and ABC-based representations, probing the effect of different tokenisation strategies within MusicXML, and testing whether music-grammar-aware tokenisation outperforms treating scores as plain text. We evaluate music understanding tasks using linear probing across composer classification, difficulty estimation, and accompaniment suggestion, and generative tasks using objective statistical metrics and a human pairwise preference study. Our results show that MusicXML-tokenised models outperform MIDI and text-based counterparts on understanding and generative tasks.

1. INTRODUCTION

Music can be computationally represented at multiple levels [1], from raw audio signals to symbolic encodings of discrete musical events—such as notes, chords, and rhythms—that support structural analysis, manipulation, and retrieval [2]. Within the symbolic domain, however, a fundamental tension persists between expressive completeness and structural generality [3]: the capacity to faithfully

Figure

Figure 1. Tokenisation of a C4 staccato quarter note over a C major chord under REMI+ and MxlTok. Unlike REMI+, MxlTok encodes harmonic and notational context.

reconstruct the original content on one hand, and the ability to represent and manipulate high-level musical structures on the other. This trade-off is further complicated by the distinction between prescriptive and descriptive representations [4]: score-based formats specify what should be played, abstracting the expressive nuances of a performance, while performance-oriented formats capture what was played, at the cost of notational generality.

These two axes—completeness versus generality, and prescriptive versus descriptive—largely define the landscape of symbolic formats in use today. Performance-oriented representations, such as MIDI [5], encode how music was played—pitch, velocity, and timing. Some notational categories can be recovered from this data: metrical position through quantisation, dynamic and articulation markings from velocity and duration. Others are lost entirely: enharmonic equivalents collapse into a single pitch class, and score structure is flattened into events and tracks with no hierarchy of parts, staves, and voices [6]. Score-based formats, by contrast, are prescriptive by design, explicitly encoding these elements. ABC notation [7] has seen growing adoption for score-based deep learning [8,9], where scores are typically treated as plain text. MusicXML, the de-facto standard for score interchange, offers a richer representation—capturing enharmonic spelling, multi-voice polyphony, articulations, dynamics, and hierarchically organised parts and measures—yet remains largely unexplored in the MIR literature [10].

Applying symbolic representations in deep learning re-

© A. Poltronieri, M. Spanio, S. Cheippa, X. Serra, and M. Rocamora. Licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). Attribution: A. Poltronieri, M. Spanio, S. Cheippa, X. Serra, and M. Rocamora, “Does Notation Matter? MusicXML Tokenisation for Symbolic Music Generation and Understanding”, in Proc. of the 27th Int. Society for Music Information Retrieval Conf., Abu Dhabi, UAE, 2026.

requires converting them into discrete token sequences, a process that has been extensively studied for MIDI [11–13], yet has received considerably less attention for score-based formats. We address this gap by introducing MxlTok, the first general-purpose tokenisation framework for MusicXML, and conducting a systematic empirical study of whether notational richness confers a measurable advantage for deep learning on symbolic music. To this end, we train 26 models spanning two architectures—autoregressive and masked language models—and evaluate them on both generative and understanding tasks. We systematically compare MusicXML tokenisation against MIDI and ABC representations, probing the effect of serialisation strategy and vocabulary size within MusicXML, and testing whether music-informed tokenisation outperforms plain-text encoding [8, 9]. Our results suggest that the expressiveness of MusicXML is particularly advantageous for understanding tasks, where MusicXML-tokenised models consistently outperform their MIDI and text-based counterparts in all probing benchmarks. Moreover, MusicXML tokenisation performs competitively on generative tasks, achieving better scores in objective statistical metrics and ranking highest in human preference evaluations, while producing fully notated scores that encode expressive nuances like dynamics and articulations.

The contributions of this paper can be summarised as follows: (i) MxlTok: We introduce the first general-purpose tokenisation framework for MusicXML, following the extensible design of MidiTok [11], with built-in support for custom tokenisation strategies, Byte Pair Encoding (BPE) training [12, 14], and dataset preprocessing. (ii) Empirical study: We train 26 models to systematically compare tokenisation strategies along three axes: serialisation order within MusicXML (measure-first vs. part-first); symbolic input representation (MusicXML vs. MIDI vs. ABC notation); and tokens grammar (music-specific vs. general-purpose subword tokenisation). All comparisons are conducted across both autoregressive and masked language model architectures, with and without BPE. (iii) Evaluation protocol: Understanding tasks are assessed via linear probing on contextual embeddings extracted from trained masked language models, across composer classification, difficulty estimation, and accompaniment suggestion. Generative tasks are evaluated using objective statistical metrics [15], alongside a human pairwise preference study [16, 17]. (iv) Open models: We release the weights of 7 pretrained MusicXML-based models—both generative and understanding—covering all MxlTok tokenisation configurations. To our knowledge, these are the first general-purpose and publicly available language models trained on MusicXML data. 1^{1}

References (45)

  • The representation levels of music information
  • Generative structural representation of tonal music
  • A framework for the evaluation of music representation systems
  • Prescriptive and descriptive music-writing
  • A Comprehensive Introduction, ser
  • Musical knowledge: What can artificial intelligence bring to the musician?
  • The ABC music standard 2.1
  • Mupt: A generative symbolic music pretrained transformer
  • Notagen: Advancing musicality in symbolic music generation with large language model training paradigms
  • Practical end-to-end optical music recognition for pianoform music
  • MidiTok: A Python Package for MIDI File Tokenization
  • Byte pair encoding for symbolic music
  • Impact of time and note duration tokenizations on deep learning symbolic music modeling
  • Neural machine translation of rare words with subword units
  • Muspy: A toolkit for symbolic music generation
  • Chatbot arena: an open platform for evaluating llms by human preference
  • Music arena: Live evaluation for text-to-music
  • This time with feeling: Learning expressive musical performance
  • Pop music transformer: Beat-based modeling and generation of expressive pop piano compositions
  • FIGARO: Controllable music generation using learned and expert features
  • Compound word transformer: Learning to compose full-song music over dynamic directed hypergraphs
  • MusicBERT: Symbolic music understanding with large-scale pre-training
  • Popmag: Pop music accompaniment generation
  • Mmm : Exploring conditional multi-track music generation with the transformer (opens arXiv in a new tab)
  • Pianoroll-event: A novel score representation for symbolic music
  • Optimizing feature extraction for symbolic music
  • Symbolic music representations for classification tasks: A systematic evaluation
  • Style-based composer identification and attribution of symbolic music scores: A systematic survey
  • Piano score rearrangement into multiple difficulty levels via notation-to-notation approach
  • MusicXML 4.0 specification
  • PDMX: A large-scale public domain musicxml dataset for symbolic music processing
  • xml2abc: MusicXML to ABC notation converter
  • LEGATO: Large-scale end-to-end generalizable approach to typeset OMR
  • HuggingFace's Transformers: State-of-the-art Natural Language Processing
  • Language models are unsupervised multitask learners
  • Bert: Pre-training of deep bidirectional transformers for language understanding
  • Abc-eval: Benchmarking large language models on symbolic music understanding and instruction following (opens arXiv in a new tab)
  • Using a joint-embedding predictive architecture for symbolic music understanding
  • OMAR-RQ: Open music audio representation model trained with multi-feature masked token prediction
  • Online database of scores in the Humdrum file format
  • MuseScore Studio
  • Combining piano performance dimensions for score difficulty classification
  • Symbolic music similarity through a graph-based representation
  • Survey on the evaluation of generative models in music
  • The musicality of non-musicians: An index for assessing musical sophistication in the general population