Prompt engineering is crucial for fully leveraging large language models (LLMs), yet most existing optimization methods follow a single trajectory, resulting in limited adaptability, gradient conflicts, and high computational overhead. We propose MAPGD (Multi-Agent Prompt Gradient Descent), a novel framework that reconceptualizes prompt optimization as a collaborative process among specialized agents. Each agent focuses on a distinct refinement dimension, such as instruction clarity, example selection, format structure, or stylistic adaptation, and their contributions are coordinated through semantic gradient embedding, conflict detection, and fusion. To further enhance robustness and stability, MAPGD introduces two new mechanisms: Hypersphere Constrained Gradient Clustering (HCGC), which enforces angular margin constraints for compact and well-separated clusters, and Channel Adaptive Agent Weighting (CAAW), which dynamically reweights agent contributions based on validation performance. Experiments on classification and reasoning benchmarks show that MAPGD consistently surpasses single-agent and random baselines in both accuracy and efficiency. Ablation studies confirm the effectiveness of gradient fusion, agent specialization, and conflict resolution. Together, these components establish MAPGD as a unified, gradient-based, and interpretable framework for robust prompt optimization with theoretical convergence guarantees.


翻译:提示工程对于充分发挥大型语言模型(LLM)的潜力至关重要,然而现有优化方法大多遵循单一轨迹,导致适应性有限、梯度冲突和计算开销高昂。本文提出MAPGD(多智能体提示梯度下降),这是一种新颖的框架,将提示优化重新构想为多个专业化智能体之间的协作过程。每个智能体专注于不同的优化维度,例如指令清晰度、示例选择、格式结构或风格适配,并通过语义梯度嵌入、冲突检测与融合机制协调其贡献。为进一步增强鲁棒性与稳定性,MAPGD引入了两种新机制:超球面约束梯度聚类(HCGC),通过施加角度间隔约束以形成紧凑且分离良好的聚类;以及通道自适应智能体加权(CAAW),根据验证性能动态调整智能体贡献的权重。在分类与推理基准测试上的实验表明,MAPGD在准确性和效率上均持续超越单智能体及随机基线方法。消融研究证实了梯度融合、智能体专业化与冲突解决机制的有效性。这些组件共同使MAPGD成为一个具有理论收敛保证的统一、基于梯度且可解释的鲁棒提示优化框架。

0
下载
关闭预览

相关内容

梯度的本意是一个向量(矢量),表示某一函数在该点处的方向导数沿着该方向取得最大值,即函数在该点处沿着该方向(此梯度的方向)变化最快,变化率最大(为该梯度的模)。
基于大语言模型的智能体优化研究综述
专知会员服务
59+阅读 · 2025年3月25日
自动化提示工程综述:一种优化视角
专知会员服务
28+阅读 · 2025年2月18日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【NeurIPS2024】IPO: 面向视觉-语言模型的可解释提示优化
专知会员服务
22+阅读 · 2024年10月23日
【ICML2024】离散提示优化扩散模型
专知会员服务
20+阅读 · 2024年7月4日
【NeurIPS 2021】设置多智能体策略梯度的方差
专知会员服务
21+阅读 · 2021年10月24日
【Nature论文】深度网络中的梯度下降复杂度控制
专知会员服务
41+阅读 · 2020年3月9日
从泰勒展开来看梯度下降算法
深度学习每日摘要
13+阅读 · 2019年4月9日
干货|代码原理教你搞懂SGD随机梯度下降、BGD、MBGD
机器学习研究会
12+阅读 · 2017年11月25日
并行算法演进,从MapReduce到MPI
凡人机器学习
10+阅读 · 2017年11月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员