arXiv:2503.21720cs.CLcs.AI2025-03ICLR被引 19

用多个现成模型协作,让大模型生成更符合需求的内容。

Collab: Controlled Decoding using Mixture of Agents for LLM Alignment

  • 多个预训练模型在生成时动态协作,按需选择最优模型
  • 相比单模型策略,平均奖励提升1.56倍,GPT-4评分胜率超71%
  • 无需重训练,适合需要快速适配新任务的场景

大语言模型对齐对安全可靠应用至关重要。强化学习人类反馈(RLHF)虽有效,但需更新数十亿参数,计算成本高。相比之下,控制解码可在推理阶段实现对齐,无需重训练。然而,单智能体解码方法难以适应复杂多变的任务。为此,我们提出基于多智能体混合的控制解码策略,利用现有预对齐的大型语言模型作为智能体。将每个先验策略视为一个智能体,通过一种逐标记的选择机制,在解码过程中动态从模型池中选取最合适的模型。该策略基于长期效用度量决定每一步的模型切换,实现高效协作与对齐。理论分析表明,该算法在目标任务奖励下可达到最优性能。我们在多种开源对齐模型上进行了全面评估,结果表明该方法优于单智能体基线。值得注意的是,Collab超越当前最先进解码策略,在平均奖励上提升1.56倍,基于GPT-4的胜率-平局率达71.89%。

原文摘要 · Abstract (English)

Alignment of Large Language models (LLMs) is crucial for safe and trustworthy deployment in applications. Reinforcement learning from human feedback (RLHF) has emerged as an effective technique to align LLMs to human preferences and broader utilities, but it requires updating billions of model parameters, which is computationally expensive. Controlled Decoding, by contrast, provides a mechanism for aligning a model at inference time without retraining. However, single-agent decoding approaches often struggle to adapt to diverse tasks due to the complexity and variability inherent in these tasks. To strengthen the test-time performance w.r.t the target task, we propose a mixture of agent-based decoding strategies leveraging the existing off-the-shelf aligned LLM policies. Treating each prior policy as an agent in the spirit of mixture of agent collaboration, we develop a decoding method that allows for inference-time alignment through a token-level selection strategy among multiple agents. For each token, the most suitable LLM is dynamically chosen from a pool of models based on a long-term utility metric. This policy-switching mechanism ensures optimal model selection at each step, enabling efficient collaboration and alignment among LLMs during decoding. Theoretical analysis of our proposed algorithm establishes optimal performance with respect to the target task represented via a target reward for the given off-the-shelf models. We conduct comprehensive empirical evaluations with open-source aligned models on diverse tasks and preferences, which demonstrates the merits of this approach over single-agent decoding baselines. Notably, Collab surpasses the current SoTA decoding strategy, achieving an improvement of up to 1.56x in average reward and 71.89% in GPT-4 based win-tie rate.

模型对齐控制解码多智能体推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。