Coder Social home page Coder Social logo

lerp's Introduction

LERP (Logical Entity RePresentation)

Official Repository for ICLR 2023 Paper: Logical Entity Representation in Knowledge-Graphs for Differentiable Rule Learning by Chi Han, Qizheng He, Charles Yu, Xinya Du, Hanghang Tong, Heng Ji.

Requirements

  • PyTorch 1.12.1
  • NumPy

Running the Code

Scripts for running LERP on graph completion dataset are stored in ./scripts/ directory. Before running the scripts, please specify a general directory $LOG for storing all checkpoints and logs, and each trial will create a sub-directory inside it for storage purposes. Please be aware that the checkpoint can be large depending on the task and configuration, and can occupy up to 4GB of space, so we advise carefully selecting the position in your disk. You can also specify the gpu you want to use into $CUDA_VISIBLE_DEVICES argument. If none is specified, the system will default to 0.

Besides running the commands in the following way, you can also directly pass in the arguments like bash scripts/run_wn18rr.sh ./log 0.

To train and evaluate LERP on Family dataset:

bash scripts/run_family.sh $LOG $CUDA_VISIBLE_DEVICES

On UMLS dataset:

bash scripts/run_umls.sh $LOG $CUDA_VISIBLE_DEVICES

On Kinship dataset:

bash scripts/run_kinship.sh $LOG $CUDA_VISIBLE_DEVICES

On WN18RR dataset:

bash scripts/run_wn18rr.sh $LOG $CUDA_VISIBLE_DEVICES

On WN-18 dataset:

bash scripts/run_wn18.sh $LOG $CUDA_VISIBLE_DEVICES

Acknowledgement

This code partially is borrowed from Neural LP and DRUM.

Citation

To cite our paper, please use the following BibTeX:

@inproceedings{han2023logical,
  title={Logical Entity Representation in Knowledge-Graphs for Differentiable Rule Learning},
  author={Han, Chi and He, Qizheng and Yu, Charles and Du, Xinya and Tong, Hanghang and Ji, Heng},
  booktitle={The Eleventh International Conference on Learning Representations},
  year={2023}
}

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.