GCoder: Improving Large Language Model for Generalized Graph Problem Solving
Preprint
Abstract
Large Language Models (LLMs) have demonstrated strong reasoning abilities, making them suitable for complex tasks such as graph computation. Traditional reasoning steps paradigm for graph problems is hindered by unverifiable steps, limited long-term reasoning, and poor generalization to graph variations. To overcome these limitations, we introduce GCoder, a code-based LLM designed to enhance problem-solving in generalized graph computation problems. Our method involves constructing an extensive training dataset, GraphWild, featuring diverse graph formats and algorithms. We employ a multi-stage training process, including Supervised Fine-Tuning (SFT) and Reinforcement Learning from Compiler Feedback (RLCF), to refine model capabilities. For unseen tasks, a hybrid retrieval technique is used to augment performance. Experiments demonstrate that GCoder outperforms GPT-4o, with an average accuracy improvement of 16.42% across various graph computational problems. Furthermore, GCoder efficiently manages large-scale graphs with millions of nodes and diverse input formats, overcoming the limitations of previous models focused on the reasoning steps paradigm. This advancement paves the way for more intuitive and effective graph problem-solving using LLMs. Code and data are available at here: https://github.com/Bklight999/WWW25-GCoder/tree/master.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- GraphLLM: Boosting Graph Reasoning Ability of Large Language ModelIEEE Transactions on Big Data, 2025
- GraphWiz: An Instruction-Following Language Model for Graph Computational Problems2024
- A Survey of Graph Meets Large Language Model: Progress and Future Directions2024
- Exploring the Potential of Large Language Models (LLMs)in Learning on GraphsACM SIGKDD Explorations Newsletter, 2024
- OpenGraph: Towards Open Graph Foundation Models2024
- InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignment2024
- MATHSENSEI: A Tool-Augmented Large Language Model for Mathematical Reasoning2024
- Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergy2023
- GraphQA: protein model quality assessment using graph convolutional networksBioinformatics, 2020
- The Network Data Repository with Interactive Graph Analytics and VisualizationProceedings of the AAAI Conference on Artificial Intelligence, 2015