MI-MIDI: Mechanistic Interpretability of Text-to-MIDI Generation Models via Probing, Lenses and Steering
Jakub Poćwiardowski, Mateusz Modrzejewski
cs.SD, cs.AI
Submitted: 2026-08-06
Updated: 2026-08-10
Comments: 13 pages
Project page: https://jpocwiar.github.io/MI-MIDI-Demo
License: http://creativecommons.org/licenses/by-nc-sa/4.0/
The gist: Mechanistic interpretability of music generation has concentrated on audio models, leaving symbolic models largely unexplored.
Terminology
Abstract
Mechanistic interpretability of music generation has concentrated on audio models, leaving symbolic models largely unexplored. We analyze two public text-to-MIDI systems of contrasting design: the purpose-built encoder--decoder text2midi and MIDI-LLM, a Llama~3.2~1B model extended with MIDI tokens using linear probing, the logit and tuned lenses, activation patching and difference-in-means steering. Across these methods, we recover musically meaningful structure and show how architecture shapes its formation and control. Pitch, instrumentation, harmony and texture are linearly decodable in both models. text2midi refines predictions gradually across depth, whereas MIDI-LLM works largely in its inherited textual basis before a sharp late rotation into the musical vocabulary; patching identifies a matching late attenuation of prompt-driven instrument transfer. Steering produces bidirectional changes in register and polyphony in both systems, and in tempo/energy in MIDI-LLM. Our two-orientation protocol isolates directional control and shows that all-layer interventions are robust in text2midi but accumulate disruptively in MIDI-LLM. Together, the results provide a practical toolkit for tracing and controlling musical concepts in symbolic generators. Audio examples are available on a demo website.
Sources
- Understanding intermediate layers using linear classifier probes
- Eliciting Latent Predictions from Transformers with the Tuned Lens
- Steering Language Models With Activation Engineering
- Activation Patching for Interpretable Steering in Music Generation
- MIDI-LLM: Improving Text-to-MIDI Music Generation via Adapting Large Language Models
- Jukebox: A Generative Model for Music
- MusicLM: Generating Music From Text
- Simple and Controllable Music Generation
- MidiCaps: A large-scale MIDI dataset with text captions
- Instruct-MusicGen: Unlocking Text-to-Music Editing for Music Language Models via Instruction Tuning
- Do Music Generation Models Encode Music Theory?
- Exploring XAI for the Arts: Explaining Latent Space in Generative Music
- Learning Interpretable Representation for Controllable Polyphonic Music Generation
- Learning to Traverse Latent Spaces for Musical Score Inpainting
- Latent Space Disentanglement via Activation Steering for Interpretable Attribute Control in Symbolic Music Generation
- Anticipatory Music Transformer
- Toy Models of Superposition
Related papers
- Few-Shot Open-Set Audio Classification via Transductive Prototype Refinement and Class Logit Enhancement
- Spectral Masking and Interpolation Attack (SMIA): A Black-box Adversarial Attack against Voice Authentication and Anti-Spoofing Systems
- Remix the Timbre: Diffusion-Based Style Transfer Across Polyphonic Stems
- Harmonic Representations in Symbolic Music Transformers are Localized and Controllable
- AVMeme Exam: A Multimodal Multilingual Multicultural Benchmark for LLMs' Contextual and Cultural Knowledge and Thinking
- SoundWeaver: Compositional Warm-Starting for Text-to-Audio Diffusion Serving