{"id":13605502,"url":"https://github.com/HKUST-KnowComp/SQE","last_synced_at":"2025-04-12T05:33:20.411Z","repository":{"id":175417100,"uuid":"653868370","full_name":"HKUST-KnowComp/SQE","owner":"HKUST-KnowComp","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-10T23:48:01.000Z","size":83,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-02T19:37:42.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HKUST-KnowComp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-14T23:20:35.000Z","updated_at":"2024-07-17T05:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa99fd34-7405-4eeb-8486-789b779c5c63","html_url":"https://github.com/HKUST-KnowComp/SQE","commit_stats":null,"previous_names":["hkust-knowcomp/sqe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FSQE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FSQE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FSQE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FSQE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HKUST-KnowComp","download_url":"https://codeload.github.com/HKUST-KnowComp/SQE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223497891,"owners_count":17155215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:00:59.483Z","updated_at":"2024-11-07T10:30:43.022Z","avatar_url":"https://github.com/HKUST-KnowComp.png","language":"Python","funding_links":[],"categories":[":wrench: Implementations"],"sub_categories":["Dataset tools"],"readme":"# Sequential Query Encoding (SQE)\n\nThe official implementation for the paper Sequential Query Encoding For Complex Query Answering on Knowledge Graphs [[Paper]](https://arxiv.org/pdf/2302.13114.pdf).\n\nThe KG data we are using is from the KG reasoning repo from [here](http://snap.stanford.edu/betae/KG_data.zip). The data descriptions are here: https://github.com/snap-stanford/KGReasoning. Please put the downloaded files under \u003ccode\u003e./KG_data\u003c/code\u003e directory.\n\nThe complex query dataset for our benchmark can be downloaded [here](https://hkustconnect-my.sharepoint.com/:u:/g/personal/tzhengad_connect_ust_hk/EXgjlrPJHadPhPDQCuVFy88B-BCkdNJc1Mu1rTBURpfysQ?e=wCEFuo)（52.9GB).\nSome people experience difficulty in downloading large files from onedrive on the command line. [Here](https://sushantag9.medium.com/download-data-from-onedrive-using-command-line-d27196a676d9) is a tutorial on downloading onedrive files in the command line. \n\n\nWe provided a wide range of baselines with our codebase. For experiments, please check out \u003ccode\u003eexample.sh\u003c/code\u003e for script format. \n\nDuring the running process, you can monitor the training process via tensorboard with following commands: \u003cbr\u003e\n\u003ccode\u003e tensorboard --logdir your_log_dir --port the_port_you_fancy \u003c/code\u003e \u003cbr\u003e\n\u003ccode\u003e ssh -N -f -L localhost:port_number:localhost:port_number your_server_location \u003c/code\u003e\n\n## Supported Models:\n\nIterative Encoding Model:\n\n| Model Flag (-m) | Paper  |\n|---|---|\n| gqe |  [Embedding logical queries on knowledge graphs](https://proceedings.neurips.cc/paper/2018/hash/ef50c335cca9f340bde656363ebd02fd-Abstract.html)  |\n| q2b | [Query2box: Reasoning over knowledge graphs in vector space using box embeddings](https://openreview.net/forum?id=BJgr4kSFDS) |\n| betae | [Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs](https://proceedings.neurips.cc/paper/2020/hash/e43739bba7cdb577e9e3e4e42447f5a5-Abstract.html)  |\n| hype | [Self-supervised hyperboloid representations from logical queries over knowledge graphs](https://dl.acm.org/doi/10.1145/3442381.3449974) |\n| mlp / mlp_mixer| [Neural methods for logical reasoning over knowledge graphs](https://openreview.net/forum?id=tgcAoUVHRIB)  |\n| cone | [Cone: Cone embeddings for multihop reasoning over knowledge graphs](https://openreview.net/pdf?id=Twf_XYunk5j) |\n| q2p |  [Query2Particles: Knowledge Graph Reasoning with Particle Embeddings](https://aclanthology.org/2022.findings-naacl.207/) |\n| fuzzqe | [Fuzzy Logic Based Logical Query Answering on Knowledge Graphs](https://arxiv.org/abs/2108.02390) |\n| tree_lstm | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n| tree_rnn | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n\nSequential Encoding Models:\n\n| Model Flag (-m) | Paper  |\n|---|---|\n| biqe | [Answering Complex Queries in Knowledge Graphs with Bidirectional Sequence Encoders](https://arxiv.org/abs/2004.02596) |\n| tcn | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n| lstm | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n| gru | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n| transformer | (this paper) [Sequential Query Encoding for Complex Query Answering on Knowledge Graphs](https://openreview.net/pdf?id=ERqGqZzSu5) |\n\n\n## Brining your own Query Encoding Model!\n\nAlso, you are welcome to build your own models with our benchmark, by overriding the functions in \u003ccode\u003e./models/model.py\u003c/code\u003e. You only need to write your model, and the rest of things can be done by the code in this repo~\n\n## Citations:\nIf you find the code/data/paper interesting, please cite our paper!\n\n```\n@article{\n      bai2023sequential,\n      title={Sequential Query Encoding for Complex Query Answering on Knowledge Graphs},\n      author={Jiaxin Bai and Tianshi Zheng and Yangqiu Song},\n      journal={Transactions on Machine Learning Research},\n      issn={2835-8856},\n      year={2023},\n      url={https://openreview.net/forum?id=ERqGqZzSu5},\n      note={}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKUST-KnowComp%2FSQE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHKUST-KnowComp%2FSQE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKUST-KnowComp%2FSQE/lists"}