Code Monkey home page Code Monkey logo

eva's Introduction

EVA: Entity Visual Alignment

EVA logo

Entity Alignment is the task of linking entities with the same real-world identity from different knowledge graphs. EVA is a set of algorithms that leverage images in knowledge graphs for facilitating Entity Alignment.

This repo holds code for reproducing models presented in our paper: Visual Pivoting for (Unsupervised) Entity Alignment [arxiv][aaai] at AAAI 2021.

Data

Download the used data (DBP15k, DWY15 along with precomputed features) from here (dropbox) (1.3GB after unzipping) and place under data/.

[optional] The raw images of entities appeared in DBP15k and DWY15k can be downloaded here (dropbox) (108GB after unzipping). All images are saved as title-image pairs in dictionaries and can be accessed with the following code:

import pickle
zh_images = pickle.load(open("eva_image_resources/dbp15k/zh_dbp15k_link_img_dict_full.pkl",'rb'))
print(en_images["http://zh.dbpedia.org/resource/香港有線電視"].size)

Environment

The code is tested with python 3.7 and torch 1.7.0.

Use EVA

Run the full model on DBP15k:

./run_dbp15k.sh 0 2020 fr_en

where 0 specifies the GPU device, 2020 is a random seed and fr_en sets the language pair.

Similarly, you can run the full model on DWY15k:

./run_dwy15k.sh 0 2020 1

where the first two args are the same as before, the third specifies where using the normal (1) or dense (2) split.

To run without iterative learning:

./run_dbp15k_no_il.sh 0 2020 fr_en
./run_dwy15k_no_il.sh 0 2020 1

To run the unsupervised setting on DBP15k:

./run_dbp15k_unsup.sh 0 2020 fr_en

Acknowledgement

Our codes are modified from KECG. We appreciate the authors for making KECG open-sourced.

Citation

@inproceedings{liu2021visual,
  title={Visual Pivoting for (Unsupervised) Entity Alignment},
  author={Liu, Fangyu and Chen, Muhao and Roth, Dan and Collier, Nigel},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={35},
  number={5},
  pages={4257--4266},
  year={2021}
}

License

EVA is MIT licensed. See the LICENSE file for details.

eva's People

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.