Skip to main content
QUICK REVIEW

[论文解读] Algorithm of Thoughts: Enhancing Exploration of Ideas in Large Language Models

Bilgehan Sel, Ahmad Al-Tawaha|arXiv (Cornell University)|Aug 20, 2023
Topic ModelingComputer Science被引用 12
一句话总结

AoT 在上下文中引入算法推理,以极少查询探索解空间,优于单次查询方法,且可与外部树搜索方法(如 ToT)相比拟。

ABSTRACT

Current literature, aiming to surpass the "Chain-of-Thought" approach, often resorts to external modi operandi involving halting, modifying, and then resuming the generation process to boost Large Language Models' (LLMs) reasoning capacities. Due to their myopic perspective, they escalate the number of query requests, leading to increased costs, memory, and computational overheads. Addressing this, we propose the Algorithm of Thoughts -- a novel strategy that propels LLMs through algorithmic reasoning pathways. By employing algorithmic examples fully in-context, this overarching view of the whole process exploits the innate recurrence dynamics of LLMs, expanding their idea exploration with merely one or a few queries. Our technique outperforms earlier single-query methods and even more recent multi-query strategies that employ an extensive tree search algorithms while using significantly fewer tokens. Intriguingly, our results suggest that instructing an LLM using an algorithm can lead to performance surpassing that of the algorithm itself, hinting at LLM's inherent ability to weave its intuition into optimized searches. We probe into the underpinnings of our method's efficacy and its nuances in application. The code and related content can be found in: https://algorithm-of-thoughts.github.io.

研究动机与目标

  • 在多步推理中降低对大语言模型的查询需求以节省成本和能耗。
  • 引入一种新的上下文学习范式,在单次或最少查询内实现对算法探索的内化。
  • 利用大语言模型的递归与启发式推理,扩展对解空间的探索,超越标准提示和 CoT。
  • 证明算法性上下文提示能够超越单次查询方法,并与外部树搜索方法竞争。
  • 研究 AoT 的边界与局限性,包括标记效率和对模型能力的依赖(如 GPT-4)。

提出的方法

  • 提出 Algorithm of Thoughts (AoT),将搜索过程算法(类似 DFS/BFS)编码为在一个生成窗口内的上下文算法示例。
  • 实现连续生成,在不暂停外部评估的情况下创建并评估整个序列,解决基于 token 概率采样的局限性。
  • 使用以 DFS 为导向的提示并进行剪枝以回退到有前景的节点,同时结合 LLM 自身的启发式方法来优先考虑局部、前景较好的分支。
  • 在推理任务中将 AoT 与标准提示、Chain-of-Thought (CoT)、CoT 与 Self-Consistency、Standard+Refine,以及 Tree-of-Thought (ToT) 进行对比。
  • 证明 AoT 能以一次查询实现高成功率,并分析错误类型以指导未来的提示设计。
  • 探索算法选择的变体(AoT(DFS)、AoT(BFS)、AoT(Random))以及提示长度(AoT Short/Long)对性能的影响。

实验结果

研究问题

  • RQ1AoT 能否在使用更少的 LLM 查询的同时超越外部树搜索方法的效率和性能?
  • RQ2在提示中嵌入算法搜索行为如何影响大语言模型的推理质量和速度?
  • RQ3与 ToT 及其他 prompting 方法相比,使用 AoT 时的标记使用和生成长度的权衡是什么?
  • RQ4不同的树搜索策略(DFS、BFS、随机)是否影响 AoT 的有效性与效率?
  • RQ5AoT 的主要错误模式是什么,如何通过提示微调来缓解?

主要发现

  • AoT 在 Game of 24 和小型填词游戏中,优于标准提示和 CoT/CoT-SC 等单 prompts 方法。
  • AoT 在多项任务上与 ToT 的性能相当或更好,同时需要的 LLM 查询显著更少(AoT 约1次查询,而 ToT 在 Game of 24 上平均约109.1 次查询)。
  • 在 Game of 24 中,AoT 以1次平均查询实现71% 的成功率,而 ToT 以 ~109 次查询实现69%。
  • 在 5x5 小型填字游戏中,AoT 以 2 次平均查询达到 52% 的单词成功率,而 ToT 在 >200 次查询时达到 60%;AoT 的错误分布显示不同的主导失败模式。
  • 错误分析揭示表达式失误和未最终化等类别,AoT+手动决议在 Game of 24 中达到78% 的成功率。
  • AoT 的变体(DFS/BFS/Random)表明结构化算法(DFS/BFS)优于随机搜索,AoT(DFS) 在 Game of 24 中的成功率为 71%,AoT(BFS) 为 48%。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。