Manuscript Offprint
arXiv:2610.34247Does Notation Matter? MusicXML Tokenisation for Symbolic Music Generation and Understanding
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 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.
2.1 MIDI Tokenisers
Tokenisation of MIDI has been studied extensively through a variety of strategies, unified in the MidiTok library [11], ranging from direct MIDI event encoding [18] to musically structured representations with explicit bar and duration tokens [19,20], and embedding pooling approaches to reduce sequence length [21–24]. Among these, REMI+ [20] and Octuple [22] have emerged as the most widely adopted [12, 13], and we use them as baselines in our empirical study. REMI+ extends REMI [19] to the multitrack, multi-time-signature setting by prepending Program tokens to each note event, while Octuple reduces sequence length by merging multiple note attributes into a single pooled embedding, at the cost of requiring multiple output heads during training in its original formulation. More recently, Qian et al. [25] propose Pianoroll-Event, which encodes scores as structured pianoroll event sequences, prioritising encoding efficiency over notational completeness.
Beyond the design of tokenisation schemes, two lines of work are directly relevant to our study. Fradet et al. [12] apply byte pair encoding to symbolic music tokenisation, showing that learned subword-like merges improve performance on both generative and understanding tasks—a setup closely related to ours, and one that motivates our inclusion of BPE as a variable across all experimental conditions. BPE [14] is a subword tokenisation algorithm that iteratively merges the most frequent token pair into a new vocabulary entry until a target size is reached. A subsequent study [13] analyses the effect of time and note duration representations on model performance across composer classification, emotion classification, music generation, and sequence representation tasks, finding that explicit encoding of temporal information yields task-dependent benefits; however, the study is restricted to MIDI and offers limited generalisable conclusions across tokenisation families.
Both studies, however, are restricted to MIDI, leaving open whether symbolic format choice or tokenisation granularity is the primary driver of model performance. Comparisons across formats, using hand-crafted features [26] or neural representations [27], report no consistent advantage for notationally richer ones; a survey of both [28] attributes this to tooling rather than to the information itself. In this study, we make tokenisation the controlled variable.
2.2 Score Tokenisers
Compared to MIDI, tokenisation of score-based formats has received considerably less attention. The main approaches operating on score representations are generative models based on ABC notation [8, 9]. However, ABC was originally designed for encoding folk and traditional Western European tunes, which are typically single-voice melodies written on a single staff. The standard has not been officially updated since version 2.1 [7], and brings some limitations: multi-voice support remains inconsistently implemented across tools, and both MuPT [8] and NotaGen [9] introduce non-standard extensions to handle polyphonic content, resulting in mutually incompatible dialects that hinder reproducibility and interoperability.
From a tokenisation perspective, both works treat ABC scores as plain character sequences, applying general-
https://github.com/andreamust/MxlTok.
| Feature | MIDI | ABC | LMX | MxITok |
|---|---|---|---|---|
| Enharmonic spelling | ✕ | ✓ | ✓ | ✓ |
| Dynamics & hairpins | ~ | ✓ | ✕ | ✓ |
| Tempo markings | ~ | ✓ | ✕ | ✓ |
| Articulation & ornaments | ✕ | ~ | ✕ | ✓ |
| Harmony / chord symbols | ~ | ~ | ✕ | ✓ |
| Multi-part score structure | ~ | ~ | ✕ | ✓ |
| Repeat signs | ✕ | ✓ | ✕ | ✓ |
Table 1. Notational features supported by each symbolic representation. ✓: fully supported; ~: partially supported; ✕: not supported.
purpose subword tokenisers without exploiting any music-specific grammatical structure. As a result, musical concepts are not represented as atomic units: for example, a C7 note is encoded as the character sequence c", where the pitch is implied by the combination of the letters, rather than being represented as a single explicit token.
Tokenising score-based formats such as MusicXML naturally provides an explicit and hierarchical musical grammar, since the format itself organises musical content into discrete, semantically meaningful elements—pitch, duration, articulation, dynamics, voice, harmony—structured across parts, measures, and notes, rather than encoding them as a flat character stream. Only a handful of approaches have attempted to exploit this structure, and all are task-specific and notionally incomplete. Suzuki [29] introduces a MusicXML tokeniser for piano score rearrangement, covering basic notational elements but restricted to piano and lacking support for expressive markings. Mayer et al. [10] propose LMX, a depth-first serialisation of the MusicXML tree for optical music recognition, which explicitly discards dynamics, pedal markings, and does not support multi-part scores or repetitions. Zhang et al. [27] adapt REMI and Compound Word to MusicXML by introducing key-signature and voice tokens, but retain the underlying MIDI event grammar and evaluate only on piece-level classification.
MxITok addresses these limitations by providing the first general-purpose MusicXML tokenisation framework, encoding the full range of notational elements available in the source format (Table 1).
3. METHODOLOGY
3.1 The MxITok Framework
MxITok is designed as a general-purpose tokenisation framework for MusicXML, extending the linearisation approach of LMX [10] to support the full set of notational elements available in the format—including pitch spelling, dynamics and hairpins, tempo markings, articulations and ornaments, harmony symbols, repeat signs, and multi-part scores (Table 1). Following the extensible design of MidiTok [11], MxITok exposes a base tokeniser class from which users can derive custom strategies by overriding format-specific methods, while inheriting shared infrastructure for vocabulary construction, BPE training, and dataset preprocessing. The library ships with three built-in tokenisers: the default mx1 tokeniser, and REMI+ and Octuple, which apply their original MIDI tokenisation schemes to MusicXML-parsed score content.
Each note is represented as an ordered group of tokens consisting of a set of prefix tokens encoding contextual modifiers (e.g., grace, chord), a root token encoding note type and duration (e.g., quarter, eighth), and a set of suffix tokens encoding notational modifiers (e.g., dot, tied:start, dynamics, articulations), as shown in Figure 1. The serialiser applies delta-encoding for voice, stem, and staff tokens, emitting them only when their value changes with respect to the previous event. MxITok supports microtonal pitch alterations, enabling application to non-Western music traditions. The base vocabulary comprises approximately 750 tokens, against the 200–400 typical of MIDI tokenisers.
A key design dimension of MxITok is the serialisation order of the score, which directly mirrors the two document types defined in the MusicXML standard [30]. In Part-First (PF) serialisation, corresponding to <score-partwise>, the score is traversed part by part, with all measures of a given instrument appearing before moving to the next. In Measure-First (MF) serialisation, corresponding to <score-timewise>, measures are primary, and all parts within a given measure are serialised together before advancing to the next. Within a measure, parts are emitted as contiguous blocks; this keeps simultaneous material within a bar's distance in the token stream, at the cost of interleaving voices across parts. Both strategies are lossless and encode the same musical content, but impose different inductive biases on the model; their relative merits for generative and understanding tasks are an empirical question addressed in this paper. BPE is supported at arbitrary vocabulary sizes; in this work we train models with 5k and 10k tokens, independently for each tokeniser configuration, consistent with the approach of Fradet et al. [12]. Beyond these experimental axes, MxITok exposes additional configurable dimensions—including interval-based pitch encoding and pitch-shift augmentation—following the design space explored by previous studies [13].
3.2 Dataset
We train all models on the Rated and Deduplicated (R∩D) subset of PDMX (v5) [31], a large-scale dataset of public domain MusicXML scores collected from the MuseScore platform. All scores in PDMX are released under CC-0 or Public Domain licenses, allowing us to release both the preprocessed tokenised data and the weights of all trained models—including the generative ones—without licensing restrictions, ensuring full reproducibility of our results.
PDMX comprises 254K scores in total, organised into four subsets obtained by progressively filtering for deduplication and user ratings: All (A, 254K scores), Deduplicated (D, 102K), Rated (R, 14K), and Rated and Deduplicated (R∩D, 13K). Deduplication is performed via embedding-based title similarity and note count clustering, retaining the highest-rated arrangement per cluster; ratings, provided by the MuseScore community, serve as a proxy for data quality. We use the R∩D subset following the ablation study of [31], which shows that rating-based filtering is a more effective quality proxy than scale, with R∩D-trained models outperforming those trained on larger subsets in both objective metrics and human preference evaluations. The R∩D subset covers a diverse range of genres, with classical and folk forming the largest portion, followed by rock, pop, jazz, and soundtrack. Notational content is pervasive rather than incidental in R∩D: 53% of scores carry dynamics, 50% articulations, and 61% at least one note whose spelling is unrecoverable from pitch class.
3.3 Baselines and Experimental Conditions
| Tokeniser | Format | BPE | GPT | BERT |
|---|---|---|---|---|
| MxITok-PF | MusicXML | none, 5k, 10k | ✓ | ✓ |
| MxITok-MF | MusicXML | none, 5k, 10k | ✓ | ✓ |
| MxITok-Octuple | MusicXML | none | ✕ | ✓ |
| REMI+ | MIDI | none, 5k, 10k | ✓ | ✓ |
| Octuple | MIDI | none | ✕ | ✓ |
| ABC | ABC | none, 5k, 10k | ✓ | ✓ |
Table 2. Experimental conditions. For each tokeniser, √ indicates which model architectures are trained.
To compare MusicXML tokenisation against alternative symbolic representations, we prepare the R∩D subset of PDMX in each target format prior to tokenisation. MIDI files are obtained directly from the PDMX dataset [31], while ABC conversion is performed using the xml2abc library [32], following prior work [33]. Both conversions are lossless with respect to target format, as MusicXML is the richest of the three representations.
For MusicXML, we evaluate two MxITok tokenisers: the default mx1 tokeniser under both part-first (PF) and measure-first (MF) serialisation orders, and MxITok-Octuple. For MIDI, we use REMI+ [20] and Octuple [22], the two most widely adopted MIDI tokenisation schemes, shown to achieve the best performance on generative and understanding tasks respectively [12, 13]. The ABC baseline tokenises scores as plain text using the HuggingFace BPE tokeniser [34], consistently with prior work [8, 9]. BPE is evaluated at vocabulary sizes of 5k and 10k tokens for all tokenisers except Octuple, which is excluded as its embedding pooling design already serves as a sequence compression strategy. For autoregressive models, every tokenised sequence is prefixed, immediately after the <BOS> token, with the number of parts and their instrument names; this ensures that all models receive the same structural conditioning at generation time, enabling a fair comparison across tokeniser configurations (c.f. Section 4.2). Both Octuple variants are likewise excluded from generative evaluation, as it has been shown to be underperforming on autoregressive generation [12]. All experimental conditions are summarised in Table 2.
3.4 Models
All 26 models are trained from scratch using the HuggingFace Transformers library [34]. We train two model families: an autoregressive transformer (GPT-2 [35]) for generative tasks, and a masked language model (BERT [36]) for understanding tasks. Both follow the configuration of Long et al. [31]: 6 layers, 8 attention heads, and a hidden dimension of 512, totalling approximately 20M parameters. This architecture was validated by [31] on the same dataset and task setup, achieving strong performance without requiring larger model capacities; we adopt it to ensure that observed differences are attributable to tokenisation rather than architectural choices. Since BPE and no-BPE models operate on sequences of substantially different lengths, convergence rates vary across configurations; we therefore train on a maximum of 100k steps and apply early stopping with a patience of 1500 steps.
4. EVALUATION
Following prior work [12, 13, 25, 37–39], we evaluate understanding and generative tasks separately. Understanding is assessed via linear probing, while generative quality is measured using both objective metrics and a human preference study.
4.1 Music Understanding Tasks
Since no prior work has addressed deep learning on MusicXML, no established benchmark or dataset exists for evaluating such models. We propose a set of probing tasks and the corresponding datasets. For all tasks, embeddings are extracted from each BERT model and used as fixed features for a probing classifier consisting of two linear layers with hidden dimension 512.
4.1.1 Composer Recognition
We evaluate composer classification on a subset of the KernScores corpus [40], a collection of symbolic music scores in the Humdrum **kern format. Scores are converted to MusicXML using the MuseScore CLI [41], a lossless conversion with respect to the musical content. The dataset comprises 1,968 scores spanning 20 composers with a balanced class distribution; we define balanced splits and evaluate using 5-fold cross-validation. To isolate the effect of representational richness from tokenisation strategy, we additionally run an ablation in which the same scores are first converted to MIDI and then back to MusicXML and ABC notation, ensuring that all three representations are derived from the same lossy source.
4.1.2 Difficulty Estimation
For difficulty estimation, we evaluate on the Can I Play It? (CIPI) dataset [42], which comprises 652 classical piano compositions across 9 difficulty levels and 29 composers from the Baroque era to the 20th century. The dataset is distributed in MusicXML format; for MIDI and ABC models, scores are converted as described in Section 3. We adopt the predefined 5-fold cross-validation splits and report 9-class accuracy and balanced accuracy.
4.1.3 Accompaniment Suggestion
We adopt the accompaniment suggestion task from [38], evaluated on the Wikifonia dataset [43], which consists
| Format | Tokenizer | BPE | Composer Classification | Difficulty Estimation | Accompaniment Suggestion | Ablation Study | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc ↑ | Macro F1 ↑ | Acc-9 ↑ | Acc-±1 ↑ | MAP ↑ | H@1 ↑ | H@5 ↑ | Acc ↑ | Macro F1 ↑ | |||
| MusicXML | MxlTok-MF | 10k | 0.781 | 0.777 | 0.303 | 0.695 | 0.779 | 0.650 | 0.949 | 0.735 | 0.732 |
| 5k | 0.775 | 0.772 | 0.301 | 0.650 | 0.810 | 0.695 | 0.965 | 0.733 | 0.725 | ||
| None | 0.769 | 0.765 | 0.278 | 0.619 | 0.815 | 0.702 | 0.973 | 0.701 | 0.690 | ||
| MxlTok-PF | 10k | 0.753 | 0.747 | 0.277 | 0.659 | 0.777 | 0.652 | 0.952 | 0.675 | 0.668 | |
| 5k | 0.746 | 0.741 | 0.246 | 0.620 | 0.804 | 0.687 | 0.958 | 0.678 | 0.667 | ||
| None | 0.763 | 0.759 | 0.258 | 0.608 | 0.803 | 0.680 | 0.966 | 0.672 | 0.664 | ||
| MusicXML | Octuple | None | 0.742 | 0.735 | 0.242 | 0.603 | 0.750 | 0.618 | 0.931 | 0.680 | 0.664 |
| MIDI | REMI+ | 10k | 0.748 | 0.739 | 0.229 | 0.608 | 0.721 | 0.573 | 0.922 | 0.734 | 0.724 |
| 5k | 0.744 | 0.735 | 0.228 | 0.551 | 0.726 | 0.579 | 0.925 | 0.743 | 0.729 | ||
| None | 0.721 | 0.708 | 0.261 | 0.667 | 0.724 | 0.579 | 0.924 | 0.735 | 0.725 | ||
| MIDI | Octuple | None | 0.716 | 0.710 | 0.241 | 0.622 | 0.614 | 0.458 | 0.820 | 0.725 | 0.717 |
| ABC | Word-level | 10k | 0.705 | 0.698 | 0.272 | 0.632 | 0.602 | 0.445 | 0.814 | 0.676 | 0.668 |
| 5k | 0.715 | 0.707 | 0.256 | 0.633 | 0.595 | 0.432 | 0.811 | 0.674 | 0.666 | ||
| None | 0.707 | 0.703 | 0.267 | 0.660 | 0.556 | 0.382 | 0.770 | 0.668 | 0.660 | ||
Table 3. Downstream task evaluation across tokenisation strategies. Best results per column are in bold. Standard deviations are omitted, as all values are below a threshold of 0.05.
of 5,000 lead sheets in MusicXML format. Positive pairs are constructed by separating the melody track from the remaining accompaniment, while negative pairs use non-matching combinations. The task is evaluated as a retrieval problem using Mean Average Precision (MAP) and HITS@k (k = 1, 5).
4.2 Generative Tasks
4.2.1 Objective Analysis
Evaluating generated music objectively remains an open challenge [44]. While MusPy [15] provides metrics designed for symbolic music generation across all formats considered here, their correlation with perceived quality remains poorly understood.
Recently, [25] proposed aggregating Polyphony Rate (PR), Scale Consistency (SC), and Groove Consistency (GC) into a single Jensen–Shannon (JS) score, capturing harmonic richness, tonal coherence, and rhythmic stability respectively. The score is defined as JS = 100 × exp(-2 × JS), where JS is the average Jensen–Shannon divergence between the distributions of the generated and reference sequences for each metric. Higher values indicate closer alignment between generated and reference distributions. We adopt this formulation, using statistics computed over the training split of the PDMX R∩D subset as reference distribution, since it proved to be a clean and diverse dataset of MusicXML data [31].
To ensure comparability, all models are conditioned on the same set of musical attributes—number of parts, instrument types, key, and time signature. For each model, 200 pieces are generated over 20 prompts with 10 outputs each, using a maximum sequence length of 2048 tokens.
4.2.2 Human Listening Test
To assess the perceptual quality of generated music, we conduct a pairwise preference study following the evaluation protocol proposed in similar studies [12, 13, 25, 31]. Pairwise judgments are aggregated using a Bradley–Terry model to estimate latent quality scores and derive a global ranking of the models, as proposed in similar evaluation frameworks [16, 17]. The scores are mean-centered across models for interpretability.
Stimuli. We sample 7 tracks at random from the subsets of the PDMX dataset that were not used for training. For each track, we generate 10 continuations per model, conditioned on a prompt consisting of the first 4 bars of the score plus 4 additional tokens. We then randomly select 3 continuations per prompt for each model, resulting in 21 sampled continuations per model (168 stimuli in total). The prompt length is chosen to provide sufficient musical context while mitigating the risk of models, particularly those trained with BPE, prematurely terminating generation by producing an EOS token. Participants listen to a synthesised rendering of the prompt followed by 12 generated bars from the two models, presented in randomised order.
Evaluation dimensions. For each pair of continuations, participants indicate their preference along four dimensions: (i) Fidelity: consistency with the prompt in terms of pitch, scale, and rhythm; (ii) Correctness: quality of note succession and harmonic content; (iii) Diversity: variety of melodies and harmonies while remaining musically coherent; (iv) Overall preference: subjective global preference. Musical competency is assessed via the Gold-MSI questionnaire [45].
Design. We adopt a balanced pairwise design where model pairs are sampled to ensure comparable exposure, restricting comparisons to the same prompt. To limit participant fatigue, each model is represented by a single BPE variant per condition: the no-BPE model and the 5k BPE model, yielding 8 models. Each participant evaluates 30 randomly assigned comparisons. The study involved 16 participants, yielding a total of 960 judgments. On average, each model appears in comparisons, and each stimulus is evaluated 5–6 times by different participants. Participants reported an average Gold-MSI score of 5.5 out of 7, indicating a musically experienced sample.
| Format | Tokenizer | BPE | Statistical Evaluation | User Study | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| PR | SC | GC | JS ↑ | Fidelity ↑ | Correctness ↑ | Diversity ↑ | Overall ↑ | |||
| MusicXML | MxlTok-MF | 10k | 28.6 | 0.98 | 0.90 | 87.0 | - | - | - | - |
| 5k | 29.6 | 0.98 | 0.87 | 88.3 | 0.26 ± 0.34 | 0.30 ± 0.33 | 0.40 ± 0.33 | 0.49 ± 0.34 | ||
| - | 21.2 | 0.98 | 0.85 | 84.5 | 1.19 ± 0.38 | 0.63 ± 0.34 | 0.41 ± 0.33 | 0.60 ± 0.34 | ||
| MxlTok-PF | 10k | 20.9 | 0.96 | 0.79 | 85.6 | - | - | - | - | |
| 5k | 26.5 | 0.94 | 0.84 | 89.2 | 0.09 ± 0.34 | -0.07 ± 0.33 | 0.22 ± 0.33 | 0.19 ± 0.34 | ||
| - | 19.3 | 0.99 | 0.76 | 78.0 | 0.60 ± 0.35 | 0.60 ± 0.34 | 0.89 ± 0.36 | 0.81 ± 0.36 | ||
| MIDI | REMI+ | 10k | 41.6 | 0.94 | 0.96 | 81.5 | - | - | - | - |
| 5k | 46.9 | 0.94 | 0.96 | 79.4 | -0.70 ± 0.36 | -0.49 ± 0.34 | -0.23 ± 0.33 | -0.50 ± 0.35 | ||
| - | 40.4 | 0.95 | 0.97 | 77.4 | 0.54 ± 0.35 | 0.52 ± 0.34 | 0.20 ± 0.33 | 0.51 ± 0.34 | ||
| ABC | Word-level | 10k | 19.5 | 0.99 | 0.98 | 52.6 | - | - | - | - |
| 5k | 19.8 | 0.98 | 0.96 | 56.0 | -0.46 ± 0.34 | -0.31 ± 0.33 | -0.57 ± 0.34 | -0.69 ± 0.35 | ||
| - | 16.6 | 0.98 | 0.97 | 50.6 | -1.46 ± 0.42 | -1.18 ± 0.39 | -1.32 ± 0.40 | -1.40 ± 0.42 | ||
Table 4. Generative evaluation across formats and tokenisation strategies. Statistical metrics characterise the generated music distribution; JS measures similarity to the target corpus. User study columns report Bradley–Terry preference scores.
5. RESULTS
5.1 Understanding Tasks
Table 3 reports the results of the probing evaluation across all understanding tasks. For composer classification, MxlTok models consistently outperform both baselines, with MIDI representations ranking second. For difficulty estimation, MusicXML models again achieve the best results; interestingly, ABC representations rank second, suggesting that notational richness plays a meaningful role in this task. For both tasks, BPE merges provide a consistent benefit, with the 10k vocabulary performing slightly better than no-BPE and on par with 5k, consistent with [12]. For accompaniment suggestion, MxlTok models again rank highest, though BPE does not improve performance here, suggesting that retrieval benefits from fine-grained token resolution rather than compressed representations. Notably, the 5k BPE vocabulary outperforms the 10k for MusicXML configurations, suggesting that the larger vocabulary is over-parameterised given the size of the training set. Octuple underperforms relative to other tokenisers, contrary to [12, 22], likely because its pooled embeddings do not account for MusicXML's additional expressive tokens.
The ablation confirms that notation matters: when scores are first converted to MIDI before tokenisation, MIDI-derived MxlTok models match the performance of their MIDI counterparts, demonstrating that the advantage of MusicXML lies in the notational content lost upon conversion to MIDI, not in the tokenisation strategy alone.
5.2 Generative Tasks
Table 4 reports the results of the generative evaluation across formats, tokenisers, and BPE vocabulary sizes.
Objective evaluation. MxlTok models outperform both baselines on JS score across BPE configurations, with part-first at 5k BPE achieving the best result (89.2), followed by measure-first (88.3). REMI+ occupies an intermediate position, while on average producing more polyphonic output than its MusicXML and ABC counterparts. ABC word-level tokenisation performs worst across all configurations, suggesting that word-level tokenisation of ABC notation leads to a distribution that diverges substantially from the reference. Notably, the 5k BPE vocabulary consistently outperforms the 10k, likely due to vocabulary over-parameterisation given the size of the training set.
User study. The Bradley–Terry scores corroborate the statistical findings, with ABC tokenisation ranking lowest and MIDI models scoring slightly below their MusicXML counterparts. Among MusicXML configurations, part-first achieves the highest overall preference (0.81) and diversity (0.89) scores, while measure-first leads on fidelity (1.19) and correctness (0.63), suggesting that the two serialisation orders capture complementary generative strengths. Contrary to [12], BPE does not improve perceptual quality here, which we attribute to a methodological difference: whereas [12] apply BPE at the bar level, we apply it over the full sequence, which may break merge boundaries at the prompt and yield suboptimal continuations.
6. CONCLUSIONS
We presented MxlTok, the first general-purpose tokenisation framework for MusicXML, addressing a representational gap that has long limited the applicability of deep learning models to score-based symbolic music. Our empirical study demonstrates that this gap has measurable consequences: MusicXML-based tokenisation matches or outperforms the baselines. On understanding tasks, MxlTok models achieve the best results on composer classification, difficulty estimation, and accompaniment suggestion, indicating that notational expressiveness is beneficial in such tasks. On the generative side, MxlTok models produce output that more closely matches the target distribution and is preferred by listeners in perceptual evaluation. Among serialisation strategies, measure-first consistently outperforms part-first on understanding tasks, while part-first is preferred in generative evaluation, suggesting that the two orders capture complementary inductive biases. Together, these results indicate that score semantics carry information that performance-oriented and plain-text representations fail to capture, and that this gap has measurable consequences for what models learn and generate.
7. ACKNOWLEDGMENTS
This work is supported by the “Cátedra IA y Música” project (TSI-100929-2023-1), funded by the Secretaría de Estado de Digitalización e Inteligencia Artificial, the European Union-Next Generation EU funds and BMAT Music Innovators. And by the “IMPA” project (PID2023-152250OB-I00) funded by MCIU/AEI/10.13039/501100011033/FEDER, UE.
8. ETHICS STATEMENT
This work involves training generative models on symbolic music data, an area that raises legitimate concerns regarding the rights of composers and musicians, and the broader societal implications of automated music generation. All models in this study are trained exclusively on PDMX (v5) [31], a dataset comprising scores released under CC-0 or Public Domain licenses. We note, however, that such licences may not always reflect the status of the underlying composition; a portion of the corpus is therefore likely to consist of arrangements of works still under copyright. We rely on the licence metadata as the best available signal, and flag this as a limitation of currently available large-scale symbolic corpora.
9. REFERENCES
[1] H. Vinet, “The representation levels of music information,” in Computer Music Modeling and Retrieval, U. K. Wiil, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 2004, pp. 193–209.
[2] A. Marsden, “Generative structural representation of tonal music,” Journal of New Music Research, vol. 34, no. 4, pp. 409–428, 2005.
[3] G. Wiggins, E. Miranda, A. Smaill, and M. Harris, “A framework for the evaluation of music representation systems,” Computer Music Journal, vol. 17, no. 3, pp. 31–42, 1993.
[4] C. Seeger, “Prescriptive and descriptive music-writing,” The Musical Quarterly, vol. XLIV, no. 2, pp. 184–195, 04 1958.
[5] J. Rothstein, MIDI: A Comprehensive Introduction, ser. Computer music and digital audio series. A-R Editions, 1992.
[6] G. A. Wiggins and A. Smaill, “Musical knowledge: What can artificial intelligence bring to the musician?” in Readings in Music and Artificial Intelligence, E. R. Miranda, Ed. Harwood Academic publishers, 2000, pp. 29–46.
[7] C. Walshaw, “The ABC music standard 2.1,” abcnotation.com, Tech. Rep., December 2011.
[8] X. Qu, Y. Bai, Y. Ma, Z. Zhou, K. M. Lo, J. Liu, R. Yuan, L. Min, X. Liu, T. Zhang, X. Du, S. Guo, Y. Liang, Y. Li, S. Wu, J. Zhou, T. Zheng, Z. Ma,
F. Han, W. Xue, G. Xia, E. Benetos, X. Yue, C. Lin, X. Tan, W. Huang, J. Fu, and G. Zhang, “Mupt: A generative symbolic music pretrained transformer,” in The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net, 2025.
[9] Y. Wang, S. Wu, J. Hu, X. Du, Y. Peng, Y. Huang, S. Fan, X. Li, F. Yu, and M. Sun, “Notagen: Advancing musicality in symbolic music generation with large language model training paradigms,” in Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 2025, Montreal, Canada, August 16-22, 2025. ijcai.org, 2025, pp. 10207–10215.
[10] J. Mayer, M. Straka, J. Hajič, and P. Pecina, “Practical end-to-end optical music recognition for pianoform music,” in International Conference on Document Analysis and Recognition. Springer, 2024, pp. 55–73.
[11] N. Fradet, J.-P. Briot, F. Chhel, A. El Fallah-Seghrouchni, and N. Gutowski, “MidiTok: A Python Package for MIDI File Tokenization,” in Extended Abstracts for the Late-Breaking Demo Session of the 22nd International Society for Music Information Retrieval Conference, Online, United States, Nov 2021.
[12] N. Fradet, N. Gutowski, F. Chhel, and J.-P. Briot, “Byte pair encoding for symbolic music,” in Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, H. Bouamor, J. Pino, and K. Bali, Eds. Singapore: Association for Computational Linguistics, Dec. 2023.
[13] N. Fradet, N. Gutowski, F. Chhel, and J. Briot, “Impact of time and note duration tokenizations on deep learning symbolic music modeling,” in Proceedings of the 24th International Society for Music Information Retrieval Conference, ISMIR 2023, Milan, Italy, November 5-9, 2023, A. Sarti, F. Antonacci, M. Sandler, P. Bestagini, S. Dixon, B. Liang, G. Richard, and J. Pauwels, Eds., 2023, pp. 89–97.
[14] R. Sennrich, B. Haddow, and A. Birch, “Neural machine translation of rare words with subword units,” in Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), K. Erk and N. A. Smith, Eds. Berlin, Germany: Association for Computational Linguistics, Aug. 2016, pp. 1715–1725.
[15] H. Dong, K. Chen, J. J. McAuley, and T. Berg-Kirkpatrick, “Muspy: A toolkit for symbolic music generation,” in Proceedings of the 21th International Society for Music Information Retrieval Conference, ISMIR 2020, Montreal, Canada, October 11-16, 2020, J. Cumming, J. H. Lee, B. McFee, M. Schedl, J. Devaney, C. McKay, E. Zangerle, and T. de Reuse, Eds., 2020, pp. 101–108.
[16] W.-L. Chiang, L. Zheng, Y. Sheng, A. N. Angelopoulos, T. Li, D. Li, B. Zhu, H. Zhang, M. I. Jordan, J. E. Gonzalez, and I. Stoica, “Chatbot arena: an open platform for evaluating llms by human preference,” in Proceedings of the 41st International Conference on Machine Learning, ser. ICML’24. JMLR.org, 2024.
[17] Y. Kim, W. Chi, A. N. Angelopoulos, W.-L. Chiang, K. Saito, S. Watanabe, Y. Mitsufuji, and C. Donahue, "Music arena: Live evaluation for text-to-music," in The Thirty-ninth Annual Conference on Neural Information Processing Systems Creative AI Track: Humanity, 2025.
[18] S. Oore, I. Simon, S. Dieleman, D. Eck, and K. Simonyan, “This time with feeling: Learning expressive musical performance,” Neural Computing and Applications, vol. 32, p. 955–967, 2018.
[19] Y.-S. Huang and Y.-H. Yang, “Pop music transformer: Beat-based modeling and generation of expressive pop piano compositions,” in Proceedings of the 28th ACM International Conference on Multimedia, ser. MM ’20. New York, NY, USA: Association for Computing Machinery, 2020, p. 1180–1188.
[20] D. von Rütte, L. Biggio, Y. Kilcher, and T. Hofmann, “FIGARO: Controllable music generation using learned and expert features,” in The Eleventh International Conference on Learning Representations, 2023.
[21] W.-Y. Hsiao, J.-Y. Liu, Y.-C. Yeh, and Y.-H. Yang, "Compound word transformer: Learning to compose full-song music over dynamic directed hypergraphs," Proceedings of the AAAI Conference on Artificial Intelligence, vol. 35, no. 1, pp. 178–186, May 2021.
[22] M. Zeng, X. Tan, R. Wang, Z. Ju, T. Qin, and T.-Y. Liu, “MusicBERT: Symbolic music understanding with large-scale pre-training,” in Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Online: Association for Computational Linguistics, Aug. 2021, pp. 791–800.
[23] Y. Ren, J. He, X. Tan, T. Qin, Z. Zhao, and T.-Y. Liu, "Popmag: Pop music accompaniment generation," in Proceedings of the 28th ACM International Conference on Multimedia. Association for Computing Machinery, 2020, p. 1198–1206.
[24] J. Ens and P. Pasquier, “Mmm : Exploring conditional multi-track music generation with the transformer,” 2020. [Online]. Available: https://arxiv.org/abs/2008.06048
[25] L. Qian, H. Gu, D. Li, B. Cao, and Q. Liu, “Pianoroll-event: A novel score representation for symbolic music,” in ICASSP 2026 - 2026 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2026, pp. 1–5.
[26] F. Simonetta, A. Llorens, M. Serrano, E. García-Portugués, and Á. Torrente, “Optimizing feature extraction for symbolic music,” in Proceedings of the 24th International Society for Music Information Retrieval Conference, ISMIR 2023, Milan, Italy, November 5-9, 2023, A. Sarti, F. Antonacci, M. Sandler, P. Bestagini, S. Dixon, B. Liang, G. Richard, and J. Pauwels, Eds., 2023, pp. 802–809.
[27] H. Zhang, E. Karystinaios, S. Dixon, G. Widmer, and C. E. Cancino-Chacón, “Symbolic music representations for classification tasks: A systematic evaluation,” in Proceedings of the 24th International Society for Music Information Retrieval Conference, ISMIR 2023, Milan, Italy, November 5-9, 2023, A. Sarti, F. Antonacci, M. Sandler, P. Bestagini, S. Dixon, B. Liang, G. Richard, and J. Pauwels, Eds., 2023, pp. 848–858.
[28] F. Simonetta, “Style-based composer identification and attribution of symbolic music scores: A systematic survey,” Transactions of the International Society for Music Information Retrieval, Jul 2025.
[29] M. Suzuki, “Piano score rearrangement into multiple difficulty levels via notation-to-notation approach,” in EURASIP Journal on Audio, Speech, and Music Processing, vol. 2023, no. 52, 2023.
[30] M. Good and R. LLC, “MusicXML 4.0 specification,” W3C Community Group, Tech. Rep., June 2021, accessed: 2026. [Online]. Available: https://www.w3.org/2021/06/musicxml40/
[31] P. Long, Z. Novack, T. Berg-Kirkpatrick, and J. McAuley, “PDMX: A large-scale public domain musicxml dataset for symbolic music processing,” in ICASSP 2025 - 2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2025, pp. 1–5.
[32] W. Vree, “xml2abc: MusicXML to ABC notation converter,” 2024. [Online]. Available: https://wim.vree.org/svgParse/xml2abc.html
[33] G. Yang, V. Ebert, N. C. Tamer, B. S. Zheng, L. A. Pozzobon, and N. A. Smith, “LEGATO: Large-scale end-to-end generalizable approach to typeset OMR,” in The Fourteenth International Conference on Learning Representations, 2026.
[34] T. Wolf, L. Debut, V. Sanh, J. Chaumond, C. De-langue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, J. Davison, S. Shleifer, P. von Platen, C. Ma, Y. Jernite, J. Plu, C. Xu, T. L. Scao, S. Gugger, M. Drame, Q. Lhoest, and A. M. Rush, "Huggingface's transformers: State-of-the-art natural language processing," 2020. [Online]. Available: https://arxiv.org/abs/1910.03771
[35] A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever et al., “Language models are unsupervised multitask learners,” OpenAI blog, vol. 1, no. 8, p. 9, 2019.
[36] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, "Bert: Pre-training of deep bidirectional transformers for language understanding," in Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers), 2019, pp. 4171–4186.
[37] J. Zhao, Y. Li, W. Li, and K. Yoshii, “Abc-eval: Benchmarking large language models on symbolic music understanding and instruction following,” arXiv preprint arXiv:2509.23350, 2025.
[38] R. Hachana and B. Rasheed, “Using a joint-embedding predictive architecture for symbolic music understanding,” in AI for Music Workshop, 2025.
[39] P. Alonso-Jiménez, P. Ramoneda, R. O. Araz, A. Poltronieri, and D. Bogdanov, “OMAR-RQ: Open music audio representation model trained with multi-feature masked token prediction,” in ACM Multimedia Conference (ACMMM), Open Source Track, 2025.
[40] C. S. Sapp, “Online database of scores in the Humdrum file format,” in Proceedings of the 6th International Society for Music Information Retrieval Conference (ISMIR), 2005, pp. 664–665.
[41] Muse Group, “MuseScore Studio,” 2025. [Online]. Available: https://musescore.org/en
[42] P. Ramoneda, D. Jeong, V. Eremenko, N. C. Tamer, M. Miron, and X. Serra, “Combining piano performance dimensions for score difficulty classification,” Expert Systems with Applications, vol. 238, p. 121776, 2024.
[43] F. Simonetta, F. Carnovalini, N. Orio, and A. Rodà, “Symbolic music similarity through a graph-based representation,” in Proceedings of the Audio Mostly 2018 on Sound in Immersion and Emotion, ser. AM ’18. New York, NY, USA: Association for Computing Machinery, 2018.
[44] A. Lerch, C. Arthur, N. Bryan-Kinns, C. Ford, Q. Sun, and A. Vinay, “Survey on the evaluation of generative models in music,” ACM Comput. Surv., vol. 58, no. 4, Oct. 2025.
[45] D. Müllensiefen, B. Gingras, J. Musil, and L. Stewart, “The musicality of non-musicians: An index for assessing musical sophistication in the general population,” PLOS ONE, vol. 9, no. 2, p. e89642, 2014.