Feb 2024 | Jianing Wang, Junda Wu, Yupeng Hou, Yao Liu, Ming Gao, Julian McAuley
InstructGraph is a framework that enhances large language models (LLMs) with graph reasoning and generation capabilities through instruction tuning and preference alignment. The framework first converts graph data into a code-like format, enabling LLMs to understand and generate graphs without external graph-specific encoders. It then introduces a graph instruction tuning stage to improve the LLM's ability to solve graph reasoning and generation tasks. To address hallucination issues in graph tasks, the framework uses preference alignment to enhance the reliability of model outputs. Extensive experiments across multiple graph-centric tasks show that InstructGraph outperforms GPT-4 and LLaMA2 by over 13% and 38%, respectively. The framework includes three main components: graph input engineering, graph instruction tuning, and graph preference alignment. Graph input engineering transforms graph data into a code-like format, while graph instruction tuning improves the LLM's ability to solve graph tasks using standard language modeling objectives. Graph preference alignment reduces hallucination by optimizing the LLM to prefer correct answers over incorrect ones. The framework is evaluated on various graph reasoning and generation tasks, demonstrating its effectiveness in improving LLM performance on graph-related tasks. InstructGraph also shows strong performance on general NLP tasks, indicating its versatility. The framework is parameter-efficient and can be applied to different LLMs, making it a promising approach for enhancing graph reasoning and generation capabilities in LLMs.InstructGraph is a framework that enhances large language models (LLMs) with graph reasoning and generation capabilities through instruction tuning and preference alignment. The framework first converts graph data into a code-like format, enabling LLMs to understand and generate graphs without external graph-specific encoders. It then introduces a graph instruction tuning stage to improve the LLM's ability to solve graph reasoning and generation tasks. To address hallucination issues in graph tasks, the framework uses preference alignment to enhance the reliability of model outputs. Extensive experiments across multiple graph-centric tasks show that InstructGraph outperforms GPT-4 and LLaMA2 by over 13% and 38%, respectively. The framework includes three main components: graph input engineering, graph instruction tuning, and graph preference alignment. Graph input engineering transforms graph data into a code-like format, while graph instruction tuning improves the LLM's ability to solve graph tasks using standard language modeling objectives. Graph preference alignment reduces hallucination by optimizing the LLM to prefer correct answers over incorrect ones. The framework is evaluated on various graph reasoning and generation tasks, demonstrating its effectiveness in improving LLM performance on graph-related tasks. InstructGraph also shows strong performance on general NLP tasks, indicating its versatility. The framework is parameter-efficient and can be applied to different LLMs, making it a promising approach for enhancing graph reasoning and generation capabilities in LLMs.