Eliminating Unfounded Set Checking for HEX-Programs

Thomas Eiter, Michael Fink, Thomas Krennwallner, Christoph Redl, Peter SchüllerarXiv 2013

Abstract

HEX-programs extend Answer Set Programming (ASP) by incorporating external atoms, enabling logic programs to interact with external data sources such as description logic ontologies and web services. However, ensuring the minimality of answer sets under Faber-Leone-Pfeifer (FLP) semantics requires computationally expensive "foundedness" checks to detect unfounded sets (UFS). This paper introduces a syntactic criterion and a program decomposition method designed to identify instances where these checks are redundant. By analyzing dependency graphs for cyclic dependencies through external atoms (e-cycles), the proposed approach allows solvers to bypass UFS checking for many common program structures, leading to significant performance improvements in practical applications.

Introduction

Answer Set Programming (ASP) has become a leading paradigm for solving complex combinatorial search problems. HEX-programs further expand this utility by allowing external atoms, which act as bridges to external computational sources. While this flexibility is powerful, it introduces a significant performance overhead. To maintain the integrity of the FLP semantics—specifically ensuring that answer sets do not contain self-supporting, "unfounded" truths—solvers must perform a UFS check. In the state-of-the-art dlvhex solver, this check often becomes a primary bottleneck, sometimes proving intractable even for relatively simple programs.

Methodology

The research proposes three primary strategies to mitigate or eliminate the overhead associated with foundedness checking:

1. Syntactic Decision Criterion

The authors define a method to analyze a program's dependency graph to identify e-cycles: cyclic dependencies that involve at least one external atom. They prove that if a program (or a specific component of it) is free of e-cycles, the initial model-guessing phase of the solver inherently guarantees minimality. In such cases, the UFS check can be safely skipped without compromising the correctness of the answer sets.

2. Modular Program Decomposition

Rather than treating a HEX-program as a monolithic block, the authors propose partitioning the program into subset-maximal strongly connected components (SCCs). By applying the syntactic criterion to each SCC individually, the solver can selectively disable UFS checks for "safe" components. This allows the solver to concentrate its computational resources only on the specific parts of the program where cycles actually exist.

3. Cyclic Input Atoms and Nogoods

For programs where cycles are unavoidable, the authors identify specific atoms involved in those cycles. This information is used to generate "nogoods" (logical constraints) that assist the underlying SAT solver in pruning the search space more effectively, preventing the solver from repeatedly exploring invalid model candidates.

Experimental Evaluation

The approach was evaluated across three distinct benchmarks, each representing different structural characteristics:

  • Argumentation Benchmarks: Using randomized instances of abstract argumentation frameworks, the authors found that while these programs contain cycles, they are often localized. This was the most successful test case; for systems with 10 arguments, the new approach achieved a 36.78% performance gain in finding the first answer set and reduced the number of timeouts in "all answer sets" tasks from 40 down to 16.
  • Description Logics (DL): Testing variants of a "wine ontology" query system, the syntactic check correctly identified that no UFS check was necessary for standard DL-plugin queries. This resulted in a measurable speedup, reducing execution time from 13.59s to 12.19s in high-candidate scenarios.
  • Multi-Context Systems (MCS): These benchmarks were designed to be cycle-heavy, with almost every atom involved in an e-cycle. As expected, the performance gain here was marginal (less than 1%), as the optimization could rarely be triggered.

Discussion and Key Insights

The primary strength of this approach lies in its syntactic nature. Because the solver can determine the necessity of a UFS check by analyzing the program structure before the search begins, it avoids the overhead of runtime semantic analysis for acyclic workflows. Many real-world applications of HEX-programs follow a "workflow" pattern—fetching data and then processing it—which is naturally acyclic and thus benefits immensely from this optimization.

Furthermore, the decomposition strategy allows for "localized complexity." Even in complex programs, the expensive UFS search is quarantined to specific SCCs, while the rest of the program is evaluated using high-speed, standard ASP techniques.

Conclusion and Future Work

This research demonstrates that a significant portion of the computational tax paid by HEX-programs is often unnecessary. By identifying e-cycle-free components, solvers can achieve substantial speedups. Future work may involve developing dynamic checks that evaluate specific model candidates during the search process, potentially pruning even more dependencies. Additionally, incorporating knowledge about the semantics of external atoms (such as monotonicity) could allow for the elimination of cycles that are currently flagged as potentially problematic by the static analysis.

Summary updated

BibTeX
@misc{eiter2013eliminating,
  author = {Thomas Eiter and Michael Fink and Thomas Krennwallner and Christoph Redl and Peter Schüller},
  title = {{Eliminating Unfounded Set Checking for HEX-Programs}},
  year = {2013},
  eprint = {1301.1390},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1301.1390},
}
Figure