MI-MIDI: Mechanistic Interpretability of Text-to-MIDI Generation Models via Probing, Lenses and Steering
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.
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
This paper makes a significant contribution to the field of mechanistic interpretability by extending its methods to symbolic music generation, offering a detailed comparative analysis of two distinct architectures and providing a robust protocol for causal intervention and control.
Methodology
The paper employs a rigorous mechanistic interpretability toolkit, including linear probing, logit/tuned lenses, activation patching, and difference-in-means steering. The methodology is sound and well-executed, particularly the novel "bidirectional evaluation protocol" for steering, which effectively decomposes directional control from symmetric drift. The comparative analysis between a purpose-built encoder-decoder (text2midi) and a repurposed LLM (MIDI-LLM) provides valuable insights into how architecture influences the formation of symbolic representations. The use of the tuned lens to disentangle basis changes from genuine prediction formation in the LLM is a strong technical contribution.
Results & evaluation
The experimental setup is comprehensive, covering two distinct models and multiple interpretability techniques. The results are clearly presented and support the claims of architectural differences in prediction formation (gradual vs. late binding). The steering experiments demonstrate robust control over register and polyphony, with quantifiable metrics for tempo/energy in the LLM. The controlled probing on SynTheory adds necessary isolation to the ecological validity of full-generation probing. The statistical treatment, including confidence intervals and seed-clustered standard errors, is appropriate.
Reproducibility
The paper provides detailed descriptions of the models, datasets (MIDICaps, SynTheory), and experimental protocols. The authors state that code will be released, and audio examples are available online. The specific hyperparameters for probing and steering are reported. However, the exact codebase for the "tuned lens" implementation and the specific steering vector computation details could benefit from more explicit pseudocode or references to specific libraries to ensure perfect reproducibility.
Limitations
The study is limited to two models, which restricts the generalizability of the architectural conclusions. The metrics for tempo and polyphony are proxies (note density, mean pitch) and may not perfectly capture the musical concepts, especially in multi-track MIDI where interactions are complex. The probing labels for full generations are heuristic estimates, introducing potential noise. The steering directions are derived from text contrasts that vary lexically and musically, making it difficult to isolate the pure musical concept vector.
Broader impact
This work bridges the gap between mechanistic interpretability in language models and symbolic music generation. It provides a practical toolkit for researchers and developers to trace and control musical concepts in generative models, potentially leading to more controllable and interpretable music AI systems. The findings on architecture-dependent intervention strategies are directly applicable to the design of future symbolic music models. This paper makes a significant contribution to the field of mechanistic interpretability by extending its methods to symbolic music generation, offering a detailed comparative analysis of two distinct architectures and providing a robust protocol for causal intervention and control.
Author of this paper? Send a correction.