All Projects → snap-stanford → KGReasoning

snap-stanford / KGReasoning

Licence: MIT license
Multi-Hop Logical Reasoning in Knowledge Graphs

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to KGReasoning

Grakn
TypeDB: a strongly-typed database
Stars: ✭ 2,947 (+1395.94%)
Mutual labels:  knowledge-graph, knowledge-base, reasoning
typedb
TypeDB: a strongly-typed database
Stars: ✭ 3,152 (+1500%)
Mutual labels:  knowledge-graph, knowledge-base, reasoning
Hyte
EMNLP 2018: HyTE: Hyperplane-based Temporally aware Knowledge Graph Embedding
Stars: ✭ 130 (-34.01%)
Mutual labels:  knowledge-graph, knowledge-base
Zincbase
A state of the art knowledge base
Stars: ✭ 144 (-26.9%)
Mutual labels:  knowledge-graph, knowledge-base
harika
Offline-, mobile-first graph note-taking app focused on performance with the knowledgebase of any scale
Stars: ✭ 111 (-43.65%)
Mutual labels:  knowledge-graph, knowledge-base
Simple
SimplE Embedding for Link Prediction in Knowledge Graphs
Stars: ✭ 104 (-47.21%)
Mutual labels:  knowledge-graph, knowledge-base
Workbase
Grakn Workbase (Knowledge IDE)
Stars: ✭ 106 (-46.19%)
Mutual labels:  knowledge-graph, knowledge-base
Topic Db
TopicDB is a topic maps-based semantic graph store (using PostgreSQL for persistence)
Stars: ✭ 164 (-16.75%)
Mutual labels:  knowledge-graph, knowledge-base
Athens
Free self-hosted desktop app: https://github.com/athensresearch/athens/releases; Try the demo at https://athensresearch.github.io/athens; Docs viewable at https://athensresearch.github.io/docs/
Stars: ✭ 5,501 (+2692.39%)
Mutual labels:  knowledge-graph, knowledge-base
Kbgan
Code for "KBGAN: Adversarial Learning for Knowledge Graph Embeddings" https://arxiv.org/abs/1711.04071
Stars: ✭ 186 (-5.58%)
Mutual labels:  knowledge-graph, knowledge-base
Zincbase
A batteries-included kit for knowledge graphs
Stars: ✭ 249 (+26.4%)
Mutual labels:  knowledge-graph, knowledge-base
Stock Knowledge Graph
利用网络上公开的数据构建一个小型的证券知识图谱/知识库
Stars: ✭ 1,182 (+500%)
Mutual labels:  knowledge-graph, knowledge-base
Awesome Knowledge Management
A curated list of amazingly awesome articles, people, applications, software libraries and projects related to the knowledge management space
Stars: ✭ 758 (+284.77%)
Mutual labels:  knowledge-graph, knowledge-base
Capse
A Capsule Network-based Embedding Model for Knowledge Graph Completion and Search Personalization (NAACL 2019)
Stars: ✭ 114 (-42.13%)
Mutual labels:  knowledge-graph, knowledge-base
Atomspace
The OpenCog (hyper-)graph database and graph rewriting system
Stars: ✭ 495 (+151.27%)
Mutual labels:  knowledge-graph, knowledge-base
Tutorial Utilizing Kg
Resources for Tutorial on "Utilizing Knowledge Graphs in Text-centric Information Retrieval"
Stars: ✭ 148 (-24.87%)
Mutual labels:  knowledge-graph, knowledge-base
hugo-documentation-theme
📖 Project Docs / Knowledge Base template for Hugo Website Builder. 创建项目文档
Stars: ✭ 101 (-48.73%)
Mutual labels:  knowledge-graph, knowledge-base
Ccks2019 el
CCKS 2019 中文短文本实体链指比赛技术创新奖解决方案
Stars: ✭ 326 (+65.48%)
Mutual labels:  knowledge-graph, knowledge-base
Dynamic Kg
Dynamic (Temporal) Knowledge Graph Completion (Reasoning)
Stars: ✭ 381 (+93.4%)
Mutual labels:  knowledge-graph, knowledge-base
Aser
ASER (activities, states, events, and their relations), a large-scale eventuality knowledge graph extracted from more than 11-billion-token unstructured textual data.
Stars: ✭ 171 (-13.2%)
Mutual labels:  knowledge-graph, knowledge-base

KGReasoning

This repo contains several algorithms for multi-hop reasoning on knowledge graphs, including the official Pytorch implementation of Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs.

Models

KG Data

The KG data (FB15k, FB15k-237, NELL995) mentioned in the BetaE paper and the Query2box paper can be downloaded here. Note the two use the same training queries, but the difference is that the valid/test queries in BetaE paper have a maximum number of answers, making it more realistic.

Each folder in the data represents a KG, including the following files.

  • train.txt/valid.txt/test.txt: KG edges
  • id2rel/rel2id/ent2id/id2ent.pkl: KG entity relation dicts
  • train-queries/valid-queries/test-queries.pkl: defaultdict(set), each key represents a query structure, and the value represents the instantiated queries
  • train-answers.pkl: defaultdict(set), each key represents a query, and the value represents the answers obtained in the training graph (edges in train.txt)
  • valid-easy-answers/test-easy-answers.pkl: defaultdict(set), each key represents a query, and the value represents the answers obtained in the training graph (edges in train.txt) / valid graph (edges in train.txt+valid.txt)
  • valid-hard-answers/test-hard-answers.pkl: defaultdict(set), each key represents a query, and the value represents the additional answers obtained in the validation graph (edges in train.txt+valid.txt) / test graph (edges in train.txt+valid.txt+test.txt)

We represent the query structures using a tuple in case we run out of names :), (credits to @michiyasunaga). For example, 1p queries: (e, (r,)) and 2i queries: ((e, (r,)),(e, (r,))). Check the code for more details.

Examples

Please refer to the examples.sh for the scripts of all 3 models on all 3 datasets.

Citations

If you use this repo, please cite the following paper.

@inproceedings{
 ren2020beta,
 title={Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs},
 author={Hongyu Ren and Jure Leskovec},
 booktitle={Neural Information Processing Systems},
 year={2020}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].