TL;DR
Neural audio codecs are excellent at reconstructing sound but terrible for language modeling because they pack acoustic noise into discrete tokens. LLM-Codec fixes this by training the codec with language-model-facing objectives (future token prediction and semantic alignment) via a differentiable bridge. This drastically reduces token perplexity by 35× and boosts speech coherence without sacrificing audio reconstruction quality.
What Problem Does This Paper Address?
Spoken Language Models (SLMs) process speech by turning audio waveforms into discrete tokens using neural audio codecs (like EnCodec or SoundStream), then modeling them autoregressively just like text. However, there is a fundamental tension: codecs are traditionally trained to minimize reconstruction distortion (preserving fine-grained acoustic details like pitch micro-variations, background noise, and breathing), whereas LLMs want to predict sequential linguistic patterns.
This objective mismatch introduces stochastic variations into the token space—meaning the exact same word spoken slightly differently yields entirely different token sequences. This inflates token entropy, making it incredibly hard for an LLM to learn clean sequential dependencies, which ultimately leads to high perplexity, repetition, and hallucinations during speech generation.
Methods
The authors introduce LLM-Codec, a framework that reshapes an existing codec's token space using two LLM-facing regularizers, all while keeping the core codec and LLM architectures unchanged:
- Future Token Prediction (FTP): Instead of just predicting the next token, FTP uses K auxiliary Medusa-style decoding heads to predict multiple tokens into the future. This forces the codec to emit tokens that capture longer-range linguistic structures (like phonemes or words) that span multiple steps.
- Semantic Alignment (SA): To ensure the tokens carry actual meaning, SA aligns the hidden states of the audio tokens with the hidden states of their corresponding text translations within the middle-to-high layers of a frozen LLM. It uses a layer-wise cosine alignment and a memory-bank contrastive loss to prevent representation collapse.
- Differentiable Gumbel Bridge: Because vector quantization (VQ) uses a non-differentiable
argmax, they introduce a hard Gumbel-Softmax bridge. This keeps tokens discrete during the forward pass but allows smooth gradients to flow from the LLM objectives all the way back to the codec encoder.
Datasets
- Training: The model is trained on LibriSpeech train-clean-100, utilizing its paired audio and text transcripts for the semantic alignment loss.
- Evaluation:
- SALMon: A speech coherence benchmark that tests if a language model can distinguish between coherent speech and minimally perturbed incoherent variants (e.g., sudden changes in speaker or background noise mid-utterance).
- Codec-SUPERB-tiny: A benchmark used to evaluate audio reconstruction quality across three distinct domains: Speech, Music, and Environmental Audio.
Key Insights and Ideas
- Objectives, Not Model Capacity, Dictate Predictability: Standard codecs (ranging from 80M to 211M parameters) all hit a perplexity wall between 148K and 160K. LLM-Codec proves that scaling up model size doesn't fix token chaos; changing the training objective does.
- Fidelity and Learnability are Orthogonal and Additive: You don't have to sacrifice sound quality to make tokens predictable. The ablation studies showed that the reconstruction gains came entirely from the standard GAN/spectral training procedure, while the massive learnability gains came from the LLM-facing losses (FTP and SA).
- The Gradient is the Key, Not the Horizon: Surprisingly, ablating the number of future prediction heads (K) showed that even K=1 (next-token prediction) captured most of the learnability benefit. The magic lies in exposing the codec encoder to the LLM's gradient signal itself, rather than long-horizon forecasting.
Key Results
- Massive Perplexity Drop: LLM-Codec reduced token-level validation perplexity on LibriSpeech by 35× compared to its base codec (dropping from 159,768 to just 4,617), completely outclassing all baselines despite having the same parameter count.
- Superior Speech Coherence: On the SALMon benchmark, an LM trained on LLM-Codec tokens achieved 61.6% overall accuracy, a +12.1 point jump over the baseline AUV model. The gains were most pronounced in maintaining background consistency (+22.5 points) and handling reverberation (+18.5 points).
- Improved Reconstruction Fidelity: Instead of degrading audio quality, LLM-Codec actually improved speech spectral fidelity on Codec-SUPERB-tiny, reducing the Mel distance by 5.0% and STFT distance by 3.0% relative to the baseline AUV model, while remaining highly competitive on perceptual metrics (PESQ and STOI).
Limitations and Future Work
- Speech-Centric Supervision: The Semantic Alignment (SA) mechanism relies heavily on paired audio-text transcripts. This makes it ill-posed for non-speech audio (like music or environmental sounds) where text equivalents do not exist.
- Frozen LLM Backbone: The LLM backbone remains frozen during training to isolate tokenization effects and preserve text capabilities. Jointly adapting the LLM and codec could unlock further gains but risks degrading text performance.
- Read Speech Bias: Evaluation was primarily focused on clean, read speech (LibriSpeech). Performance on complex conversational audio—which includes disfluencies, overlapping speech, and rapid speaker turns—remains an open question for future validation.
- Training Overhead: Incorporating a full LLM forward pass and auxiliary Medusa heads increases memory and compute requirements during training, though inference costs remain unchanged since the auxiliary heads are discarded at test time.
Summary updated