G o T : Effective Graph-of-Thought Reasoning in Language Models (2024)

Abstract: With the widespread use of language models (LMs) in NLP tasks, researchers have discovered the potential of Chain-of-thought (CoT) to assist LMs in accomplishing complex reasoning tasks by generating intermediate steps. However, human thought processes are often non-linear, rather than simply sequential chains of thoughts. Therefore, we propose Graph-of-Thought (GoT) reasoning, which models human thought processes not only as a chain but also as a graph. By representing thought units as nodes and connections between them as edges, our approach captures the non-sequential nature of human thinking and allows for a more realistic modeling of thought processes. GoT adopts a two-stage framework with an additional GoT encoder for thought graph representation and fuses the graph representation with the original input representation through a gated fusion mechanism. We evaluate GoT’s performance on a text-only reasoning task (AQUA-RAT) and a multimodal reasoning task (ScienceQA). Our model achieves significant improvement over the strong CoT baseline on the AQUA-RAT test set and boosts accuracy from 85.19% to 87.59% using the T5-base model over the state-of-the-art Multimodal-CoT on the ScienceQA test set. Our code is publicly available at https://github.com/Zoeyyao27/Graph-of-Thought

## introduction in the field of human cognition, it has long been recognized that the human thought process is far more complex and non-linear than could be captured by a simple, sequential chain of thoughts @xcite . human thinking is often characterized by its ability to make sudden leaps and connections between seemingly unrelated ideas, which can lead to novel insights and solutions. this non-linear, jumping thought process is a hallmark of human creativity, reasoning, and problem-solving abilities. however, it also poses a significant challenge for cognitive modeling and understanding. recently, large language models (llms) have been advancing at an unprecedented pace. with the emergence of breakthroughs such as @xcite , palm @xcite , and @xcite , the field of natural language processing has entered a new era of possibilities. recent studies @xcite @xcite have shown that the reasoning ability of llms can be unlocked by chain-of-thought (cot) prompting. cot prompting involves a series of intermediate natural language rationales that lead to the final answer. in addition, @xcite have introduced multimodal-cot, which combines both language and visual modalities to help surpass the limitations of textual information. more detailed related works can be found in appendix a. previous works on chain-of-thought (cot) prompting, which have been limited to textual and visual information, often represented the human reasoning process as sequential thought chains. this approach overlooks the modeling of humans' jumping thought process and neglects to incorporate the complex structural information of reasoning thoughts into the model. concurrent work tree-of-thoughts (tot) @xcite divides thoughts into thought units and models them as a tree-like search process. nevertheless, human cognition transcends this tree structure, exhibiting intricate graph-like formations. our perspective diverges further as we believe that the human intellect is capable of crafting elaborate thought graphs founded upon linear ## graph-of-thought the overview of our proposed got can be seen in figure 2 . inspired by multimodal-cot @xcite , got also adopts a two-stage framework. (1) rationale generation stage: in the first stage, the model generates rationales based on the input text (including question, context, and choices) the vision features, and the generated thought graph corresponding to the input text. for multi-modal tasks @xcite @xcite , it is a common practice to use different encoders to process inputs from different modalities and a straightfor- thought graph image (optional) graph-of-thought constructor input text question: do ferns produce seeds? choices: (a) yes (b) no context: this diagram shows the life cycle of a fern. ## experiments dataset we evaluate our model on the text-only aqua-rat @xcite and multimodal scienceqa benchmark @xcite . the detailed dataset information and statistics are shown in appendix b. ## conclusion we introduce a novel graph-of-thought (got) reasoning approach, which is an innovative method for modeling the non-sequential nature of human thinking for lms. got enhances lms with deductive reasoning abilities, providing a more realistic representation of thought processes. our experiments showcases the superiority of got on the text-only reasoning dataset aqua-rat, achieving a similar result compared to gpt-3 model while utilizing significantly fewer parameters. furthermore, got establishes a new state-of-the-art on the multimodal reasoning benchmark, scienceqa with fewer parameters. this performance surpasses strong chatgpt and gpt-4 systems, as well as human performance, demonstrating the efficacy of got. through comprehensive case studies and ablation studies, we provide substantial evidence of the effectiveness of got in reasoning tasks. if you want it, you got it! in chain-of-thought reasoning, one idea leads to the next in a logical sequence and builds on previous knowledge. each idea is supported by evidence or reasoning, and the conclusions drawn from the chain are logical and sound. most cot methods can be divided into two categories based on how to generate the final answer: (1) prompting for cot, including zero-shot cot and few-shot cot; and (2) fine-tuning for cot.