GithubHelp home page GithubHelp logo

nineabyss / glbench Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 1.0 214.75 MB

GLBench: A Comprehensive Benchmark for Graphs with Large Language Models

License: MIT License

Python 40.19% Shell 0.65% C 0.01% Jupyter Notebook 59.16%

glbench's Introduction

GLBench: A Comprehensive Benchmark for Graphs with Large Language Models

If you like our project, please give us a star ⭐ on GitHub for the latest update.

GitHub stars

This is the official implementation of the following paper:

GLBench: A Comprehensive Benchmark for Graphs with Large Language Models [Paper]

Yuhan Li, Peisong Wang, Xiao Zhu, Aochuan Chen, Haiyun Jiang, Deng Cai, Victor Wai Kin Chan, Jia Li

Trend of Graph&LLM.

Environment Setup

Before you begin, ensure that you have Anaconda or Miniconda installed on your system. This guide assumes that you have a CUDA-enabled GPU. After create your conda environment (we recommend python==3.10), please run

pip install -r requirements.txt

to install python packages.

Datasets

All datasets in GLBench are available in this link. Please place them in the datasets folder.

Benchmarking

Supervised

Classical(GNN)

Benchmark the Classical GNNs (grid-search hyperparameters)

cd models/gnn
bash models/gnn/run.sh

LLM

Benchmark the LLMs(Sent-BERT, BERT, RoBERTa)

cd models/llm
bash 

Enhancer

  • GIANT

Due to some package conflicts or version limitations, we recommend using docker to run GIANT. The docker file is in

models/enhancer/giant-xrt/dockerfile

After starting the Docker container, run

cd models/enhancer/giant-xrt/
bash run_all.sh
  • TAPE
cd models/enhancer/TAPE/
bash run.sh
  • OFA
cd models/enhancer/OneForAll/
bash run.sh
  • ENGINE

Predictor

  • InstructGLM

  • GraphText

Due to some package conflicts or version limitations, we recommend using docker to run GraphText. The docker file is in

models/predictor/GraphText/dockerfile

After starting the Docker container, run

cd models/predictor/GraphText
bash run.sh
  • GraphAdapter
cd models/predictor/GraphAdapter
bash run.sh
  • LLaGA

Aignment

  • GLEM
cd models/alignment/GLEM
bash run.sh
  • Patton
bash run_pretrain.sh
bash nc_class_train.sh
bash nc_class_test.sh

We also provide seperate scripts for different datasets.

  • Zero-shot

LLM

Benchmark the LLMs(LLaMA3, GPT-3.5-turbo, GPT-4o, DeepSeek-chat)

cd models/llm

You can use your own API key for OpenAI.

Enhancer

  • OFA
cd models/enhancer/OneForAll/
bash run_zeroshot.sh
  • ZeroG
cd models/enhancer/ZeroG/
bash run.sh

Predictor

  • GraphGPT
cd models/predictor/GraphGPT
bash ./scripts/eval_script/graphgpt_eval.sh

FYI: our other works

πŸ”₯ A Survey of Graph Meets Large Language Model: Progress and Future Directions (IJCAI'24) GitHub stars

Github Repo | Paper

πŸ”₯ ZeroG: Investigating Cross-dataset Zero-shot Transferability in Graphs (KDD'24) GitHub stars

Github Repo | Paper

Acknowledgement

We are appreciated to all authors of works we cite for their solid work and clear code organization! The orginal version of the GraphLLM methods are listed as follows:

Alignment:

GLEM:

  • (2022.10) [ICLR' 2023] Learning on Large-scale Text-attributed Graphs via Variational Inference [Paper | Code]

Patton:

  • (2023.05) [ACL' 2023] PATTON : Language Model Pretraining on Text-Rich Networks [Paper | Code]

Enhancer:

ENGINE:

  • (2024.01) [IJCAI' 2024] Efficient Tuning and Inference for Large Language Models on Textual Graphs [Paper]

GIANT:

  • (2022.03) [ICLR' 2022] Node Feature Extraction by Self-Supervised Multi-scale Neighborhood Prediction [Paper | Code]

OFA:

  • (2023.09) [ICLR' 2024] One for All: Towards Training One Graph Model for All Classification Tasks [Paper | Code]

TAPE:

  • (2023.05) [ICLR' 2024] Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning [Paper | Code]

ZeroG:

  • (2024.02) [KDD' 2024] ZeroG: Investigating Cross-dataset Zero-shot Transferability in Graphs [Paper] | Code]

Predictor:

GraphAdapter:

  • (2024.02) [WWW' 2024] Can GNN be Good Adapter for LLMs? [Paper]

GraphGPT:

  • (2023.10) [SIGIR' 2024] GraphGPT: Graph Instruction Tuning for Large Language Models [Paper | Code]

GraphText:

  • (2023.10) [Arxiv' 2023] GraphText: Graph Reasoning in Text Space [Paper] | Code]

InstructGLM:

  • (2023.08) [Arxiv' 2023] Natural Language is All a Graph Needs [Paper | Code]

LLaGA:

  • (2024.02) [Arxiv' 2024] LLaGA: Large Language and Graph Assistant [Paper | Code]

Code Base Structure

$CODE_DIR
    β”œβ”€β”€ datasets
    └── models
    Β Β   β”œβ”€β”€ alignment
    Β Β   β”‚Β Β  β”œβ”€β”€ GLEM
    Β Β   β”‚Β Β  └── Patton
    Β Β   β”œβ”€β”€ enhancer
    Β Β   β”‚Β Β  β”œβ”€β”€ ENGINE
    Β Β   β”‚Β Β  β”œβ”€β”€ giant-xrt
    Β Β   β”‚Β Β  β”œβ”€β”€ OneForAll
        β”‚   β”œβ”€β”€ TAPE
    Β Β   β”‚Β Β  └── ZeroG
    Β Β   β”œβ”€β”€ gnn
    Β Β   β”œβ”€β”€ llm
    Β Β   β”‚Β Β  β”œβ”€β”€ deepseek-chat
    Β Β   β”‚Β Β  β”œβ”€β”€ gpt-3.5-turbo
    Β Β   β”‚Β Β  β”œβ”€β”€ gpt-4o
    Β Β   β”‚Β Β  └── llama3-70b
    Β Β   └── predictor
    Β Β      β”œβ”€β”€ GraphAdapter
    Β Β      β”œβ”€β”€ GraphGPT
    Β Β      β”œβ”€β”€ GraphText
    Β Β      β”œβ”€β”€ InstructGLM
    Β Β      └── LLaGA

glbench's People

Contributors

nineabyss avatar hexagonstar avatar dsailathkust avatar

Stargazers

Linhao Luo (Raymond) avatar 1998czk avatar JieWang avatar Jianheng Tang avatar  avatar guangxin su avatar Jingbo Zhou avatar Allen Liu avatar  avatar gxu_sy avatar yaoyaoyao avatar jiaguozi avatar Xixi Wu avatar 唐国撁Tommy avatar  avatar  avatar  avatar monkeycoder avatar  avatar  avatar  avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

superallen13

glbench's Issues

Is this just a collection of codes snippets from other repos?

I think this is not a benchmark or a library; it looks more like a collection of code snippets from other repos. It appears that there was no attempt made to adapt the code from the authors to your own framework. Instead, I would say it is a straightforward copy-and-paste without additional efforts.

It's comprehensive, but not "usable". Overclaimed, your paper.

Why didn’t you include links to other relevant code or projects?

Thank you for sharing your work with the community! I noticed that the project doesn’t include any references or links to other relevant code or projects.
Could you add links to related projects or codebases that might provide additional value to the users?
Thank you for your time!

Issues about commands

Thanks for your excellent work!
However, I find that some of the code cannot be executed correctly using your commands. For example, when I run OFA using the following commands, it raises several issues.

cd models/enhancer/OneForAll/
bash run.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.