思維圖譜
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