Source code of the paper "Multi-view Riemannian Manifolds Fusion Enhancement for Knowledge Graph Completion".This paper was submitted to TKDE'2024
pip install -r requirement.txt
Details such like:
- python>=3.8
- torch>=1.8
- tqdm
- geoopt
- sklearn
All experiments are run with 4 RTX3090(24GB) GPUs.
- Due to the size limit of github, please download the dataset (FB15K-237, CN-100K, Kinships, WN18RR, YAGO3-10, UML.) from google drive and save it in the following format:
- MRME-KGC
- model
- manifolds
- file1
- file2
- file3 .....
- manifolds
- src_data
- CN-100K
- FB237
- Kinships
- UML
- WN18RR
- YAGO3-10
- model
2.After completing the above steps, please run the "process_datasets.py" file in the model folder to generate KG data to be input into the model:
cd model/
python process_datasets.py
bash Run-FB237-100d.sh
bash Run-CN-100K-100d.sh
bash Run-UML-100d.sh
....
- I encountered "CUDA out of memory" when running the code.
We run experiments with 4 RTX3090(24GB) GPUs, please reduce the batch size if you don't have enough resources.
- ModuleNotFoundError: No module named 'sklearn'
Please note that the command used to install the 'sklearn' package is: "pip install -U scikit-learn" instead of "pip install -U sklearn". Please pay attention to this problem!
If you want to draw pictures similar to the model pictures in the paper about hyperbolas and spheres, please refer to the "Draw a picture of hyperbolic space.ipynb" file.
vim Draw a picture of hyperbolic space.ipynb
If you have any questions, please contact my email [email protected] !