hyemin-yang/ProgRAG

33

stars

112

commits

Python

primary language

Feb 10, 2026

updated

README

[AAAI 2026] ProgRAG: Hallucination-Resistant Progressive Retrieval and Reasoning over Knowledge Graphs

Codes for the paper titled "ProgRAG: Hallucination-Resistant Progressive Retrieval and Reasoning over Knowledge Graphs", published in the 40th Annual AAAI Conference on Artificial Intelligence (AAAI'2026).


model


How to run

1) Installation

# 1. Create and activate a new conda environment
conda create -n ProgRAG python=3.8 -y
conda activate ProgRAG

# 2. Install PyTorch with CUDA 11.8 support
conda install pytorch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 pytorch-cuda=11.8 -c pytorch -c nvidia

# 3. Install PyTorch Geometric and related packages
pip install torch-scatter==2.1.1 torch-sparse==0.6.17 torch-cluster==1.6.1 torch-spline-conv==1.2.1 -f https://data.pyg.org/whl/torch-2.2.1+cu118.html
pip install torch-geometric==2.3.0

# 4. Install additional dependencies
conda install ninja easydict pyyaml -c conda-forge

# 5. Install compatible Hugging Face packages
# These versions are tested for Python 3.8
pip install transformers==4.46.3 tokenizers==0.20.0 huggingface_hub==0.36.0 safetensors==0.5.3

# 6. Install Sentence Transformers and Datasets
pip install "sentence-transformers[train]==3.0.1" datasets==2.14.7

2) Download Datasets and Checkpoints

To run experiments, download the required Knowledge Graph datasets and checkpoints for:

  • Relation Retriever : sbert
  • Triple Retriever : GNN, MPNet

You can download all necessary files from the following Google Drive link: https://drive.google.com/drive/folders/1BVvQRNTaLdONEeFauZfxPYQXQSpCVuNm?usp=drive_link

πŸ“‚ Directory Structure After Download

After downloading, the files should be placed as follows:

data/
└── webqsp/
    β”œβ”€β”€ total_graph_webqsp.jsonl
    β”œβ”€β”€ webqsp_topic_graph.pkl
    β”œβ”€β”€ train_goldenpath.jsonl
    β”œβ”€β”€ relation.pth
    └── webqsp_triple2id.pkl
└── cwq/
    β”œβ”€β”€ total_graph_cwq.jsonl
    β”œβ”€β”€ cwq_topic_graph.pkl
    β”œβ”€β”€ train_goldenpath.jsonl
    β”œβ”€β”€ relation.pth
    └── cwq_triple2id.pkl

ckpt/
β”œβ”€β”€ GNN/
β”‚   β”œβ”€β”€ webqsp_GNN.pth
β”‚   └── cwq_GNN.pth
β”œβ”€β”€ mpnet/
β”‚   β”œβ”€β”€ webqsp.mdl
β”‚   └── cwq.mdl
└── sbert/

Alternatively, you can preprocess the datasets using the following commands:

python3 graph_preprocess.py
python3 GNN/get_emb.py

You can train the GNN and MPNet (Triple Retrievers) using the following commands:

python3 GNN/gnn_train.py
python3 MPNet/[dataset].sh 

3) Run

python main.py --dataset [DATASET_NAME]

Replace [DATASET_NAME] with the name of the dataset you want to use (e.g., webqsp, cwq, etc.).

Contributors

hyemin-yang

68 commits

meanboat-23

44 commits

hyemin-yang/ProgRAG

33

stars

112

commits

Python

primary language

Feb 10, 2026

updated

README

[AAAI 2026] ProgRAG: Hallucination-Resistant Progressive Retrieval and Reasoning over Knowledge Graphs

Codes for the paper titled "ProgRAG: Hallucination-Resistant Progressive Retrieval and Reasoning over Knowledge Graphs", published in the 40th Annual AAAI Conference on Artificial Intelligence (AAAI'2026).


model


How to run

1) Installation

# 1. Create and activate a new conda environment
conda create -n ProgRAG python=3.8 -y
conda activate ProgRAG

# 2. Install PyTorch with CUDA 11.8 support
conda install pytorch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 pytorch-cuda=11.8 -c pytorch -c nvidia

# 3. Install PyTorch Geometric and related packages
pip install torch-scatter==2.1.1 torch-sparse==0.6.17 torch-cluster==1.6.1 torch-spline-conv==1.2.1 -f https://data.pyg.org/whl/torch-2.2.1+cu118.html
pip install torch-geometric==2.3.0

# 4. Install additional dependencies
conda install ninja easydict pyyaml -c conda-forge

# 5. Install compatible Hugging Face packages
# These versions are tested for Python 3.8
pip install transformers==4.46.3 tokenizers==0.20.0 huggingface_hub==0.36.0 safetensors==0.5.3

# 6. Install Sentence Transformers and Datasets
pip install "sentence-transformers[train]==3.0.1" datasets==2.14.7

2) Download Datasets and Checkpoints

To run experiments, download the required Knowledge Graph datasets and checkpoints for:

  • Relation Retriever : sbert
  • Triple Retriever : GNN, MPNet

You can download all necessary files from the following Google Drive link: https://drive.google.com/drive/folders/1BVvQRNTaLdONEeFauZfxPYQXQSpCVuNm?usp=drive_link

πŸ“‚ Directory Structure After Download

After downloading, the files should be placed as follows:

data/
└── webqsp/
    β”œβ”€β”€ total_graph_webqsp.jsonl
    β”œβ”€β”€ webqsp_topic_graph.pkl
    β”œβ”€β”€ train_goldenpath.jsonl
    β”œβ”€β”€ relation.pth
    └── webqsp_triple2id.pkl
└── cwq/
    β”œβ”€β”€ total_graph_cwq.jsonl
    β”œβ”€β”€ cwq_topic_graph.pkl
    β”œβ”€β”€ train_goldenpath.jsonl
    β”œβ”€β”€ relation.pth
    └── cwq_triple2id.pkl

ckpt/
β”œβ”€β”€ GNN/
β”‚   β”œβ”€β”€ webqsp_GNN.pth
β”‚   └── cwq_GNN.pth
β”œβ”€β”€ mpnet/
β”‚   β”œβ”€β”€ webqsp.mdl
β”‚   └── cwq.mdl
└── sbert/

Alternatively, you can preprocess the datasets using the following commands:

python3 graph_preprocess.py
python3 GNN/get_emb.py

You can train the GNN and MPNet (Triple Retrievers) using the following commands:

python3 GNN/gnn_train.py
python3 MPNet/[dataset].sh 

3) Run

python main.py --dataset [DATASET_NAME]

Replace [DATASET_NAME] with the name of the dataset you want to use (e.g., webqsp, cwq, etc.).

Contributors

hyemin-yang

68 commits

meanboat-23

44 commits

Languages

Python

85.2%

C++

7.2%

Cuda

7.2%