Git Product home page Git Product logo

low-rank-logic's Introduction

Low-rank Logic Embeddings

https://travis-ci.org/uclmr/low-rank-logic.svg?branch=master https://badges.gitter.im/Join%20Chat.svg https://badge.waffle.io/uclmr/low-rank-logic.png?label=ready&title=Ready

This repository contains code accompanying the paper: Tim Rocktäschel, Sameer Singh and Sebastian Riedel. Injecting Logical Background Knowledge into Embeddings for Relation Extraction. in: Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics – Human Language Technologies (NAACL HLT). 2015. [bib] [pdf]

./overview.png

Prerequisites

  • git to clone the repository
  • Java JDK and sbt to run code
  • gnuplot to reproduce evaluation plots
  • pdflatex to reproduce pdf tables

Download code

Clone the repository

cd ~/workspace
git clone https://github.com/uclmr/low-rank-logic.git
git submodule update --init --recursive
cd wolfe
git checkout tags/v0.4.0
cd ..

Compile and test

sbt clean compile test

Download data

NAACL13

If you have a license for the NYT corpus please write us a mail to obtain the link to the naacl2013.txt.zip file.

Move to resources
mv ~/Downloads/naacl2013.txt.zip ./src/main/resources

Comparison on Complete Data (Figure 3)

Matrix factorization

sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-MF.conf'

Joint Optimization (Section 3.2)

sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Joint.conf'

Zero-shot Relation Learning (Table 1)

  • MF (matrix factorization)
sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Zero-MF.conf'
  • Inf (logical inference)
sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Zero-Inf.conf'
  • Post (post-factorization inference)
sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Zero-Post.conf'
  • Pre (pre-factorization inference)
sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Zero-Pre.conf'
  • Joint (joint optimization)
sbt 'vmargs -Xmx8G' 'run-main uclmr.MatrixFactorization ./conf/naacl2015-Zero-Joint.conf'

Generating Figure

cd data/eval
tail -105 ../out/experiments.log > subsample.log
gnuplot -e 'fileName = "subsample"' eval.gpl 
open subsample-wMAP.pdf

Relations with Few Distant Labels (Figure 2)

sbt 'run-main uclmr.util.SubsampleExperiments 4'

4 is the number of threads used to run experiments in parallel.

Evaluate predictions

sbt 'run-main uclmr.io.EvaluateNAACL ./conf/eval.conf ./data/out/latest/predict.txt'

Citing

@inproceedings{rocktaschel2015injecting,
  title={{Injecting Logical Background Knowledge into Embeddings for Relation Extraction}},
  author={Rockt{\"a}schel, Tim and Singh, Sameer and Riedel, Sebastian},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics – Human Language Technologies (NAACL HLT)},
  year={2015}
}

low-rank-logic's People

Contributors

rockt avatar sameersingh avatar gitter-badger avatar riedelcastro avatar

Watchers

James Cloos 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.