NExT-GPT: Any-to-Any Multimodal LLM

Shengqiong Wu, Hao Fei, Leigang Qu, Wei Ji, Tat-Seng Chua

TL;DR

NExT-GPT is an end-to-end, "any-to-any" multimodal large language model (MM-LLM) capable of accepting and generating any combination of text, images, videos, and audio. By leveraging frozen, pre-trained encoders and decoders and tuning only 1% of its parameters via lightweight projection layers, it achieves seamless cross-modal reasoning and generation with minimal computational overhead.

What Problem Does This Paper Address?

While recent multimodal models have made massive strides, most are fundamentally asymmetric: they excel at input-side understanding (e.g., processing an image or audio clip) but are limited to generating purely textual responses. A few models can output interleaved text and images, but true human-like AI requires an "any-to-any" capability—the flexibility to ingest any mix of modalities and respond in whatever combination of text, video, audio, or imagery is most appropriate.

Previous attempts to solve this typically relied on "pipeline" architectures (like HuggingGPT or Visual-ChatGPT), where a central LLM coordinates distinct, off-the-shelf expert models using text descriptions as a universal intermediary. However, these cascaded systems suffer from severe limitations:

  1. Error Propagation: Noise and misunderstandings accumulate as information is passed discretely between modules.
  2. Information Loss: Text captions cannot fully capture complex non-linguistic features like spatial relationships or precise numerical counts.
  3. Lack of End-to-End Synergy: Without joint tuning, the system struggles to interpret intricate or implicit user instructions.

Methods

NExT-GPT overcomes these limitations using a unified three-tier architecture that connects a core LLM with arbitrary multimodal adaptors and diffusion decoders.

The three-tier architecture of NExT-GPT, enabling any-to-any multimodal input and output processing.
  1. Multimodal Encoding Stage: The system utilizes ImageBind, a unified high-performance encoder, to extract patch-level features from images, audio, and video. Instead of using a standard linear layer to project these features directly into the LLM, NExT-GPT introduces a novel grouping mechanism. This learnable module hierarchically aggregates grid-level features into discrete "concept tokens," better matching the semantic nature of textual tokens.
  2. LLM Understanding and Reasoning Stage: A frozen Vicuna-7B acts as the core brain. It processes the input text and concept tokens to perform semantic reasoning. Crucially, instead of just generating text, the LLM is taught to output special, modality-specific "signal tokens" (e.g., [IMGi], [AUDi], [VIDi]) when it decides a non-textual output is required.
  3. Multimodal Generation Stage: These signal tokens are passed through Transformer-based output projection layers to condition frozen, off-the-shelf latent diffusion models: Stable Diffusion for images, Zeroscope for video, and AudioLDM for audio.

Lightweight Alignment Learning

To make this system trainable without astronomical costs, the authors freeze the massive encoder, LLM, and decoder backbones. They only train the input and output projection layers, which account for a mere 1% of the total parameters (155M out of over 12B).

The two-stage alignment process: encoding-side LLM-centric alignment and decoding-side instruction-following alignment.

Alignment is achieved in two phases:

  • Encoding-side LLM-centric alignment: Trains the input projectors on an "X-to-text" generation task, forcing the concept tokens to be understandable to the frozen LLM.
  • Decoding-side instruction-following alignment: Minimizes the distance between the LLM's projected signal tokens and the text-conditioned spaces of the downstream diffusion models.

Datasets

The model's training relies on a mix of standard alignment datasets and a newly curated instruction-tuning dataset:

  • Alignment Pre-training: Uses CC3M (3M image-caption pairs), WebVid-2M (2M short video-caption pairs), and AudioCaps (46k audio-caption pairs).
  • Text-to-Multimodal (T2M) Dataset: The authors used GPT-4 to wrap existing caption datasets into 15k instances of text-to-multimodal instructions.
  • Modality-Switching Instruction Tuning (MosIT) Dataset: Because no dataset existed for complex, multi-turn, multi-modal conversations, the authors manually curated and annotated 5,000 high-quality dialogues. These conversations feature alternating modalities across 3–7 turns, using real assets sourced from YouTube, Google, Midjourney, and Stable Diffusion XL.

Key Insights and Ideas

  • The Power of "Soft" Tokens: Pipeline models lose crucial visual details when translating an image into a text caption for the LLM. NExT-GPT passes "soft" signal token embeddings directly to the diffusion models. This implicit representation naturally preserves complex visual-spatial relations and exact object counts that text struggles to convey.
  • The Grouping Mechanism Matters: Replacing simple linear projection layers with a hierarchical grouping mechanism significantly boosts perceptual performance. Aggregating raw patches into conceptual representations aligns much better with the tokenized nature of language models.
  • Extreme Parameter Efficiency: Freezing the core components and tuning only 1% of the parameters not only democratizes training but also makes the architecture highly modular. New modalities (like 3D vision or haptics) can theoretically be "plugged in" simply by training a new pair of lightweight projection layers.

Key Results

NExT-GPT demonstrates state-of-the-art performance across both understanding and generation tasks:

  • Multimodal Perception: In zero-shot evaluations, NExT-GPT outperforms competitive baselines like BLIP-2 and InstructBLIP on image captioning (123.7 CIDEr on NoCaps) and achieves top-tier results in video question answering (64.5 on MSVD-QA) and audio captioning (81.3 on AudioCaps).
  • Multimodal Generation: The model achieves superior text-to-image generation quality (10.07 FID on COCO) and text-to-video generation (12.69 FID / 31.97 CLIPSIM on MSR-VTT), outperforming non-LLM-centered models like CoDi.
  • Human Evaluation: Blind human reviews scoring instruction following, rationality, and generation quality ranked NExT-GPT significantly higher than pipeline alternatives like HuggingGPT and Visual-ChatGPT.

Limitations and Future Work

Despite its success, the authors note several avenues for improvement:

  • Modality & Task Expansion: The current implementation is limited to text, images, video, and audio. Future iterations aim to include 3D vision, web pages, and tables, alongside tasks like object detection and segmentation.
  • LLM Scalability: The system was only validated using Vicuna-7B; exploring larger or different LLM backbones could unlock deeper reasoning capabilities.
  • Diffusion Model Bottlenecks: The final generation quality remains inherently capped by the underlying diffusion models. The authors suggest integrating retrieval-based approaches to complement and stabilize the generation process.

Summary updated

Abstract

While recently Multimodal Large Language Models (MM-LLMs) have made exciting strides, they mostly fall prey to the limitation of only input-side multimodal understanding, without the ability to produce content in multiple modalities. As we humans always perceive the world and communicate with people through various modalities, developing any-to-any MM-LLMs capable of accepting and delivering content in any modality becomes essential to human-level AI. To fill the gap, we present an end-to-end general-purpose any-to-any MM-LLM system, NExT-GPT. We connect an LLM with multimodal adaptors and different diffusion decoders, enabling NExT-GPT to perceive inputs and generate outputs in arbitrary combinations of text, images, videos, and audio. By leveraging the existing well-trained highly-performing encoders and decoders, NExT-GPT is tuned with only a small amount of parameter (1%) of certain projection layers, which not only benefits low-cost training and also facilitates convenient expansion to more potential modalities. Moreover, we introduce a modality-switching instruction tuning (MosIT) and manually curate a high-quality dataset for MosIT, based on which NExT-GPT is empowered with complex cross-modal semantic understanding and content generation. Overall, our research showcases the promising possibility of building an AI agent capable of modeling universal modalities, paving the way for more human-like AI research in the community. Project page: https://next-gpt.github.io/
BibTeX
@inproceedings{wu2024next,
  author = {Shengqiong Wu and Hao Fei and Leigang Qu and Wei Ji and Tat-Seng Chua},
  title = {{NExT-GPT: Any-to-Any Multimodal LLM}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=NZQkumsNlf},
}
Figure