PandaGPT: One Model To Instruction-Follow Them All

Yixuan Su, Tian Lan, Huayang Li, Jialu Xu, Yan Wang, Deng CaiarXiv 2023 · DOI

Abstract

PandaGPT is a general-purpose model capable of following instructions across six different modalities—image/video, text, audio, depth, thermal, and IMU—despite being trained only on aligned image-text pairs. By "hooking up" the shared embedding space of ImageBind to the Vicuna large language model, the researchers achieved emergent, zero-shot cross-modal reasoning with minimal additional training.

Introduction

While Large Language Models (LLMs) like GPT-4 have mastered text, humans perceive the world holistically through multiple senses simultaneously. Most existing multimodal AI systems are "siloed": they might handle text and images (like LLaVA) or text and audio (like SpeechGPT), but rarely can they synthesize information across a wide array of sensory inputs.

The primary challenge in building a "jack-of-all-trades" multimodal model is data: it is incredibly difficult to find or create massive, high-quality instruction-following datasets that cover every possible combination of audio, video, thermal, and depth data. PandaGPT addresses this by leveraging "feature alignment" to bypass the need for modality-specific training data.

Methods

The architecture of PandaGPT is elegantly simple, relying on two pre-trained "frozen" pillars:

  1. The Encoder (ImageBind): A model from Meta AI that learns a joint embedding space for six modalities. Because ImageBind maps images, heatmaps, and audio clips into the same mathematical neighborhood, a model that understands the "image" part of that space can theoretically understand the others.
  2. The Backbone (Vicuna): An open-source LLM (based on LLaMA) known for its strong instruction-following capabilities.
The architecture of PandaGPT connects ImageBind to Vicuna via a linear projection layer and LoRA.

The "Glue" and Training Strategy

To connect these two, the authors added a linear projection matrix to map ImageBind’s embeddings into the LLM's space. They also applied LoRA (Low-Rank Adaptation) to the Vicuna model.

Crucially, the authors only trained the "glue" (the linear layer and the LoRA weights), which accounts for only 0.4% of the total parameters. They trained the model for 7 hours on 8x A100 GPUs using only image-text instruction data (160k instances from LLaVA/Mini-GPT4). Because of ImageBind's shared space, the ability to follow instructions for images "leaked" over to audio, video, and thermal data automatically.

Key Insights

  • The Power of Binding: You don't need to train on every modality to understand every modality. If the encoder is "bound" (e.g., seeing a picture of a dog and hearing a bark as the same concept), the LLM only needs to learn how to talk about the picture to be able to talk about the sound.
  • Multimodal Arithmetic: PandaGPT can perform "compositional" tasks, such as synthesizing an image of a person and an audio clip of a thunderstorm to write a story.
  • Zero-Shot Emergence: The model displays "cross-modal behaviors" for data it never saw during its instruction-tuning phase (like IMU or thermal data), proving that alignment in the embedding space is a viable shortcut to general AGI.

Results and Discussion

PandaGPT successfully identifies specific individuals in images, describes ingredients in video tutorials, and explains the context of audio clips (e.g., a dog barking). The model demonstrates complex reasoning, such as predicting the emotional state of people in a video. By freezing the heavy-duty encoders and the LLM, the researchers created a highly capable multimodal agent with very low computational overhead.

Limitations

  • Coarse Granularity: The model uses a single embedding vector for entire inputs, potentially missing fine-grained temporal details.
  • Output Modality: PandaGPT can perceive multiple modalities but only responds in text.
  • Hallucination: Like all LLMs, it is prone to making things up when connecting disparate multimodal information.

Summary updated

BibTeX
@misc{su2023pandagpt,
  author = {Yixuan Su and Tian Lan and Huayang Li and Jialu Xu and Yan Wang and Deng Cai},
  title = {{PandaGPT: One Model To Instruction-Follow Them All}},
  year = {2023},
  eprint = {2305.16355},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.16355},
}
Figure