Socrates: a flexible toolkit for building logic-based expert systems

Robert Corlett, Nick Davies, Robin Khan, Han Reichgelt, Frank van HarmelenKnowledge-Based Systems 1988 · DOI

TL;DR

This paper introduces Socrates, a toolkit designed to overcome the limitations of existing expert system shells and hybrid systems. It achieves this by providing a flexible architecture that combines logic-based knowledge representation with meta-level inference for control, allowing for the creation of specialized expert systems tailored to specific domains and tasks.

What Problem Does This Paper Address?

Building effective expert systems has historically been a challenge due to the limitations of available tools. "Expert system shells" often offer a rigid inference engine and knowledge representation scheme, making them unsuitable for diverse applications. On the other hand, "hybrid systems" (like LOOPS or KEE) provide a rich set of tools but lack guidance, leading to ad-hoc development and difficulty in choosing appropriate strategies. The core problem Socrates addresses is the need for a flexible yet structured approach to building expert systems, recognizing that different applications require different "models of rationality" – a combination of domain knowledge and a strategy for using it.

Methods

Socrates employs a three-tiered architecture and a structured methodology for building expert systems:

  • Logic for Knowledge Representation: Socrates uses logic as its unifying framework for representing domain knowledge (the "static" aspect of a model of rationality). It supports "many-sorted logics" with hierarchical sort structures, which improve readability and reduce search space. This approach allows for a formal semantics and expressive power.
  • Meta-Level Inference for Control: The "dynamic" aspect of a model of rationality (how to use knowledge) is handled by meta-level inference. Socrates separates control knowledge from domain knowledge, arguing this improves development, debugging, reusability, and explanation. This is achieved through a two-layer architecture: an object-level interpreter for domain knowledge and a meta-level interpreter for control knowledge.
  • Declarative and Procedural Control Specification: Socrates offers two ways to specify control strategies:
  • Declarative: A many-sorted Horn Clause Logic is used to express control strategies, interpreted by the meta-level interpreter. This allows for explicit representation of control.
  • Procedural: An alternative, more procedural meta-level language (based on Common Lisp primitives) is provided for specifying control regimes. This approach aims for greater efficiency and a more natural way to express procedural control knowledge.
  • Configuration Process: Building an expert system with Socrates involves three stages: declaring a logical language, declaring a proof theory for that language, and declaring a proof strategy.

Datasets

Not discussed in the paper. The paper focuses on the toolkit's architecture and methodology, not specific empirical evaluations on datasets.

Key Insights and Ideas

  • Models of Rationality: The paper frames expert system design around "models of rationality," which have static (knowledge representation) and dynamic (control strategy) aspects. This provides a principled way to think about system design.
  • Separation of Concerns: Explicitly separating domain knowledge from control knowledge is crucial for flexibility, reusability, and explainability. Socrates' meta-level architecture embodies this.
  • Logic as a Unifying Framework: Using logic for both representation and inference provides a solid theoretical foundation and a consistent way to build diverse systems.
  • Hierarchical Knowledge Representation: Many-sorted logics with hierarchical sorts offer a powerful way to model domain taxonomies and simplify complex expressions.
  • Flexibility in Control: The ability to define control strategies declaratively or procedurally, and to potentially add a scheduler for subtasks, allows for tailoring the system to a wide range of problems.

Key Results

The paper describes a working implementation of Socrates in Common Lisp. It highlights the successful application of the toolkit in building:

  • An expert system for personal investment advice.
  • A route planning system.
  • The reimplementation of the DOCS expert system (medical domain), which involved a complex sort hierarchy and a generate-and-test control strategy.
  • Solving "Schubert's steamroller" problem using a breadth-first search strategy, demonstrating the power of meta-level control for complex search spaces.

The authors claim that the meta-level overhead can be acceptably small, especially when control strategies are compiled.

Limitations and Future Work

  • Meta-Level Overhead: While manageable, the meta-level interpretation incurs an execution cost compared to hardwired control. The authors suggest compiling control regimes to mitigate this.
  • Language for Control Specification: The paper identifies the need for a better language for specifying control strategies, particularly a core vocabulary that can be preprogrammed.
  • Procedural Language Power: The procedural meta-level language, being based on Common Lisp, might be "too powerful" by not restricting the knowledge engineer sufficiently.
  • Scheduler Implementation: A third level, the scheduler, is proposed for handling composite tasks but is not yet implemented.
  • Library of Control Strategies: The authors suggest developing a library of preprogrammed control strategies to ease the knowledge engineer's task.
  • Handling Extra-Logical Issues: Future work includes using meta-level interpretation for uncertainty, truth maintenance, and explanation, leveraging the slot-value annotation mechanism.
  • Modal Logics: Extending Socrates to handle modal logics through reification is also mentioned.

Summary updated

BibTeX
@article{corlett1988socrates,
  author = {Robert Corlett and Nick Davies and Robin Khan and Han Reichgelt and Frank van Harmelen},
  title = {{Socrates: a flexible toolkit for building logic-based expert systems}},
  journal = {Knowledge-Based Systems},
  year = {1988},
  doi = {10.1016/0950-7051(88)90071-8},
}
Figure