Backdoors to Tractable Answer-Set Programming

Johannes Klaus Fichte, Stefan Szeider

Abstract

Answer Set Programming (ASP) is an increasingly popular framework for declarative programming that admits the description of problems by means of rules and constraints that form a disjunctive logic program. In particular, many AI problems such as reasoning in a nonmonotonic setting can be directly formulated in ASP. Although the main problems of ASP are of high computational complexity, complete for the second level of the Polynomial Hierarchy, several restrictions of ASP have been identified in the literature, under which ASP problems become tractable. In this paper we use the concept of backdoors to identify new restrictions that make ASP problems tractable. Small backdoors are sets of atoms that represent "clever reasoning shortcuts" through the search space and represent a hidden structure in the problem input. The concept of backdoors is widely used in theoretical investigations in the areas of propositional satisfiability and constraint satisfaction. We show that it can be fruitfully adapted to ASP. We demonstrate how backdoors can serve as a unifying framework that accommodates several tractable restrictions of ASP known from the literature. Furthermore, we show how backdoors allow us to deploy recent algorithmic results from parameterized complexity theory to the domain of answer set programming.

Introduction

Answer-Set Programming (ASP) is a powerful tool for declarative problem solving, but it comes with a heavy computational price: its core decision problems (like determining if a solution exists) are located at the second level of the Polynomial Hierarchy ($\Sigma^P_2$-complete). This is significantly harder than standard SAT solving.

Despite this daunting theoretical complexity, modern ASP solvers often perform remarkably well on real-world instances. This suggests that practical problems possess a "hidden structure." This research formalizes this structure using backdoors—a concept borrowed from propositional satisfiability (SAT) and constraint satisfaction (CSP). A backdoor is a small set of variables that, once assigned truth values, reduces the remaining problem into a "tractable" class that can be solved in polynomial time.

Methodology and Target Classes

The backdoor framework is extended to the non-monotonic setting of ASP through several key steps:

  1. Defining ASP Backdoors: A "truth assignment reduct" ($P_\tau$) simplifies a program based on a partial assignment to a set of atoms $X$. If $P_\tau$ falls into a tractable class $C$ for all possible assignments to $X$, then $X$ is a strong $C$-backdoor.
  2. Fixed-Parameter Tractability (FPT): Using FPT theory, the authors show that if the size of the backdoor ($k$) is small, the complexity of solving the ASP program becomes polynomial in the size of the program, with the exponential cost isolated to $k$.
  3. Target Classes: Several tractable "target classes" for backdoors are identified, including Horn programs and various acyclic programs (e.g., C-Acyc, DC-Acyc).
Hierarchy of tractable ASP fragments

The paper explores how to detect these backdoors by linking detection to known graph problems like Vertex Cover (for Horn backdoors) and Feedback Vertex Set (for acyclic backdoors).

Structural Parameters: Backdoors vs. Treewidth

The paper compares backdoor size to incidence treewidth, another popular structural parameter. These two measures are proven to be "incomparable"—meaning some programs have small backdoors but large treewidth, and vice versa. This demonstrates that backdoors capture a unique type of "easiness" in programs. Furthermore, while finding a "strong" backdoor for acyclic classes is computationally hard (W[2]-hard), finding a "deletion" backdoor (a subset of atoms whose removal makes the program acyclic) is often fixed-parameter tractable.

Empirical Evaluation

The approach was evaluated on several benchmark sets to measure the size of the smallest strong Horn-backdoors, including real-world Daimler-Chrysler car configuration logistics and random logic programs (RLP/RG).

Empirical results for strong Horn-backdoors across various instance sets

In real-world Daimler-Chrysler benchmarks, the smallest backdoors consisted of only 11% to 23% of the total variables. In contrast, random programs (RG) had much larger backdoors (over 90%), highlighting that structured real-world problems indeed possess the "hidden shortcuts" hypothesized.

Key Results and Conclusion

The authors prove that if a small strong backdoor to an "enumerable" class (like Horn or Acyclic) is provided, then Consistency, Reasoning, and even Counting answer sets are all fixed-parameter tractable. Detecting strong Horn-backdoors can be done in $O(1.2738^k + kn)$ time, making it practical for small $k$.

While promising, some limitations remain. For several acyclicity-based classes (like Stratified programs), finding the strongest backdoor remains W[2]-hard. Future work includes exploring "backdoor trees" to prune the search space and developing heuristics for general-purpose ASP solvers. Testing the scalability of backdoor detection on massive industrial instances remains an open challenge.

Summary updated

BibTeX
@inproceedings{fichte2011backdoors,
  author = {Johannes Klaus Fichte and Stefan Szeider},
  title = {{Backdoors to Tractable Answer-Set Programming}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2011},
  url = {https://openreview.net/forum?id=rkbE8QG_-S},
}
Figure