Prolog/Ex 1, An Inference Engine Which Explains Both Yes and No Answers

TL;DR

This paper introduces Prolog/Ex1, a novel inference engine that significantly enhances Prolog's ability to explain its reasoning. Unlike standard Prolog, Prolog/Ex1 can provide clear explanations for both successful deductions ("yes" answers) and failures ("no" answers), even for programs that would otherwise loop indefinitely. This makes logic-based expert systems more transparent and understandable to their users.

What Problem Does This Paper Address?

Expert systems, often built using logic programming languages like Prolog, are valuable for their ability to provide advice or answers based on a knowledge base. However, a critical aspect of their utility is the ability to explain why they arrived at a particular conclusion. While standard Prolog can generate explanations for "yes" answers by tracing the proof, it struggles with "no" answers. When a Prolog program fails to find a proof, it simply returns "no" without any indication of why the deduction failed. This leaves users in the dark, unable to understand the limitations of the knowledge base or the reasoning process. Furthermore, some logically sound Prolog programs can enter infinite loops with standard interpreters, producing no answer at all.

Methods

Prolog/Ex1 tackles these issues by modifying the standard Prolog interpreter. For "yes" answers, it generates explanations by accumulating a proof tree, similar to existing methods, but with a focus on finding the shortest explanation.

The real innovation lies in handling "no" answers and non-terminating programs. Instead of immediately failing when a proof isn't found, Prolog/Ex1 explores "partial proofs" where some steps are assumed to succeed, even if they would normally fail. These assumed steps are marked with a question mark in the explanation tree, indicating potential points of failure. To prevent these explorations from becoming infinite, Prolog/Ex1 employs a technique (detailed in Section II, which is not fully elaborated in the provided text) to limit the computation. For "no" explanations, Prolog/Ex1 aims to provide the deepest possible conditional explanation, highlighting the most fundamental assumptions that lead to the failure. It also includes logic to generalize questions by replacing constants with variables if no direct path is found, making the explanation more robust.

Datasets

Not discussed in the paper. The paper focuses on a theoretical modification of an inference engine and uses illustrative examples rather than formal datasets.

Key Insights and Ideas

  • Unified Explanation: The most significant insight is the development of a single inference engine capable of explaining both successful and unsuccessful queries, bridging a major gap in standard Prolog.
  • Handling Non-Termination: Prolog/Ex1 provides a procedural meaning to programs that would otherwise loop indefinitely in standard Prolog, making more declarative specifications executable.
  • "Conditional" Explanations for Failure: By exploring partial proofs and marking assumed steps, Prolog/Ex1 offers a structured way to understand why a query failed, pointing to missing facts or relationships.
  • Prioritizing Explanations: The engine is designed to provide the most helpful explanations, such as the shortest proof for "yes" answers and the deepest conditional explanation for "no" answers.

Key Results

The paper demonstrates Prolog/Ex1's capabilities through examples. It shows how Prolog/Ex1 can:

  • Provide explanations for queries that would cause infinite loops in standard Prolog (e.g., Example 1).
  • Generate explanations for "no" answers, identifying missing flights or sequences of flights (e.g., asking to fly from "sfo" to "Ihr" or "lhr" to "lax").
  • Produce shorter explanations when multiple proofs exist (e.g., flying from "jfk" to "lax").

While quantitative results like accuracy or speedup are not presented, the qualitative improvement in explanatory power for both positive and negative queries is the core finding.

Limitations and Future Work

The paper acknowledges that the technique for limiting computation in the face of assumed successes (Section II) is crucial but not fully detailed in the provided text. It also mentions that the generated explanations can be mapped into quasi-English, suggesting future work in natural language generation for explanations. The authors imply that this approach is generally applicable to knowledge bases written in Prolog without requiring modifications to the knowledge base itself.

Summary updated

BibTeX
@inproceedings{1983prolog,
  title = {{Prolog/Ex 1, An Inference Engine Which Explains Both Yes and No Answers}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1983},
}
Figure