Table of Contents
Fetching ...

InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignment

Jianing Wang, Junda Wu, Yupeng Hou, Yao Liu, Ming Gao, Julian McAuley

TL;DR

This work tackles the gap between graph data and large language models by introducing InstructGraph, which converts graphs into a code-like representation, then applies graph-centric instruction tuning and graph preference alignment to improve reasoning, generation, and reliability. The method uses a structured graph verbalizer, four task groups for instruction tuning, and a Direct Preference Optimization framework to mitigate graph hallucinations, achieving strong gains over GPT-4 and LLaMA2 on graph tasks while remaining competitive on general NLP benchmarks. Key contributions include the code-format graph representation, the multi-task graph instruction tuning regime, and the DPO-based hallucination mitigation, validated across diverse backbones and graph-centric datasets. Overall, InstructGraph advances reliable, graph-aware LLM capabilities with practical benefits for graph reasoning and generation tasks.

Abstract

Do current large language models (LLMs) better solve graph reasoning and generation tasks with parameter updates? In this paper, we propose InstructGraph, a framework that empowers LLMs with the abilities of graph reasoning and generation by instruction tuning and preference alignment. Specifically, we first propose a structured format verbalizer to unify all graph data into a universal code-like format, which can simply represent the graph without any external graph-specific encoders. Furthermore, a graph instruction tuning stage is introduced to guide LLMs in solving graph reasoning and generation tasks. Finally, we identify potential hallucination problems in graph tasks and sample negative instances for preference alignment, the target of which is to enhance the output's reliability of the model. Extensive experiments across multiple graph-centric tasks exhibit that InstructGraph can achieve the best performance and outperform GPT-4 and LLaMA2 by more than 13\% and 38\%, respectively.

InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignment

TL;DR

This work tackles the gap between graph data and large language models by introducing InstructGraph, which converts graphs into a code-like representation, then applies graph-centric instruction tuning and graph preference alignment to improve reasoning, generation, and reliability. The method uses a structured graph verbalizer, four task groups for instruction tuning, and a Direct Preference Optimization framework to mitigate graph hallucinations, achieving strong gains over GPT-4 and LLaMA2 on graph tasks while remaining competitive on general NLP benchmarks. Key contributions include the code-format graph representation, the multi-task graph instruction tuning regime, and the DPO-based hallucination mitigation, validated across diverse backbones and graph-centric datasets. Overall, InstructGraph advances reliable, graph-aware LLM capabilities with practical benefits for graph reasoning and generation tasks.

Abstract

Do current large language models (LLMs) better solve graph reasoning and generation tasks with parameter updates? In this paper, we propose InstructGraph, a framework that empowers LLMs with the abilities of graph reasoning and generation by instruction tuning and preference alignment. Specifically, we first propose a structured format verbalizer to unify all graph data into a universal code-like format, which can simply represent the graph without any external graph-specific encoders. Furthermore, a graph instruction tuning stage is introduced to guide LLMs in solving graph reasoning and generation tasks. Finally, we identify potential hallucination problems in graph tasks and sample negative instances for preference alignment, the target of which is to enhance the output's reliability of the model. Extensive experiments across multiple graph-centric tasks exhibit that InstructGraph can achieve the best performance and outperform GPT-4 and LLaMA2 by more than 13\% and 38\%, respectively.
Paper Structure (30 sections, 3 equations, 5 figures, 11 tables)

This paper contains 30 sections, 3 equations, 5 figures, 11 tables.

Figures (5)

  • Figure 1: Four groups of graph-centric reasoning and generation tasks.
  • Figure 2: The InstructGraph framework. 1) We first collect multiple graph tasks, and unify them into a code-like format, along with task-specific textual data to form a graph instruction corpus. 2) Then, we perform graph instruction tuning to improve the ability of an LLM to solve graph reasoning and generation tasks. 3) Finally, we investigate multiple graph hallucination scenarios and optimize the LLM by preference alignment.
  • Figure 3: Performance (%) comparison with LLaMA2, Vicuna, GPT-3.5, and GPT-4 towards the overall graph, named entity recognition (NER), and relation extraction (RE) on graph generation tasks.
  • Figure 4: Results (%) of balance between trainable parameters and performances over graph tasks.
  • Figure 5: Effectiveness (%) of towards different scales and backbones.