Skip to content

bio-ontology-research-group/GeometrE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fully Geometric Multi-Hop Reasoning on Knowledge Graphs With Transitive Relations


Main Requirements and installation

  • Python 3.10.15
  • PyTorch 2.4.1

You can install all the requirements through environment.yml as follows

conda env create -f environment.yml
conda activate geometre

Data

Place the data under src/data such that the file structure looks like tis:

.
├── environment.yml
├── README.md
├── requirements.txt
└── src
    ├── data
        ├── FB15k-237-betae
        ├── NELL-betae
        └── WN18RR-QA


Reproduce the results

To reproduce the results please run the following commands below. We used Weights and Biases, you might want to input your username in the src/main.py script.

  • WN18RR
python main.py --do_train --do_test --alpha=0.5 --batch_size=1024 --data_path=data/WN18RR-QA --gamma=20 --hidden_dim=400 --learning_rate=0.001 --negative_sample_size=64 --transitive=no --with_answer_embedding -ns -desc "reproduce wn18rr"
  • NELL
python main.py --do_train --do_test --alpha=0.2 --batch_size=1024 --data_path=data/NELL-betae --gamma=10 --hidden_dim=400 --learning_rate=0.0005 --negative_sample_size=64 --transitive=no -ns -desc "reproduce nell"
  • FB15k-237
python main.py --do_train --do_test --alpha=0.2 --batch_size=1024 --data_path=data/FB15k-237-betae --gamma=20 --hidden_dim=400 --learning_rate=0.0005 --negative_sample_size=64 --transitive=no -ns -desc "reproduce fb237"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published