TL;DR
This paper introduces theoretical frameworks and practical algorithms for finding sets of solutions in Answer Set Programming (ASP) that are either intentionally similar or purposefully diverse. By modifying the search process of the popular solver clasp, the authors created CLASP-NK, a tool that outperforms traditional modeling approaches in both speed and memory efficiency.
What Problem Does This Paper Address?
In many complex computational tasks—like configuring a car, planning a robot's path, or reconstructing evolutionary trees (phylogeny)—there isn't just one "right" answer. Often, a solver might find thousands of valid solutions.
The challenge is two-fold:
- Solution Explosion: A user cannot manually inspect 50,000 valid plans. They need a representative sample (diverse solutions).
- Robustness: If a chosen plan fails due to an unforeseen real-world obstacle, the user needs an alternative that is as close as possible to the original (similar solutions) to minimize disruption.
Standard Answer Set Programming (ASP) is excellent at finding any solution or all solutions, but it lacks native mechanisms to reason about the distance between those solutions. This paper fills that gap by defining the computational complexity of finding such sets and providing tools to actually compute them.
Methods
The authors propose four distinct strategies to find $n$ solutions with a distance constraint $k$:
- Offline Method: The "brute force" approach. It computes every possible solution first, then uses clustering algorithms (like finding a clique in a graph) to pick the best subset. This is complete but fails when the number of solutions is huge.
- Online Method 1 (Reformulation): This involves rewriting the ASP program so that a single "answer set" actually represents $n$ different solutions, with added constraints to enforce the distance between them. While elegant, it makes the program $n$ times larger, often overwhelming the solver.
- Online Method 2 (Iterative): A greedy approach. The solver finds one solution, then adds a constraint to find a second solution that is $k$-close (or $k$-distant) to the first, and so on. It’s fast but "incomplete"—it might miss the global optimum because it's locked into its first choice.
- Online Method 3 (Incremental/Solver Modification): The core contribution. The authors modified the internal search algorithm of the
claspsolver. This new version, CLASP-NK, uses C++ heuristics to estimate the distance of partial solutions during the search process, allowing it to prune the search tree much earlier.
Datasets
The methods were evaluated on two distinct types of problems:
- Phylogeny Reconstruction: Using a real-world dataset of Indo-European languages (assembled by Ringe et al.). The goal was to find evolutionary trees that were either very similar (to see stable traits) or diverse (to explore different historical hypotheses).
- Blocks World Planning: A classic AI benchmark where a robot moves blocks from an initial state to a goal state. This was used to test the efficiency of finding diverse plans in a search space with over 50,000 possible solutions.
Key Insights and Ideas
- The Power of Solver Integration: The biggest "aha moment" is that implementing distance functions in the solver's core (C++) is vastly superior to representing them in the modeling language (ASP).
CLASP-NKwas often orders of magnitude faster than the reformulation method. - Distance is Domain-Specific: The authors show that "distance" isn't just a simple bit-flip count (Hamming distance). For trees, they used "Nodal Distance," and for plans, they used "Action-based Hamming Distance." Their framework is modular enough to handle these complex, non-linear measures.
- Complexity Matters: The paper proves that finding these sets is generally NP-complete, and optimization versions (finding the most diverse set) sit even higher in the complexity hierarchy ($FP^{NP}$). This justifies the need for the sophisticated pruning heuristics implemented in
CLASP-NK.
Key Results
- Speedup: In the phylogeny experiments,
CLASP-NKfound 2 similar solutions in 1.46 seconds, compared to 26.23 seconds for the reformulation method. - Memory Efficiency: For the Blocks World problem, the reformulation method often ran out of memory (OM), while
CLASP-NKmaintained a stable memory footprint (around 111MB) even when searching for 6 similar plans. - Practical Utility: The authors integrated their methods into
PHYLO-ASP, a tool used by historical linguists to analyze language evolution, proving the real-world applicability of the research.
Limitations and Future Work
- Incompleteness of Greedy Methods: Both the iterative and incremental methods are "incomplete." Because they pick the first solution and then look for others relative to it, they might miss a cluster of solutions that are even more similar/diverse elsewhere in the search space.
- Heuristic Admissibility: The performance of
CLASP-NKrelies heavily on having a "lower bound" heuristic for distance. If the heuristic is weak, the solver can't prune effectively. - Future Directions: The authors suggest looking at "hybrid" problems—for example, finding a solution that is very distant from a set of "bad" solutions but very close to a "good" one.
Reference: Eiter, T., Erdem, E., Erdogan, H., & Fink, M. (2011). Finding Similar/Diverse Solutions in Answer Set Programming. Theory and Practice of Logic Programming.
Summary updated