Skip to main content
QUICK REVIEW

[Paper Review] Meta-learning via Language Model In-context Tuning

Yanda Chen, Ruiqi Zhong|arXiv (Cornell University)|Oct 15, 2021
Topic ModelingComputer Science17 citations
TL;DR

This paper proposes in-context tuning (ICT), a meta-learning method that fine-tunes a pre-trained language model to directly predict labels from in-context examples, improving few-shot learning performance and robustness. ICT outperforms both raw prompting and MAML by up to 10% AUC-ROC on binary classification tasks and significantly reduces sensitivity to example ordering and wording.

ABSTRACT

The goal of meta-learning is to learn to adapt to a new task with only a few labeled examples. To tackle this problem in NLP, we propose $ extit{in-context tuning}$, which recasts adaptation and prediction as a simple sequence prediction problem: to form the input sequence, we concatenate the task instruction, the labeled examples, and the target input to predict; to meta-train the model to learn from in-context examples, we fine-tune a pre-trained language model (LM) to predict the target label from the input sequences on a collection of tasks. We benchmark our method on two collections of text classification tasks: LAMA and BinaryClfs. Compared to first-order MAML which adapts the model with gradient descent, our method better leverages the inductive bias of LMs to perform pattern matching, and outperforms MAML by an absolute $6\%$ AUC ROC score on BinaryClfs, with increasing advantage w.r.t. model size. Compared to non-fine-tuned in-context learning (i.e. prompting a raw LM), in-context tuning directly learns to learn from in-context examples. On BinaryClfs, in-context tuning improves the average AUC-ROC score by an absolute $10\%$, and reduces the variance with respect to example ordering by 6x and example choices by 2x.

Motivation & Objective

  • To address the poor generalization and high sensitivity of raw large language models in few-shot learning, especially to example ordering and instruction wording.
  • To improve few-shot performance by meta-training a language model to learn from in-context examples, rather than relying on gradient-based adaptation.
  • To reduce the over-sensitivity of in-context learning in pre-trained LMs, which often leads to unstable predictions under minor input variations.
  • To demonstrate that fine-tuning LMs directly for in-context learning outperforms both prompting raw models and optimization-based meta-learning (e.g., MAML).
  • To show that in-context tuning better leverages the inductive bias of LMs for few-shot adaptation, especially as model scale increases.

Proposed method

  • Reformulates few-shot learning as a sequence prediction task: input is formed by concatenating task instruction, in-context examples, and target input.
  • Fine-tunes a pre-trained language model end-to-end to predict the correct label token given the full input sequence, directly optimizing for few-shot performance.
  • Uses a bi-level optimization-free training setup, avoiding the nested optimization of MAML by freezing model weights during inference and adaptation.
  • Employs a standard language modeling objective (next-token prediction) on a diverse set of few-shot tasks to train the model to generalize from in-context examples.
  • Applies in-context tuning on two benchmark datasets: LAMA (knowledge probing) and BinaryClfs (binary text classification) with few-shot examples.
  • Evaluates robustness by measuring performance variance under perturbations such as example reordering, example selection, and instruction wording changes.

Experimental results

Research questions

  • RQ1Can fine-tuning a pre-trained language model to perform in-context learning improve few-shot generalization beyond raw prompting?
  • RQ2How does in-context tuning compare to gradient-based meta-learning methods like MAML in terms of accuracy and robustness?
  • RQ3To what extent does in-context tuning reduce sensitivity to example ordering, example selection, and instruction wording in few-shot prompting?
  • RQ4Does the performance gain of in-context tuning scale with model size, and does it better exploit the inductive bias of large language models?
  • RQ5Can in-context tuning mitigate known artifacts of in-context learning, such as recency bias and overfitting to example format?

Key findings

  • ICT improves average AUC-ROC by 10.6 percentage points on the BinaryClfs benchmark compared to raw prompting, with a 6x reduction in variance due to example ordering.
  • ICT reduces variance from example choice by 2x compared to raw prompting, indicating greater robustness to in-context example selection.
  • ICT outperforms first-order MAML by 5.1 points in AUC-ROC on BinaryClfs and by 2.8 points on LAMA, with larger gains on larger models.
  • On LAMA, ICT improves Precision@1 by 7.6 points over raw prompting, demonstrating improved factual knowledge retrieval.
  • ICT significantly reduces sensitivity to instruction wording, decreasing performance variance by 19% on LAMA compared to raw prompting.
  • The method shows increasing performance gains with model scale, suggesting that in-context tuning better leverages the inductive bias of large pre-trained models.

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.