Git Product home page Git Product logo

nsil's Introduction

NSIL: Neuro-Symbolic Learning of Answer Set Programs from Raw Data

This repository is associated with the paper "Neuro-Symbolic Learning of Answer Set Programs from Raw Data", published at IJCAI 2023. A recorded presentation is available. Please consider citing if it is useful in your work. The technical appendix forming our supplementary material is available here.

Intel x86 vs. Apple Silicon (Mac M1/M2)

If running on an intel machine, the recommended approach is using Docker. For Apple Silicon users, Docker can be used by adding the --platform linux/amd64 flag to the build and run commands, however, the performance hit is significant. It is recommended to install natively.

Docker installation

A docker container is provided for easy setup and installation so the only additional software required is a container runtime such as Docker Desktop, Podman, or minikube.

Setup

The following commands assume the docker command is available on your system. If using a different container run-time, please replace accordingly. From the root directory:

  1. docker build -t nsil:ijcai_2023 .
  2. docker run -d -p 8000:8000 -p 9990:9990 --name nsil_ijcai_2023 nsil:ijcai_2023
  3. Open http://localhost:8000 in your web browser to launch a markdown viewer containing detailed documentation that explains how to reproduce the experiment results.

Running experiments

Once the docker container is running:

  1. docker exec -it nsil_ijcai_2023 /bin/bash
  2. cd scripts
  3. Run experiments using the commands detailed in the documentation.

Stopping the container and removing files

exit
docker stop nsil_ijcai_2023
docker rm nsil_ijcai_2023
docker rmi nsil:ijcai_2023

Native Unix Installation

Pre-requisites

Installation

  1. Create python environment and install dependencies
virtualenv nsil_p3
source nsil_p3/bin/activate
pip install -r requirements.txt
  1. Download image data
chmod +x ./download_data.sh
./download_data.sh
  1. Create a setup script with the following contents:
BASE_PATH=/path/to/NSIL
export PYTHONPATH=$BASE_PATH
cd $BASE_PATH/examples/$1

and replace the value of BASE_PATH accordingly. Save this file to paper_experiments/ijcai_2023/scripts/setup.sh and ensure it has execute permissions. If you also want to run the NeurASP and FF-NSL baseline experiments, save a copy to paper_experiments/ijcai_2023/scripts/naive_baselines/setup.sh, again ensuring executable permissions.

  1. Move ILASP and FastLAS binaries to the root directory. We provide apple silicon and intel ubuntu linux binaries, copy accordingly.
mv LAS_binaries/ILASP_apple_silicon ILASP
mv LAS_binaries/FastLAS_apple_silicon FastLAS
  1. Set the python path to the root directory
export PYTHONPATH=/path/to/NSIL
  1. To view documentation:
cd paper_experiments/ijcai_2023/
chmod +x ./start_web_servers.sh
./start_web_servers.sh
  1. To run experiments:
cd paper_experiments/ijcai_2023/scripts
find . -type f -exec chmod +x {} \;
./run_arithmetic_repeats.sh -p 100 -s 0 -m 5 # For example - see documentation for more commands.

Citation

TBC

nsil's People

Contributors

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