CLAISep 29, 2024

Can Large Language Models Analyze Graphs like Professionals? A Benchmark, Datasets and Models

arXiv:2409.19667v423 citationsh-index: 31Has Code
Originality Incremental advance
AI Analysis

This addresses the challenge of LLMs handling structured graph data for applications in fields like social networks and biology, representing an incremental advance with specific gains.

The paper tackles the problem of enabling large language models (LLMs) to analyze graphs like human professionals by introducing ProGraph, a benchmark requiring programming-based solutions, and finds current LLMs achieve only 36% accuracy. It proposes LLM4Graph datasets and methods that improve accuracy by 11-32% through document retrieval and fine-tuning.

The need to analyze graphs is ubiquitous across various fields, from social networks to biological research and recommendation systems. Therefore, enabling the ability of large language models (LLMs) to process graphs is an important step toward more advanced general intelligence. However, current LLM benchmarks on graph analysis require models to directly reason over the prompts describing graph topology, and are thus limited to small graphs with only a few dozens of nodes. In contrast, human experts typically write programs based on popular libraries for task solving, and can thus handle graphs with different scales. To this end, a question naturally arises: can LLMs analyze graphs like professionals? In this paper, we introduce ProGraph, a manually crafted benchmark containing 3 categories of graph tasks. The benchmark expects solutions based on programming instead of directly reasoning over raw inputs. Our findings reveal that the performance of current LLMs is unsatisfactory, with the best model achieving only 36% accuracy. To bridge this gap, we propose LLM4Graph datasets, which include crawled documents and auto-generated codes based on 6 widely used graph libraries. By augmenting closed-source LLMs with document retrieval and fine-tuning open-source ones on the codes, we show 11-32% absolute improvements in their accuracies. Our results underscore that the capabilities of LLMs in handling structured data are still under-explored, and show the effectiveness of LLM4Graph in enhancing LLMs' proficiency of graph analysis. The benchmark, datasets and enhanced open-source models are available at https://github.com/BUPT-GAMMA/ProGraph.

Code Implementations2 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes