All Projects → nju-websoft → HyperKA

nju-websoft / HyperKA

Licence: MIT License
Knowledge Association with Hyperbolic Knowledge Graph Embeddings, EMNLP 2020

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to HyperKA

industry-eval-EA
An Industry Evaluation of Embedding-based Entity Alignment @ COLING'20
Stars: ✭ 19 (-29.63%)
Mutual labels:  knowledge-graph, entity-alignment
NMN
Source code and datasets for ACL 2020 paper: Neighborhood Matching Network for Entity Alignment.
Stars: ✭ 55 (+103.7%)
Mutual labels:  knowledge-graph, entity-alignment
heron-language
A pure functional type-inferred language based on JavaScript
Stars: ✭ 53 (+96.3%)
Mutual labels:  type-inference
bangle-io
A web only WYSIWYG note taking app that saves notes locally in markdown format.
Stars: ✭ 626 (+2218.52%)
Mutual labels:  knowledge-graph
Metagraph
Metagraph是一款知识创作分享工具,不同于以往的知识创作平台,Metagraph提供了强大的内容关联能力。
Stars: ✭ 18 (-33.33%)
Mutual labels:  knowledge-graph
ITO
Intelligence Task Ontology (ITO)
Stars: ✭ 37 (+37.04%)
Mutual labels:  knowledge-graph
awesome-ontology
A curated list of ontology things
Stars: ✭ 73 (+170.37%)
Mutual labels:  knowledge-graph
TypeInferencer
Algorithm W and Algorithm M in F#
Stars: ✭ 33 (+22.22%)
Mutual labels:  type-inference
Typology
Swift type checking and semantic analysis for developer tools
Stars: ✭ 68 (+151.85%)
Mutual labels:  type-inference
skywalkR
code for Gogleva et al manuscript
Stars: ✭ 28 (+3.7%)
Mutual labels:  knowledge-graph
Knowledge Graph based Intent Network
Learning Intents behind Interactions with Knowledge Graph for Recommendation, WWW2021
Stars: ✭ 116 (+329.63%)
Mutual labels:  knowledge-graph
koza
Data transformation framework for LinkML data models
Stars: ✭ 21 (-22.22%)
Mutual labels:  knowledge-graph
AutoSF
Y. Zhang, Q. Yao, J. Kwok. Bilinear Scoring Function Search for Knowledge Graph Learning. TPAMI 2022
Stars: ✭ 51 (+88.89%)
Mutual labels:  knowledge-graph
KGMiner
Knowledge Graph Miner
Stars: ✭ 37 (+37.04%)
Mutual labels:  knowledge-graph
knowledge-graph
Graph Data Visualization Demo| 图数据搜索可视化应用案例
Stars: ✭ 30 (+11.11%)
Mutual labels:  knowledge-graph
PathCon
Combining relational context and relational paths for knowledge graph completion
Stars: ✭ 94 (+248.15%)
Mutual labels:  knowledge-graph
FCA-Map
💠 Ontology matching system based on formal concept analysis
Stars: ✭ 25 (-7.41%)
Mutual labels:  knowledge-graph
WhySoMuch
knowledge graph recommendation
Stars: ✭ 67 (+148.15%)
Mutual labels:  knowledge-graph
hyperbolic-learning
Implemented ML algorithms in hyperbolic geometry (MDS, K-Means, Support vector machines, etc.)
Stars: ✭ 89 (+229.63%)
Mutual labels:  hyperbolic-embeddings
ke-dialogue
KE-Dialogue: Injecting knowledge graph into a fully end-to-end dialogue system.
Stars: ✭ 39 (+44.44%)
Mutual labels:  knowledge-graph

HyperKA

Source code for EMNLP-2020 paper "Knowledge Association with Hyperbolic Knowledge Graph Embeddings".

Capturing associations for knowledge graphs (KGs) through entity alignment, entity type inference and other related tasks benefits NLP applications with comprehensive knowledge representations. Recent related methods built on Euclidean embeddings are challenged by the hierarchical structures and different scales of KGs. They also depend on high embedding dimensions to realize enough expressiveness. Differently, we explore with low-dimensional hyperbolic embeddings for knowledge association. We propose a hyperbolic relational graph neural network for KG embedding and capture knowledge associations with a hyperbolic transformation. Extensive experiments on entity alignment and type inference demonstrate the effectiveness and efficiency of our method.

Datasets

We use three datasets in our experiments, i.e., DBP15K for entity alignment, YAGO26K-906 and DB111K-174 for type inference. We provide the datasets in the folder ./dataset/ of the repository.

Code

Package Description

src/
├── hyperka/
│   ├── ea_apps/: implementations for entity alignment
│   ├── ea_funcs/: implementations of training and test functions for entity alignment
│   ├── et_apps/: implementations for entity type inference
│   ├── et_funcs/: implementations for training and test functions for entity type inference
│   ├── hyperbolic/: implementations for hyperbolic operations

Dependencies

  • Python 3.6
  • Tensorflow 1.14
  • Scipy
  • scikit-learn
  • Numpy
  • Pandas
  • Matplotlib
  • psutil
  • python-igraph
  • Graph-tool
  • ray

Installation

We recommend creating a new conda environment to install and run HyperKA. You should first install Python 3.6 and Tensorflow-GPU 1.14 using conda. Then, HyperKA can be installed using pip with the following script:

conda install -c conda-forge graph-tool==2.29
pip install -e . -i https://pypi.python.org/simple

Running

For example, to run HyperKA (75 dim) on ZH-EN of DBP15K for entity alignment, please use the following commands:

cd src/hyperka/ea_apps/
python main.py --input ../../../dataset/dbp15k/zh_en/mtranse/0_3/

To run HyperKA (75 dim) on DBP15K ZH-EN under the bootstrapping setting, please use the following commands:

cd src/hyperka/ea_apps/
python main.py --input ../../../dataset/dbp15k/zh_en/mtranse/0_3/ --is_bp True --learning_rate 0.0005 --epsilon4triple 0.99

To run HyperKA (75/15 dim) on DB111K-174 for entity type inference, use the following commands:

cd src/hyperka/et_apps/
python main.py --input ../../../dataset/joie/db/ --neg_typing_margin 0.1 --neg_triple_margin 0.2 --nums_neg 30 --mapping_neg_nums 30 --batch_size 20000 --epochs 100

Due to the instability of optimizing hyperbolic embeddings, it is acceptable that the results fluctuate a little (±1%) when running code repeatedly. You can run the code several times and choose the average result.

If you have any difficulty or question in running code and reproducing experimental results, please email to [email protected] or [email protected].

Citation

If you use our model or code, please kindly cite it as follows:

@inproceedings{HyperKA,
  author    = {Zequn Sun, 
               Muhao Chen,  
               Wei Hu, 
               Chengming Wang, 
               Jian Dai, 
               Wei Zhang}, 
  title     = {Knowledge Association with Hyperbolic Knowledge Graph Embeddings}, 
  booktitle = {EMNLP}, 
  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].