ChatPaper.aiChatPaper

思维图谱

On the Diagram of Thought

September 16, 2024
作者: Yifan Zhang, Yang Yuan, Andrew Chi-Chih Yao
cs.AI

摘要

我们介绍了“思维图”(DoT),这是一个框架,将大型语言模型(LLMs)中的迭代推理建模为在单个模型内构建有向无环图(DAG)。与将推理表示为线性链或树的传统方法不同,DoT将命题、批评、改进和验证组织成一个连贯的DAG结构,使模型能够探索复杂的推理路径,同时保持逻辑一致性。图中的每个节点对应于已经被提出、批评、改进或验证的命题,使LLM能够通过自然语言反馈迭代改进其推理。通过利用具有角色特定标记的自回归下一个标记预测,DoT促进了在提出想法和批判性评估之间的无缝过渡,提供比二进制信号更丰富的反馈。此外,我们使用拓扑理论对DoT框架进行形式化,提供了一个数学基础,确保推理过程中的逻辑一致性和正确性。这种方法增强了单个LLM内的训练和推理过程,消除了多个模型或外部控制机制的需要。DoT为设计下一代推理专用模型提供了一个概念框架,强调训练效率、强大的推理能力和理论基础。代码可在https://github.com/diagram-of-thought/diagram-of-thought找到。
English
We introduce Diagram of Thought (DoT), a framework that models iterative reasoning in large language models (LLMs) as the construction of a directed acyclic graph (DAG) within a single model. Unlike traditional approaches that represent reasoning as linear chains or trees, DoT organizes propositions, critiques, refinements, and verifications into a cohesive DAG structure, allowing the model to explore complex reasoning pathways while maintaining logical consistency. Each node in the diagram corresponds to a proposition that has been proposed, critiqued, refined, or verified, enabling the LLM to iteratively improve its reasoning through natural language feedback. By leveraging auto-regressive next-token prediction with role-specific tokens, DoT facilitates seamless transitions between proposing ideas and critically evaluating them, providing richer feedback than binary signals. Furthermore, we formalize the DoT framework using Topos Theory, providing a mathematical foundation that ensures logical consistency and soundness in the reasoning process. This approach enhances both the training and inference processes within a single LLM, eliminating the need for multiple models or external control mechanisms. DoT offers a conceptual framework for designing next-generation reasoning-specialized models, emphasizing training efficiency, robust reasoning capabilities, and theoretical grounding. The code is available at https://github.com/diagram-of-thought/diagram-of-thought.

Summary

AI-Generated Summary

PDF142November 16, 2024