COSMIC: Data Efficient Instruction-tuning For Speech In-Context Learning

Jing Pan, Jian Wu, Yashesh Gaur, Sunit Sivasankaran, Zhuo Chen, Shujie Liu, Jinyu Li

Introduction

Large Language Models (LLMs) have revolutionized natural language processing through in-context learning (ICL)—the ability to perform new tasks by observing just a few examples in a prompt. However, speech processing has traditionally relied on "specialist" models trained on massive datasets for specific tasks like transcription. COSMIC (Contextual Speech Model with Instruction-following/in-context-learning Capabilities) bridges this gap, enabling speech models to inherit the generalist reasoning and ICL strengths of LLMs using remarkably little data.

The Challenge of Speech In-Context Learning

Adapting a speech model to a new domain or task usually requires fine-tuning on thousands of hours of supervised data. The authors of COSMIC sought to determine if a speech model could instead learn to follow complex instructions and perform unseen tasks—like translating into a language it wasn't explicitly trained for—using minimal resources. Their approach achieves this with only 450 hours of training data.

Architecture and Methodology

COSMIC employs a three-part architecture designed to "glue" acoustic signals to the semantic space of an LLM.

The COSMIC architecture integrates an acoustic encoder with an LLM via a Qformer bridge.
  1. Acoustic Encoder: A pre-trained Whisper-medium encoder converts raw audio into high-resolution features.
  2. Window-level Qformer: This bridge compresses acoustic features into a sequence length the LLM can process, mapping them into the LLM’s embedding space.
  3. LLM Backbone: LLaMA-2 (7B and 13B versions) serves as the core reasoning engine.

SQA Instruction Tuning

The "secret sauce" of COSMIC is Speech Comprehension Test Question-Answer (SQA) instruction tuning. Instead of simple transcription (ASR), the researchers used GPT-3.5 to generate diverse SQA pairs from transcripts. Training the model to answer questions about audio content forces it to align the speech modality with the LLM's internal reasoning logic. This method is highly efficient, tuning only ~30 million parameters (Qformer and LoRA adapters) while keeping the heavy-duty encoders and LLMs frozen.

Key Results and Emergent Capabilities

COSMIC demonstrates that training on SQA "activates" the LLM's ability to follow instructions, allowing it to generalize to tasks it never encountered during training.

Cross-Modal Translation

Despite being trained only on English speech (using the TED-LIUM 3 dataset), COSMIC can perform speech-to-text translation into Spanish, French, or German. This emergent capability stems from the model's ability to plug English audio into the multilingual knowledge already present in the frozen LLaMA-2 backbone.

Translation performance (BLEU) for COSMIC models on the TED-LIUM 3 dataset, highlighting 1-shot gains.

As shown in the results, providing just a single example (1-shot) at inference time leads to massive performance gains. For instance, COSMIC-7B achieved a BLEU score of 33.18 in 1-shot English-to-Spanish translation, a significant jump from its 0-shot performance.

Domain Adaptation and Contextual Biasing

When tested on the LibriSpeech domain, a single 1-shot example reduced the Word Error Rate (WER) by an average of 25.8% relative. Furthermore, by including a "context" instruction (e.g., listing rare words mentioned by the speaker), the model reduced its Biased Word Error Rate (B-WER) by roughly 50%.

Discussion and Limitations

While COSMIC shows that SQA is superior to ASR for modality alignment, scaling presents unique challenges. The 13B model occasionally required 1-shot prompts to "stabilize" its output and prevent hallucinations. Additionally, the current model is English-centric for audio input. Future work will focus on expanding dataset diversity and exploring truly multilingual speech-to-multilingual text capabilities. COSMIC represents a significant step toward universal speech models that can "learn how to learn" from context.

Summary updated

BibTeX
@inproceedings{pan2024cosmic,
  author = {Jing Pan and Jian Wu and Yashesh Gaur and Sunit Sivasankaran and Zhuo Chen and Shujie Liu and Jinyu Li},
  title = {{COSMIC: Data Efficient Instruction-tuning For Speech In-Context Learning}},
  booktitle = {Interspeech},
  year = {2024},
  doi = {10.21437/interspeech.2024-1346},
}
Figure