Skip to main content
QUICK REVIEW

[Paper Review] Language Models are General-Purpose Interfaces

Yaru Hao, Haoyu Song|arXiv (Cornell University)|Jun 13, 2022
Topic ModelingComputer Science27 citations
TL;DR

MetaLM trains a semi-causal language model that docks bidirectional encoders (for language and vision) with a causal language model to serve as a general-purpose interface for diverse tasks, enabling multitask finetuning, instruction tuning, and in-context learning across language-only and vision-language settings.

ABSTRACT

Foundation models have received much attention due to their effectiveness across a broad range of downstream applications. Though there is a big convergence in terms of architecture, most pretrained models are typically still developed for specific tasks or modalities. In this work, we propose to use language models as a general-purpose interface to various foundation models. A collection of pretrained encoders perceive diverse modalities (such as vision, and language), and they dock with a language model that plays the role of a universal task layer. We propose a semi-causal language modeling objective to jointly pretrain the interface and the modular encoders. We subsume the advantages and capabilities from both causal and non-causal modeling, thereby combining the best of two worlds. Specifically, the proposed method not only inherits the capabilities of in-context learning and open-ended generation from causal language modeling, but also is conducive to finetuning because of the bidirectional encoders. More importantly, our approach seamlessly unlocks the combinations of the above capabilities, e.g., enabling in-context learning or instruction following with finetuned encoders. Experimental results across various language-only and vision-language benchmarks show that our model outperforms or is competitive with specialized models on finetuning, zero-shot generalization, and few-shot learning.

Motivation & Objective

  • Unify diverse tasks under a single open-ended generation interface mediated by a universal task layer.
  • Develop a semi-causal pretraining objective that jointly trains encoders and the interface.
  • Demonstrate that the MetaLM interface supports in-context learning, fine-tuning, and zero-/few-shot generalization across language-only and vision-language tasks.
  • Show that combining non-causal encoders with a causal decoder yields competitive or superior performance to task-specific models.

Proposed method

  • Introduce MetaLM, a semi-causal language model with a unidirectional decoder and multiple bidirectional encoders (connectors) for different modalities.
  • Design a semi-causal objective that autoregressively generates tokens while conditioning on bidirectional-span representations from encoders.
  • Use a connector layer to map encoder outputs to the universal task layer and share the output vocabulary for predicting tokens.
  • Pretrain on large English text (Pile) and, for vision-language tasks, on image-text pairs with a joint pretraining objective.
  • Evaluate across language-only and vision-language benchmarks in multitask finetuning, single-task finetuning, instruction tuning, in-context learning, zero-/few-shot settings, and downstream finetuning.
  • Present results comparing MetaLM against GPT on multitask finetuning and across multiple task clusters.

Experimental results

Research questions

  • RQ1Can a semi-causal pretraining objective allow a universal language model interface to benefit from both causal and bidirectional encoders?
  • RQ2Does wiring multiple bidirectional encoders to a causal decoder enable effective multitask fine-tuning, instruction following, and in-context learning across language-only and multimodal tasks?
  • RQ3How does MetaLM perform on zero-/few-shot generalization, in-context learning, and finetuning compared to task-specific baselines?
  • RQ4What are the gains from single-task finetuning when updating only the encoders while keeping the interface fixed?
  • RQ5Can vision-language tasks be effectively handled via the same semi-causal interface with appropriate connectors?

Key findings

  • MetaLM consistently surpasses GPT on most multitask finetuning task clusters, especially in NLU and reading comprehension.
  • Single-task finetuning with encoder-only updates yields competitive results compared to strong baselines while keeping the interface fixed.
  • Instruction tuning with MetaLM significantly improves zero-shot and best-template performance across clusters.
  • In-context learning with MetaLM matches or exceeds GPT in several StoryCloze, HellaSwag, Winograd-style, and commonsense tasks.
  • On vision-language tasks, the framework supports zero-shot, in-context, and finetuning modes with competitive results across VQA, captioning, visual reasoning, and explanations.
  • Across language-only tasks, MetaLM shows notable gains in natural language inference, sentiment, paraphrase, and question answering clusters when finetuned versus zero-shot.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.