Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

CITE - A Comprehensive Benchmark for Heterogeneous Text-Attributed Graphs on Catalytic Materials

0. Python environment requirements

  • Python >= 3.6
  • PyTorch >= 2.1.0
  • CUDA >= 11.8

1.Download CITE

Dataset version Description
csv csv files include node and edge informations, including raw-texts and 128-dimention embedding
Download paper, author, journal, keywords, label and move them to datasets/csv/node
Download paper-paper, paper-author, paper-journal, paper-keywords and move them to datasets/csv/edge
pt chemistry.pt and my_graph_data.pt provides all information of node and edges.
Download the datasets and move them to datasets/pt/
json json file include manufactured for GraphGPT, which includs two training stages and one eval stage.
Download stage1, stage2 and eval and move them to dataset/json/

2.Run models

Homogeneous Graph models

Requirements

cd models/gnn/
conda create --name gnn python==3.10
conda activate gnn
pip install -r requirements.txt

How to run

chomd +x run.sh
./run.sh

Heterogeneous Graph models

Requirements

cd models/HGN/
conda create --name hgn python==3.8
conda activate hgn
pip install -r requirements.txt
pip install dgl -f https://data.dgl.ai/wheels/repo.html
pip install openhgnn

How to run

python main.py -m model name -t node_classification -d my_custom_node_classification -g 0 --use_best_config

model names: RGCN SimpleHGN HGT NARS CompGCN HPN

LLMs

Requirements

cd models/LLMs
conda create --name LLM python==3.10
conda activate LLM
pip install -r requirements.txt

Run

python chat.py

Evaluation

python llama_preds.py

LLM+Graph models

TAPE

Requirements
cd models/TAPE+LLaMA
conda create --name TAPE python==3.10
conda activate TAPE
pip install -r requirements.txt
How to run
chomd +x run.sh
./run.sh

GraphGPT

Requirements
cd models/GraphGPT
conda create --name GraphGPT python==3.10
conda activate GraphGPT
pip install -r requirements.txt
How to run
Stage-1
chmod +x stage1.sh
./stage1.sh
Extract
chmod +x extract.sh
./extract.sh
Stage-2
xchmod +x stage2.sh
./stage2.sh
Eval
chmod +x eval.sh
./eval.sh

LLaGA

Requirements
cd models/LLaGA
conda create --name llaga python==3.10
conda activate llaga
pip install -r requirements.txt
pip install flash-attn --no-build-isolation
pip install torch_geometric
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.1.0+cu118.html
Training
CUDA_VISIBLE_DEVICES=0 ./scripts/train.sh vicuna nc chemistry 16 chemistry
Evaluation
python eval/eval_pretrain.py \
  --model_path /path/to/projector \
  --model_base lmsys/vicuna-7b-v1.5-16k \
  --conv_mode v1 \
  --dataset chemistry \
  --pretrained_embedding_type chemistry \
  --use_hop 2 \
  --sample_neighbor_size 10 \
  --answers_file ./results/chemistry_nc.jsonl \
  --task nc \
  --cache_dir ../../checkpoint \
  --template ND

python eval/eval_res.py --dataset chemistry --task nc --res_path ./results/chemistry_nc.jsonl

About

Catalytic Information Textual Entities

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages