InstructSeq: Unifying Vision Tasks with Instruction-conditioned Multi-modal Sequence Generation

Rongyao Fang, Shilin Yan, Zhaoyang Huang, Jingqiu Zhou, Hao Tian, Jifeng Dai, Hongsheng LiarXiv 2023 · DOI

Abstract

InstructSeq is a unified multi-modal framework designed to execute a wide array of vision tasks—from pixel-level semantic segmentation to natural language image captioning—through flexible, free-form instructions. By leveraging an autoregressive transformer and a shared vocabulary of discrete tokens, the model bridges the gap between dense visual outputs and textual responses. Training on diverse, LLM-paraphrased prompts enables strong generalization and robustness to novel human commands, outperforming specialized models on several benchmarks.

Introduction

While Multi-modal Large Language Models (MLLMs) excel at conversational tasks like Visual Question Answering (VQA), they often struggle with "dense" vision tasks requiring precise spatial outputs, such as segmentation or localization. Conversely, traditional vision generalists often rely on rigid templates or visual prompts, making them brittle when faced with the variability of natural language. InstructSeq addresses this by treating all vision tasks as a sequence generation problem conditioned on free-form text, providing a single architecture capable of handling both dense visual and textual outputs.

Methodology

InstructSeq utilizes a multi-modal transformer architecture composed of three core components: a Visual Encoder (ViT-MAE), a frozen Instruction Encoder (RoBERTa), and an Autoregressive Transformer.

InstructSeq architecture overview showing the integration of visual and instruction encoders with an autoregressive transformer to produce diverse token types.

The system unifies diverse tasks by mapping all outputs into a shared vocabulary of three token types:

  • Dense Visual Tokens: Represented via a VQ-VAE as discrete grids (e.g., 16x16 or 32x32) that decode into segmentation masks.
  • Sparse Positional Tokens: 1,000 discrete bins representing bounding box coordinates [x1, y1, x2, y2].
  • Text Tokens: A standard 50k BPE vocabulary for natural language generation.

To ensure robustness, the authors employed Instruction Augmentation, using Claude-2 to paraphrase task templates into thousands of unique instructions. This forces the model to learn the underlying task intent rather than specific trigger phrases.

Key Insights

  • Robustness through Paraphrasing: Unlike template-based models that fail when prompts vary slightly, InstructSeq maintains performance across diverse linguistic inputs.
  • Unified Sequence Generation: By converting pixels and coordinates into tokens, "drawing" and "writing" become the same fundamental operation: predicting the next token in a sequence.
  • Stochastic Aggregation: As a generative model, InstructSeq can sample multiple sequences and aggregate results (voting) to improve final accuracy.
  • Confidence Mapping: The model's output probabilities allow for the generation of confidence maps, highlighting areas of uncertainty, such as object boundaries.

Experimental Results

InstructSeq demonstrates competitive performance against both specialized and generalist architectures:

  • Semantic Segmentation: Achieved 47.22 mIoU on COCO-Stuff and 47.01 mIoU on ADE20K, significantly outperforming previous generalist models like Unified-IO.
  • Referring Segmentation: Reached 59.60 oIoU on RefCOCO, showcasing its ability to link complex text descriptions in pixel-level masks.
  • Zero-Shot Generalization: On the FSS-1000 benchmark for unseen classes, InstructSeq achieved 68.7% mIoU, surpassing other generalist methods like Painter (62.3%).

Discussion and Limitations

Despite its strengths, InstructSeq faces challenges common to autoregressive models. Inference speed is slower than feed-forward architectures due to token-by-token generation. Additionally, the reliance on VQ-VAE tokens limits output resolution, potentially losing fine-grained details. Future work will explore decoupling linguistic intents to minimize task interference and improving the efficiency of the autoregressive decoding process.

Summary updated

BibTeX
@misc{fang2023instructseq,
  author = {Rongyao Fang and Shilin Yan and Zhaoyang Huang and Jingqiu Zhou and Hao Tian and Jifeng Dai and Hongsheng Li},
  title = {{InstructSeq: Unifying Vision Tasks with Instruction-conditioned Multi-modal Sequence Generation}},
  year = {2023},
  eprint = {2311.18835},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.18835},
}
Figure