Evaluating and enhancing the general capabilities of large language models (LLMs) has been an important research topic. Graph is a common data structure in the real world, and understanding graph data is a crucial part for advancing general intelligence. To evaluate and enhance the graph understanding abilities of LLMs, in this paper, we propose a benchmark named GraphInstruct, which comprehensively includes 21 classical graph reasoning tasks, providing diverse graph generation pipelines and detailed reasoning steps. Based on GraphInstruct, we further construct GraphLM through efficient instruction-tuning, which shows prominent graph understanding capability. In order to enhance the LLM with graph reasoning capability as well, we propose a step mask training strategy, and construct a model named GraphLM+. As one of the pioneering efforts to enhance the graph understanding and reasoning abilities of LLMs, extensive experiments have demonstrated the superiority of GraphLM and GraphLM+ over other LLMs. We look forward to more researchers exploring the potential of LLMs in the graph data mining domain through GraphInstruct. Our code for generating GraphInstruct is released publicly at: https://github.com/CGCL-codes/GraphInstruct.
翻译:评估和增强大型语言模型(LLMs)的通用能力一直是重要的研究课题。图作为现实世界中的常见数据结构,对图数据的理解是推进通用智能的关键环节。为评估和增强LLMs的图理解能力,本文提出名为GraphInstruct的基准测试集,该基准全面包含21类经典图推理任务,提供多样化的图生成流程及详细推理步骤。基于GraphInstruct,我们通过高效指令微调构建了GraphLM模型,该模型展现出卓越的图理解能力。为同时增强LLM的图推理能力,我们提出一种逐步掩码训练策略,并构建了GraphLM+模型。作为增强LLMs图理解与推理能力的开创性工作之一,大量实验表明GraphLM和GraphLM+相比其他LLMs具有显著优势。我们期待更多研究者通过GraphInstruct探索LLMs在图数据挖掘领域的潜力。GraphInstruct的生成代码已公开于:https://github.com/CGCL-codes/GraphInstruct。