Skip to main content
QUICK REVIEW

[Paper Review] In-context Learning Distillation: Transferring Few-shot Learning Ability of Pre-trained Language Models

Yukun Huang, Yanda Chen|arXiv (Cornell University)|Dec 20, 2022
Topic ModelingComputer Science9 citations
TL;DR

This paper introduces in-context learning distillation (ICL-D), a knowledge distillation framework that transfers few-shot learning capabilities from large pre-trained language models to smaller student models by jointly optimizing in-context learning and language modeling objectives. The method achieves state-of-the-art performance on LAMA and CrossFit benchmarks, with student models up to 13.4× smaller and 3.6× faster than the teacher while retaining 91.4% of its performance.

ABSTRACT

Given the success with in-context learning of large pre-trained language models, we introduce in-context learning distillation to transfer in-context few-shot learning ability from large models to smaller models. We propose to combine in-context learning objectives with language modeling objectives to distill both the ability to read in-context examples and task knowledge to the smaller models. We perform in-context learning distillation under two different few-shot learning paradigms: Meta In-context Tuning (Meta-ICT) and Multitask In-context Tuning (Multitask-ICT). Multitask-ICT performs better on multitask few-shot learning but also requires more computation than Meta-ICT. Our method shows consistent improvements for both Meta-ICT and Multitask-ICT on two benchmarks: LAMA and CrossFit. Our extensive experiments and analysis reveal that in-context learning objectives and language modeling objectives are complementary under the Multitask-ICT paradigm. In-context learning objectives achieve the best performance when combined with language modeling objectives.

Motivation & Objective

  • To address the high computational cost and deployment barriers of large pre-trained language models in real-time and resource-constrained systems.
  • To transfer few-shot in-context learning ability from large teacher models to smaller student models, enabling efficient deployment.
  • To investigate whether in-context learning ability can be effectively transferred via knowledge distillation, especially under multitask few-shot settings.
  • To explore the complementary roles of in-context learning and language modeling objectives in distillation for few-shot learning.
  • To propose a new few-shot learning paradigm, Multitask In-context Tuning (Multitask-ICT), that improves upon Meta-ICT in performance at the cost of higher computation.

Proposed method

  • Proposes in-context learning distillation (ICL-D), a teacher-student framework that distills both in-context learning behavior and task-specific knowledge from a large teacher model to a smaller student model.
  • Combines in-context learning objectives—learning to infer tasks from input-output demonstrations—with language modeling objectives to enhance knowledge transfer.
  • Applies the distillation framework under two few-shot learning paradigms: Meta-ICT (meta-trained on diverse tasks) and Multitask-ICT (tuned jointly on multiple few-shot tasks).
  • Introduces Multitask-ICT as a new paradigm that fine-tunes the model on in-context examples from multiple target tasks before inference, improving performance over Meta-ICT.
  • Uses soft-label distillation from the teacher model to guide the student’s prediction distribution, while also leveraging the teacher’s hidden representations for knowledge transfer.
  • Employs a dual-objective training objective: one for in-context learning (conditioned on demonstrations) and one for language modeling (next-token prediction), both optimized jointly.

Experimental results

Research questions

  • RQ1Can in-context few-shot learning ability be effectively transferred from large pre-trained language models to smaller student models via knowledge distillation?
  • RQ2How do in-context learning objectives and language modeling objectives interact and complement each other during distillation?
  • RQ3Does the proposed Multitask-ICT paradigm outperform Meta-ICT in few-shot learning performance, and at what computational cost?
  • RQ4To what extent does the distribution of meta-training tasks influence the performance of Meta-ICT, and can distillation mitigate data sparsity?
  • RQ5Can distillation with only language modeling objectives transfer useful knowledge for in-context learning, or is in-context learning supervision essential?

Key findings

  • In-context learning distillation consistently improves few-shot performance on both LAMA and CrossFit benchmarks under both Meta-ICT and Multitask-ICT paradigms.
  • Multitask-ICT outperforms Meta-ICT in few-shot learning accuracy but requires significantly more computation during adaptation.
  • The combination of in-context learning and language modeling objectives yields the best performance in Multitask-ICT, demonstrating their complementary nature.
  • Language modeling distillation alone performs poorly, achieving only 18.5% P@1 on Setting 3, indicating it is insufficient without in-context learning supervision.
  • A student model reduced to 1/13.4th the size of the teacher model retains 91.4% of the teacher’s performance on CrossFit under Multitask-ICT.
  • A 93% model size reduction results in a 1.7× speedup and 91.4% performance retention, with some smaller models even outperforming the teacher.

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.