Giter VIP home page Giter VIP logo

boxte's Introduction

Heads-up: The code in this repo is functional, reliable, but also, well... ugly. Today I would probably not write this kind of code anymore. So, proceed at your own risk!

BoxTE

BoxTE is a box embedding model for temporal knowledge graph completion (TKGC), developed by Ralph Abboud, Ismail Ilkan Ceylan, and myself. It achieves state-of-the art performance on multiple TKGC benchmarks, while being fully expressive, inherently interpretable, and capturing various logical inference patterns. Get the AAAI paper here: https://arxiv.org/abs/2109.08970

This repository contains the source code for the BoxTE embedding model and additionally contains scripts for training and testing, as well TKGC datasets.

Requirements

  • PyTorch >= 1.7.0 and corresponding NumPy version

Running BoxTE

To train the BoxTE model, run main.py and specify the required arguments --train_path, --test_path and --valid_path to select a dataset. The flag -h can be used to obtain a description of all available settings: python main.py -h. Using these, different hyperparameter-settings and model variants can be selected.

To perform a test on saved/pretrained model parameters, run main.py, specify --load_params_path and set --num_epochs=0.

Reproducing results

We provide hyperparameter-files that contain the settings used to obtain best results on each dataset. To run experiments with these settings, execute the following commands from within the repository:

python main.py @path/to/repo/modelargs/icews14

python main.py @path/to/repo/modelargs/icews5-15

python main.py @path/to/repo/modelargs/gdelt

To reproduce the results in a setting with a limited number of model parameters, run:

python main.py @path/to/repo/modelargs/icews14-lowdim

python main.py @path/to/repo/modelargs/icews5-15-lowdim

python main.py @path/to/repo/modelargs/gdelt-lowdim

boxte's People

Contributors

johannesmessner 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.