Skip to content

[NAACL 2025] Mitigating Heterogeneity among Factor Tensors via Lie Group Manifolds for Tensor Decomposition Based Temporal Knowledge Graph Embedding

License

Notifications You must be signed in to change notification settings

dellixx/tkbc-lie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mitigating Heterogeneity among Factor Tensors via Lie Group Manifolds for Tensor Decomposition Based Temporal Knowledge Graph Embedding

Static Badge Static Badge

Installation

Create a conda environment with pytorch and scikit-learn :

conda create --name tkbc_env python=3.x
source activate tkbc_env
conda install --file requirements.txt -c pytorch

Then install the kbc package to this environment

python setup.py install

Datasets

We provide the downloaded data at tkbc/src_data

Once the datasets are downloaded, go to the tkbc/ folder and add them to the package data folder by running :

python tkbc/process.py

This will create the files required to compute the filtered metrics.

Reproducing results

# ICEWS14
python tkbc/learner.py --dataset ICEWS14 --model TeAST --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TComplEx  --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TNTcomplEx  --rank 128 --emb_reg 1e-2 --time_reg 1e-2
python tkbc/learner.py --dataset ICEWS14 --model TeLM --rank 121 --emb_reg 1e-2 --time_reg 1e-2

# ICEWS05-15
python tkbc/learner.py --dataset ICEWS05-15 --model TeAST --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TComplEx --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TNTcomplEx --rank 128 --emb_reg 1e-3 --time_reg 1
python tkbc/learner.py --dataset ICEWS05-15 --model TeLM --rank 121 --emb_reg 1e-3 --time_reg 1

License

MIT licensed, as found in the LICENSE file.

Acknowledgement

We refer to the code of TNTComplEx and TeLM. Thanks for their great contributions!

About

[NAACL 2025] Mitigating Heterogeneity among Factor Tensors via Lie Group Manifolds for Tensor Decomposition Based Temporal Knowledge Graph Embedding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages