Giter Site home page Giter Site logo

ntp's Introduction

End-to-End Differentiable Proving

This is an implementation of the paper End-to-End Differentiable Proving. For a high-level introduction, see the NIPS oral, slides and poster.

Disclaimer

Please note that this software is not maintained. It is highly-experimental research code, not well documented and we provide no warranty of any kind. Use at your own risk!

Data Format

Data for the NTP is in nl format - basically Prolog syntax:

ntp$ head data/countries/countries.nl
locatedIn(palau,micronesia).
locatedIn(palau,oceania).
locatedIn(maldives,southern_asia).
locatedIn(maldives,asia).
locatedIn(brunei,south-eastern_asia).
locatedIn(brunei,asia).
neighborOf(brunei,malaysia).
locatedIn(japan,eastern_asia).
locatedIn(japan,asia).
locatedIn(netherlands,western_europe).
  • *.nl files represent facts and rules (example of a rule: isa(X,Y) :- isa(X,Z), isa(Z,Y))

  • *.nlt files represent rule templates (example of a rule template: #1(X,Y) :- #2(X,Z), #3(Z,Y))

ntp$ cat data/ntp/simpsons.nlt
5   #1(X, Y) :- #2(X, Y).

5   #1(X, Y) :- #1(Y, X).

5   #1(X, Y) :-
    #2(X, Z),
    #2(Z, Y).

Running

The main file for running NTP is ntp/experiments/learn.py which takes the path to a configuration file as argument.

Code Structure

The core implementation of the NTP can be found here.

The base models (neural link predictors) are implemented here.

Imortant "modules" are unify, this one and this one. It should pretty much reflect the pseudocode in the paper.

The tricky part is the tiling of batched representations for batch proving - check out this.

However, this tiling needs to happen at various points in the code, e.g. here

Implementation of tiling (and multiplexing) here and here.

An important trick in NTP for proving in larger KBs and usin complex rules, is the Kmax heuristic, implemented here.

There is a symbolic prover implementation here

  • it is probably worthwile to look at it first, and compare to NTP.

Test

nosetests

Contributors

Citation

@inproceedings{rocktaschel2017end,
  author    = {Tim Rockt{\"{a}}schel and
               Sebastian Riedel},
  title     = {End-to-end Differentiable Proving},
  booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
               on Neural Information Processing Systems 2017, 4-9 December 2017,
               Long Beach, CA, {USA}},
  pages     = {3791--3803},
  year      = {2017},
  url       = {http://papers.nips.cc/paper/6969-end-to-end-differentiable-proving},
}

ntp's People

Contributors

rockt 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ntp's Issues

Running code does not produce stated results from paper

Hello,

I am a PhD student working on a project building on your paper. Running the code in the manner described in the readme does not seem to reproduce the results from the paper.

For example, running learn.py with the countries_S1_complex.conf file yields AUC-PR of 17.5, not 99 as reported in the paper. Similar discrepancies occur using other complEx configuration files, and smaller discrepancies for the NTP setting.

I was wondering if this is a known problem with the code/scripts, or if I am misapprehending the instructions in the readme.

Thank you for your time.

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.