SAME: A Semantically-Aligned Music Autoencoder

Julian D. Parker, Zach Evans, Cj Carr, Zachary Zukowski, Josiah Taylor, Matthew Rice, Jordi PonsarXiv 2026 · arXiv

TL;DR

Stability AI has introduced SAME (Semantically-Aligned Music autoEncoder), a novel audio autoencoder that achieves a massive 4096× temporal compression ratio for stereo music while preserving high reconstruction quality and downstream generative performance. By replacing traditional convolutional architectures with a transformer-based resampling backbone and introducing semantic regularization, SAME delivers state-of-the-art audio quality alongside significantly faster inference speeds.

What Problem Does This Paper Address?

Modern generative audio models, such as diffusion or flow-matching networks, rely heavily on continuous latent representations produced by Neural Audio Codecs (NACs). However, traditional NACs typically rely on convolutional architectures and struggle to scale up their compression ratios without severely degrading audio quality or making the latent space too chaotic for downstream generation.

Achieving high compression (e.g., 4096×) is highly desirable because it drastically reduces the computational cost of downstream generative modeling. However, doing so while maintaining stereo imaging, transient fidelity, and semantic coherence has remained a major hurdle. SAME aims to break this bottleneck.

Methods

SAME introduces an encoder-bottleneck-decoder architecture built entirely around transformer primitives rather than strided convolutions:

Figure 1: SAME architecture and training losses. Total compression: PS×. Dashed boxes indicate loss components.
  • Patching Pretransform & Transformer Resampling Blocks (TRB): Audio is first split into parameter-free patches (providing 256× downsampling). Then, a novel TRB uses self-attention to interleave input embeddings with learnable output tokens to achieve another 16× downsampling, hitting the target 4096× compression ratio.
  • Attention Strategies: For the large model (SAME-L), sliding-window attention provides linear complexity. For the CPU-optimized model (SAME-S), the authors design a "Chunked + Midpoint Shift" attention mechanism to avoid edge artifacts during independent chunk processing.
Figure 3: Attention masks for a 12-embedding interleaved sequence (4 segments of S+1=3, dashed lines). Left: sliding-window attention. Right: chunked attention with midpoint shift. Teal: standard chunk boundaries (layers 1. . .⌊D/2⌋). Orange: shifted boundaries (layers ⌊D/2⌋+1. . .D).
  • Soft-Normalisation Bottleneck: Instead of a strict Variational Autoencoder (VAE) bottleneck, SAME uses a lightly constrained bottleneck that normalizes latents using an exponential moving average of data statistics, paired with a dual-axis KL-like regularization loss.
  • Advanced Loss Suite: The model is trained using an improved multi-resolution STFT loss featuring a perceptual K-weighting filter, symmetric spectral contrast, and phase-derivative losses operating directly on normalized complex phasors.
  • Auxiliary Semantic Regularization: To keep the highly compressed latent space tractable for generation, the authors introduce three auxiliary losses: a joint flow-matching generative alignment loss, semantic regression losses (targeting chroma and spatial attributes), and a contrastive latent alignment critic.

Datasets

  • Training: The models were trained on the Audiosparx production music dataset (~19,500 hours), consisting of a 66/25/9% mix of music, sound effects, and instrument stems.
  • Evaluation: Objective metrics and MUSHRA listening tests were conducted using 446 track/caption pairs from the Song Describer Dataset (SDD).

Key Insights and Ideas

  • High Compression Demands Semantic Structure: A key "aha" moment in the paper is that a highly compressed bottleneck (4096×) actually regresses downstream generation performance if left unguided. However, by injecting auxiliary semantic losses (like chroma and text contrastive alignment), the latent space becomes highly structured, making it significantly easier for downstream diffusion models to learn musical structure.
  • Phasors Over Phase Unwrapping: Traditional phase-derivative losses suffer from discontinuities at the $2\pi$ boundary. SAME elegantly bypasses this by calculating cosine distances directly on normalized complex phasors, preserving transient fidelity and stereo imaging without numerical instability.
  • Transformers are Faster than Convolutions for Audio: Despite having significantly more parameters than convolutional baselines, SAME's reliance on highly optimized transformer primitives allows it to leverage modern hardware acceleration efficiently, running substantially faster during inference.

Key Results

The authors released two open-weights variants: SAME-L (852M parameters) and SAME-S (a distilled 108M parameter version).

Table 1: Objective reconstruction quality and MUSHRA listening test. Bold: best. Underline: second best. Dt: temporal downsampling. d: latent dimension. RTF: audio duration / encode+decode wall-clock time; higher is faster. MUSHRA: 36 trials, 12 participants after filtering; 0–100 scale, mean ± 95% CI; reference scored 97.6±4.9 and the 64 kbps MP3 anchor 30.9±22.6 (excluded from ranking). †CoDiCodec in 2-step autoregressive mode; excluded from MUSHRA.
  • Subjective Quality: In MUSHRA listening tests, SAME-L achieved the highest score (82.2), outperforming the strong $\epsilon$ar-VAE baseline (77.6) and SAO VAE (73.3).
  • Inference Speedup: Both variants are remarkably fast. SAME-S runs 6–7× faster than convolutional VAE baselines with a Real-Time Factor (RTF) of 2069. SAME-L runs roughly 2× faster than baselines (RTF 561) despite its massive parameter count.
  • Ablation Validation: The ablation study demonstrated that combining the soft-normalization bottleneck with flow-matching alignment and semantic regressors yielded the best generation scores (MuQEval of 3.870 vs 3.194 for the VAE baseline).

Limitations and Future Work

  • CPU Deployment Constraints: The preferred sliding-window attention mechanism is currently unsupported by popular CPU-inference libraries like LiteRT, forcing the authors to implement the chunked-with-midpoint-shift workaround for the smaller SAME-S model.
  • Reconstruction vs. Generation Trade-off: The ablation study noted that adding semantic regressors slightly increased the raw reconstruction error ($\text{MEL}_{\text{log1p}}$) while drastically improving downstream generation quality, highlighting an inherent trade-off between pixel-perfect reconstruction and generative utility.

Summary updated

Abstract

Latent representations are at the heart of the majority of modern generative models. In the audio domain they are typically produced by a neural-audio-codec autoencoder. In this work we introduce SAME (Semantically-Aligned Music autoEncoder), an autoencoder for stereo music and general audio that reaches a 4096$\times$ temporal compression ratio while maintaining reconstruction quality and downstream generative performance. We achieve this by combining a tranformer-based backbone with set of semantic regularisation approaches, phase-aware reconstruction losses and improved discriminator designs. The architecture delivers substantial computational cost benefits, through both its high compression ratio and its reliance on well-optimised transformer primitives. Two variants (a large SAME-L and a CPU-deployable SAME-S) are released in open-weights form.
BibTeX
@misc{parker2026same,
  author = {Julian D. Parker and Zach Evans and CJ Carr and Zachary Zukowski and Josiah Taylor and Matthew Rice and Jordi Pons},
  title = {{SAME: A Semantically-Aligned Music Autoencoder}},
  year = {2026},
  eprint = {2605.18613},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18613},
}

Loading related content...

Figure