VRVQ: Variable Bitrate Residual Vector Quantization for Audio Compression

Yunkee Chae, Woosung Choi, Yuhta Takida, Junghyun Koo, Yukara Ikemiya, Zhi Zhong, Kin Wai Cheuk, Marco A. Martínez-Ramírez, Kyogu Lee, Wei-Hsiang Liao, Yuki Mitsufuji

TL;DR

Current state-of-the-art neural audio codecs rely on Residual Vector Quantization (RVQ) with a fixed number of codebooks per frame, wasting bits on simple signals like silence. This paper introduces Variable Bitrate RVQ (VRVQ), dynamically allocating codebooks per time frame using an encoder-derived importance map. Coupled with a novel smooth gradient estimator for binarization, VRVQ significantly improves the rate-distortion tradeoff over standard constant bitrate RVQ architectures like DAC.

What Problem Does This Paper Address?

Modern neural audio codecs (such as SoundStream, EnCodec, and DAC) compress audio by encoding raw waveforms into discrete tokens across multiple quantizer stages via RVQ. However, standard RVQ allocates the exact same number of codebooks across every downsampled time frame—operating strictly as a Constant Bitrate (CBR) codec.

In real-world audio, information density fluctuates dramatically: complex musical transients or dense speech demand high bitrates, while background noise or silence requires very few bits. While traditional codecs (like AAC) support Variable Bitrate (VBR), enabling VBR in RVQ-based neural audio autoencoders remained an open challenge because dynamically masking codebooks requires non-differentiable thresholding operations that hinder gradient flow.

Methods

VRVQ introduces a content-adaptive codebook allocation mechanism trained end-to-end within an RVQ-GAN framework:

  • Importance Map-Based Bit Allocation: An intermediate encoder feature map ($E_1(x)$) is fed to a lightweight 1D convolutional subnetwork $E_p$ to predict a frame-level importance map $p[t] \in (0, 1)$. This importance value is scaled and passed to a set of Heaviside step functions to yield a monotonically decreasing binary mask $m[t] \in \{0, 1\}^{N_q}$, dictating how many residual quantizers are retained at frame $t$.
  • Smooth Surrogate Gradient Estimator: Standard Straight-Through Estimators (STEs) often use saturated identity functions during backpropagation, but these yield zero gradients across large regions. The authors propose a smooth surrogate function $f_\alpha^k(s)$ based on a log-ratio of hyperbolic cosines parameterized by temperature $\alpha$: $$f_\alpha^k(s) := \frac{1}{2\alpha} \log \left( \frac{\cosh(\alpha(s - k))}{\cosh(\alpha(-s + k + 1))} \right) + \frac{1}{2}$$ This smooth relaxation guarantees continuous gradient flow across all operational ranges during training.

  • Continuous Rate Control: Rather than conditioning the network on fixed loss weights $\beta$, the authors randomly sample a continuous scaling factor $l \sim \mathcal{U}([L_{\min}, L_{\max}])$ during training. Analytically framed through a $\beta$-VAE formulation, the rate loss remains mathematically independent of the sampled $l$, enabling a single trained model to operate continuously across arbitrary target bitrates at inference.

Datasets

The authors trained and evaluated their system at 44.1 kHz using audio setups aligned with the DAC benchmark:

  • Training: A combination of speech datasets (DAPS, Common Voice, VCTK, clean DNS Challenge 4), music datasets (MUSDB18, Jamendo), and environmental sound (AudioSet). Audio was normalized to -16 dB LUFS with random phase-shift augmentation.
  • Evaluation: Evaluated on unnormalized 10-second segments (300 total; 100 randomly extracted from each domain): speakers F10 and M10 from DAPS, test splits of MUSDB18, and test splits of AudioSet. No new benchmarks were introduced.

Key Insights and Ideas

  • Surrogate Smoothness is Critical ($\alpha < 2$): When the surrogate approaches the hard baseline ($\alpha \to \infty$), the model fails to utilize the full codebook capacity during training, severely damaging high-bitrate quality. Softer relaxations ($\alpha \le 1$) preserve gradient propagation, unlocking better rate-distortion curves.
  • Exploiting Raw Energy Profiles: Ablation experiments showed that training without LUFS loudness normalization noticeably boosted reconstruction metrics (SI-SDR, SDR, ViSQOL). Unnormalized training allows the importance subnetwork to directly leverage genuine temporal energy differences (e.g., silence vs. active speech).
  • Overhead Penalty at Low Rates: Dynamic masking requires transmitting the selected codebook depth per frame ($\log_2(N_q) = 3$ bits/frame, or $\approx 0.258$ kbps). At very low bitrates (< 3 kbps), this fixed overhead consumes a significant fraction of the bit budget, causing VBR advantages to diminish.

Key Results

Evaluated against a scratch-trained DAC baseline ($N_q = 8$ and $N_q = 16$ codebooks):

  • Distortion Metrics: Models trained with smooth surrogates ($\alpha < 2$) consistently outperformed the baseline saturated-identity surrogate and achieved significantly higher SI-SDR and lower waveform $L_1$ loss than DAC across equivalent bitrates.
  • Perceptual Quality: For bitrates above 3–4 kbps, VRVQ with $\alpha \le 1$ exceeded DAC in ViSQOL (perceptual MOS estimate) and log-mel spectral distance.
  • Scalability ($N_q = 16$): Scaling up to 16 codebooks (~14 kbps max) demonstrated that VRVQ matches or exceeds DAC performance on waveform-level reconstruction (SDR/SI-SDR) without degrading fixed-rate CBR evaluation mode.

Limitations and Future Work

  • Signaling Overhead: The explicit transmission cost of signaling codebook counts per frame limits efficiency in extremely constrained bandwidth regimes (< 3 kbps).
  • Alternative Scaling Functions: Nonlinear importance transforms (such as exponential scaling $S^\gamma_{\text{exp}}$) failed to train stably, collapsing codebook usage down to a single quantizer for most frames.
  • Absence of Entropy Coding: Bitrates were computed strictly by counting active codebooks (10 bits per active quantizer). Incorporating learned temporal entropy models or arithmetic coding remains an open avenue for future compression gains.

Summary updated

BibTeX
@inproceedings{chae2025vrvq,
  author = {Yunkee Chae and Woosung Choi and Yuhta Takida and Junghyun Koo and Yukara Ikemiya and Zhi Zhong and Kin Wai Cheuk and Marco A. Martínez-Ramírez and Kyogu Lee and Wei-Hsiang Liao and Yuki Mitsufuji},
  title = {{VRVQ: Variable Bitrate Residual Vector Quantization for Audio Compression}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2025},
  doi = {10.1109/icassp49660.2025.10889508},
}
Figure