MLN , Weak Constraints , and P-log

LP is a recently introduced formalism that extends answer set programs by adopting the log-linear weight scheme of Markov Logic. This paper investigates the relationships between LP and two other extensions of answer set programs: weak constraints to express a quantitative preference among answer sets, and P-log to incorporate probabilistic uncertainty. We present a translation of LP into programs with weak constraints and a translation of P-log into LP, which complement the existing translations in the opposite directions. The first translation allows us to compute the most probable stable models (i.e., MAP estimates) of LP programs using standard ASP solvers. This result can be extended to other formalisms, such as Markov Logic, ProbLog, and Pearl’s Causal Models, that are shown to be translatable into LP. The second translation tells us how probabilistic nonmonotonicity (the ability of the reasoner to change his probabilistic model as a result of new information) of P-log can be represented in LP, which yields a way to compute P-log using standard ASP solvers and MLN solvers. Introduction LP (Lee and Wang 2016) is a recently introduced probabilistic logic programming language that extends answer set programs (Gelfond and Lifschitz 1988) with the concept of weighted rules, whose weight scheme is adopted from that of Markov Logic (Richardson and Domingos 2006). It is shown in (Lee and Wang 2016; Lee, Meng, and Wang 2015) that LP is expressive enough to embed Markov Logic and several other probabilistic logic languages, such as ProbLog (De Raedt, Kimmig, and Toivonen 2007), Pearls’ Causal Models (Pearl 2000), and a fragment of P-log (Baral, Gelfond, and Rushton 2009). Among several extensions of answer set programs to overcome the deterministic nature of the stable model semantics, LP is one of the few languages that incorporate the concept of weights into the semantics. Another one is weak constraints (Buccafurri, Leone, and Rullo 2000), which are to assign a quantitative preference over the stable models of non-weak constraint rules: weak constraints cannot be used for deriving stable models. It is relatively a simple extension Copyright c © 2017, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. of the stable model semantics but has turned out to be useful in many practical applications. Weak constraints are part of the ASP Core 2 language (Calimeri et al. 2013), and are implemented in standard ASP solvers, such as CLINGO and DLV. P-log is a probabilistic extension of answer set programs. In contrast to weak constraints, it is highly structured and has quite a sophisticated semantics. One of its distinct features is probabilistic nonmonotonicity (the ability of the reasoner to change his probabilistic model as a result of new information) whereas, in most other probabilistic logic languages, new information can only cause the reasoner to abandon some of his possible worlds, making the effect of an update monotonic. This paper reveals interesting relationships between LP and these two extensions of answer set programs. It shows how different weight schemes of LP and weak constraints are related, and how the probabilistic reasoning in P-log can be expressed in LP. The result helps us understand these languages better as well as other related languages, and also provides new, effective computational methods based on the translations. It is shown in (Lee and Wang 2016) that programs with weak constraints can be easily viewed as a special case of LP programs. In the first part of this paper, we show that an inverse translation is also possible under certain conditions, i.e., an LP program can be turned into a usual ASP program with weak constraints so that the most probable stable models of the LP program are exactly the optimal stable models of the program with weak constraints. The result allows for using ASP solvers for computing Maximum A Posteriori probability (MAP) estimates of LP programs. Interestingly, the translation is quite simple so it can be easily applied in practice. Further, the result implies that MAP inference in other probabilistic logic languages, such as Markov Logic, ProbLog, and Pearl’s Causal Models, can be computed by standard ASP solvers because they are known to be embeddable in LP, thereby allowing us to apply combinatorial optimization in standard ASP solvers to MAP inference in these languages. In the second part of the paper, we show how P-log can be completely characterized in LP. Unlike the translation in (Lee and Wang 2016), which was limited to a subset of P-log that does not allow dynamic default probability, our translation applies to full P-log and complements the recent translation from LP into P-log in (Balai and Gelfond 2016). In conjunction with the embedding of LP in answer set programs with weak constraints, our work shows how MAP estimates of P-log can be computed by standard ASP solvers, which provides a highly efficient way to compute P-log. Preliminaries Review: LP We review the definition of LP from (Lee and Wang 2016). In fact, we consider a more general syntax of programs than the one from (Lee and Wang 2016), but this is not an essential extension. We follow the view of (Ferraris, Lee, and Lifschitz 2011) by identifying logic program rules as a special case of first-order formulas under the stable model semantics. For example, rule r(x)← p(x), not q(x) is identified with formula ∀x(p(x) ∧ ¬q(x) → r(x)). An LP program is a finite set of weighted first-order formulasw : F where w is a real number (in which case the weighted formula is called soft) or α for denoting the infinite weight (in which case it is called hard). An LP program is called ground if its formulas contain no variables. We assume a finite Herbrand Universe. Any LP program can be turned into a ground program by replacing the quantifiers with multiple conjunctions and disjunctions over the Herbrand Universe. Each of the ground instances of a formula with free variables receives the same weight as the original formula. For any ground LP program Π and any interpretation I , Π denotes the unweighted formula obtained from Π, and ΠI denotes the set of w : F in Π such that I |= F , and SM[Π] denotes the set {I | I is a stable model of ΠI} (We refer the reader to the stable model semantics of first-order formulas in (Ferraris, Lee, and Lifschitz 2011)). The unnormalized weight of an interpretation I under Π is defined as WΠ(I) = exp ( ∑ w:F ∈ ΠI w ) if I ∈ SM[Π];