用强化学习方法高效优化大模型提示词,支持隐私保护协作。
FedPOB: Sample-Efficient Federated Prompt Optimization via Bandits
- 基于多臂赌博机框架,实现黑盒模型的高效提示词优化。
- 参与方越多,性能越优,实验显示显著优于现有基线。
- 适合需要隐私保护、低调用成本的多方协作场景。
大型语言模型(LLMs)的性能高度依赖输入提示,提示词优化至关重要。但实际应用面临三大挑战:(1)强大专有大模型的黑箱特性;(2)因查询成本高需高样本效率;(3)多个用户间希望实现隐私保护协作。为同时解决这些问题,我们提出一种基于多臂赌博机(MABs)的样本高效联邦提示词优化框架。该框架天然适用于黑箱优化、具备高样本效率,并能通过更多参与方带来理论保障的协同收益。我们首先提出联邦提示词优化算法FedPOB,是线性UCB算法的联邦变体,各参与方共享模型参数而非原始数据。随后,针对实际中的比较反馈场景,提出基于联邦对弈赌博机的FedPOB-Pref算法。大量实验表明,两种方法均显著优于现有基线,且随着参与方增加性能持续提升,验证了联邦方法的有效性。
原文摘要 · Abstract (English)
The performance of large language models (LLMs) is highly sensitive to the input prompt, making prompt optimization a critical task. However, real-world application is hindered by three major challenges: (1) the black-box nature of powerful proprietary LLMs, (2) the need for high sample efficiency due to query costs, and (3) the desire for privacy-preserving collaboration among multiple users. To address these challenges simultaneously, we introduce a novel framework for sample-efficient federated prompt optimization based on multi-armed bandits (MABs). The MAB framework is uniquely suited for this problem as it is (1) inherently a black-box optimization method, (2) practically sample-efficient, and (3) enables collaborative learning with theoretically guaranteed benefit from more participating agents. We first propose the Federated Prompt Optimization via Bandits (FedPOB) algorithm, a federated variant of the Linear UCB algorithm, where agents collaborate by sharing model parameters instead of raw data. We then extend our approach to the practical setting of comparative user feedback by introducing FedPOB with Preference Feedback (FedPOB-Pref), an efficient algorithm based on federated dueling bandits. Extensive experiments demonstrate that both FedPOB and FedPOB-Pref significantly outperform existing baselines and that their performance consistently improves as more agents participate in the collaboration, validating the effectiveness of our federated approach.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。