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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 14e8fd1c-2069-449c-ab4f-8e2f1a91fca3Cited by top-tier papers3
- Skill Neologisms: Towards Skill-based Continual LearningAntonin Berthon, Nicolás Astorga, Mihaela van der SchaarICML 2026 · 1 citation
- PromptLoop: Plug-and-Play Prompt Refinement via Latent Feedback for Diffusion Model AlignmentSuhyeon Lee, Jong Chul YeCVPR 2026
- 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
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
- Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
- Promptbreeder: Self-Referential Self-Improvement via Prompt EvolutionChrisantha Fernando, Dylan Banarse, Henryk Michalewski, Simon Osindero et al.ICML 2024 · 432 citations
Related papers
- Prompting a Pretrained Transformer Can Be a Universal ApproximatorAleksandar Petrov, Philip Torr, Adel BibiICML 2024 · 19 citations
- SPT: Learning to Selectively Insert Prompts for Better Prompt TuningWei Zhu, Ming TanEMNLP 2023 · 7 citations
- When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and LimitationsAleksandar Petrov, Philip Torr, Adel BibiICLR 2024 · 44 citations
- On the Role of Attention in Prompt-tuningSamet Oymak, Ankit Singh Rawat, Mahdi Soltanolkotabi, Christos ThrampoulidisICML 2023 · 67 citations
- Universality and Limitations of Prompt TuningYihan Wang, Jatin Chauhan, Wei Wang, Cho-Jui HsiehNeurIPS 2023 · 48 citations
