Skip to content

HKUST-KnowComp/SQE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequential Query Encoding (SQE)

The official implementation for the paper Sequential Query Encoding For Complex Query Answering on Knowledge Graphs [Paper].

The KG data we are using is from the KG reasoning repo from here. The data descriptions are here: https://github.com/snap-stanford/KGReasoning. Please put the downloaded files under ./KG_data directory.

The complex query dataset for our benchmark can be downloaded here(52.9GB). Some people experience difficulty in downloading large files from onedrive on the command line. Here is a tutorial on downloading onedrive files in the command line.

We provided a wide range of baselines with our codebase. For experiments, please check out example.sh for script format.

During the running process, you can monitor the training process via tensorboard with following commands:
tensorboard --logdir your_log_dir --port the_port_you_fancy
ssh -N -f -L localhost:port_number:localhost:port_number your_server_location

Supported Models:

Iterative Encoding Model:

Model Flag (-m) Paper
gqe Embedding logical queries on knowledge graphs
q2b Query2box: Reasoning over knowledge graphs in vector space using box embeddings
betae Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs
hype Self-supervised hyperboloid representations from logical queries over knowledge graphs
mlp / mlp_mixer Neural methods for logical reasoning over knowledge graphs
cone Cone: Cone embeddings for multihop reasoning over knowledge graphs
q2p Query2Particles: Knowledge Graph Reasoning with Particle Embeddings
fuzzqe Fuzzy Logic Based Logical Query Answering on Knowledge Graphs
tree_lstm (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs
tree_rnn (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs

Sequential Encoding Models:

Model Flag (-m) Paper
biqe Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoders
tcn (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs
lstm (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs
gru (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs
transformer (this paper) Sequential Query Encoding for Complex Query Answering on Knowledge Graphs

Brining your own Query Encoding Model!

Also, you are welcome to build your own models with our benchmark, by overriding the functions in ./models/model.py. You only need to write your model, and the rest of things can be done by the code in this repo~

Citations:

If you find the code/data/paper interesting, please cite our paper!

@article{
      bai2023sequential,
      title={Sequential Query Encoding for Complex Query Answering on Knowledge Graphs},
      author={Jiaxin Bai and Tianshi Zheng and Yangqiu Song},
      journal={Transactions on Machine Learning Research},
      issn={2835-8856},
      year={2023},
      url={https://openreview.net/forum?id=ERqGqZzSu5},
      note={}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published