Skip to main content

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}
}

Metadata

Release files for deepstochlog 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepstochlog 0.0.1
File Size Uploaded
deepstochlog-0.0.1.tar.gz 29.1 kB Details

Release files / deepstochlog-0.0.1.tar.gz

Download URL deepstochlog-0.0.1.tar.gz
Size 29.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4b9279fdcd54536b845f3e78172fa283d7923dbdf7fe7b222be9dff1934683f8
BLAKE2b-256 checksum
How to use checksums
d5656793be44561011177b8e6eb2beb284f142e0572dbc81504af6c84a1aa64a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page