A multi-threshold, internal rule representation form used to support user modifiable knowledge-based systems

A multi-threshold, internal rule representation form used to support user modifiable knowledge-based systems

Data Sr Knowledge Engineering 1 (1985) 327-336 North-Holland 327 Short Communication A multi-threshold, internal rule representation form used to s...

623KB Sizes 0 Downloads 10 Views

Data Sr Knowledge Engineering 1 (1985) 327-336 North-Holland

327

Short Communication

A multi-threshold, internal rule representation form used to support user modifiable knowledge-based systems Lawrence J. MAZLACK, and Greg VAUGHN Quantitative University

At~alysislInformatiot~ of Cincitmati, Cincitmati,

Jeffrey

BERNSTEIN,

Systems Department, OH 45221, U.S. A.

Electrical

David and

KELLEY

Computer

Engineering

Department,

Abstract. A Rat file (i.e., tabular) internal rule representation suitable for storing expert system rules that can make use of a spreadsheet-like user interface is presented. The representation handles individual rule thresholds, different knowledge evidence procedures, and rule structures which can be represented as network graphs. Such representations: (a) help a system’s rule structure to be made relatively accessible for those without significant artificial intelligence training, (b) allow for clear understanding of the extent and nature of a rule, and (c) provide opportunities for consistency checking.

Keywords. Expert system, knowledge-base, representation,

threshold, verification.

1. Introduction We have been exploring ways in whichever the knowledge development process for expert systems could (a) be made relatively accessible to those without significant artificial intelligence (AI) training, (b) allow for relatively easy understanding of the elements of an expert system rule, (c) provide a way of providing some degree of consistency checking, and (d) reflect the thresholding process usually used in human decision making. The advantages of all of these goals are either well known or obvious. They represent long standing needs of the expert system domain. The need for consistency checking is a well-known AI problem as it is difficulty to assign consistent judgement values across all the rules of an expert system. Likewise, it is difficult to select factors that will insure that the resulting belief calculations of the system are consistent. Users often have a need to examine the raw rule structure. An examination of the raw rule structures is potentially desirable for system debugging. The need for the user to view the basic elements or rules of a system is supported by most commercial systems. However, these raw rule structures are,usually not easily understandable to someone without significant AI training as the raw rule structures are usually represented in LISP or PROLOG. These needs are particularly important to the type of problems we are concerned with: 0169-023X186/$3.50

0 1986, Elsevier Science Publishers B.V. (North-Holland)

328

L. J. Mazlack

et al.

I A multi-threshold,

htenral

rule representation

fowl

systems providing desk’top advice in the office and manufacturing domains. For the most part, these systems should (a) be robust, (b) easily modifiable by a variety of users, and (c) have the rules and the evidence combinations must be consistent and verifiable by the user/ developer. The systems that we have been working with are medium size (100-1000 rules) and use a MYCIN-like [S] structure. We decided to utilize a spreadsheet-like type of interface to the knowledge base for development or modification. Likewise, the same can be used to access portions of the rule structure. Also, as the rule structure is a flat file (i.e., tabular) simple projection can be used to view the knowledge base. Likewise, as with any flat file, the raw structure itself can be viewed. This capability means that a person untrained in AI languages can easily examine the rules. Spreadsheets such as VisiCalc, Lotus l-2-3, JAZZ, or Excel have become an effective and popular way of doing certain types of calculations which require a coordinated combination of a group of user supplied equations. Spreadsheets use easily understood tabular data representations. The use of an analogous technique to accomplish expert system knowledge representation and the specification of knowledge combination is a potentially effective and efficient methodology for some classes of expert systems. Additionally, there are a variety of thresholds that people normally use when they are making decisions. These thresholds generally address: (a) if enough information had been developed to support making a decision, (b) if there has not been a high enough level of information developed to make a decision, and (c) if the knowledge that we do have is of questionable utility as it is below a noise level. This paper addresses the internal tabular representation that was developed to support easy and effective viewing of the knowledge base as well as use of a spreadsheet-like user/system interface. Additionally, we will discuss the use of systematic threshold control levels. This representation has been used in six different problem domains including manufacturing, finance, hospital administration, and personal health. The systems in question were designed to provide desk top advice to decision makers.

2. Knowledge combination The types of rules that we consider and how the evidence is combined has been previously reported [3]. It can be summarized that we have developed a general purpose expert system (as shown in Fig. 1) that is capable of data driven, goal driven, or greedy solution strategies using the following evidence strategies: minimum, disjunction, reinforcing, and approximate (or fuzzy). The following is presented both as a short introduction to how we use thresholds and to the needs of a flat rule representation. 2.1. Basic knowledge combination

procedures

For the purposes of evaluation, knowledge in a knowledge-based system (KBS) can be thought as being a collection of two level graphs with the parent node representing the judgement ,being and the child nodes providing supporting information. These nodes are generally of two different types: ANDs and ORs. In an AND node, when all of the supporting knowledge has metric values greater than zero, all of the relevant supporting knowledge is considered to be necessary to establish a knowledge metric for the parent AND node. For

L. J. Mazlack

et al.

I A multi-threshold,

internal

rule representation

fortn

329

Fig. 1. Generic expert system diagram.

example, the AND rule of Example 1, can be expressed as the graph shown in Fig. 2(a). Figure 2(b) shows the minimum flat representation for this graph. Example 1: AND rule. IF tomorrow will be SUNNY(b,) [AND1

W=W4

[AND1

WITHOUT WZND(b,) THEN it will be a NICE DAY(j,) NICE DAY

GO node/rule number

uerbal rule type description (OR) one for

w each next &l/d of this rule

(b) Fig. 2. (a) Example of an AND graph; (b) Minimum tabular representation

for an AND graph.

330

L. J. Mazlack

et al.

I A multi-threshold, LEAVE

internal

THE

rule representation

form

BUILDING

b0

(4 node/rule

rule

next

type

node/rule

judgement

t

I

me sel%ar eecb next cbitd ol lbls rule

(b) Fig.

3. (a) OR

graph

example;

(b) Minimum

tabular

representation

for

an OR

graph.

The bi represents the metric level of belief (internally, - 1 to + 1, after system interface) that a condition will be true (SUNNY, WARM, etc.) and i0 represents the metric level of judgement (-1 to +l, after system interface) that the parent node (NICE DAY) will be true given the supporting evidence expressed in the child nodes. For an AND knowledge combination calculation, the source of the supporting knowledge is immaterial. The computational process is the same. The most common way to calculate the level of belief of an AND node is b,=j,*,min

1=l,...,t1

(bi).

Normally, in an OR node, all of the relevant supporting knowledge is examined in establishing a belief metric for the parent node. However, the computational process may vary, depending on the source of the supporting knowledge. For example, the OR rule of Example 2 can be expressed as a graph as shown in Fig. 3(a). Figure 3(b) shows the minimum flat representation for this graph. Example 2: OR rule with disjunctive, non-supporting

or non-related

evidence.

If the building it is time to need to GO THEN LEAVE

is ON FIRE ( jl) GO HOME ( j2) TO THE AIRPORT THE BUILDING

WI [ORI

( j3)

If the source of supporting information is taken directly from the environment metric belief value of the parent node is usually calculated as bo = i,T,E,,,

Cbi *iI

> .

the resulting

L. .I. Mazlack et al, I A multi-threshold,

intqxal rule representation form

331

Usually, a completely disjunctive combination is performed when extracting raw data from the external environment. A variant of the OR structure is the menu. A menu has the capability to choose among several different choices. Figure 4 illustrates how we support menus. The difficulty with a completely disjunctive formulation is that it treats all OR node supporting information as completely disjunctive (i.e., unrelated) and consequently nonreinforcing where it might be expected that beliefs from different supporting knowledge

50

CYCLES

60 CYCLES

440

CYCLES

(4

node/rule number

rule type (OR)

uerbal description

. me

set

‘for

eecb

Fig. 4. (a) An exclusive menu choice; (b) Menu form; (c) Menu choice example; (d) Minimum tabular representation for a menu.

332

L. J. Mnzlnck

et al.

I A t,lrthi-tkreshol~,

irrterttal

rule representation

font!

sources could sometimes reinforce each other and consequently enhance the value of a decision. For example, in the case of Example 3, both of the separate child beliefs could be reasonably combined to produce a higher metric belief level for the resulting judgement (HIRE) than either one by itself. Example 3: OR rule with reinforcing evidence. IF a possible employee is WELL TRAINED (j,) HIGHLY EXPERIENCED THEN HIRE

(j,)

[ORI

Several investigators use the probablistic addition introduced by Shortliffe [5] to provide a means for handling reinforcing supporting evidence for an OR node when the belief levels are derived from other rules. For the two branch case, the formulation is

The negative term is called the measure of disbelief. When the rule is represented by a n-gram and the count of the branches is greater than two, then the same calculation is recursively applied. Our system can handle another class of knowledge combination, approximate or fuzzy. This type of calculation was first developed by Zadeh [7]. Approximate reasoning uses the same basic AND, OR rule structure but combines evidence in a way that reflects the impreciseness of knowledge. Tong and Shapiro [6] discuss several different variants of approximate knowledge combination. In the calculations for both the AND as well as the OR structures, there is a noise threshold level which is used to reduce to zero any belief values which become so small that they are considered to be meaningless. This noise threshold level is different than either a sufficiency threshold or an activation threshold, both of which will be discussed later. 2.2. Combining

knowledge

The process of (a) only applying completely disjunctive evidence combination procedures when the knowledge is being extracted from the environment, or alternately (b) using reinforcing or additive OR evidence procedures when the supporting knowledge is not drawn directly from the environment seems somewhat arbitrary. Example 3 illustrated this arbitrariness as the specific evidence WELL TRAINED and HIGHLY EXPERIENCED could either be the result of (a) beliefs drawn directly from the environment or (b) beliefs which are the result of knowledge derived from other rules. In (a), a blind obedience to the previously discussed evidence combination procedures would require completely disjunctive combination while (b) would require the reinforcing combination of knowledge. In addition to such cases where the source of the knowledge can be variable, there are clearly some situations where knowledge taken from the environment should result in a combination of the belief level. For example, in Example 4, the question as to whether or not a given lake has fish suitable for catching should be additive, irregardless of the source of the evidence.

L. J. Mazlack

et al.

I A multi-threshold,

internal

rule representation

form

333

Example 4: OR rule with reinforcing evidence drawn from the environment. If the lake has BIG BASS( jl) BIG PERCH( jz) SMALL PERCH( j3) [OR] CATFZSH( j4) THEN there are SUITABLE FISH to catch 2.3. Threshold utility 2.3.1. Noise threshold Expert systems often include a general any one calculation becomes less than the is on the same order of the system’s error level, the result of the calculation is set

noise threshold. The idea being that if the result of noise threshold, the result is meaningless, or at least level. When a calculation does fall below this noise to zero.

2.3.2. Activation threshold There may be some cases where the amount of evidence developed is not strong enough to contribute significantly to a solution. At the same time, this level of evidence could well be greater than the system’s noise threshold. In such cases, ultimately unprofitable lines of inquiries may be continued. This can be illustrated by the graph in Fig. 5 where, if the evidence of satisfactory fish available to be caught was too weak, it would be a waste of time to ask about whether or not it was going to be a nice day to go fishing tomorrow. In such cases, an activation threshold can be applied. An activation threshold could reasonably be tested at either of two points: (a) after a node has established a final belief value, or (b) as the evidence is accumulated by a node in preparation for establishing a belief level. The advantage in the first approach is that each parent node could specify a different level at which it considered a child’s level to be ‘too weak’ to provide evidential support to the parent node. The disadvantage in this is that of unintentional inconsistencies in defining what is too weak. In the interests of consistency, we have chosen to allow only one activation threshold a

go fishing

Fig. 5. Node (suitable fish) with an activation threshold (Y.

334

L. J. Marlnck

et nl.

I A ttlttlti-tlrresltol~l,

ittterttnl

rule represetttatiott

form

node. Besides the belief level calculation for an AND or an evidence acquisition node when the level of combined evidence becomes too weak. 2.3.3.

OR suficiently

threshold

In both of the knowledge combination processes for OR nodes (previously shown in eqs. (2), (3), the sufficiency of knowledge at which it is not necessary to attempt to discover more supporting evidence for a given OR node can be identified as a sufficiency threshold level 0 for the case of disjunctive evidence for an OR node and (9 for the case of reinforcing evidence for an OR node. The concept behind establishing a threshold is that once a parent node achieves a sufficiently high belief level (the threshold) from a subset of the available evidence, further inquiry directed toward other evidence supplying branches for that node is not required. The use of either type of OR sufficiency threshold (0, Sp), would require a threshold sufficiency field in the flat representation, as illustrated in Fig. 6. 2.3.3.1. Disjunctive evidence threshold. In the case of the disjunctive OR evidence combination procedure (previously shown in eq. (2)), evidence is not reinforcing. Therefore, there is a de facto maximum threshold specification of O,,, = max( ii). It is reasonable to suspect that Osurlicien,would often be less than O,,,, as (a) it could be expected that some belief levels (bi) could be less than unity and still be sufficiently high so that an evidence combination of bi *jr could be less than O,,, and still be high enough to warrant a decision, and (b) it could be expected that for some ji < O,,, the level of evidence could be high enough to warrant not inquiring about disjunctive evidence for the same OR node. That (b) is true can be seen from considering the case where the disjunctive evidence is gathered in descending rank order of judgement metric. In this case, if all of the belief metrics have the maximum possible value of 1.0, additional inquiries cannot increase the knowledge level of the parent OR node. It follows that a threshold maximally set to the value of 1 * j2 where jz is the second highest judgement metric and 1 represents the unity belief level could not result in any loss of information. Thus, there is at least one case (0 = 1 *j,) where a threshold would be useful in all cases. Reinforcing evidence threshold. The case where the OR evidence is treated in a reinforcing combination procedure (as in Eq. (3)) can result in a level of combined evidence greater than 0 mnx. Given all non-negative judgement metrics ( ji) and evidence belief metrics approaches 1.0 at the limit, even if all bi * j, C 1.0. This is appropriate as the more Cbi), @mm positive reinforcing evidence, the more sure should be the combined evidence. Where ~~“lIicie”cshould be profitably set for any given case requires a careful analysis of the acceptable levels of knowledge. A properly defined interface helps the knowledge engineering understanding what would be a suitable value. This must be available or else the knowledge engineer could set a threshold value too high (one that could not be reached because of the effect of successive value attrition). Most likely, appropriate levels of both 0 and Q,can be best 2.3.3.2.

I eithei

I

one seiYfur next

Fig. 6. Minimum

tabular representation

child

of

ihis

each rule

for an OR graph with a sufficiency threshold.

L.3. Mnzlnck et nl. I A tndti-threshold,

internnl rule representation form

335

set by establishing all of the initial evidential belief levels at 1.0 and observing the resulting levels of combined knowledge at each parent node.

3. Flat representation We chose to use a straightforward flat or tabular representation which included explicit, actual next/previous rule number references (i.e., numbers assigned by the user to a rule). Using a flat format as a knowledge representation vehicle has the substantial advantages of flexibility and simplicity. It is easy to modify the rule sets and to provide a friendly development interface. Such a structure also has an execution time advantage of speed as well what

50 ;; ofn ‘0 ;i x4 )oo 002 004 008 009 005 010 011 012 013 003 006 014 007 015 016 017 018

fishi OKfis perch boss mater lake riuer streo marm famil picni green shop money need swim water

AND OR EXOl EXOl PROR EX03 EX03 EX03 EXOI OR AND EXOi RND EX02 EXOI RND EX04

to

next

do tomorrow

rule/node

u

320 332 -----

0

AND node

3

disjunctiue OR node

minL..)*J

040 --------000 025 050 -------

fj@j

I30 _--

Fig.

7. Complete

matrix

example.

data nodf (EXnn)

336

L. J. Mazlack

et al.

I A multi-hesltold,

internal

rule represerttatiott

form

as the major development advantage that an easy manual trace through the rule structure can be easily effected. This manual capability is particularly useful for debugging. Additionally this representation is relatively simple for a spreadsheet environment to access. The disadvantages of such an approach is mostly a lack .of elegance. It should be noted that this representation easily accommodates a network evidence structure (i.e., evidence that supports more than one higher-level nodes). The example in Fig. 7 shows a complete data representation. It contains both the graph and the basic flat or tabular representation for the example graph. Not shown is the I/O interface scaling values that allow a wide range of input data values. 4. Closing comments This paper presented a flat internal knowledge representation that met the observed needs for (a) design modularity (to resolve problems), (b) consistency between modules (especially the resulting belief values), and (c) an ease of addition/deletion of both partial and complete rules without redoing the entire knowledge structure. Our system has a particular emphasis on (a) user verification and (b) constraint satisfaction and consistency. This led us to the flat or tabular representation that we used. References [l] R.O. Duda, Knowledge-based expert systems come of age, BYTE 6 (9) (1981) 238-281. [2] W.G. Gevarter, An overview of expert systems, NASA 82-2505, 1982. [3] L.J. Mazlack, Using sufficiency threshold rules in a knowledge based bystem, Proc. 1 sf Internadonal Workshop on Expert Darabase Systems (1984) 130-734. [4] D.S. Nau, Expert computer systems, IEEE Compw. 16 (2) (1982) 63-85. [5] E.H. Shortliffe, Cornpurer-based Medical Cottsuhanls; MYCIN (Elsevier, New York, 1976). [6] R.M. Tong and D.G. Shapiro, Experimental investigations of uncertainty in a rule-based system for information retrieval, hernat. 1. Man-Machine Stud. 22 (1985) 265-282. [7] L.A. Zadeh, Fuzzy sets, InformaGon and Control 8 (1965) 338-353.