Dual-Contrastive Sparse Autoencoders Reveal Features of Musical Interpretation

Jan Chen, Manuel Cherep, Patricia Maes, Nikhil SinghNeurIPS 2026

TL;DR

When Jimi Hendrix covers Bob Dylan, or Glenn Gould re-records Bach, our ears effortlessly separate the underlying song from the performance. Generative AI models implicitly learn both, but mash them together inside their neural weights. This paper introduces a Dual-Contrastive Sparse Autoencoder (DC-SAE) that cleanly splits a music model's internal brainwaves into "what the piece is" versus "how it is being played"—giving us an unprecedented microscope for musicology and a set of interpretable dials to steer AI music generation.

What Problem Does This Paper Address?

Philosophers and musicologists have long debated where a musical "work" ends and its "interpretation" begins. Play a Bach fugue on a choir of kazoos, and it’s still Bach—just a very weird performance. Change too many notes, though, and it becomes a new piece entirely.

Can we study this boundary empirically at scale? Generative music transformers (like MusicGen and Magenta RealTime 2) are trained on thousands of hours of raw audio, meaning they must implicitly learn both stable musical composition and expressive quirks. Recently, researchers have used Sparse Autoencoders (SAEs)—interpretability tools that unpack dense, tangled neural activations into readable, human-friendly concepts—to peer inside these models. However, standard SAEs dump everything into one flat dictionary, tangling work identity (melody, chord structure) with performance style (phrasing, distortion, room acoustics).

Methods

To untangle these concepts without needing painstakingly aligned sheet music, the authors built the Dual-Contrastive Sparse Autoencoder (DC-SAE) and attached it to the frozen middle-to-late layers of MusicGen-Large and Magenta RealTime 2.

Figure 1: DC-SAE factorizes residual stream activations into two sparse codes. Code zi (“Identity”) encodes work identity, and code zj (“Expression”) encodes performance variation. We reconstruct activations from both codes jointly with a shared linear decoder. Pivots, which are windows of the anchor’s work from other recordings, act as positives for zi and as hard negatives for zj. We train the decoder with reconstruction loss Lrec and swap loss Lswap. In Lswap, we decode from ¯zi, the mean of zi over windows of the same work, in place of zi.

Instead of one encoder, DC-SAE uses two parallel TopK sparse encoders—an Identity branch ($z_i$) and a Variation/Expression branch ($z_j$)—that feed into a single shared linear decoder to reconstruct the model's original activations. What makes them specialize is a clever contrastive training game using "pivots" (passages of the same work from different recordings, roughly aligned in time using MERT audio embeddings):

  • Pulling Identity Together: For $z_i$, pivots act as positive matches against random other songs, forcing $z_i$ to capture only what remains constant across different recordings of a piece.
  • Pushing Variation Apart: For $z_j$, those exact same pivots act as hard negatives. Meanwhile, the positive match is the original audio clip run through acoustic augmentations (like simulated mic changes or EQ shifts). Because both positive and negative clips are the same song, $z_j$ can only tell them apart by isolating performance-specific nuances.
  • The Swap Loss: During training, the model occasionally swaps a clip's $z_i$ code with the average $z_i$ across all recordings of that work. To reconstruct the audio accurately, $z_j$ is forced to carry all the unique, moment-to-moment expressive weight.

Datasets

The authors curated three corpora from public YouTube audio using only coarse, work-level metadata (performer labels were held out strictly for testing):

  • Classical (101.2 hours): Recordings of 100 popular classical works sourced via Wikidata and MusicBrainz.
  • Jazz (75.6 hours): Recordings of the 100 most-played jazz standards from the iReal Pro forum.
  • Pop Covers (58.7 hours): 100 cover song families sampled from the SHS100K dataset.

Key Insights and Ideas

  • AI Discovers Philosophy of Music: Philosopher Stephen Davies famously categorized musical works as "thick" (the score dictates almost everything, like Classical) or "thin" (the artist has massive leeway, like Jazz or Pop). Remarkably, DC-SAE's variation branch ($z_j$) reflects this exact divide! In Classical music, $z_j$ surfaces subtle microstructures like "exceptionally soft attacks" or pedaling. In Jazz and Pop, $z_j$ captures bold macro-choices like "bright upper-register trumpet solos" or "heavily distorted electric guitar power chords."
  • Emergent Performer Fingerprints: Even though DC-SAE is never told who is playing during training, linear probes trained on $z_j$ can predict the conductor, soloist, or bandleader on completely unseen pieces—capturing a mix of musicianship, typical instrumentation, and studio production.
  • Clean Geometric Separation: Visualizing the learned decoder directions shows that in Jazz and Pop, identity and variation features naturally segregate into distinct geometric neighborhoods, whereas Classical features mingle more closely, mirroring how tightly bound classical performance is to the score.
UMAP of Identity vs. Variation

Key Results

  • Pinpointing the Song: On unseen classical recordings of known works, probing MusicGen's $z_i$ hits 89.9% accuracy (chance is 2%), crushing audio embedding baselines like MERT (72.7%) and a standard vanilla SAE (73.5%). Work-identity accuracy is highest in Classical (89.9%) and lowest in Jazz (17.4%), matching how radically jazz musicians improvise away from the sheet music.
  • Spotting the Recording & Performer: On same-recording verification, $z_j$ outperforms all baselines across every genre, and its lead widens (by up to +0.075 accuracy) when tested under unseen audio degradations like codec artifacts or hum. On unseen works, $z_j$ predicts the performer with 26.9%–34.1% accuracy (chance ~2%), cleanly beating vanilla SAEs (18.5%–27.3%).
  • Steering Generation: Injecting a single $z_j$ feature direction back into the frozen transformer acts like an expressive control knob (e.g., dialing in "harpsichord timbre" or "swing feel"). In a blind listening study ($N=10$, 240 trials), listeners rated steered tracks +0.69 points higher ($p = .0039$ overall; +1.00 on MusicGen) on a 5-point scale for matching the intended description compared to distractors.

Limitations and Future Work

The authors emphasize that their findings reveal how two specific transformer layers organize Western art and popular music—not necessarily how human brains do it, nor where musicology should draw philosophical boundaries. Additionally, transferring the pipeline to Magenta RealTime 2 worked well for work identity, but variation features transferred only partially (sometimes trailing raw, uninterpretable activations), suggesting hyperparameter schedules need per-backbone tuning. Future work could extend this factorization to non-Western musical traditions, plug music-theory probes into $z_i$, and adapt the technique to diffusion-based audio generators.

Summary updated

Abstract

For decades, philosophers and musicologists have debated which features of a performance are constitutive of the work and which express how it is being interpreted. Computational evidence has been hard to assemble: audio embedding models conflate work identity with performance style, and existing interpretability tools for music generators recover flat dictionaries that mix the two. We address this gap with the dual-contrastive sparse autoencoder (DC-SAE), a two-branch sparse autoencoder that uses coarse work-level metadata to factor a frozen music transformer's residual stream into work-identity and performance-variation subspaces. Across jazz-standard, classical-work, and pop-cover corpora of Western art and popular music, and two generative music transformers (MusicGen and Magenta RealTime 2), the resulting decomposition is supported by probes and a feature gallery that surfaces musically interpretable concepts. Without performer supervision, the variation branch predicts performer labels, which on these corpora entangle musicianship with instrumentation, venue, and production. Steering generation along single variation-branch features shifts outputs toward the features' descriptions, which listeners rate as a better fit than alternatives. Together, these results indicate that generative music transformers contain a model-internal representation of musical interpretation that can be recovered, interpreted, and steered.
BibTeX
@inproceedings{chen2026dual,
  author = {Jan Chen and Manuel Cherep and Patricia Maes and Nikhil Singh},
  title = {{Dual-Contrastive Sparse Autoencoders Reveal Features of Musical Interpretation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=L95qutWlv4},
}
Figure