On the Distillation Loss Functions of Speech VAE for Unified Reconstruction, Understanding, and Generation

Changhao Cheng, Wei Wang, Wangyou Zhang, Dongya Jia, Jian Wu, Zhuo Chen, Yanmin QianarXiv 2026

TL;DR

This paper introduces a novel distillation paradigm for speech Variational Autoencoders (VAEs) to resolve the performance trade-offs between audio reconstruction, generation, and understanding. By implementing a joint-marginal alignment loss with adaptive gradient weighting, the authors create a unified continuous speech representation that excels across all three domains, significantly boosting speech understanding without sacrificing audio quality.

What Problem Does This Paper Address?

As the speech processing community moves toward unified models that can both understand and generate speech (akin to text-based LLMs), finding the right acoustic representation is critical. Traditional discrete tokens often suffer from information loss, leading researchers to favor continuous representations like VAE latents.

To improve speech generation, recent methods align these VAE latents with self-supervised learning (SSL) features via time-axis distillation. However, the authors reveal a major dilemma: existing alignment strategies heavily degrade speech understanding capabilities (such as Automatic Speech Recognition or Speaker Identification).

Figure 1: T-axis Aligned Semantic VAE (TAS-VAE) distills semantic knowledge from speech foundation models via Eq.2 alignment loss, achieving TTS performance comparable to mel spectrograms with minor reconstruction degradation. Its latent representations still underperform on downstream speech understanding. Baseline: Mel+Vocos [16] (reconstruction), Fbank (understanding), Mel+F5- TTS [15] (generation).

The paper addresses this gap by systematically exploring the distillation loss design space to find a representation that balances reconstruction, understanding, and generation.

Methods

The authors build upon a standard speech VAE backbone (consisting of a DAC-based encoder, a BigVGAN decoder, KL divergence, and GAN losses) and introduce a feature alignment loss ($\mathcal{L}_{\text{align}}$) that distills knowledge from a frozen foundation model (WavLM Large) into the VAE latent space.

They explore three distinct alignment loss architectures:

  1. T-axis Aligned: Frame-by-frame point-wise cosine similarity.
  2. D-axis Aligned: Dimension-wise distillation to capture temporal structures in local feature dimensions.
  3. Joint-marginal Aligned (JMAS-VAE): A novel approach combining frame-level feature distance ($\mathcal{L}_{\text{mcos}}$) with sequence-level distribution similarity ($\mathcal{L}_{\text{mdss}}$) using tunable margins ($m_1, m_2$) to enforce intra-distribution consistency.
Figure 2: The design space of distillation loss functions for speech VAEs. For mathematical formulations, see Eqs. 2 to 6.

Crucially, they introduce an Adaptive Weighting Strategy ($\star$). Instead of using static loss weights, they dynamically adjust the distillation weight based on the gradient norm ratio between the reconstruction loss and the distillation loss:

$$\omega_{\text{adaptive}} = \frac{\|\nabla\mathcal{L}_{\text{rec}}\|}{\|\nabla\mathcal{L}_{\text{distill}}\|}$$

Datasets

  • Training: All VAE models were trained on the full Libriheavy dataset (~50,000 hours of speech at 16kHz).
  • Evaluation:
  • Reconstruction: Evaluated on LibriSpeech-test-clean using PESQ and STOI metrics.
  • Understanding: Evaluated across 8 tasks on the SUPERB benchmark (including Emotion Recognition, ASR, Keyword Spotting, and Speaker Identification).
  • Generation: Evaluated via a Text-to-Speech (TTS) task using an F5-TTS model trained on LibriTTS and tested on LibriSpeech-PC test-clean.

Key Insights and Ideas

  • The Semantic vs. Acoustic Trade-off: Frame-wise alignment along the time axis focuses heavily on semantic information (benefiting understanding tasks), but discards fine-grained acoustic details. Conversely, sequence-level distribution similarity ($\mathcal{L}_{\text{mdss}}$) preserves the relative structures between frames, protecting acoustic information.
  • The Necessity of Dynamic Gradients: Static weights fail because distillation gradients can easily overwhelm or be dwarfed by reconstruction gradients. As shown in training logs, the adaptive weights ($\omega_{\text{mcos}}$ and $\omega_{\text{mdss}}$) scale up by orders of magnitude during training, enabling a much finer alignment.
Figure 3: The adaptive weighting of the two distillation losses for JMAS-VAE as a function of training steps. The vertical axis adopts a logarithmic coordinate system.
  • Margin Tuning is Key: Introducing explicit margins ($m_1, m_2$) acts as a control valve, allowing researchers to precisely navigate the trade-offs between understanding accuracy and audio generation fidelity.

Key Results

The proposed JMAS-VAE$^\star$ (Joint-marginal Aligned with adaptive weighting) achieved the highest overall geometric mean score across all tasks:

  • Overall Performance: JMAS-VAE$^\star$ scored 0.772, outperforming Vanilla VAE (0.645), Semantic-VAE (0.690), and EnCodec (0.651).
  • Understanding Boost: It drastically reduced the Word Error Rate (WER) in ASR tasks to 21.04%, compared to Vanilla VAE's 53.48% and Semantic-VAE's 41.75%.
  • Preserved Audio Quality: Unlike other alignment methods that suffered severe reconstruction degradation when adaptively weighted, JMAS-VAE$^\star$ maintained excellent audio quality (PESQ of 3.84 and STOI of 0.973).

Limitations and Future Work

The authors note that directly forcing VAE latents to match pretrained SSL features without dedicated regularization can lead to biased representations. While their joint-marginal approach mitigates this, finding the absolute optimal margin parameters still requires empirical tuning.

For future work, the authors plan to explore other architectural design choices for speech VAEs—such as modifying the channel dimensions and frame rates—and evaluate their direct integration into large-scale Speech LLMs.

Summary updated

Abstract

Continuous speech representations based on Variational Autoencoders (VAEs) have emerged as a promising alternative to traditional spectrogram or discrete token based features for speech generation and reconstruction. Recent research has tried to enrich the structural information in VAE latent representations by aligning with self-supervised learning (SSL) features, aiming for better generation performance. However, it remains unclear whether the widely-used alignment approach based on time-axis distillation is optimal when considering more tasks. To address this problem, this paper systematically explores different alignment approaches and analyzes their impact on the performances over three axes: reconstruction, understanding, and generation. We investigate various design choices in the distillation loss. Extensive experiments show that the joint-marginal alignment approach with adaptive weighting can achieve the best overall performance while allowing for a controllable balance.
BibTeX
@misc{cheng2026distillation,
  author = {Changhao Cheng and Wei Wang and Wangyou Zhang and Dongya Jia and Jian Wu and Zhuo Chen and Yanmin Qian},
  title = {{On the Distillation Loss Functions of Speech VAE for Unified Reconstruction, Understanding, and Generation}},
  year = {2026},
  eprint = {2604.12383},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.12383},
}

Loading related content...

Figure