Skip to main content

Neural Stochastic Logic Programming

Project description

DeepStochLog

Installation

Installing SWI Prolog

DeepStochLog requires SWI Prolog to run. Run the following commands to install:

sudo apt-add-repository ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install swi-prolog

Installing DeepStochLog package

To install DeepStochLog itself, you can download this repository and run the following command:

python setup.py install

Running the examples

Local dependencies

To see DeepStochLog in action, please first install SWI Prolog (as explained about), as well as the requirements listed in requirements.txt

pip install -r requirements.txt

Datasets

The datasets used in the tasks used to evaluate DeepStochLog can be found in our initial release.

Addition example

To see DeepStochLog in action, navigate to examples/addition and run addition.py.

The neural definite clause grammar specification is provided in addition.pl. The addition(N) predicate specifies/recognises that two handwritten digits N1 and N2 sum to N. The neural probability nn(number, [X], Y, digit) makes the neural network with name number (a MNIST classifier) label input image X with the digit Y.

Credits & Paper citation

If use this work in an academic context, please consider citing the following paper:

The paper is also accepted to AAAI22. Please cite that version of the paper when the proceedings are out.

@article{winters2021deepstochlog,
  title={Deepstochlog: Neural stochastic logic programming},
  author={Winters, Thomas and Marra, Giuseppe and Manhaeve, Robin and De Raedt, Luc},
  journal={arXiv preprint arXiv:2106.12574},
  year={2021}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepstochlog-0.0.1.tar.gz (29.1 kB view details)

Uploaded Source

File details

Details for the file deepstochlog-0.0.1.tar.gz.

File metadata

  • Download URL: deepstochlog-0.0.1.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3

File hashes

Hashes for deepstochlog-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4b9279fdcd54536b845f3e78172fa283d7923dbdf7fe7b222be9dff1934683f8
MD5 60b678353f6b14495284f43bd89321a8
BLAKE2b-256 d5656793be44561011177b8e6eb2beb284f142e0572dbc81504af6c84a1aa64a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page