arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2404.03683cs.LGcs.AIcs.CL
收藏

搜索流(SoS):学习用语言进行搜索

Stream of Search (SoS): Learning to Search in Language

Stanford University(斯坦福大学);MIT(麻省理工学院);Harvey Mudd(哈维穆德学院)

Kanishk Gandhi, Denise Lee, Gabriel Grand, Muxin Liu, Winson Cheng, Archit Sharma, Noah D. Goodman

AI总结:

本文提出将符号搜索过程编码为搜索流(SoS)以训练语言模型,并在 Countdown 上证明其结合 APA 与 STaR 后可显著提升搜索能力并解决启发式求解器失败的问题。

摘要:

语言模型在训练期间很少看到有成效的错误。因此,它们难以超越下一个 token 进行观察,遭受错误滚雪球式累积的困扰,并且难以预测自身行动在若干步之后的后果。在本文中,我们展示了如何通过将搜索过程以语言表示为一个扁平化字符串——即搜索流(stream of search,SoS)——来教会语言模型进行搜索。我们提出了一种统一的搜索语言,能够刻画一系列不同的符号搜索策略。我们使用简单但困难的 Countdown 游戏来演示该方法;在该游戏中,目标是用算术运算组合输入数字以得到目标数字。我们在由启发式求解器生成的搜索流数据集上,从零开始预训练一个基于 transformer 的语言模型。我们发现,与仅训练来预测最优搜索轨迹的模型相比,SoS 预训练将搜索准确率提高了 25%。我们进一步使用两种策略改进方法对该模型进行微调:优势诱导策略对齐(Advantage-Induced Policy Alignment,APA)和自教推理器(Self-Taught Reasoner,STaR)。经过微调的 SoS 模型解决了 36% 此前未解决的问题,其中包括任何启发式求解器都无法解决的问题。我们的结果表明,语言模型可以通过搜索学习解决问题,通过自我改进灵活使用不同搜索策略,并有可能发现新的搜索策略。

英文摘要:

Language models are rarely shown fruitful mistakes while training. They then struggle to look beyond the next token, suffering from a snowballing of errors and struggling to predict the consequence of their actions several steps ahead. In this paper, we show how language models can be taught to search by representing the process of search in language, as a flattened string -- a stream of search (SoS). We propose a unified language for search that captures an array of different symbolic search strategies. We demonstrate our approach using the simple yet difficult game of Countdown, where the goal is to combine input numbers with arithmetic operations to reach a target number. We pretrain a transformer-based language model from scratch on a dataset of streams of search generated by heuristic solvers. We find that SoS pretraining increases search accuracy by 25% over models trained to predict only the optimal search trajectory. We further finetune this model with two policy improvement methods: Advantage-Induced Policy Alignment (APA) and Self-Taught Reasoner (STaR). The finetuned SoS models solve 36% of previously unsolved problems, including problems that cannot be solved by any of the heuristic solvers. Our results indicate that language models can learn to solve problems via search, self-improve to flexibly use different search strategies, and potentially discover new ones.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑