MelTok: 2D Tokenization for Single-Codebook Audio Compression

Jingyi Li, Zhiyuan Zhao, Zhisheng Zhang, Yunfei Liu, Lijian Lin, Ye Zhu, Jiahao Wu, Qiuqiang Kong, Yu Li

TL;DR

MelTok introduces a novel two-dimensional (2D) tokenizer and token-based vocoder capable of compressing high-fidelity 44.1 kHz audio into a single discrete codebook. By preserving the inherent time-frequency structure of audio, MelTok eliminates the frequency-variant redundancy of traditional 1D tokenizers, achieving reconstruction quality comparable to complex multi-codebook models while remaining highly efficient for downstream Large Audio Language Models (LALMs).

What Problem Does This Paper Address?

To power Large Audio Language Models (LALMs) for tasks like speech synthesis or audio understanding, continuous audio waveforms must first be converted into discrete tokens using neural audio codecs.

Currently, codecs face a trade-off:

  1. Multi-codebook approaches (like Residual Vector Quantization used in DAC or SNAC) capture high-quality audio but generate multiple parallel token sequences, making downstream language model decoding slow and complex.
  2. Single-codebook approaches (like WavTokenizer) are much more efficient for language models but struggle to capture fine-grained acoustic details, particularly high-frequency components (above 20 kHz).

This failure happens because standard codecs use 1D tokenizers that process audio sequentially along the time axis. This treats frequency content as a variant property, creating massive data redundancy and resulting in "over-smoothed," muffled audio reconstructions. MelTok addresses this by rethinking tokenization in two dimensions.

Methods

MelTok splits the compression and reconstruction process into a stable, two-stage framework:

  1. Stage One: Mel-Spectrogram Reconstruction via 2D Tokenizer Instead of tokenizing raw waveforms, MelTok converts audio into a 2D log-mel spectrogram. It then "patchifies" this spectrogram (using a Haar wavelet transform) and passes it through a 2D convolutional tokenizer (built on the Cosmos architecture). This compresses the audio into a single sequence of discrete tokens from an 8192-size codebook. To prevent over-smoothing, the authors optimize this stage using a combination of $L_1$ reconstruction loss and a VGG-19-based perceptual loss.

  2. Stage Two: Token-Based Vocoder To map these discrete tokens back to high-fidelity waveforms, the authors propose a token-based vocoder based on the Vocos architecture. Crucially, they mathematically demonstrate that using discrete tokens as input bounds the propagated error, stabilizing GAN training. The vocoder utilizes Snake activation functions and spectral normalization to maintain Lipschitz continuity, ensuring small perturbations in the latent space don't cause massive distortions in the output audio.

Datasets

The model was trained and evaluated using several high-resolution audio datasets:

  • AudioSet: The entire balanced training subset was used for general sound and environmental noise training, and the evaluation set was used to test general audio reconstruction.
  • musdb18-hq: Used for training and testing music domain reconstruction.
  • HQ-Conversations: A high-quality dataset used to augment speech training.

All audio files were processed at their original high-fidelity sampling rate of 44 kHz.

Key Insights and Ideas

  • The Power of 2D Representation: 1D tokenizers force the model to pack all frequency variations into a single temporal sequence. By treating the spectrogram as a 2D image, MelTok exploits "frequency-invariance" patterns, leading to a much more compact and less redundant representation.
  • Disentangled Latent Space: A t-SNE visualization reveals that MelTok's 2D tokenizer naturally separates low-, mid-, and high-frequency structures into distinct clusters within the latent space. In contrast, 1D tokenizers produce highly entangled, overlapping embeddings.
Figure 3: t-SNE visualization of latent embeddings produced by the 1D and 2D tokenizers. Each point represents the latent embedding of a single time frame, and each color denotes a different frequency band.
  • Discrete Codes Stabilize GANs: Feeding discrete codebook tokens into the vocoder—rather than continuous spectrograms—introduces a strict upper bound on reconstruction errors. This mathematical constraint prevents extreme deviations during adversarial training, leading to better audio quality and faster convergence (within just 50 epochs).

Key Results

MelTok bridges the gap between single-codebook efficiency and multi-codebook quality:

  • High-Frequency Fidelity: MelTok accurately reconstructs high-frequency details that cause other single-codebook models to produce a bright ringing or muffled sound.
Figure 1: Mel-spectrogram comparison of original and reconstructed waveforms produced by dif- ferent codecs. MelTok accurately reconstructs the high-frequency details.
  • Objective Metrics: On the AudioSet evaluation, MelTok achieved a ViSQOL score of 4.17, outperforming state-of-the-art single-codebook baselines like WavTokenizer (3.26) and UniCodec (3.18), and matching the performance of the 9-codebook DAC baseline (4.19). It also achieved the lowest Log-Spectral Distance (LSD) of 0.77 and Mel Cepstral Distortion (MCD) of 2.92.
  • Downstream Performance: Beyond compression, MelTok's tokens proved superior for downstream understanding tasks. It achieved the highest F1 score (0.3398) for sound event classification and outperformed all other single-codebook codecs in music genre classification on the GTZAN dataset.

Limitations and Future Work

Despite its strong performance, the authors note a few limitations:

  • Sensitivity to Upsampled Data: Training is easily disrupted if the dataset contains low-resolution audio (e.g., 16 kHz) that has been artificially upsampled to 44.1/48 kHz. This is a common issue in open-source audio corpora.
  • Downstream Generation Untested: While MelTok provides an excellent representation for audio understanding, the authors have not yet integrated these tokens into an actual generative Audio Language Model (ALM) to evaluate downstream text-to-audio or audio-to-audio generation. This remains a primary focus for future work.

Summary updated

Abstract

Large Audio Language Models (LALMs) have emerged with strong performance across diverse audio understanding tasks and can be further enhanced by neural audio codecs. Transitioning from multi-layer residual vector quantizers to a single-layer quantizer has been shown to facilitate more efficient downstream language models decoding. However, the ability of a single codebook to capture fine-grained acoustic details remains limited, as the frequency-variant nature of 1D tokenizers leads to redundancy. To address this issue, we propose MelTok, a two-dimensional (2D) tokenizer that effectively compresses acoustic details of 44.1 KHz audio into a single codebook. The tokenizer encodes audio into a more compact representation than one-dimensional tokenizers. Furthermore, to recover audio from mel-spectrogram tokens, we propose a token-based vocoder. Both objective and subjective evaluations demonstrate that MelTok achieves quality comparable to multi-codebook codecs and outperforms existing state-of-the-art neural codecs with a single codebook on high-fidelity audio reconstruction. By preserving acoustic details, MelTok offers a strong representation for downstream understanding tasks.
BibTeX
@misc{li2025meltok,
  author = {Jingyi Li and Zhiyuan Zhao and Zhisheng Zhang and Yunfei Liu and Lijian Lin and Ye Zhu and Jiahao Wu and Qiuqiang Kong and Yu Li},
  title = {{MelTok: 2D Tokenization for Single-Codebook Audio Compression}},
  year = {2025},
  eprint = {2510.01903},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.01903},
}
Figure