Skip to main content
QUICK REVIEW

[论文解读] Planting a SEED of Vision in Large Language Model

Yuying Ge, Yixiao Ge|arXiv (Cornell University)|Jul 16, 2023
Multimodal Machine Learning ApplicationsComputer Science被引用 10
一句话总结

SEED 引入了一个离散图像标记器,使现成的大语言模型能够通过 LoRA 调整的多模态模型执行图像到文本和文本到图像生成,使用 5M 图像文本对和一个 1D 因果 token 设计。

ABSTRACT

We present SEED, an elaborate image tokenizer that empowers Large Language Models (LLMs) with the emergent ability to SEE and Draw at the same time. Research on image tokenizers has previously reached an impasse, as frameworks employing quantized visual tokens have lost prominence due to subpar performance and convergence in multimodal comprehension (compared to BLIP-2, etc.) or generation (compared to Stable Diffusion, etc.). Despite the limitations, we remain confident in its natural capacity to unify visual and textual representations, facilitating scalable multimodal training with LLM's original recipe. In this study, we identify two crucial principles for the architecture and training of SEED that effectively ease subsequent alignment with LLMs. (1) Image tokens should be independent of 2D physical patch positions and instead be produced with a 1D causal dependency, exhibiting intrinsic interdependence that aligns with the left-to-right autoregressive prediction mechanism in LLMs. (2) Image tokens should capture high-level semantics consistent with the degree of semantic abstraction in words, and be optimized for both discriminativeness and reconstruction during the tokenizer training phase. As a result, the off-the-shelf LLM is able to perform both image-to-text and text-to-image generation by incorporating our SEED through efficient LoRA tuning. Comprehensive multimodal pretraining and instruction tuning, which may yield improved results, are reserved for future investigation. This version of SEED was trained in 5.7 days using only 64 V100 GPUs and 5M publicly available image-text pairs. Our preliminary study emphasizes the great potential of discrete visual tokens in versatile multimodal LLMs and the importance of proper image tokenizers in broader research.

研究动机与目标

  • 为自回归 LLM 设计一个统一视觉与文本表示的标记器以提高动力学。
  • 开发一个具有 1D 因果依赖和高级语义标记的基于 VQ 的图像标记器。
  • 证明通过 LoRA 与 LLM 集成的 SEED 能实现从视觉到语言和从语言到视觉的任务。
  • 展示在与既定多模态基线相比时的零样本检索与生成性能的竞争力。
  • 概述一个在有限计算资源与公开图像文本数据下的可扩展训练方案。

提出的方法

  • 将 SEED 设计为一个基于 VQ 的图像标记器,配备 ViT 编码器、因果 Q-Former、VQ 码本、反向 Q-Former 与 UNet 解码器。
  • 训练因果 Q-Former,利用 1D 因果注意力和图像-文本对比损失从 16x16 ViT 特征中产生 32 个因果嵌入。
  • 用 VQ 码本对因果嵌入进行量化,产生具有因果依赖性的 32 个离散视觉码。
  • 使用反向 Q-Former 将离散码映射到生成嵌入,与 Stable Diffusion 潜在空间对齐,从而实现图像合成。
  • 训练解码器从离散码重建连续嵌入,通过双重重建损失将生成嵌入与文本特征对齐。
  • 在 5M 图像文本对上使用 LoRA 对 SEED-OPT 2.7B 模型进行微调,使其能够执行图像到文本和文本到图像的自回归任务。
Figure 1: (a) The proposed SEED is a discrete image tokenizer, producing quantized visual codes with 1D causal dependency and high-level semantics. (b) SEED visual tokens enable LLMs to perform both visual comprehension and generation through multimodal autoregression with interleaved image-text dat
Figure 1: (a) The proposed SEED is a discrete image tokenizer, producing quantized visual codes with 1D causal dependency and high-level semantics. (b) SEED visual tokens enable LLMs to perform both visual comprehension and generation through multimodal autoregression with interleaved image-text dat

实验结果

研究问题

  • RQ1离散化、语义丰富的图像标记器是否能够与 LLM 的文本标记紧密对齐,从而实现统一的多模态自回归?
  • RQ21D 因果、高级语义的图像标记是否在 LLM 框架内有助于图像理解与图像生成?
  • RQ3将 SEED 与预训练 LLM 通过 LoRA 集成时,与既定多模态基线相比,其检索和生成能力如何?
  • RQ4在 modest compute 与数据规模下,训练此类标记器和多模态模型是否可行且能保持语义对齐?
  • RQ5将 SEED 与 LLM 结合时,在零样本图像字幕生成和视觉问答方面表现如何?

主要发现

  • SEED 标记在标准基准上对比 BLIP-2 的零样本图像文本检索具有竞争力。
  • 离散的 SEED 标记在与 Stable Diffusion 相比的图像生成性能上具有竞争力,并实现基于 CLIP 的语义对齐。
  • 通过 LoRA 在 5M 图像文本对上训练的 SEED-OPT 2.7B 展示了图像到文本和文本到图像的自回归能力。
  • SEED 通过反向 Q-Former 将离散标记解码到 SD-UNet 潜在空间,从而实现逼真的图像生成。
  • 定性演示表明 SEED 在不进行有监督的 VQA 微调的情况下也能够生成字幕并回答开放式视觉问题。
  • 该方法表明离散视觉标记可以有效支持 LLM 的新兴多模态能力。
Figure 2: Overview of our SEED tokenizer, which produces discrete visual codes with causal dependency and high-level semantics.
Figure 2: Overview of our SEED tokenizer, which produces discrete visual codes with causal dependency and high-level semantics.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。