Code Monkey home page Code Monkey logo

streamline-vi-csp's Introduction

Streamlined Survey Propogation

This repository provides a reference implementation for solving constraint satisfaction problems via streamlined survey propogation as described in the paper:

Streamlining Variational Inference for Constraint Satisfaction Problems
Aditya Grover, Tudor Achim, Stefano Ermon
Advances in Neural Information Processing Systems (NeurIPS), 2018
Paper: http://arxiv.org/abs/1811.09813

General

The codebase has been built on top of the survey propogation implementation of A. Braunstein, M. Mezard, and R. Zecchina as described in the paper "Survey propagation: an algorithm for satisfiability". It is implemented in C/C++ and tested on Ubuntu 16.04.

Setup

To compile the binaries run the following command from the root directory

make all

This will create a binary file for sp in the root directory (and others which will be directly accessed by sp).

Options

For a full list of options, run:

./sp -h

Key options are described below:

  -l CSP in CNF representation (if none provided, random k-SAT instance is generated)
  -k length of each clause 
  -n number of variables 
  -m number of clauses 
  -a clause/variable ratio
  -s seed for reproducibility
  -% percentage of paired disjunctions (denoted as R in the paper)
  -t number of streamlining iterations (denoted as T in the paper)
  -d limit on the streamlined disjunctions per variable
  -p prefix path where all the generated files (cnf formula, streamlined formula etc.) are dumped
  

Examples

Baseline survey inspired decimation on a random 3-SAT instance with 50,000 variables and clause to variable ratio of 4.235:

./sp -n50000 -a4.235 -k3 -%1 -t0 -d2 -s1

Survey inspired streamlining for the same problem instance:

./sp -n50000 -a4.235 -k3 -%1 -t90 -d2 -s1

Survey inspired streamlining for an arbitrary CSP accessed via the filepath csp/1.cnf:

./sp -%1 -lcsp/1.cnf -t80

Citing

If you find this codebase useful in your research, please consider citing the following paper:

@inproceedings{grover2018streamlining,
title={Streamlining Variational Inference for Constraint Satisfaction Problems},
author={Grover, Aditya and Achim, Tudor and Ermon, Stefano},
booktitle={Advances in Neural Information Processing Systems},
year={2018}}

streamline-vi-csp's People

Contributors

aditya-grover avatar tachim avatar

Watchers

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