Hostname: page-component-77f85d65b8-jkvpf Total loading time: 0 Render date: 2026-04-18T22:57:55.722Z Has data issue: false hasContentIssue false

Fast Inference for Probabilistic Answer Set Programs Via the Residual Program

Published online by Cambridge University Press:  15 January 2025

DAMIANO AZZOLINI
Affiliation:
Department of Environmental and Prevention Sciences, University of Ferrara, Ferrara, Italy (e-mail: damiano.azzolini@unife.it)
FABRIZIO RIGUZZI
Affiliation:
Department of Mathematics and Computer Science, University of Ferrara, Ferrara, Italy (e-mail: fabrizio.riguzzi@unife.it)
Rights & Permissions [Opens in a new window]

Abstract

When we want to compute the probability of a query from a probabilistic answer set program, some parts of a program may not influence the probability of a query, but they impact on the size of the grounding. Identifying and removing them is crucial to speed up the computation. Algorithms for SLG resolution offer the possibility of returning the residual program which can be used for computing answer sets for normal programs that do have a total well-founded model. The residual program does not contain the parts of the program that do not influence the probability. In this paper, we propose to exploit the residual program for performing inference. Empirical results on graph datasets show that the approach leads to significantly faster inference. The paper has been accepted at the ICLP2024 conference and under consideration in Theory and Practice of Logic Programming (TPLP).

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Fig. 1. Programs, call graphs (CD), and dependency graphs (DG) with (Figure 1a) and without (Figure 1b) OLON. The dependency graph of both programs is the same. They only differ in the call graph: for the left program, the call graph contains an edge labeled with $-$ (negative) while for the right program the same edge is labeled with $+$ (positive).

Figure 1

Table 1. Worlds and probabilities for Example4. The column #q/# A.S. contains the number of answer sets where the query $path(a,d)$ is true and the total number of answer sets

Figure 2

Fig. 2. Cactus plot for aspmc and $\mathrm{aspmc}^r$ with 100, 300, and 500 s of time on the smokersGrid and smokersBA datasets.

Figure 3

Fig. 3. Cactus plot for aspmc and $\mathrm{aspmc}^r$ with 100, 300, and 500 s of time limit on the reachGrid and reachBA datasets.

Figure 4

Table 2. Values for the reachBA and smokersBA datasets in the format ($\mathrm{aspmc}^r$ - aspmc) for the tests with 500 s of time limit. $\mu$ stands for (rounded) mean, tw. for treewidth, and vert. for vertices related to the dependency graph. The column # unsolved contains the number of unsolved instances for the specific size

Figure 5

Table 3. Values for the reachGrid and smokersGrid datasets in the format ($\mathrm{aspmc}^r$ - aspmc) for the tests with 500 s of time limit. $\mu$ stands for (rounded) mean, tw. for treewidth, and vert. for vertices related to the dependency graph. The column # unsolved contains the number of unsolved instances for the specific size