Abstract
Inductive Logic Programming (ILP) has traditionally struggled with scalability when applied to non-monotonic logic programs, such as those used in Answer Set Programming (ASP). This paper introduces a novel framework for learning from context-dependent examples, where each example is associated with its own unique background knowledge. To address the computational bottlenecks of batch learning, the authors present ILASP2i, an iterative algorithm that leverages counterexample-driven learning. Experimental results demonstrate that ILASP2i achieves up to a 100x improvement in speed and memory efficiency over previous state-of-the-art systems, enabling the application of ILP to complex, real-world datasets like urban mobility preferences.
Introduction
Inductive Logic Programming (ILP) is a subfield of machine learning that aims to induce logic programs (hypotheses) from examples and background knowledge. While highly expressive, traditional ILP systems often assume a static background knowledge base shared across all examples. In many real-world scenarios—such as learning user preferences across different environments or navigating varying maps—this assumption is restrictive. Furthermore, learning within the framework of Answer Set Programming (ASP) is particularly challenging due to its non-monotonic nature, where the addition of new information can invalidate previous conclusions.
This paper addresses these limitations by formalizing a framework for context-dependent learning and introducing a scalable iterative algorithm, ILASP2i, which significantly reduces the computational overhead of the learning process.
Context-Dependent Learning
The authors propose a new learning task: $ILP^{context}_{LOAS}$ (Learning from Ordered Answer Sets with Context). In this framework, each example is no longer a standalone observation but is paired with a specific "context"—a local logic program representing the specific state or environment associated with that example.
For instance, in a travel preference task, the context might include the specific bus routes and weather conditions for a single journey. By partitioning background knowledge into these local contexts, the system avoids the "grounding explosion" that occurs when trying to represent all possible world states in a single global background knowledge base. The authors prove that these context-dependent tasks can be mathematically reduced to standard ILP tasks, ensuring compatibility with existing logic solvers while providing a more structured way to handle complex data.
The ILASP2i Algorithm
The primary contribution of this work is ILASP2i, an iterative version of the ILASP2 system. Traditional ASP learners are typically "batch learners," attempting to process all examples and constraints simultaneously. This approach often leads to "Out of Memory" errors as the number of examples grows.
ILASP2i adopts a counterexample-driven approach:
- Initialization: The algorithm starts with an empty set of "relevant" examples.
- Hypothesis Generation: It finds a hypothesis that satisfies the current set of relevant examples.
- Violation Search: The system searches the full dataset for a "counterexample"—an example that the current hypothesis fails to explain.
- Iteration: This counterexample is added to the relevant set, and the process repeats until a hypothesis is found that satisfies all examples.
This method is particularly effective for non-monotonic logic. Unlike traditional "cover loops" in Prolog-based ILP, which learn one rule at a time, ILASP2i maintains a persistent set of constraints. This ensures that when a new rule is added, it does not inadvertently violate previously satisfied examples, a common pitfall in ASP learning.
Experimental Evaluation
The authors evaluated ILASP2i across four distinct domains to test its versatility and scalability:
- Hamiltonian Graphs: Learning the logical definition of a Hamiltonian cycle.
- Scheduling Preferences: Inducing weak constraints to represent an academic's preferences for interview schedules.
- Agent Movement: Learning movement rules and invented concepts for an agent in a grid world.
- Urban Mobility: A real-world simulation where the system learns journey preferences (e.g., "avoid high-crime areas" or "minimize walking") based on pairwise comparisons of potential routes.
Key Results and Insights
The transition from batch learning to iterative learning yielded dramatic performance gains:
- Scalability: In the urban mobility task, the original ILASP2 system failed due to memory exhaustion at 200 examples. In contrast, ILASP2i handled over 500 examples using 100x less memory.
- Computational Speed: ILASP2i was over two orders of magnitude faster than its predecessor in the journey preference domain.
- Predictive Accuracy: On the urban mobility dataset, the system achieved 85% accuracy with only 20 examples. When the framework was extended to include "equality" orderings (allowing the user to indicate two journeys are equally preferable), accuracy increased to 93%.
These results suggest that in many ILP tasks, only a small subset of examples actually "drive" the learning process. By focusing on these critical counterexamples, ILASP2i avoids the redundant computations that plague batch learners.
Conclusion and Future Work
ILASP2i represents a significant step forward in making Inductive Logic Programming viable for complex, structured datasets. By combining context-dependent formalisms with an iterative search strategy, the authors have moved ASP learning from toy problems to scalable, real-world applications.
Future research directions include extending the algorithm to handle noisy data, where some examples may be incorrectly labeled, and optimizing the selection of counterexamples to further reduce the number of iterations required to reach a solution. Additionally, the authors aim to address the challenge of extremely large hypothesis spaces, which remain a bottleneck for current ILP systems.
Summary updated