用生成流网络高效优化语言模型提示词,提升搜索效率。
GFlowPO: Generative Flow Network as a Language Model Prompt Optimizer
- 将提示词搜索建模为后验推断问题,结合元提示先验。
- 通过重放策略复用历史评估结果,实现样本高效探索。
- 动态更新元提示,聚焦高奖励区域,适合少样本任务优化。
为语言模型寻找有效提示至关重要却极难:提示空间组合爆炸,目标模型评估成本高导致奖励稀疏。现有基于强化学习的提示优化方法常依赖在线策略更新和固定分布采样的元提示,样本效率低。我们提出GFlowPO,一种概率化提示优化框架,将提示搜索建模为受元提示引导的隐变量后验推断问题。第一步,用离线生成流网络(GFlowNet)目标微调轻量级提示语言模型,采用基于重放的训练策略复用历史提示评估,实现样本高效探索。第二步,引入无需训练的动态记忆更新机制(DMU),通过重放缓冲区中的多样化提示与小优先队列中的高绩效提示联合更新元提示,逐步聚焦于高奖励区域。在少样本文本分类、指令归纳基准及问答任务中,GFlowPO持续优于近期离散提示优化基线。
原文摘要 · Abstract (English)
Finding effective prompts for language models (LMs) is critical yet notoriously difficult: the prompt space is combinatorially large, rewards are sparse due to expensive target-LM evaluation. Yet, existing RL-based prompt optimizers often rely on on-policy updates and a meta-prompt sampled from a fixed distribution, leading to poor sample efficiency. We propose GFlowPO, a probabilistic prompt optimization framework that casts prompt search as a posterior inference problem over latent prompts regularized by a meta-prompted reference-LM prior. In the first step, we fine-tune a lightweight prompt-LM with an off-policy Generative Flow Network (GFlowNet) objective, using a replay-based training policy that reuses past prompt evaluations to enable sample-efficient exploration. In the second step, we introduce Dynamic Memory Update (DMU), a training-free mechanism that updates the meta-prompt by injecting both (i) diverse prompts from a replay buffer and (ii) top-performing prompts from a small priority queue, thereby progressively concentrating the search process on high-reward regions. Across few-shot text classification, instruction induction benchmarks, and question answering tasks, GFlowPO consistently outperforms recent discrete prompt optimization baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。