Abstract
Validating Knowledge-Based Systems (KBS) is notoriously difficult due to a lack of formal specifications. This paper proposes a method to bridge the gap between high-level design and low-level execution by using a KADS conceptual model to derive "Valid Inference Paths," which are then compared against real-time system traces to identify bugs or design flaws.
Introduction
In the early 1990s, the development of expert systems—or Knowledge-Based Systems (KBS)—often lacked the rigorous specifications found in traditional software engineering. This environment made validation particularly challenging: how can developers ensure a system does the right thing for the right reasons when its logic is buried in complex, non-linear rule bases?
Traditional "white box" testing, which focuses on code coverage (ensuring every line of code is executed), is often insufficient for KBS. In these systems, the logic is frequently opaque, making it difficult to verify if the system's behavior aligns with the knowledge engineer's intent. This paper addresses the need for a formal benchmark to test system behavior against design intent by leveraging structured conceptual models.
Methodology
The proposed methodology utilizes the KADS (Knowledge Acquisition and Design Support) framework. Central to KADS is the Conceptual Model (CM), which provides a high-level description of how a system should reason. The approach involves three primary components:
- Inference Structure: A map of how the system moves between "roles" (classes of concepts) via "inferences" (discrete reasoning steps).
- Valid Inference Paths (VIP): The system automatically generates all possible paths from the starting point (initial roles) to the conclusion (final roles) based on the design. These paths are then reviewed by a domain expert to ensure they make "semantic sense," creating a gold-standard set of VIPs.
- Current Inference Path (CIP): When the actual KBS code runs on real data, the system generates a "high-level trace." This trace is mapped back to the conceptual model to show which inferences the system actually made during execution.
The Validation Process
The core testing mechanism is a comparison: Is the CIP in the set of VIPs? If the system takes a path that was not authorized by the conceptual model, or if the model is missing a valid path that the code discovered, a discrepancy is identified. This process facilitates bi-directional refinement; it can uncover bugs in the implementation or reveal flaws in the original conceptual theory.
Key Insights and Ideas
Semantic vs. Syntactic Correctness
The paper highlights that just because a reasoning path is possible according to the graph (syntactic), it does not mean it is logical in the real world (semantic). The requirement for expert verification of the VIPs is a crucial step in ensuring the "specification" is actually correct before it is used as a benchmark.
The "High-Level" Trace
One of the biggest hurdles in debugging AI is the "explanation problem." By mapping code execution back to a conceptual model, the author creates a trace that is easily understood by humans. This moves debugging away from dense dumps of rule firings and toward a structured understanding of the system's logic.
Improved Error Localization
By using explicit links between the conceptual model and the KBS, developers can pinpoint exactly where the reasoning went off the rails. This provides a better metric for "coverage" than traditional code coverage, offering a clear criterion for when testing is complete—specifically, when all VIPs have been exercised.
Limitations and Future Work
While the procedure was tested on a real-world KBS (referenced as Haouche 1993), several limitations remain:
- Expert Reliance: Verifying every possible inference path for semantic correctness can be labor-intensive for large, complex systems.
- Model Maturity: The method assumes the Conceptual Model is mostly valid. If the CM is poorly designed, the testing process is fundamentally flawed.
- Automation: While paths are derived automatically, the mapping between code and model currently requires significant manual setup by a knowledge engineer.
Future research directions include using this conceptual approach to automate the generation of test cases that target specific, unexercised inference paths, further solving the classical coverage problem in KBS testing.
Summary updated