-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpasp.html
147 lines (113 loc) · 4.95 KB
/
dpasp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<!-- Main CSS Stylesheet -->
<link rel="stylesheet" href="css/main.css">
<!-- Syntax Highlighting -->
<link rel="stylesheet" href="css/syntax.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<!-- Fira Sans, Sarabun, Karla Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&family=Karla&family=Sarabun&display=swap" rel="stylesheet">
<!-- Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Mathjax -->
<script src="js/mathjax-config.js" defer></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<!-- Title -->
<title>dPASP</title>
</head>
<body>
<div class="title">
<h3>dPASP: A Flexible Differentiable Probabilistic Answer Set
Programming Environment For Neurosymbolic Learning and Reasoning</h3>
</div>
<div class="container">
<div class="sidebar">
<a href="#start" class="sidebar-item">Getting Started</a>
<a href="#docs" class="sidebar-item">Documentation</a>
<a href="#source" class="sidebar-item">Source Code</a>
<a href="#try" class="sidebar-item">Try it online!</a>
</div>
<div class="content">
<blockquote class="highlight">
dPASP is a flexible framework for neuro-probabilistic answer set programming.
</blockquote>
<p>
The dPASP framework presents a powerful high-level language for describing
probabilistic tasks in an intuitive and declarative manner. Just like in traditional
probabilistic logic programming (PLP), programs in dPASP are written in terms of
probabilistic facts or rules, allowing for uncertainty to play a role in the knowledge
description of the problem. Notably, our framework further extends PLP by leveraging the
expressiveness of neural networks for describing probabilities in possibly hybrid domains.
Further, by natively embedding neural expressions within the language, dPASP offers
end-to-end training of sophisticated models and loss functions while requiring minimal user
knowledge of deep learning system's inner workings.
</p>
<h1 id="start">Getting Started</h1>
<p>
dPASP is mostly written in C with a front user layer in Python. Although a Python API
is exposed for manipulating programs and their output, dPASP can be used as a
standalone language and interpreter. <a href="#try">Try it online!</a>
</p>
<h2>Installation</h2>
<p>
Installation instructions (with a short tutorial on usage) can be found <a href="https://kamel.ime.usp.br/pages/learn_dpasp.html#installation">here</a>.
</p>
<h2>Running</h2>
<p>
dPASP is available either as a Python library,
</p>
<pre><code class="language-python">import pasp
# Parse a program with the least undefined stable semantics.
P = pasp.parse("examples/prisoners.plp", semantics="lstable")
# Run exact credal inference.
pasp.exact(P)</code></pre>
<p>
or as a command line interpreter.
</p>
<pre><code class="language-bash">% Prints the help message.
pasp --help
% Runs the prisoners example with credal inference and stable semantics.
pasp examples/prisoners.plp
ℙ(e1 | u) = [0.290426, 0.379192]
ℙ(e1 | not b, u) = [0.450125, 0.549875]
ℙ(g | e1, u) = [0.000000, 1.000000]
ℙ(d) = [0.000000, 1.000000]
ℙ(e1 | g, u) = [0.000000, 0.549875]
ℙ(e1 | ga, u) = [0.279971, 0.390743]
% Runs the 3-coloring example with credal inference and L-stable semantics.
pasp --sem=lstable examples/3coloring.plp
ℙ(c(1,r)) = [0.000000, 1.000000]
ℙ(e(1,2) | undef f) = [0.772727, 0.772727]
ℙ(undef f) = [0.064453, 0.064453]
% Runs the insomnia example with Max-Entropy inference and stable semantics.
pasp --psem=maxent examples/insomnia.plp
ℙ(insomnia) = 0.300000
ℙ(work) = 0.650000
ℙ(sleep) = 0.350000
ℙ(not sleep) = 0.650000
ℙ(not work) = 0.350000</code></pre>
<br>
See the <a href="https://kamel.ime.usp.br/pages/learn_dpasp.html">"Learning dPASP Through Examples"</a> tutorial for more information on how to program with dPASP.
<!--<h1 id="docs">Documentation</h1>
<p>
Full documentation is available <a href="dpasp/pasp.html">here</a>.
</p>-->
<h1 id="source">Source Code</h1>
<p>
The dPASP project repository can be found at GitHub
<a href="https://github.com/kamel-usp/dpasp">here</a>.
</p>
<h1 id="try">Try it online!</h1>
<p>
Coming soon!
</p>
</div>
</div>
</body>
</html>