The Joy of Probabilistic Answer Set Programming

The Joy of Probabilistic Answer Set Programming

Proceedings of Machine Learning Research 103:91–101, 2019 ISIPTA 2019 The Joy of Probabilistic Answer Set Programming Fabio Gagliardi Cozman [email protected] Escola Politécnica – Universidade de São Paulo, Brazil Abstract logical variable, or an atom preceded by : (then we say the Probabilistic answer set programming (PASP) com- atom is strongly negated; that is, the logical value of the bines rules, facts, and independent probabilistic facts. expression is given by usual Boolean negation). Often one restricts such programs so that every query Syntactically, an ASP program is a set of rules such as yields a sharp probability value. The purpose of this paper is to argue that a very useful modeling language H1 _···_ Hm :− B1;:::;Bn.; is obtained by adopting a particular credal semantics for PASP, where one associates with each consistent where H1 _···_ Hm is the head and B1;:::;Bn is the body, program a credal set. We examine the basic properties and where each Hi is a literal and each subgoal B j can of PASP and present an algorithm to compute (upper) be either a literal A or a literal A preceded by not (that is, probabilities given a program. not A). Here is a rule: Keywords: Logic programming, Answer set program- ming, Probabilistic programming, Credal sets. red(X)_green(X)_blue(X) :− node(X);not barred(X).; meaning that if some individual X is a node that is not 1. Introduction known to be barred, then X is red or green or blue. If a rule is such that m = 1, it is said to be nondisjunctive; a The purpose of this paper is to show that Probabilistic nondisjunctive rule with n = 0 is called a fact, and instead Answer Set Programming (PASP) actually offers an elegant of writing H :− ., we just write H.. A program that is and enjoyable modeling language. To do so, we review, and nondisjunctive (it only contains nondisjunctive rules) and modify slightly, the credal semantics of probabilistic logic contains no not and no : is said to be definite. programming, and we use it to concoct a programming style A propositional atom is an atom without logical vari- where one can ask questions about probability distributions ables. The Herbrand base of a program is the set of propo- satisfying sets of constraints. sitional literals (propositional atoms and their strongly The credal semantics is based on the stable model se- negated versions) that can be produced by combining all mantics. About twenty years ago it became clear that the predicates and constants in the program. An interpretation stable model semantics for logic programs also offered an is a consistent subset of the Herbrand base of the program attractive programming paradigm. A similar perspective (that is, it does not contain a literal and its strong negation). is proposed in this paper: instead of looking at the credal A propositional literal is true/false with respect to an inter- semantics of PASP merely as a way to lend meaning to pretation when it is/isn’t in the interpretation. Similarly, a pathological cyclic programs, here the credal semantics is propositional subgoal A, where A is a literal, is true/false viewed as a probabilistic programming paradigm that goes with respect to an interpretation when A is/isnt’t in the in- beyond existing modeling languages. terpretation, while not A is true/false when A isn’t/is in the Section2 reviews some needed concepts, and Section3 interpretation. A rule is satisfied by an interpretation iff presents the basic syntax and semantics of PASP. Sections either some of the subgoals in the body are false or all the 4 and5 detail the semantics and discuss the proposed pro- subgoals in the body and some of the literals in the head gramming paradigm. Section6 presents an algorithm that are true with respect to the interpretation. A model of a returns (upper) probabilities given a PASP program. program is an interpretation that satisfies all the rules of the program. A model I of a program is minimal iff there 2. Background: Answer Set Programming exists no model J of the program such that J ⊂ I . Every definite program has a unique minimal model; Answer Set Programming (ASP) is a programming hence it is natural to take this model as the semantics of the paradigm that emerged from research in logic program- program. With negation, there may be no unique minimal ming; we here review basic syntactic and semantic no- model, and there are several proposed semantics [12]. tions [18]. The stable model semantics is based on reducts, defined First: a literal is either an atom r(t1;:::;tk) where r is as follows. Given a program P and an interpretation I , I a predicate of arity k and each ti is either a constant or a their reduct P is the propositional program obtained by © 2019 F.G. Cozman. THE JOY OF PASP first removing all grounded rules with not A in their body 3. PASP: Probabilistic Answer Set and A 2 I , and then by removing each subgoal not A from Programming all remaning grounded rules. A stable model of P is an I interpretation I that is a minimal model of the reduct P . Combinations of logic programming and probabilities The set of stable models is the semantics of P. Note that a have been pursued for some time [21, 34, 39, 42, 49]. program may fail to have a stable model: an example is the Many different proposals can be found in the literature single-rule program A :− not A.. [7, 45, 15, 14, 46]; several recent surveys cover very rel- Intuitively: if we think of an interpretation as the set of evant material [5, 47, 27]. A popular scheme is “Sato’s atoms that are assumed true/false, then the stable models distribution semantics”; both Sato’s original proposal [49] of a program are those interpretations that, once assumed, and Poole’s similar Probabilistic Horn Abduction [42] are again obtained by applying the rules of the program. focused on particular cases (definite/acyclic programs), Originally proposed for nondisjunctive programs [22], and they have been greatly extended through the years the stable model semantics was later extended to general [43, 44, 50, 51]. The basic idea is to allow for probabilistic programs and stable models were renamed as answer sets. facts. Answer sets were then used to propose a new program- A probabilistic fact consists of a fact A. that is associated ming paradigm [37, 40], where one writes down rules and with a probability a, assumed to be a rational number in constraints that characterize a problem in such a way that [0;1]. The syntax of the ProbLog package [20] for a such a answer sets are solutions of the problem. Solvers that find probabilistic fact is answer sets for ASP are now popular, usually operating within a “Guess & Check” methodology. The idea is to a :: A.: use disjunctive rules to guess solutions nondeterministi- cally, and constraints to check whether interpretations are A probabilistic fact may contain logical variables; for actually solutions [30]. An example should illustrate the instance we may write 0:25 :: edge(X;Y).:. If we then idea. have constants node1 and node2, the latter probabilis- Suppose we are given a graph, encoded by a predicate tic fact can be grounded into 0:25 :: edge(node1;node1)., node and a predicate edge (respectively unary and binary 0:25 :: edge(node1;node2)., 0:25 :: edge(node2;node1)., predicates). Suppose we assign to each node a color, as 0:25 :: edge(node2;node2).. specified by the following rule: Probabilistic Answer Set Programming (PASP) deals red(X) _ green(X) _ blue(X) :− node(X).: with programs consisting of probabilistic facts, facts, and Suppose also that no two adjacent nodes can be red. We rules. Sato’s distribution semantics adopts the following might use the rule: interpretation for a grounded probabilistic fact a :: A.: • with probability a, the fact A. is kept together with all auxiliar :− not auxiliar;edge(X;Y);red(X);red(Y).: other facs and rules; This rule forces auxiliar to be false and the remainder of • with probability 1 − a, the fact is simply removed from the body to be false. Usually such a constraint is written the program. simply as follows: This semantics induces a probability distribution over log- ical programs. However, a different semantics for proba- :− edge(X;Y);red(X);red(Y).: bilistic facts is adopted in this paper: here we add A. to the We might then force the colors to be assigned so as to program with probability a, and we add :A. to the program generate a three-coloring (that is, no adjacent nodes have with probability 1−a (if necessary, ::A is replaced by A). the same color) by adding two more constraints: We discuss the reason for departing from Sato’s semantics in Section4. :− edge(X;Y);green(X);green(Y). So, take the set of probabilistic facts of the program :− edge(X;Y);blue(X);blue(Y).: of interest, and ground them as needed to obtain a set of Given a set of atoms that define a graph, say probabilistic propositional facts F = fai :: Aigi2I.A total node(n1).;node(n2).;:::;edge(n1;n2).;:::, any answer choice q is a subset of these latter probabilistic proposi- set for the latter program is a three-coloring; failure to have tional facts. Once we collect the facts in q and the strongly an answer set signals failure to have a three-coloring. One negated facts F nq, and add them to the facts and rules of can think of the program as first guessing a color for each the original program, we obtain an ASP program.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us