This repository contains the code of the paper "Leveraging Large Language Models for Effective Label-free Node Classification in Text-Attributed Graphs" accepted to SIGIR 2025 Full Paper. To reproduce the results in the paper, please follow the steps:
- Prepare the environment with
pip install -r requirements.txt
- The above environment may contain some unrelated packages. You can also just install it yourself with some key requirements:
python==3.10.0
torch==2.3.0
torch_cluster==1.6.3
torch_geometric==2.5.3
torch_scatter==2.1.2
torch_sparse==0.6.18
openai==1.59.4
dgl==1.1.1
-
Prepare the required datasets. Please download the dataset from google_drive_link, and put them under the data/ folder. We have also prepared our annotation cache under the data/annotations/ folder. In most cases, this should be able to satisfy the requirement. If there are still omissions, please change the api url and key and generate the annotations by yourself.
-
Replace the configurations in config.yaml with your own config, and reproduce all the results with
bash train_bash/best_cache.sh
This code repo is based on LLMGNN. Thanks for their great work!