用上下文示范优化提示,提升伪监督数据质量,防止过拟合。
In-context Demonstration Matters: On Prompt Optimization for Pseudo-Supervision Refinement
- 通过文本批评反馈迭代优化提示和伪标签
- 在问答与分子优化任务中提升生成一致性与准确率
- 适合资源有限时改进大模型下游性能
大型语言模型在多种任务中表现优异,但微调常需人工标注或重训练,成本高昂。为应对这一挑战,本文提出一种新方法:利用无监督下游任务生成高置信度伪监督数据,并通过上下文学习能力联合优化提示与伪监督。所提算法PAPO确保当使用伪监督数据作为示范时,模型对同一输入生成一致响应,从而整体优化伪监督。通过将梯度信号转化为文本批评作为反馈,实现提示与模型输出的迭代精炼。理论分析表明,优化后的伪监督具有几何聚类结构,有助于缓解过拟合。在问答、自然语言推理及真实分子优化任务上的实验验证了该方法的有效性。
原文摘要 · Abstract (English)
Large language models (LLMs) have achieved great success across diverse tasks, and fine-tuning is sometimes needed to further enhance generation quality. Most existing methods rely on human supervision or parameter retraining, both of which are costly in terms of data collection and computational resources. To handle these challenges, a direct solution is to generate ``high-confidence'' data from unsupervised downstream tasks and use them for in-context prompting or prompt optimization to refine the pseudo-supervision. However, relying solely on such data may lead to overfitting. In this paper, we leverage the in-context learning (ICL) abilities of LLMs and propose a novel approach, pseudo-supervised demonstrations aligned prompt optimization (PAPO) algorithm, which jointly refines both the prompt and the overall pseudo-supervision. The proposed learning objective ensures that the optimized prompt guides the LLM to generate consistent responses for a given input when pseudo-supervised data from the downstream task are used as demonstrations, enabling refinement over the entire pseudo-supervision. The prompt is optimized by translating gradient signals into textual critiques, which serve as feedback to iteratively refine the prompt and model responses. Theoretical analysis in a simplified classification setting shows that the refined pseudo-supervision exhibits a geometric clustering structure, helping to mitigate overfitting. Experiments on question answering, natural language inference benchmarks, and a real-world molecule optimization task, show the effectiveness of the proposed algorithm.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。