Coder Social home page Coder Social logo

allanchen95 / pakdd-20-jarka Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 3.7 MB

Implementation of PAKDD'20 paper: "Jointly Modelling Attribute Interactions and Relationships for Cross-lingual Knowledge Alignment".

Python 100.00%
pakdd jarka attribute-interactions joint-learning merge-strategy kg-alignment

pakdd-20-jarka's Introduction

JarKA

JarKA tackles the attribute heterogeneity problem by the interaction-based matching model when aligning cross-lingual knowledge graphs, and also further incorporates structure information by a jointly-trained framework. To alleviate the conflicts generated by the two modules, three merge strategies are adopted such that the most confident seeds can be selected appropriately.

Whole Framework

Dependencies

  • Python 3.6+
  • Pytorch "1.1.0"+
  • CPU/GPU
  • Jieba
  • MeCab
  • ...

How to run

  • Directory dbp_15k: stores three datasets, zh_en, fr_en, and ja_en. You can download from here with password:r9a7 ;
  • Directoty model: saves JarKA code.

Taking, zh_en dataset, for example, we demostrate how to run JarKA model:

1. Preprocess the data

  • You need first download dbp15k dataset, and then go to the dirs ./dbp15k/zh_en/, run the following code sequentially to generate essential data files:
    • build_vocab_dict.py: to build vocabulary dict (whole_vocab_split) and the corpus for pretraining the NMT (zh_en_des);
    • filter_att.py: to filter the popular attributes which appear at least 50 times in all attribute triplets, and then match each attribute to an id. (att2id_fre.p);
    • generate_popular_attrs.py: filter and sort the attributes by popularity and seclect top-20 attribute triplets for each entity (filter_sort_zh/en_lan_att_filter.p)

2. Pretrain the NMT model.

Go the dirs model/

  • Copy all the files in the dir ./dbp15k/zh_en/ to ./data/

  • Run translate.py, and save the checkpoints.

3. Run the JarKA model.

python jarka_main.py --merge {merge_strategy}

Where {merge_strategy} contains ['multi_view', 'score_based', 'rank_based']

Extensive Experiments

Dataset discription

We evaluate the proposed model on three datasets. One is a well-adopted public dataset named DBP15K, the other two, named DBP15K-1 and DBP15K-2, modify DBP15K. DBP15K-1 loosens the constraint as 2 self-contained relationship triplets, and DBP15K-2 further removes the self-contained constraint. Thus, the clustering of the three datasets is different. Table 1 shows the statistics of the datasets.

The dbp15k-1 dataset is also avaliable online.(password: aclg)

Overall experiment results

Sensitivity to Graph Clustering

We compare JarKA and BootEA on three ZH-EN datasets, which shows that both of them perform poorer when the clustering coefficient (cc) of the dataset is smaller. But their performance gap increases with the decrease of cc, indicating BootEA is more sensitive to the clustering characteristics of the graph than JarKA, as BootEA only models the structures.

Citation

If you think JarKA inspires you, please cite it as follows:

@inproceedings{chen2020jarka,
  title={JarKA: Modeling Attribute Interactions for Cross-lingual Knowledge Alignment},
  author={Chen, Bo and Zhang, Jing and Tang, Xiaobin and Chen, Hong and Li, Cuiping},
  booktitle={Pacific-Asia Conference on Knowledge Discovery and Data Mining},
  pages={845--856},
  year={2020},
  organization={Springer}
}

pakdd-20-jarka's People

Contributors

allanchen95 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

brown-q

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.