Dual-Contrastive Sparse Autoencoders Reveal Features of Musical Interpretation

NeurIPS 2026

* Equal contribution

Paper Code Feature Explorer MusicGen Weights MRT2 Weights

$z_i$ work identity

$z_j$ performance variation

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.

Examples

0.0 s

Method

DC-SAE factorizes residual stream activations into two sparse codes. Code $z_i$ (“Identity”) encodes work identity, and code $z_j$ (“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 $z_i$ and as hard negatives for $z_j$. We train the decoder with reconstruction loss $\mathcal{L}_{\text{rec}}$ and swap loss $\mathcal{L}_{\text{swap}}$. In $\mathcal{L}_{\text{swap}}$, we decode from $\bar{z}_i$, the mean of $z_i$ over windows of the same work, in place of $z_i$.

Results

Feature Explorer

MusicGen-large, layer 24

Classical720 labelled $z_j$ features Jazz650 labelled $z_j$ features Pop Covers622 labelled $z_j$ features

Magenta RealTime 2, layer 15

Classical588 labelled $z_j$ features Jazz579 labelled $z_j$ features Pop Covers531 labelled $z_j$ features