Lune

NeurIPS2025Top-tier venue

Understanding Prompt Tuning and In-Context Learning via Meta-Learning

Tim Genewein, Kevin Li, Jordi Grau-Moya, Anian Ruoss, Laurent Orseau, Marcus Hutter

Abstract

Prompting is one of the main ways to adapt a pretrained model to target tasks. Besides manually constructing prompts, many prompt optimization methods have been proposed in the literature. Method development is mainly empirically driven, with less emphasis on a conceptual understanding of prompting. In this paper we discuss how optimal prompting can be understood through a Bayesian view, which also implies some fundamental limitations of prompting that can only be overcome by tuning weights. The paper explains in detail how meta-trained neural networks behave as Bayesian predictors over the pretraining distribution, whose hallmark feature is rapid in-context adaptation. Optimal prompting can be studied formally as conditioning these Bayesian predictors, yielding criteria for target tasks where optimal prompting is and is not possible. We support the theory with educational experiments on LSTMs and Transformers, where we compare different versions of prefix-tuning and different weight-tuning methods. We also confirm that soft prefixes, which are sequences of real-valued vectors outside the token alphabet, can lead to very effective prompts for trained and even untrained networks by manipulating activations in ways that are not achievable by hard tokens. This adds an important mechanistic aspect beyond the conceptual Bayesian theory.

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.

3 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

  • PromptLoop: Plug-and-Play Prompt Refinement via Latent Feedback for Diffusion Model Alignment cites LoRA: Low-Rank Adaptation of Large Language Models
  • PromptLoop: Plug-and-Play Prompt Refinement via Latent Feedback for Diffusion Model Alignment cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • Skill Neologisms: Towards Skill-based Continual Learning cites LoRA: Low-Rank Adaptation of Large Language Models
  • Transformers Learn In-Context by Gradient Descent cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites An Explanation of In-context Learning as Implicit Bayesian Inference
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Skill Neologisms: Towards Skill-based Continual LearningAntonin Berthon, Nicolás Astorga, Mihaela van der SchaarICML 2026 · 1 citation
  2. PromptLoop: Plug-and-Play Prompt Refinement via Latent Feedback for Diffusion Model AlignmentSuhyeon Lee, Jong Chul YeCVPR 2026
  3. LMAct: A Benchmark for In-Context Imitation Learning with Long Multimodal DemonstrationsAnian Ruoss, Fabio Pardo, Harris Chan, Bonnie Li et al.ICML 2025

Builds on29

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
  3. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
  4. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
  5. Promptbreeder: Self-Referential Self-Improvement via Prompt EvolutionChrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero et al.ICML 2024 · 432 citations

Related papers

  1. Prompting a Pretrained Transformer Can Be a Universal ApproximatorAleksandar Petrov, Philip Torr, Adel BibiICML 2024 · 19 citations
  2. Selective Prefix Tuning for Pre-trained Language ModelsHongyi Zhang, Zuchao Li, Ping Wang, Hai ZhaoACL Findings 2024 · 6 citations
  3. SPT: Learning to Selectively Insert Prompts for Better Prompt TuningWei Zhu, Ming TanEMNLP 2023 · 7 citations
  4. Late Prompt Tuning: A Late Prompt Could Be Better Than Many PromptsXiangyang Liu, Tianxiang Sun, Xuanjing Huang, Xipeng QiuEMNLP Findings 2022 · 15 citations
  5. When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and LimitationsAleksandar Petrov, Philip Torr, Adel BibiICLR 2024 · 44 citations
Dusk over the sea between two cliffs drawn in fine vertical lines