August 25-29, 2024 | Nuo Chen, Yuhan Li, Jianheng Tang, Jia Li
GraphWiz is an open-source language model designed to solve graph computational problems by explicitly following instructions. The paper introduces GraphInstruct, a novel instruction-tuning dataset that enables language models to understand and solve a wide range of graph problems through explicit reasoning paths. Using GraphInstruct, the authors developed GraphWiz, which outperforms GPT-4 in solving various graph tasks, achieving an average accuracy of 65% across nine tasks, compared to GPT-4's 43.8%. The model also demonstrates strong zero-shot generalization capabilities across different tasks and datasets. The study also investigates the relationship between training data volume and model performance, highlighting the risk of overfitting as data volume increases. Additionally, the paper explores the transferability of the model across different graph computational problems. GraphWiz provides a new blueprint for developing large language models specialized in graph reasoning and problem-solving. The model is trained using a two-phase process: mixed-task instruction tuning and direct preference optimization (DPO). The DPO method enhances the model's reasoning by training it to differentiate between more and less effective problem-solving paths. The study also analyzes the impact of hyperparameter β on model performance, showing that the optimal value varies depending on task difficulty and model size. The results demonstrate that GraphWiz performs well on various graph tasks, including cycle detection, shortest path, and maximum flow. The model's performance is evaluated on different graph sizes, showing that it can handle graphs with up to 89 nodes. The case study highlights GraphWiz's ability to correctly detect cycles in complex graphs, demonstrating its spatial reasoning and memory retention capabilities. The paper concludes that GraphWiz is a promising model for solving complex graph problems, with potential applications in research and practice.GraphWiz is an open-source language model designed to solve graph computational problems by explicitly following instructions. The paper introduces GraphInstruct, a novel instruction-tuning dataset that enables language models to understand and solve a wide range of graph problems through explicit reasoning paths. Using GraphInstruct, the authors developed GraphWiz, which outperforms GPT-4 in solving various graph tasks, achieving an average accuracy of 65% across nine tasks, compared to GPT-4's 43.8%. The model also demonstrates strong zero-shot generalization capabilities across different tasks and datasets. The study also investigates the relationship between training data volume and model performance, highlighting the risk of overfitting as data volume increases. Additionally, the paper explores the transferability of the model across different graph computational problems. GraphWiz provides a new blueprint for developing large language models specialized in graph reasoning and problem-solving. The model is trained using a two-phase process: mixed-task instruction tuning and direct preference optimization (DPO). The DPO method enhances the model's reasoning by training it to differentiate between more and less effective problem-solving paths. The study also analyzes the impact of hyperparameter β on model performance, showing that the optimal value varies depending on task difficulty and model size. The results demonstrate that GraphWiz performs well on various graph tasks, including cycle detection, shortest path, and maximum flow. The model's performance is evaluated on different graph sizes, showing that it can handle graphs with up to 89 nodes. The case study highlights GraphWiz's ability to correctly detect cycles in complex graphs, demonstrating its spatial reasoning and memory retention capabilities. The paper concludes that GraphWiz is a promising model for solving complex graph problems, with potential applications in research and practice.