Soft Self-Consistency Improves Language Model Agents
作者: Han Wang, Archiki Prasad, Elias Stengel-Eskin, Mohit Bansal
分类: cs.CL, cs.AI, cs.LG
发布日期: 2024-02-20 (更新: 2024-06-05)
备注: ACL 2024 Camera-Ready, the first three authors contributed equally; Code: https://github.com/HanNight/soft_self_consistency
💡 一句话要点
提出软自一致性方法以提升语言模型代理的性能
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 语言模型 自一致性 软自一致性 模型评分 交互任务 自然语言处理 效率提升
📋 核心要点
- 现有的自一致性方法在处理具有多个有效答案的任务时,依赖多数投票,导致样本需求量大,成本高昂。
- 论文提出了软自一致性(SOFT-SC),通过连续评分替代离散投票,增强了在稀疏动作选择中的灵活性和效率。
- 实验结果表明,SOFT-SC在多个任务上均显著提升了成功率,且所需样本数减少,表现出更高的效率。
📝 摘要(中文)
大型语言模型(LLMs)的生成可以通过采样和评分多个解决方案来选择最终答案来改善。当前的“采样和选择”方法如自一致性(SC)依赖于多数投票来评分答案。然而,当任务有许多不同且有效的答案时,投票选择需要大量样本,这使得SC在需要顺序生成多个动作(答案)的交互任务中变得成本高昂。本文提出了软自一致性(SOFT-SC),通过将SC的离散评分替换为基于模型似然的连续评分,允许在动作稀疏分布时进行选择。SOFT-SC在长时间交互任务中提高了性能和效率,所需样本数仅为SC的一半,且在写bash程序、在线购物和交互家庭游戏等任务中均取得了显著提升。
🔬 方法详解
问题定义:本文旨在解决当前自一致性方法在处理多样有效答案时的不足,尤其是在交互任务中样本需求过高的问题。
核心思路:提出软自一致性(SOFT-SC),通过使用模型似然计算连续评分,取代传统的离散投票机制,从而在选择稀疏分布的动作时提高灵活性和效率。
技术框架:SOFT-SC的整体架构包括多个阶段:首先进行多次采样生成候选答案,然后基于模型的输出计算连续评分,最后根据评分选择最佳答案。
关键创新:SOFT-SC的主要创新在于将离散投票机制转变为连续评分机制,这一设计使得在样本稀疏的情况下仍能有效选择答案,显著提高了任务的成功率。
关键设计:在SOFT-SC中,关键参数包括模型的似然计算方式和评分标准,损失函数设计上强调了连续性,以确保评分的平滑性和有效性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,SOFT-SC在写bash程序任务中成功率提高了1.3%,在在线购物任务中提高了6.6%,在交互家庭游戏ALFWorld中提高了4.7%。与传统的自一致性方法相比,SOFT-SC在性能上表现出更高的效率,所需样本数减少至一半。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理中的对话系统、自动编程、在线购物推荐等,能够显著提升交互式任务的效率和用户体验。未来,SOFT-SC方法可能会影响更多需要实时反馈和决策的智能系统。
📄 摘要(原文)
Generations from large language models (LLMs) can be improved by sampling and scoring multiple solutions to select a final answer. Current "sample and select" methods such as self-consistency (SC) rely on majority voting to score answers. However, when tasks have many distinct and valid answers, selection by voting requires a large number of samples. This makes SC prohibitively expensive for interactive tasks that involve generating multiple actions (answers) sequentially. After establishing that majority voting fails to provide consistent gains on such tasks, we demonstrate how to increase success rates by softening the scoring criterion. We introduce Soft Self-Consistency (SOFT-SC), which replaces SC's discontinuous scoring with a continuous score computed from model likelihoods, allowing for selection even when actions are sparsely distributed. SOFT-SC improves both performance and efficiency on long-horizon interactive tasks, requiring half as many samples as SC for comparable or better performance. For a fixed number of samples, SOFT-SC leads to a 1.3% increase over SC in absolute success rate on writing bash programs, a 6.6% increase on online shopping (WebShop), and a 4.7% increase for an interactive household game (ALFWorld). Finally, we show that SOFT-SC can be applied to both open-source and black-box models.