Lune

ICLR2024Top-tier venue

MEND: Meta Demonstration Distillation for Efficient and Effective In-Context Learning

Yichuan Li, Xiyao Ma, Sixing Lu, Kyumin Lee, Xiaohu Liu, Chenlei Guo

Abstract

Large Language models (LLMs) have demonstrated impressive in-context learning (ICL) capabilities, where a LLM makes predictions for a given test input together with a few input-output pairs (demonstrations). Nevertheless, the inclusion of demonstrations leads to a quadratic increase in the computational overhead of the selfattention mechanism. Existing solutions attempt to distill lengthy demonstrations into compact vectors. However, they often require task-specific retraining or compromise LLM's in-context learning performance. To mitigate these challenges, we present Meta dEmonstratioN Distillation (MEND), where a language model learns to distill any lengthy demonstrations into vectors without retraining for a new downstream task. We exploit the knowledge distillation to enhance alignment between MEND and LLM, achieving both efficiency and effectiveness simultaneously. MEND is endowed with the meta-knowledge of distilling demonstrations through a two-stage training process, which includes meta-distillation pretraining and fine-tuning. Comprehensive evaluations across seven diverse ICL task partitions using decoder-only (GPT-2) and encoder-decoder (T5) attest to MEND's prowess. It not only matches but often outperforms the Vanilla ICL as well as other state-of-the-art distillation models, while significantly reducing the computational demands. This innovation promises enhanced scalability and efficiency for the practical deployment of large language models 1.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learning to Compress Prompts with Gist Tokens cites Language Models are Few-Shot Learners
  • Doc-to-LoRA: Learning to Instantly Internalize Contexts cites Learning to Compress Prompts with Gist Tokens
  • Doc-to-LoRA: Learning to Instantly Internalize Contexts cites Language Models are Few-Shot Learners
  • A Survey on In-context Learning cites Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
  • A Survey on In-context Learning cites Language Models are Few-Shot Learners
  • Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites Language Models are Few-Shot Learners
  • Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites UnifiedQA: Crossing Format Boundaries With a Single QA System
  • Rethinking the Evaluation of In-Context Learning for LLMs cites A Survey on In-context Learning
  • Rethinking the Evaluation of In-Context Learning for LLMs cites Language Models are Few-Shot Learners
  • Language Models are Few-Shot Learners cites UnifiedQA: Crossing Format Boundaries With a Single QA System
  • DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfer cites A Survey on In-context Learning
  • DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfer cites Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?
  • DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge Transfer cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
  2. Doc-to-LoRA: Learning to Instantly Internalize ContextsRujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, Robert LangeICML 2026 · 27 citations
  3. DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge TransferRuoyu Wang, Junda Wu, Yu Xia, Tong Yu et al.KDD 2026 · 6 citations
  4. Rethinking the Evaluation of In-Context Learning for LLMsGuoxin Yu, Lemao Liu, Mo Yu, Yue Yu et al.EMNLP 2024

Builds on9

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations
  3. UnifiedQA: Crossing Format Boundaries With a Single QA SystemDaniel Khashabi, Sewon Min, Tushar Khot, Ashish Sabharwal et al.EMNLP Findings 2020 · 514 citations
  4. Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 citations
  5. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations

Related papers

  1. Embedding-based In-Context Prompt Training for Enhancing LLMs as Text EncodersAiliang Lin, Zhuoyun Li, Keyu Mao, Kotaro Funakoshi et al.ACL Findings 2026
  2. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 citations
  3. Hyper-ICL: Attention Calibration with Hyperbolic Anchor Distillation for Multimodal In-Context LearningNiloufar Alipour Talemi, Hossein Kashiani, Fatemeh AfghahICML 2026
  4. FiD-ICL: A Fusion-in-Decoder Approach for Efficient In-Context LearningQinyuan Ye, Iz Beltagy, Matthew E. Peters, Xiang Ren et al.ACL 2023 · 5 citations
  5. In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space SteeringSheng Liu, Haotian Ye, Lei Xing, James Y. ZouICML 2024 · 244 citations
Dusk over the sea between two cliffs drawn in fine vertical lines