Git Product home page Git Product logo

morse's Introduction

MorsE

This repository contains the experimental code for our SIGIR 2022 paper: Meta-Knowledge Transfer for Inductive Knowledge Graph Embedding. In this paper, to achieve inductive knowledge graph embedding, we propose a model MorsE, which does not learn embeddings for entities but learns transferable meta-knowledge that can be used to produce entity embeddings. Such meta-knowledge is modeled by entity-independent modules and learned by meta-learning.

Requirements

We run our code mainly based on PyTorch 1.7.1 and DGL 0.6.1 with CUDA. You can install cooresponding version based on your GPU resources. Furthermore, we also need lmdb to store the sampled sub-KGs for meta-training and argparse to parse command lines.

Dataset

For inductive link prediction tasks, we use datasets proposed in the paper Inductive Relation Prediction by Subgraph Reasoning. Before training our MorsE, please download the data from GraIL, and directly put these datasets in the data folder in our repository.

Train MorsE

We provide example scripts for explaining the usage of our code. For example, for meta-training MorsE on fb237_v1 based on TransE, you can try the following command line:

bash script/metatrain.sh

The training process, validation results, and final test results will be printed and saved in the corresponding log file. After training, you can find training logs in the log folder and the tensorboad logs are saved in the tb_log folder.

You can also fine-tune the meta-trained model as described in our paper. After finishing meta-training, you can try:

bash script/finetune.sh

We make some important args as variables in these scripts, and you can try different datasets and KGE methods by rewriting them. The details of argument list can be found in the main.py.

Citation

If you use or extend our work, please cite the following paper:

@inproceedings{MorsE,
author = {Chen, Mingyang and Zhang, Wen and Zhu, Yushan and Zhou, Hongting and Yuan, Zonggang and Xu, Changliang and Chen, Huajun},
title = {Meta-Knowledge Transfer for Inductive Knowledge Graph Embedding},
year = {2022},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3477495.3531757},
booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
pages = {927–937},
numpages = {11},
location = {Madrid, Spain},
series = {SIGIR '22}
}

morse's People

Contributors

anselcmy 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

morse's Issues

Can not reproduce the paper results?

I used the default script in your github repository to reproduce the code on the four sub-datasets of FB15k-237 use TransE mode, and found that the results of the paper could not be reproduced even after running many times. The following is the comparison between the paper and my reproduced results. Can you give your exact operating parameter information and look forward to your reply.
微信截图_20220810213426

Code for QA Experiment?

I am interested in the QA experiment mentioned in the paper. Can you release the code for QA experiment? Looking forward to your reply.

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.