Software and examples used in:
- On the completeness of first-order knowledge compilation for lifted probabilistic inference; G. Van den Broeck; In Proceedings of the Annual Conference on Neural Information Processing Systems (NIPS); 2011; Granada, Spain
- Lifted Probabilistic Inference by First-Order Knowledge Compilation; G. Van den Broeck, N. Taghipour, W. Meert, J. Davis, L. De Raedt; In Proceedings of the 22nd International Joint Conference on Artificial Intelligence (IJCAI), 2011; Barcelona, Spain.
- IJCAI 2011 Tutorial on Lifted Inference in Probabilistic Logical Models.
Download
Download the current version (1.0-SNAPSHOT). The package includes a jar-file, source code and some examples.
Example
A theory using the Markov Logic Network syntax can be parsed by WFOMC and queried as follows (> is the prompt).
# Example theory file
> cat models/friendsmoker.mln
person = {Guy, Nima, Wannes, Jesse, Luc}
Friends(person,person)
Smokes(person)
2 Friends(x,y) ^ Smokes(x) => Smokes(y)
# Run a query on the theory
> java -jar ./wfomc-1.0-SNAPSHOT.jar -q "Smokes(Guy)" ./models/friendsmoker.mln
Reading file using MLN syntax.
Compilation took 815 ms
evidence nnf size = 18
evidence smooth nnf size = 24
query nnf size = 33
query smooth nnf size = 45
Inference took 15 ms
evidence logWmc = 68.63908810719217 = log(6.450259808376127E29)
query logWmc = 67.94594092663222 = log(3.225129904188057E29)
P(Some(Smokes(Guy))) = 0.49999999999999906
# Visualize the circuit in a pdf
> java -jar ./wfomc-1.0-SNAPSHOT.jar --pdf ./models/friendsmoker.mln
> open ./nnfs/theory.smooth.nnf.pdf
# Visualize the circuit in a pdf in a verbose way (show all steps)
> java -jar ./wfomc-1.0-SNAPSHOT.jar --pdf --verbose ./models/friendsmoker.mln
> open ./nnfs/theory.smooth.nnf.pdf
Here you can find the visualizations for the non-verbose circuit and the verbose circuit for the theory without the query.
Help
There are some options available to, for example, visualize the d-DNNF:
> java -jar ./wfomc-1.0-SNAPSHOT.jar -h
Version 1.0
Usage: wfomc [OPTIONS] input
OPTIONS
--fg Force to read in file as a factor graph model
-h
--help This help.
--mln Force to read in file as MLN model
--pdf Create a pdf visualizing the smoothed NNF. Requires pdflatex and
graphviz dot to be in your path and the dot2texi package
installed.
--propinf Perform inference on the propositional level using the c2d
compile of Darwiche. The c2d compiler command can be set with
environment variable C2DCMD (default: ./c2d_linux).
-q query
--query query Query atom
--verify Verify the result of wfomc using the c2d compiler of Darwiche.
The c2d compiler command can be set with environment variable
C2DCMD (default: ./c2d_linux).
--wmc Force to read in file as WMC model
PARAMETERS
input Input file to read.
Â
Information
For more information, contact This e-mail address is being protected from spambots. You need JavaScript enabled to view it .
//


