When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitations
Aleksandar Petrov, Philip H. S. Torr, Adel Bibi
TL;DR
This work develops a theoretical framework for context-based fine-tuning methods in transformers, clarifying the expressiveness of prompting, soft prompting, and prefix-tuning relative to full fine-tuning. It proves that while soft prompting and prefix-tuning can exploit embedding-space capacity to control model behavior, prefix-tuning cannot alter the intrinsic attention patterns and thus cannot learn completely new tasks, only bias outputs and surface pretrained skills. The authors provide explicit constructions showing exponential generation capacity with a single virtual token and analyze cross-layer effects, explaining why prefix-tuning often fares well on related tasks but struggles with novel ones. The findings have implications for catastrophic forgetting, model alignment, and interpretability, suggesting context-based methods preserve pretrained capabilities while offering limited new capabilities, with practical success arising from skill elicitation and task-combination rather than universal task-learning.
Abstract
Context-based fine-tuning methods, including prompting, in-context learning, soft prompting (also known as prompt tuning), and prefix-tuning, have gained popularity due to their ability to often match the performance of full fine-tuning with a fraction of the parameters. Despite their empirical successes, there is little theoretical understanding of how these techniques influence the internal computation of the model and their expressiveness limitations. We show that despite the continuous embedding space being more expressive than the discrete token space, soft-prompting and prefix-tuning are potentially less expressive than full fine-tuning, even with the same number of learnable parameters. Concretely, context-based fine-tuning cannot change the relative attention pattern over the content and can only bias the outputs of an attention layer in a fixed direction. This suggests that while techniques like prompting, in-context learning, soft prompting, and prefix-tuning can effectively elicit skills present in the pretrained model, they may not be able to learn novel tasks that require new attention patterns.
