On the Diagram of Thought
Yifan Zhang, Yang Yuan, Andrew Chi-Chih Yao
2024-09-17

Summary
This paper presents the Diagram of Thought (DoT), a new framework that models how large language models (LLMs) can reason through complex ideas by organizing them into a directed acyclic graph (DAG).
What's the problem?
Traditional methods of reasoning in AI often use simple, linear structures, which can limit the model's ability to explore complex ideas and maintain logical consistency. This makes it harder for AI to effectively analyze and improve its reasoning over time.
What's the solution?
The DoT framework organizes reasoning into a DAG, where each point (or node) represents a different idea or critique. This allows the model to build on previous thoughts and make improvements based on feedback. The framework uses a mathematical approach called Topos Theory to ensure that the reasoning process is logical and sound. It also enables the model to switch between proposing ideas and evaluating them without needing multiple models or external controls.
Why it matters?
This research is important because it enhances how AI can think and reason, making it more effective at understanding complex topics. By providing a structured way for LLMs to improve their reasoning, DoT could lead to advancements in AI applications like education, content creation, and problem-solving.
Abstract
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.