UniAudio 1.5: Large Language Model-Driven Audio Codec is A Few-Shot Audio Task Learner

Dongchao Yang, Haohan Guo, Yuanyuan Wang, Rongjie Huang, Xiang Li, Xu Tan, Xixin Wu, Helen M. Meng

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities in text-based reasoning and in-context learning (ICL). However, extending these capabilities to the audio domain typically requires extensive fine-tuning or the introduction of complex adapter modules. These traditional approaches often compromise the LLM's inherent ability to learn from a few examples—a feature known as in-context learning. UniAudio 1.5 addresses this "modality heterogeneity" by introducing LLM-Codec, a novel audio codec that maps audio signals directly into the existing textual vocabulary of a frozen LLM. By treating audio as a "foreign language" with a known alphabet, UniAudio 1.5 enables models like Llama 2 to perform complex audio tasks using only a few-shot prompts.

Methodology: The LLM-Codec

The core of UniAudio 1.5 is the LLM-Codec, a multi-scale residual vector quantization (RVQ) model designed to bridge the gap between continuous audio signals and discrete textual tokens. Unlike previous codecs that create independent codebooks, LLM-Codec utilizes the frozen vocabulary of Llama 2.

Hierarchical Tokenization

To capture both high-level meaning and low-level acoustic detail, the codec employs a three-layer hierarchical quantization strategy:

  1. Semantic Layer: The first layer maps audio to common words (e.g., the Oxford 5000). This layer is optimized using a "semantic loss" derived from a pre-trained T5 model, ensuring it captures the underlying meaning of the audio.
  2. Acoustic Layers: The subsequent layers map to sub-word tokens to capture fine-grained acoustic nuances. A "consistency loss" based on Whisper features is used to maintain stability across these layers.

By representing audio this way, a frozen Llama 2 (7B) model can process audio sequences as if they were sentences in a new language, leveraging its pre-trained reasoning capabilities without any parameter updates.

Efficiency and Compression

A significant challenge in audio-LLM integration is the length of audio sequences. Standard codecs like Encodec require approximately 225 tokens per second of audio, which quickly exhausts the LLM's context window. UniAudio 1.5 achieves a high down-sampling rate, representing one second of audio with only 57 tokens. This compact representation is vital for fitting multiple demonstration examples into a single prompt for in-context learning.

Experimental Results

The researchers evaluated UniAudio 1.5 across a variety of tasks, including reconstruction, classification, and reasoning-based generation. The model was trained on approximately 2,000 hours of speech (MLS) and general sound (AudioCaps) data.

Audio Reconstruction

Despite the aggressive compression, the model maintains high fidelity. On the VCTK dataset, UniAudio 1.5 achieved a PESQ of 2.55 and an STOI of 0.82, performing competitively against high-bitrate codecs and outperforming several standard baselines.

Few-shot and Zero-shot Learning

The model's primary strength lies in its in-context learning performance:

  • Emotion Classification: In a 2-way speech emotion task (ESD dataset), the model achieved 55% accuracy using only a few prompt examples, significantly outperforming the BLSP baseline (19-33%).
  • Zero-shot Denoising: By providing four pairs of "noisy" and "clean" audio examples in the prompt, the model successfully learned to denoise unseen audio samples without specific training for the task.

Reasoning-based Generation

UniAudio 1.5 demonstrates a unique ability to combine linguistic reasoning with audio synthesis. In a "simple TTS" task using the Free Spoken Digit Dataset (FSDD), the model was given an instruction like "An audio of 1+1." It correctly generated the audio for the digit "2" with 70% accuracy, showing it can process mathematical logic and translate the result into the audio domain.

Discussion and Limitations

While UniAudio 1.5 represents a breakthrough in few-shot audio learning, several challenges remain. There is still a performance gap between this general-purpose ICL approach and specialized models that are fully fine-tuned for specific tasks. Additionally, the LLM's context window remains a bottleneck for long-form audio generation or complex multi-example prompts. Future work will focus on improving the codec's performance on non-English speech and more diverse, complex soundscapes.

Conclusion

UniAudio 1.5 demonstrates that by aligning audio quantization with the native vocabulary of an LLM, we can unlock the power of in-context learning for audio tasks. This "audio as a foreign language" paradigm allows frozen LLMs to act as versatile audio learners, paving the way for more flexible and efficient multimodal AI systems.

Summary updated

BibTeX
@inproceedings{yang2024uniaudio,
  author = {Dongchao Yang and Haohan Guo and Yuanyuan Wang and Rongjie Huang and Xiang Li and Xu Tan and Xixin Wu and Helen M. Meng},
  title = {{UniAudio 1.5: Large Language Model-Driven Audio Codec is A Few-Shot Audio Task Learner}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=NGrINZyZKk},
}
Figure