Giter VIP home page Giter VIP logo

kecg's Introduction

KECG

Source code and datasets for EMNLP 2019 paper "Semi-supervised Entity Alignment via Joint Knowledge Embedding Model and Cross-graph Model".

Reqirements

  • Python3 (tested on 3.6.6)
  • Pytorch (tested on 0.4.1)

Code

This implementation includes KECG, KECG(w\o K), and KECG(w\o NNS). Example of running KECG on DBP15K(ZH-EN)

CUDA_VISIBLE_DEVICES=0 python3.6 run.py --file_dir data/DBP15K/zh_en --rate 0.3 --lr 0.005 --epochs 1000

Example of running KECG(w\o K)

CUDA_VISIBLE_DEVICES=0 python3.6 run.py --file_dir data/DBP15K/zh_en --rate 0.3 --lr 0.001 --epochs 500 --wo_K

Example of running KECG(w\o NNS)

CUDA_VISIBLE_DEVICES=0 python3.6 run.py --file_dir data/DBP15K/zh_en --rate 0.3 --lr 0.05 --epochs 1000 --wo_NNS

Dataset

The used datasets DBP15K and DWY100K are from subfolder named "mapping" of BootEA and JAPE. (But need to combine "ref_ent_ids" and "sup_ent_ids" into a single file named "ill_ent_ids" before running KECG.) Here, you can directly unpack the data file

unzip data.zip

Acknowledgement

We refer to some codes of these repos: pyGAT, BootEA, GCN-Align. Appreciate for their great contributions!

Cite

If you use the code, please cite this paper:

  • Chengjiang Li, Yixin Cao, Lei Hou, Jiaxin Shi, Juanzi Li and Tat-Seng Chua. Semi-supervised Entity Alignment via Joint Knowledge Embedding Model and Cross-graph Model. In EMNLP 2019.

kecg's People

Contributors

iamlockelightning avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kecg's Issues

关于实验结果和论文结果的问题

你好,我在复现你的代码时发现结果分为“l2r”和“r2l”两个方向,论文里只有一个方向,比如DBP15Kzh-en。请问论文里的结果是否是实验中“l2r”+“r2l”求平均得来的吗?

How to combine the files?

Hi,I don't konw how to combine "ref_ent_ids" and "sup_ent_ids" into a single file, could you give me a code example?I would appreciate it if you can help me.

the meaning of diag?

Your work benefit me a lot! And i want to know the meaning of line 87 and 88 in layers.py.

if self.diag:
                h = torch.mul(input, self.w[i])

what is the diag means?Thanks a lot if you can give me explanations obout it.

Running on DWY100K

Hi, thank you very much for sharing the code! It has been really useful!

The code runs perfectly on DBP15K. However, when I ran it on DWY100K, an error emerged, "CUDA out of memory. Tried to allocate 11.44 GiB (GPU 0; ...; 9.49 GiB free...)", which is expected, since the size of DWY100K is much larger than DBP15K, and one GPU might not be enough. Consequently, I tried to use torch.nn.DataParallel to run it on multiple GPUs, while it reports "Runtime Error : sparse tensors do not have strides". I wonder how you altered the code to make it work on DWY100K?

Thank you very much for your time and I look forward to your reply.

Where is the paper's link?

Thanks for uploading codes, I can't wait reading your paper.

I jumped to the link in README.md, but still can't find EMNLP paper.
Would you know where it is? If so, I would appreciate it much.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.