- Pre-training & fine-tuning pipelines for fully-inductive KG reasoning.
- Out-of-the-box scripts for classic benchmarks (WN18RR, FB15k-237, NELL-995, YAGO3-10).
- Cross-domain adapters for biomedical, geographic and recommendation KGs.
- A lightweight implementation that runs on a single GPU.
📄 Looking for theoretical details and experimental results?
See the paper carefully .
cd GraphOracle
python -m venv venv # optional but recommended
source venv/bin/activate # Linux / macOS
pip install -r requirements.txtpython train.py \
--mode train \
--datasets data/YAGO data/FB15k-237 data/WN18RR \
--save_model \
--gpu 0 \
--max_epoch 200 \
--early_stopping 10
The best checkpoint will be stored in ./saved_models.
python train.py \
--mode zero-shot \
--datasets data/YAGO \
--gpu 0 \
--model_path ./saved_models/latest_model.pt
python train.py \
--mode finetune \
--datasets data/YAGO \
--gpu 0 \
--model_path ./saved_models/latest_model.pt \
--finetune_epochs 10
For processing details, please refer to the Section Processing Details of Biomedical Domain in the appendix of the paper. For comprehensive guidelines on constructing Bio datasets, please refer to the PrimeKG_Creation README.
cd PrimeKG
do as the README.md said
For GeoKG processing details, please refer to the Section Processing Detail of Geographic Datasets (GeoKG) in the appendix of the paper. For comprehensive guidenlines on constructing Geo_datasets, please refer to the GeoKG_Creation_README
cd GeoKG
do as the README.md said
For Amazon-book processing details, please refer to the Section Processing Detail of Recommendation Domain in the appendix of the paper. For comprehensive guidenlines on constructing Geo_datasets, please refer to the Amazon_Creation_README
GraphOracle/
├── KGsReasoning/ # Classic benchmark scripts
├── PrimeKG/ # Biomedical domain
├── GeoKG/ # Geographic domain
├── Recommendation_domain/ # Amazon-Book recommender KG
└── Figures/ # Paper figures & logo
| Domain & Dataset | Folder & README | One-Line Setup |
|---|---|---|
| Classic KGs WN18RR, FB15k-237, NELL-995, YAGO3-10 |
KGsReasoning/README.md |
cd KGsReasoning |
| Biomedical PrimeKG |
PrimeKG/build_dataset/README.md |
cd PrimeKG |
| Geographic GeoKG |
GeoKG/data/README.md |
cd GeoKG |
| Recommendation Amazon-Book |
Recommendation_domain/dataset/README.md |
cd Recommendation_domain |
Each sub-folder contains detailed data-creation scripts, preprocessing steps, and training commands. For additional implementation notes, consult the Processing Details sections in the paper appendix.
