Title: Understanding Prompt Tuning and In-Context Learning via Meta-Learning
Venue: NeurIPS 2025
Accepted: yes
Keywords: prompting

prefix tuning

in-context learning

meta-learning

Bayes

frontier model
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.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies prompt tuning under the lens of memory-based meta-learning. It discusses how the problem of finding of optimal prompt for a task can be viewed as conditioning of Bayes predictors. The result of this theory is an understanding of the conditions when optimal prompting is possible or not. \n\nThe paper presents a detailed theoretical discussion as well as simulations based on coin-flip data. Interestingly, the paper shows that optimal prompting is not possible when the fine-tuning data and evaluation data is a task mixture.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n - The paper is extremely well-written. I spent several hours re-reading it and learned a tremendous amount of new material. It reminded me the joys of being a reviewer. \n - The paper provides a theoretical framework for thinking about prompting and in-context learning. This is very valuable for improving our understanding. \n\nI do not see any major weaknesses. Perhaps one might be concerned whether the conclusions on simplified experiments can transfer to real-world language models, but I do not think this decreases the value of the theoretical framework.\n\nQUESTIONS:\nI have a few detailed technical questions. \n\n1. Theory for Soft prompting:\n - (1.a) Eq 8 and 9 show when hard prompting is expected to work. However, it does not apply to soft versions, correct?\n - (1.b) If correct, is it possible to extend the theory to deal with SimplexPT, RealPT, SoftPT? I understand these are off-distribution, but is it at least possible to extend the theory for SimplexPT? What is needed? If it is not possible, what exactly is the challenge? \n - Rationale for the question: the empirical results and discussion in Section 5 talks about the superior performance of soft prompts, so it will be nice if this can be captured by the theory. \n\n2. Memory-based meta-learning definition: \n - (2.a) I was not aware of this term. Did it arise from [Ortega 2019] or is there an earlier reference? Also, what exactly is the part that is \"memory-based\"? \n - (2.b) There have been other papers that propose a Bayesian inference view of in-context learning, such as [Xie 2021] discussed in Section D. How exactly does the memory-based meta-learning framework compare? Is it exactly the same? Is it a generalization? Or are there some nuanced differences despite the similarities?\n - (2.c) Lines 90-95 describes the training process. Are you saying that all LLM pre-training performed by Meta, Google, OpenAi, etc. is essential operating as memory-based meta-learning, except that the task sampling (step 2) is not explicit? \n - (2.d) The Remark in Section 2 says \"The main concerns w.r.t. the applicability of the Bayesian viewpoint is that due to limited expressivity, limited data, suboptimal optimization, and off-distribution inputs, models may not converge to or operate in the Bayesian regime.\" I am not sure I fully understand the implications of this. Expressivity and data can be scaled up in LLMs and suboptimal optimization can be ameliorated with good methods, so in what way is the Bayesian viewpoint not applicable to LLM training in practice? \n\n3. Fig 2: Please provide more explanation on how to interpret the plot. \n - (3.a) What do I make of the difference between random coins and single coin trajectories? \n - (3.b) Where do you observe the off-distribution nature of soft-prefixes? \n - (3.c) What do the red points (n=6) mean, and why are there multiple per graph? \n - (3.d) The general shape for random coins differs between transformer and LSTM. Why? \n\n4. TargetBayes, PreBayes, PreBayesPT: I did not follow how these are constructed and how these differ from each other. Can you provide more description or pseudocode for each separately? \n\n----\n\nMinor comments:\n- line 87: typo \"preforming a forward pass\" --> performing\n- I do not quite appreciate the use of longer strings for eval. (N_eval = 200). Does it matter to show generalization beyond tuning length in this experiment?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 2, "CLARITY": 4, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper describes prompt tuning through a Bayesian lens and runs a number of experiments with many prompt tuning baselines in a synthetic setting. They include some mechanistic analysis of the proposed methods.\n\nSTRENGTHS AND WEAKNESSES:\nStrengthes:\n- Prompt/prefix tuning is important, interesting, and understudied.\n- The theoretical analysis seems sound. Exploring LLM-related topics through a Bayesian lens seems important.\n- The baselines are thorough and include all the prompt tuning methods I would expect (except perhaps some missing variants of HardPT).\n- The experiments on untrained transformers surprised me and could translate to text data.\n\nWeaknesses:\n- Experiments are limited to randomly generated synthetic datasets. It is not clear how if at all any findings might be useful in real-world scenarios.\n- The Bayesian lens doesn't appear to tell us anything new about how prompt tuning works.\n- There are many ways to implement \"HardPT\" and there isn't much if any discussion of this.\n\nQUESTIONS:\n- Is 1000 steps of pretraining really enough training to learn the distribution of random coin flips? I would expect this to be hard to learn and general require much more training.\n- This is a tiny nitpick but it might be cleaner to name the embedding dimension 'd' instead of writing out 'Embedding-dimensionality' in superscript in S3.\n- How was HardPT implemented? Did you try a state-of-the-art discrete optimizer such as GCG (https://arxiv.org/abs/2307.15043)?\n\n'The embedding is a trainable linear projection from the 2D token space into a 128-dimensional “embedding” space.'\n   Is the input not a single dimension? (1 or 0)\n\n- A small presentation question: What is the main intended takeaway from Figure 1? Clarifying language in the caption may go a long way here.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 4, "DATE": "2025-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper provides a conceptual framework of viewing the large pretrained LLMs as meta-trained neural networks which can behave as Bayesian predictors over their pretraining distributions. It reinterprets prompt tuning as conditioning those Bayesian predictors with short prefixes. It proves that prompting can reach bayes-optimal performance only when the target task already lies inside the pretraining support and is unimodal. It shows two formal failure modes: multimodal targets and tasks never seen in pretraining. It validates the theory with toy coin-flip tasks using tiny ttransformers and LSTMs. It finds soft prompts inject more information than any hard token sequence. It also shows weight tuning sidesteps the theoretical limits but overwrites the original model. The paper is overall clearly written and insightful yet confined to trivial data, small models.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n1. This paper introduces a novel view of viewing the large-corpus pretraining of LLM as meta-training, where each training example is conditioned on an task and then the LLM becomes a sequential bayesian predictor, And this paper recasts prompting as steering this bayesian predictor. \n2. it has analyzed theoretical conditions for which the optimal prompting is and is not possible. And they empirically demonstrated this claim on atomic tasks.\n3. Through educational expeirments, they comfirm their theoretical conditions results. \n4. it also includes visual evidence in the PCA plots which shows how different prefixes physically move the hidden states into the region which means a good posterior region.\n\nCons:\n1. The educational experiments might not extend to real-world tasks where the combinatorial structure of language, vision or other modalities. \n2. the experiments are only conduced on small transformers and LSTM.\n\nQUESTIONS:\n1. The educational experiments are only conduced on small models like LSTMs. How do you predict your results might translate to these more modern LLMs like GPT series, LLama.\n2. How your bayesian optimization and meta learning view explains the in-context learning ability's brittleness in context order, prompt formats sensitivities?\n3. What actionable guidance does your analysis offer for practitioners—e.g., on choosing prefix length, deciding between soft-prompt tuning and weight-tuning?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper shows that meta-trained neural networks can be approximated as Bayes-optimal predictors and explore which prefix tuning technique results in optimal prompting (Bayes-optimal). To investigate this, the paper first conducts theoretical analysis, where it derives a connection between minimizing expected log loss over a distribution of stochastic data generators and the Bayes-optimal predictor for that pre-training distribution. For empirical analysis, the authors used an educational experimental setup using coin-flip sequences, where the exact Bayes-optimal predictor is analytically known. Also they train a basic Transformer and a LSTM architecture model, comparing the performance of various prefix tuning strategies against traditional weight tuning and other baselines. The empirical findings indicate that prefix tuning methods do not reach Bayes-optimal. Weight tuning methods achieve better results than prefix-tuning, although there is still a small gap when compared against Bayes-optimal.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths\n\n- I really like the idea of connecting meta-learning to Bayesian predictors. \n- The theoretical analysis is well-grounded.\n-  Clean and controlled experimental setup using coin-flip sequences, where the Bayes-optimal predictor is analytically known. This allows for precise evaluation of different tuning methods. \n- The authors also compare an exhaustive set of techniques, including prefix tuning variants and full weight tuning, providing a comprehensive view of their relative performance.\n\nWeaknesses\n\n- Even though the coin flip provides a good starting point, it does not capture the complexity and variability of real-world data. Therefore how to extend the study to complex real world tasks remains unclear. Extending the study to include richer synthetic tasks or controlled natural datasets (e.g., language modeling on short-form text, or structured reasoning problems) would provide stronger evidence for the claims. \n- As it might be difficult to get Target Bayes for real world tasks, is there a way to approximate this optimal value? Which will help point 1 too.\n- Is the result pattern we see on the coin-flip dataset consistent with another model size or is specific to the chosen model? A few selected experiments may help answer this.\n\nQUESTIONS:\nNA\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 4, "ORIGINALITY": 4, "DATE": "2025-07-16"}