🤖 AI Summary
Existing PAC-Bayesian generalization theory yields non-vacuous bounds only in the large-data regime, failing to explain the empirical success of few-shot prompt engineering. To address low-resource prompt optimization, this work introduces a novel regularization mechanism that employs data-dependent perplexity as a prior, enabling the construction of data-adaptive PAC-Bayesian generalization bounds over discrete prompt spaces. The resulting bound is non-vacuous and computationally tractable even with limited samples, and—crucially—explicitly incorporates the intrinsic uncertainty of language models (quantified via perplexity) into the theoretical analysis of prompt learning for the first time. We theoretically establish that the bound’s generalization error decays more slowly with sample size than conventional PAC-Bayes bounds, enhancing robustness in low-data settings. Empirical evaluation demonstrates that perplexity regularization consistently improves few-shot prompt generalization, yielding average accuracy gains of 2.1–5.7 percentage points across multiple benchmark tasks.
📝 Abstract
Many prompt engineering techniques have been successful in practice, even when optimizing over a large prompt space with with a small amount of task-specific data. Recent work has partially explained this success by showing generalization bounds which apply PAC-Bayes theory to the discrete prompt space, but they are non-vacuous only in data-rich scenarios. We argue that such widespread success can be more fully explained through more carefully considering data- or distribution-dependent perplexity, which acts as an effective prior and steers the optimization towards prompts that are more ``natural''for the task at hand. We derive novel generalization bounds that are non-vacuous for data-scarce prompt optimization via more useful priors, formally analyzing how perplexity regularization tightens these bounds by limiting exploration. Empirically, we explore both the bounds'effectiveness and the practical benefits of perplexity regularization in improving prompt generalization.