TL;DR
This paper introduces a novel approach to efficiently evaluate Answer Set Programs (ASPs) that interact with external data sources. By extending the evaluation of external sources to handle partial assignments (where some inputs are unknown), the authors enable earlier detection of conflicts and pruning of the search space, leading to significant performance improvements.
What Problem Does This Paper Address?
Answer Set Programming (ASP) is a powerful declarative programming paradigm used in various AI applications. However, modern applications often require ASP programs to interact with external information sources (like databases or other solvers). This is achieved through "external atoms" in HEX-programs, which act as interfaces. The challenge has been that evaluating these external sources traditionally required complete information (all inputs known). This often meant waiting until late in the search process to get feedback, hindering efficient problem-solving. The authors address this by enabling external sources to provide useful information even when only partial input is available, mimicking "theory propagation" in SAT Modulo Theories (SMT) but for more general, black-box external sources.
Methods
The core innovation is the extension of external atom evaluation from a two-valued (true/false) semantics under complete assignments to a three-valued (true/false/unknown) semantics under partial assignments. This allows for:
- Early Evaluation: External sources can be queried at any point during the search, not just when all inputs are known.
- Learning Nogoods: The system learns "nogoods" (sets of input-output configurations that are impossible) from these partial evaluations. These nogoods help prune the search space by identifying incompatible assignments early.
- Nogood Minimization: Techniques are introduced to minimize these learned nogoods, making them more general and effective at pruning. This includes sequential and simultaneous minimization, as well as a divide-and-conquer strategy (QuickXplain).
- Interleaved Search: The evaluation of external atoms is interleaved with the search for answer sets and the minimality check (unfounded set search), allowing for proactive pruning and backtracking.
Datasets
The authors evaluated their approach using three benchmark problem sets:
- Pseudo-boolean (PB-)problems: Representing 0-1 integer linear programs.
- Taxi Assignment with Ontology Access: A problem involving querying an external description logic knowledge base (DL-Lite).
- Strategic Companies: A benchmark for ASP competitions, with variants involving external controls and conflicts.
The paper does not introduce new benchmark datasets but uses existing ones to demonstrate the effectiveness of their techniques.
Key Insights and Ideas
- Partial Information is Powerful: Even incomplete information from external sources can significantly guide the ASP search, revealing conflicts much earlier than previously possible.
- Nogood Minimization is Crucial: Learning generalizable nogoods from partial evaluations is key to performance gains. Minimizing these nogoods makes them more effective at pruning the search space.
- Clear-Box Integration for Black Boxes: The approach achieves a "clear-box" integration (interleaved evaluation) with external sources that are treated as "black boxes," requiring only a three-valued oracle function. This simplifies the integration process for external source developers.
- Synergy Between Search Phases: Interleaving partial evaluation in both the main search (for compatible sets) and the unfounded set search (for minimality) yields the best results, especially when combined.
Key Results
The experimental evaluation demonstrated significant performance improvements:
- Speedup: Speedups of up to two orders of magnitude were observed compared to the baseline "never" configuration (no early external evaluation).
- Configuration Performance:
- Early evaluation strategies ("always," "periodic," "ufs-a," "ufs-p") generally outperformed the baseline.
- Nogood minimization, particularly of conflicting nogoods ("ngm-c," "qxp-c"), was highly effective.
- The combination of "always" and "ufs-a" (evaluating at every step in both main search and unfounded set search) often yielded the best results, especially for finding the first answer set.
- The QuickXplain algorithm ("qxp," "qxp-c") showed advantages when io-nogoods contained many irrelevant literals.
Limitations and Future Work
- Heuristic Tuning: The effectiveness of partial evaluation depends on heuristics for deciding when to query external sources. The paper notes that the optimal combination of heuristics can be complex and problem-dependent.
- Overhead: While beneficial, early external evaluations and nogood minimization introduce some overhead. The paper acknowledges that in some cases (e.g., when external calls are very costly or search space is already small), this overhead might outweigh the benefits.
- Future Work: The authors suggest exploring further heuristics for deciding on external evaluation invocation, improving nogood minimization techniques (e.g., by using more sophisticated algorithms for finding multiple minimal conflict sets), and potentially integrating with newer SAT solvers like CLINGO 5.
Summary updated