DM-Codec: Distilling Multimodal Representations for Speech Tokenization

Md Mubtasim Ahasan, Md Fahim, Tasnim Mohiuddin, Akmmahbubur Rahman, Aman Chadha, Tariq Iqbal, M Ashraful Amin, Md Mofijul Islam, Amin Ahsan Ali · Submission to ICLR 2025 · Withdrawn

TL;DR

Discrete speech tokenization usually forces a compromise between acoustic fidelity and high-level semantic meaning, leaving out broad linguistic context altogether. DM-Codec resolves this by distilling representations from both a speech self-supervised model (HuBERT) and a text language model (BERT) into a Residual Vector Quantizer (RVQ) neural audio codec during training. This creates tokens that pack acoustic, semantic, and contextual information into a single representation without adding any model parameters or latency at inference.

What Problem Does This Paper Address?

Applying Large Language Model (LLM) architectures to speech requires converting continuous audio into discrete tokens. Prior work generally produces either:

  1. Acoustic tokens (e.g., EnCodec, SoundStream) that preserve fine audio detail but lack semantic abstraction, or
  2. Semantic tokens (e.g., HuBERT, wav2vec 2.0) that capture phonetics and words while discarding speaker timbre and acoustic nuance.

Even hybrid codecs that blend acoustic and semantic tokens overlook contextual representations—the nuanced linguistic context captured by modern text language models. Consequently, reconstructed speech often suffers from transcription errors (measured by Word Error Rate [WER] and Word Information Lost [WIL]). DM-Codec asks: Can we distill linguistic context directly into an audio tokenizer to bridge this gap?

Methods

DM-Codec builds on an RVQ-GAN backbone (SEANet-based convolutional encoder-decoder with an 8-level RVQ operating at a 50 Hz frame rate and codebook size of 1024) and introduces multimodal teacher distillation:

Raw Speech (x) 
  ├──> Neural Codec Encoder ──> RVQ (Q_k) ──> Decoder ──> Reconstructed Speech (x̂)
  │                                ▲
  ├──> ASR ──> Text ──> LM (BERT) ─┤ (Contextual Distillation Loss L_L on RVQ-1)
  │                                │
  └──> Speech Model (HuBERT) ──────┘ (Semantic Distillation Loss L_S on RVQ-1:8)
  • Feature-Dimension Distillation: Instead of enforcing strict, brittle temporal frame-by-frame alignment between audio frames and text tokens, the authors pad text token sequences to match quantized audio sequence lengths and optimize cosine similarity along the feature dimension (D-axis) across all time steps.
  • Layer Allocation: Contextual LM distillation targets the first quantization layer (RVQ-1), while semantic speech model distillation targets the average of all layers (RVQ-1:8).
  • Global Context via [CLS] Tokens: As an alternative alignment strategy, the authors also introduce a variant that tiles BERT's sequence-level [CLS] token representation across time steps.
  • DM-Codec-TTS: To demonstrate downstream utility, the authors train an autoregressive (AR) and non-autoregressive (NAR) neural codec language model conditioned on DM-Codec tokens for zero-shot text-to-speech.

Crucially, the ASR, LM, and speech teacher models are only used as training loss guides; inference runs purely through the compact neural codec.

Datasets

  • Tokenizer Training: LibriSpeech 100-hour clean speech subset (standardized to 3-second crops at 16 kHz).
  • Tokenizer Evaluation: LibriSpeech test-clean (300 audio samples for standard evaluation; full 2,620 samples for statistical significance testing).
  • TTS Training & Evaluation: DM-Codec-TTS was trained on LibriHeavy (50,000 hours at 16 kHz) and a smaller variant on LibriTTS (585 hours at 24 kHz). Evaluation was conducted on 4–10 second subsets from LibriSpeech test-clean (2.2 hours) and the VCTK multi-speaker corpus.

Key Insights and Ideas

  • Temporal alignment is not required for distillation: RVQ representations capture holistic utterance properties. Maximizing cosine similarity across feature dimensions (D-axis) substantially outperformed time-axis (T-axis) alignment (WER 4.05 vs. 4.76).
  • Static word embeddings are not enough: Replacing BERT's contextualized hidden states with static word embeddings degraded reconstruction dramatically (WER worsened from 4.36 to 5.27), proving that contextualization, rather than vocabulary identity, drives the gains.
  • All layers matter: Averaging teacher representations across all layers outperformed taking only the 9th or final layer, confirming that combining lower-level syntax/phonetics with higher-level semantic abstraction yields the best distillation target.

Key Results

  • Speech Reconstruction (LibriSpeech):
  • DM-Codec (LM+SM) achieved a 4.05 WER and 6.61 WIL, outperforming EnCodec (4.53 / 7.17), SpeechTokenizer (4.49 / 7.10), and FACodec (4.68 / 7.33).
  • Maintained superior perceptual quality: 3.26 ViSQOL and 3.72 MOS (vs. EnCodec's 3.08 / 3.09).
  • Zero-Shot TTS (Downstream):
  • On LibriSpeech, DM-Codec-TTS achieved a 5.08 WER (vs. VALL-E's 5.90) and an MOS of 3.70.
  • On VCTK, DM-Codec-TTS achieved a 3.58 WER (vs. USLM's 6.50) with an SMOS of 3.85 and speaker similarity of 0.82.

Limitations and Future Work

  • Dataset Scope: Experiments were confined to clean, read English speech (LibriSpeech, LibriHeavy, VCTK). Multilingual, accented, code-switched, and noisy real-world speech were not evaluated.
  • Language Model Variety: The authors explored only masked language models (BERT and ELECTRA). The impact of modern decoder-only LLMs (e.g., Llama) as teacher models remains an open question.
  • Societal Risks: High-fidelity zero-shot voice cloning inherently carries misuse risks (voice spoofing, impersonation), requiring watermarking or verification safeguards in production deployments.

Summary updated

BibTeX
@misc{ahasan2024dm,
  author = {Md Mubtasim Ahasan and Md Fahim and Tasnim Mohiuddin and AKMMAHBUBUR RAHMAN and Aman Chadha and Tariq Iqbal and M Ashraful Amin and Md Mofijul Islam and Amin Ahsan Ali},
  title = {{DM-Codec: Distilling Multimodal Representations for Speech Tokenization}},
  year = {2024},
  eprint = {2410.15017},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.15017},
}
Figure