Giter Club home page Giter Club logo

hyper_relational_ilp's Introduction

Improving Inductive Link Prediction Using Hyper-Relational Facts

Python 3.8 PyTorch License: MIT arXiv

This repository contains the code accompanying the paper

@misc{ali2021improving,
    title={Improving Inductive Link Prediction Using Hyper-Relational Facts},
    author={Mehdi Ali and Max Berrendorf and Mikhail Galkin and Veronika Thost and Tengfei Ma and Volker Tresp and Jens Lehmann},
    year={2021},
    eprint={2107.04894},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

Data

Our code automatically downloads required data if it is missing. By default, it searches in ~/.data/ilp.

Installation

We recommend to work with a virtual environment. You can create one, e.g., using Python's builtin venv module:

python3 -m venv venv
source venv/bin/activate

Please install PyTorch and PyTorch Geometric first, following the instructions from PyTorch Geometric's documentation. Notice that you will first need to install PyTorch, and then select the installation command appropriately based on the chosen torch variant.

Afterwards, you can install all remaining dependencies as well as our package by simply using

pip install .

If you plan to modify the code, consider pip's --editable flag:

pip install -e .

Usage

For high-level usage, we provide a command line interface for both, hyperparameter search as well as running single configurations. If you installed the package via pip, a new ilp command should be available in your environment. Otherwise, we also provide a small wrapper script around the CLI, ./executables/main.py, which you can use, e.g., to start CLI commands in debug mode from your IDE.

You can run ilp --help to get an overview of the available commands. We further discuss them below.

Datasets

The datasets can be downloaded at https://zenodo.org/record/6581274#.Yo5Ki8ZCRTY.

Individual configurations

To start individual configurations use ilp run, e.g.,

ilp run qblp

Hyperparameter Search (HPO)

To start an HPO, use ilp tune, e.g.,

ilp tune --model stare

To get further information about the command line parameters, pass --help.

Note: Running the full HPO takes a considerable amount of time.

Results

We also provide the configurations and results of the best models from our hyperparameter search in ./best_configs.

hyper_relational_ilp's People

Contributors

mali-git avatar

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.