Why GPT-Style Models Do Not Directly Transfer to Symbolic Music: Compression in the Wrong Coordinate System

Why GPT-Style Models Do Not Directly Transfer to Symbolic Music: Compression in the Wrong Coordinate System

In This Article

    Why GPT-Style Models Do Not Directly Transfer to Symbolic Music: Compression in the Wrong Coordinate System

    Introduction

    The allure is obvious. Feed a transformer a bunch of MIDI files, let it learn the "language" of music, and watch it generate compositions that sound like Bach, Chopin, or whatever else you trained it on. After all, GPT-style models conquered text—why not notes?

    The logic seems sound on paper. Music is sequential, just like language. Notes follow one another in time. Chords resolve to other chords. Phrases build into sections. If a model can predict the next word in a sentence, surely it can predict the next note in a melody.

    This reasoning has driven countless attempts to fine-tune GPT-2, GPT-3, and their open-source cousins on symbolic music datasets. The results are consistently underwhelming: outputs that sound plausible for a few seconds before collapsing into harmonic chaos, losing key, form, and thematic coherence.

    The problem isn't that transformers are incapable of modeling music—it's that GPT-style models are built for a specific kind of sequential structure, and symbolic music lives in a different coordinate system entirely. Text is a linear, one-dimensional stream. Music is multi-dimensional, with simultaneous events, hierarchical dependencies, and expressive timing that resists naive tokenization.

    This article compares two approaches head-to-head: the direct transfer of GPT-style models to symbolic music versus music-specific adaptations that account for the true structure of musical data. The verdict, as you might expect, is not kind to naive transfer.

    Key Takeaway: GPT-style models fail at symbolic music not because they're weak models, but because they're optimized for a linear coordinate system that music doesn't inhabit.


    Understanding the Coordinate Systems

    Text as a Linear, One-Dimensional Sequence

    Language, at the token level, is genuinely sequential. When you read a sentence, you process one token at a time, left to right. There are dependencies that reach backward and forward, but they operate along a single axis. The next-token prediction task—"given all previous tokens, what comes next?"—maps naturally onto how language is consumed and produced.

    This linearity is why autoregressive models work so well on text. The training objective (predict the next token) aligns with the structure of the data (a sequence of tokens). The model learns statistical regularities: syntactic patterns, semantic associations, discourse structures. It's a form of compression—the model learns to assign high probability to plausible continuations, effectively compressing the information in the training corpus into its weights.

    Symbolic Music as Multi-Dimensional

    Symbolic music—MIDI, MusicXML, ABC notation—is not a linear sequence in the same way. Consider what happens in a single moment of a piano piece: multiple notes sounding simultaneously (polyphony), each with its own pitch, velocity, and duration. A chord is not a single token; it's a vertical slice of simultaneous events.

    Music has at least four independent dimensions at the note level:

    • Time: when a note starts and how long it lasts
    • Pitch: which note(s) are sounding
    • Velocity: how loud each note is
    • Timbre: which instrument(s) are playing

    On top of this, music has hierarchical structure: notes form motifs, motifs form phrases, phrases form sections, and sections form entire pieces. This hierarchy operates at multiple timescales simultaneously. A piece in sonata form has a global structure that spans minutes, while individual grace notes operate at millisecond timescales.

    The Concept of 'Coordinate System' in Representation Learning

    When we say a model operates in a "coordinate system," we mean the implicit assumptions it makes about the structure of its input. GPT-style models assume:

    1. Input can be represented as a linear sequence of discrete tokens
    2. Meaning emerges from left-to-right context
    3. Local dependencies are more important than global ones (due to attention windows or context limits)

    Music violates all three assumptions. It's not naturally linear (polyphony), meaning doesn't emerge purely from left-to-right context (harmonic function depends on vertical relationships), and global structure matters enormously (a sonata's development section only makes sense in the context of the exposition).

    Why the Mismatch Matters

    When you force music into a linear token stream, you're making a representational choice that discards information. The question is how much information is lost and whether the model can recover it. As we'll see, the loss is significant enough to cripple generation quality.


    Head-to-Head: GPT-Style Models vs. Music-Specific Transformers

    Let's compare the two approaches across the dimensions that matter most.

    Architecture: Standard Autoregressive Transformer vs. Relative Attention (Music Transformer)

    GPT-style: Standard causal self-attention with absolute positional encodings. Each token attends to all previous tokens, with position encoded as an absolute index. This works fine for text, where position within a document is a meaningful signal.

    Music-specific: The Music Transformer (Huang et al., 2018) introduced relative attention, where the model attends based on the distance between tokens rather than their absolute positions. This matters enormously for music because musical patterns are transposable—a melody shifted up by a third is still the same melody. Relative attention makes this shift-invariance explicit.

    Verdict: Absolute positional encodings are actively harmful for music. A model that knows "this note is at position 1,000" has no idea what that means musically. Relative attention lets the model learn "this note is a fifth above the previous one," which is musically meaningful.

    Tokenization: Linear Token Sequences vs. Event-Based Encoding with Timing Offsets

    GPT-style: Tokenize MIDI into a flat sequence—typically note-on, note-off, and time-shift tokens, all in a single stream. A chord becomes several note-on tokens in sequence, which the model must learn to group temporally.

    Music-specific: Event-based encodings that explicitly represent timing information. The MAESTRO dataset uses a vocabulary that includes note-on/note-off events with velocity classes, plus time-shift tokens that specify how much time has elapsed. This preserves the timing information that a naive tokenization loses.

    Verdict: Naive tokenization creates two problems. First, sequence lengths explode: a single chord might require 5–10 tokens. Second, the model must infer timing relationships that should be explicit. Event-based encoding with timing offsets is strictly better for music.

    Handling Polyphony: Sequential Prediction vs. Simultaneous Event Modeling

    GPT-style: Processes one token at a time. When a chord occurs, the notes are serialized into a sequence. The model must learn that these tokens are "simultaneous" from their temporal proximity, which is a fragile inference.

    Music-specific: Some approaches (like MuseNet) use multiple parallel token streams, one per instrument or voice. Others (like the Music Transformer) rely on careful tokenization that groups simultaneous events. Either way, the architecture acknowledges that polyphony is not a sequence.

    Verdict: GPT-style models treat polyphony as a sequence problem, which is like trying to read a paragraph by processing it one letter at a time in a random order. It can be done, but it's inefficient and lossy.

    Long-Term Structure: Left-to-Right Prediction vs. Hierarchical/Multi-Scale Approaches

    GPT-style: Generates left-to-right, one token at a time. The model has a finite context window (typically 1,024 to 2,048 tokens). For text, this is often sufficient because local context carries most of the information. For music, it's a disaster: a piece might be 10,000+ tokens long, and the global structure (key, form, thematic development) is spread across the entire span.

    Music-specific: Approaches like hierarchical models generate at multiple levels—first a high-level structure (section boundaries, chord progressions), then fill in details. Others use sparse attention patterns to extend context windows (MuseNet uses a sparse transformer to handle longer sequences).

    Verdict: Left-to-right prediction with finite context is fundamentally at odds with musical form. A model that can't "see" the whole piece can't maintain key, develop themes, or execute a recapitulation.

    Data Requirements: Massive Text Corpora vs. Limited MIDI Datasets

    GPT-style: GPT-3 was trained on hundreds of billions of tokens. The scale of text data available on the internet is staggering. Symbolic music datasets are tiny by comparison. The largest (Lakh MIDI) has roughly one million MIDI files, many of which are low-quality or duplicates.

    Music-specific: Models like Music Transformer and MuseNet are trained on curated datasets (MAESTRO, Lakh MIDI with filtering). They still need substantial data, but their architectures are more sample-efficient because they don't waste capacity learning to overcome representational mismatches.

    Verdict: You can't train a 175-billion-parameter model on a million MIDI files and expect it to learn music. The data simply isn't there. Music-specific models are designed to work with the data that exists.

    Performance: Local Coherence vs. Global Coherence in Generated Music

    GPT-style: Produces locally plausible music—a few measures that sound "right" before drifting into incoherence. Human evaluators in a hypothetical study rated 30% of GPT-style outputs as locally coherent but only 5% as globally coherent. The model learns note-to-note statistics but never grasps larger structure.

    Music-specific: Music Transformer generates pieces with better repetition, development, and structural coherence. MuseNet can produce multi-instrumental pieces that maintain a consistent style, though it still struggles with long-form coherence.

    Verdict: The difference is stark. GPT-style models generate music that sounds like a language model imitating music—fluent at the micro level, nonsensical at the macro level. Music-specific models, while imperfect, generate actual musical structures.

    Key Takeaway: The gap between GPT-style and music-specific models isn't marginal—it's the difference between generating plausible noise and generating music.


    Pros and Cons of Direct Transfer

    Pros: Why People Keep Trying

    Leveraging pre-trained language models: Fine-tuning GPT-2 on MIDI is cheap and easy. You get a working model with minimal effort, and it will produce something that resembles music.

    Ease of implementation: The infrastructure for training and deploying GPT-style models is mature. HuggingFace, OpenAI, and others provide tools that work out of the box. No need to implement relative attention or custom tokenizers.

    Existing infrastructure: If you already have a pipeline for text generation, adapting it to MIDI is a matter of changing the tokenizer and dataset. This is attractive for teams that want to add music generation without building from scratch.

    Cons: The Real Costs

    Loss of musical structure: The linear tokenization discards the multi-dimensional structure of music. The model never sees chords as vertical events, only as horizontal sequences.

    Inefficient sequence lengths: A piano piece from MAESTRO averages over 1,000 tokens. A full orchestral piece could easily exceed 10,000. Training on these sequences is computationally expensive, and the model's context window fills up with low-level details rather than high-level structure.

    High entropy: Music has higher per-token entropy than text. Pitch and duration are less predictable than words. The next-token prediction task becomes much harder, and the model's uncertainty translates to generation that wanders.

    Lack of global coherence: This is the killer. A GPT-style model generates notes that obey local statistics but ignore global structure. The result is music that sounds like a dream—fragments of familiar things, but no narrative arc.

    Case Study: GPT-2 Fine-Tuned on MIDI

    I've seen this experiment run multiple times. The recipe: take a small corpus of MIDI files (piano pieces, say), tokenize them into note-on/note-off/time-shift tokens, fine-tune GPT-2 for a few epochs, and generate.

    The output is always the same: surprisingly plausible short phrases. The model learns that certain note transitions are common, that certain intervals occur frequently. It captures the style at the micro level. But let the generation run for more than a few bars, and the music falls apart. The key drifts. The harmonic rhythm becomes erratic. Themes appear and vanish without development. The piece has no sense of direction.

    This is exactly what you'd expect from a model that compresses local statistics but has no representation of global structure.

    Case Study: Music Transformer

    The Music Transformer is the proof that the architecture, not the data, is the limiting factor. By switching to relative attention and using a well-designed event-based tokenization, it generates pieces that maintain structure over much longer timescales. It can produce music with recognizable repetition, development, and return—the basic elements of musical form.

    The catch: it required architectural modifications beyond standard GPT. Relative attention, careful tokenization, and training on high-quality datasets were all necessary. You can't just swap in a GPT model and get these results.


    Why the Compression Principle Fails for Music

    Next-Token Prediction as Compression in Text

    The "compression principle" is the idea that predicting the next token forces the model to learn the underlying structure of the data. For text, this works because language has strong sequential dependencies. Given enough context, the next word is often predictable. The model learns to compress the information in the corpus into a set of statistical regularities that approximate the rules of language.

    Higher Entropy in Music

    Music has higher entropy per token than text. Consider pitch: in English text, the next character is constrained by spelling, grammar, and semantics. In music, the next note could be any of 88 pitches (on piano), with any duration, any velocity. The combinatorial space is enormous, and the constraints are less rigid than in language.

    This means the next-token prediction task is much harder for music. The model's uncertainty is higher, and its predictions are less confident. When generating, this uncertainty translates to meandering, incoherent output.

    The Problem of Simultaneous Events and Hierarchical Dependencies

    Text has no true simultaneity. Even when ideas are parallel, they're expressed sequentially. Music has genuine simultaneity: chords, counterpoint, multiple instruments. When you linearize these, you destroy the vertical relationships that define harmony and polyphony.

    Similarly, hierarchical dependencies in music operate at multiple timescales. A single note's significance depends on its role in a phrase, which depends on its role in a section, which depends on its role in the whole piece. Autoregressive models have no mechanism for representing this hierarchy—they process left-to-right, one token at a time, with no explicit notion of hierarchy.

    Information Loss in Linear Tokenization of Music

    When you tokenize a chord as a sequence of note-on events, you lose the information that these notes are simultaneous. When you tokenize a phrase as a sequence of notes, you lose the information about its rhythmic shape. When you tokenize a piece as a sequence of tokens, you lose the information about its overall form.

    Yes, a sufficiently powerful model could in principle recover this information from the token stream. But in practice, it doesn't. The inductive bias of the architecture pushes toward local pattern matching, not global structure discovery.

    Key Takeaway: The compression principle works for text because language is compressible along the sequential axis. Music is compressible along multiple axes simultaneously, and a linear model can only capture one of them.


    Adaptations and Alternatives

    Music Transformer: Relative Attention for Timing and Structure

    The Music Transformer's key innovation is relative attention, which encodes the distance between tokens rather than their absolute positions. This is crucial for music because musical patterns are transposable. A melody shifted by a fifth is the same melody, but absolute positional encodings would treat it as entirely different. Relative attention makes the model invariant to transposition, which is a fundamental property of music.

    MuseNet: Sparse Attention and Diverse Training Data

    MuseNet uses a sparse attention pattern that allows it to handle longer sequences than standard transformers. It was also trained on a diverse dataset that includes many genres and styles. The result is a model that can generate multi-instrumental music with impressive stylistic variety. However, it still struggles with long-form coherence—human listeners often note that pieces drift between ideas without a clear overarching form.

    Hierarchical Models and Multi-Scale Approaches

    Instead of generating music token-by-token, hierarchical models generate at multiple levels of abstraction. First, the model generates a high-level structure (section boundaries, chord progressions, thematic material). Then, it fills in the details (individual notes) conditioned on that structure. This approach explicitly models the hierarchical nature of music and has shown promise for generating longer, more coherent pieces.

    Diffusion Models and VAEs as Alternatives

    Diffusion models have been applied to symbolic music with some success. They generate music by iteratively denoising a random signal, which allows for more global coherence than autoregressive generation. Variational autoencoders (VAEs) have also been used, particularly for generating music with specific attributes (e.g., style, mood, tempo). These approaches are not subject to the same left-to-right constraint as autoregressive models and can capture more of the multi-dimensional structure of music.

    The Role of Data Augmentation and Better Tokenization

    Even with the right architecture, data quality matters. The MAESTRO dataset, which contains high-quality piano performances with precise timing, has been crucial for training music-specific models. Data augmentation—transposing pieces, adding variations, synthesizing new performances—can help models generalize better. And better tokenization schemes, such as encoding chords as single tokens or using hierarchical token streams, can reduce sequence length and improve model performance.


    Verdict

    Summary of Key Findings

    The evidence is clear: GPT-style models do not transfer directly to symbolic music because they operate in the wrong coordinate system. Text is linear; music is multi-dimensional. GPT-style models are optimized for the former, not the latter.

    The comparison breaks down as follows:

    • Architecture: Standard autoregressive attention with absolute positions is inferior to relative attention for music.
    • Tokenization: Linear token sequences lose timing and polyphonic information that event-based encoding preserves.
    • Polyphony: Sequential prediction handles simultaneous events poorly.
    • Long-term structure: Left-to-right prediction with finite context cannot capture global musical form.
    • Data: Text corpora are massive; symbolic music datasets are tiny.
    • Performance: GPT-style models achieve local coherence but fail at global coherence.

    When GPT-Style Models Might Be Useful

    There are scenarios where GPT-style models are adequate for music generation:

    • Short motifs: For generating brief musical ideas (2–4 bars), GPT-style models can produce plausible results. The local statistics they learn are sufficient for short spans.
    • Background music: For ambient or background music where global structure is less important, GPT-style models can generate acceptable output.
    • Rapid prototyping: When you need a quick, rough musical idea and don't care about coherence, GPT-style models are a fast and easy option.

    When Music-Specific Models Are Necessary

    For any application that requires actual musical structure, music-specific models are necessary:

    • Long-form compositions: Anything longer than a phrase or two requires global coherence.
    • Thematic development: Music that develops motifs and themes requires the model to track and transform musical material over time.
    • Harmonic consistency: Maintaining a consistent key and harmonic language requires understanding the vertical structure of chords, which linear tokenization obscures.
    • Multi-instrumental composition: Coordinating multiple instruments requires modeling simultaneous events, which autoregressive models handle poorly.

    Recommendations for Practitioners and Researchers

    For practitioners: Don't fine-tune GPT-2 on MIDI and expect good results. Use a music-specific model like Music Transformer or MuseNet, or invest in a hierarchical approach. If you must use a GPT-style model, limit it to short-form generation and be prepared to post-process the output.

    For researchers: The most promising directions are hierarchical models, diffusion models, and better tokenization schemes. The key challenge is representing the multi-dimensional structure of music in a way that models can learn. Representation is the bottleneck, not architecture.


    Conclusion

    Reiteration of the 'Wrong Coordinate System' Thesis

    The "wrong coordinate system" thesis is simple: GPT-style models are built for linear sequences, and symbolic music is not a linear sequence. When you force music into a linear token stream, you lose the vertical relationships (harmony, polyphony), the expressive timing, and the hierarchical structure that make music musical.

    This isn't a failure of transformers—it's a failure of representation. The Music Transformer, MuseNet, and other music-specific models show that transformers can generate compelling music when the architecture is adapted to the coordinate system of music.

    Future Directions for AI Music Generation

    The future of AI music generation lies in better representations and architectures that respect the structure of music. Hierarchical models that generate at multiple levels of abstraction are promising. Diffusion models that generate music holistically rather than token-by-token are another direction. And better tokenization schemes that preserve timing and polyphonic information will benefit all approaches.

    Final Thoughts on the Importance of Representation in AI

    The lesson extends beyond music. The success of deep learning depends on matching the model's inductive biases to the structure of the data. Language models work on text because text is sequential. Music models need to work on music because music is multi-dimensional. The coordinate system matters—get it wrong, and no amount of data or compute will save you.

    The next time someone proposes to "just fine-tune GPT on music," remember: you can't compress a symphony into a sentence.

    Key Takeaway: Representation is destiny. For symbolic music, the coordinate system must match the structure of the data, or the model will fail regardless of its size or training data.


    FAQ

    Why can't GPT models directly generate good music?

    GPT models are trained on text, which is linear and one-dimensional. Music is multi-dimensional, with simultaneous events (polyphony), hierarchical structure, and expressive timing. When you force music into a linear token sequence, you lose this structure, and the model can't recover it.

    What is the 'wrong coordinate system' in the context of music and GPT?

    GPT models assume input is a linear sequence where meaning emerges from left-to-right context. Music lives in a multi-dimensional space with time, pitch, timbre, and dynamics as independent axes. Forcing music into a linear coordinate system discards crucial information and misaligns the model's inductive biases with the data's structure.

    Can GPT models be adapted for music with modifications?

    Yes, but the adaptations are significant. The Music Transformer uses relative attention instead of absolute positional encodings. MuseNet uses sparse attention for longer sequences. Both require careful tokenization that preserves timing and polyphonic information. These are not "minor tweaks" but substantial architectural changes.

    What are the main challenges in using GPT for symbolic music?

    The main challenges are: (1) sequence length explosion from linear tokenization, (2) high entropy per token making prediction difficult, (3) loss of polyphonic structure in linear encoding, (4) inability to capture global structure with finite context windows, and (5) limited data compared to text corpora.

    Is there any successful music generation model based on GPT?

    Music Transformer and MuseNet are both transformer-based and achieve better results than naive GPT transfer. However, both required architectural modifications beyond standard GPT. They demonstrate that transformers can work for music when properly adapted, not that GPT-style models transfer directly.

    What is the difference between text and music in terms of information density?

    Text has relatively low entropy per token—given context, the next word is often predictable. Music has higher entropy: more possible pitches, durations, and velocities, with less rigid constraints. This makes next-token prediction harder for music and leads to less confident, more meandering generation.

    How does tokenization affect music generation?

    Tokenization is crucial. Naive tokenization of MIDI into a flat sequence loses timing information, obscures polyphony, and explodes sequence length. Better tokenization schemes preserve timing offsets, group simultaneous events, and reduce sequence length. The choice of tokenization can be more important than the choice of architecture.

    Are there alternative approaches to music generation that work better?

    Hierarchical models that generate structure first, then details, are promising. Diffusion models generate music holistically rather than token-by-token. VAEs can generate music with specific attributes. Each approach has trade-offs, but all avoid the fundamental mismatch of linear autoregressive generation for music.

    What is the role of data in training music models?

    Data quality and quantity matter enormously. GPT-3 was trained on hundreds of billions of tokens; the largest MIDI datasets contain about a million files. Music-specific models are more sample-efficient due to better representations, but they still require high-quality, well-curated data. Data augmentation can help but doesn't solve the fundamental data scarcity problem.

    Can GPT models generate music that sounds good to humans?

    For short fragments, yes—GPT-style models can produce locally plausible music that sounds "right" for a few bars. But for longer pieces, human listeners consistently notice the lack of global coherence: drifting keys, undeveloped themes, and missing structural logic. The music sounds like an imitation of style without the substance of musical thought.


    Explore our other articles on AI music generation and transformer architectures to deepen your understanding of this evolving field.

    D
    Dr. Soren Vale
    AI Research Director
    Former research scientist at DeepMind. 15 years in machine learning. Believes the best AI writing explains concepts so clearly that anyone can understand them. Based in London.

    📬 Get new articles by email

    No spam. Just new articles from AI Insights.