The Expert System Shell SPIRIT

Download Report

Transcript The Expert System Shell SPIRIT

The Expert System Shell SPIRIT
Presented by
Poom Samaharn
I-MMIS 51-7038-0066
Agenda








Background
Probabilistic expert system
What is SPIRIT?
Expert system’s architecture
Knowledge processing in SPIRIT
Query and response
Terminology
Summarization
Background

The early 70’s : Develop knowledge based system with
purely deterministic rule processing.

Today : Knowledge based systems are able to manage
uncertain, subjective, and vague knowledge.

Involved probabilistic facts and rules must be either
estimated by an expert or calculated from statistical data.

SPIRIT uses subjective estimations of probabilities in a
knowledge domain and statistical data to construct a
knowledge base.
Probabilistic Expert System

The probabilistic expert system represents the experts
knowledge by a probability distribution.

The probability distribution is defined with a finite set of
discrete random variables for the space of attributes.

Stochastic or random dependencies
variables can be specified by
– Rules
– Conditionals
– Facts
between
the
Probabilistic Expert System (cont.)

For example : If the test result is positive (Fact), the
monitor display is o.k. with probability 0.9 (Rule). => the
space of attributes of the discrete variables will be
TESTRESULT
and
{positive, negative}
DISPLAY_CONDITION
{ok, defect}

Conditionals generate a fair distribution for probabilistic
knowledge base.

Probabilistic expert systems are graphical networks that
support the modeling of uncertainty and decisions in
complex domains.
What is SPIRIT?

Symmetrical
Probabilistic
Intensional
in Inference Networks in Transition.
Reasoning

The expert-system-shell SPIRIT is a sophisticated tool to
build up knowledge bases.

SPIRIT allows to use rich communication language with the
user. For example, user informs the system that the car's
speed is very high then there is an increased danger of
accident.

Interactive explanation with dependency graph and LEGstructure.
Expert System’s Architecture
Figure 1. Expert system architecture
Knowledge Processing in SPIRIT

The following four steps are description about how to
generate a probabilistic knowledge base:
Step 1 : Define variables and its attributes.
Step 2 : Enter facts and rules and assign probabilities.
Step 3 : Generate an internal structure to enable
inference.
Step 4 : Generate a joint probability distribution to
complete the knowledge base.
Step 1 : Define variables

Define the knowledge domain by specifying variables Vl and
their values vl.

Variable types and their attributes
- Boolean variable : (yes = 1/no = 0)
- Nominal variable : (an unsorted set of values e.g.
red/green/blue) )
- Utility variable : (a sorted list of numeric values e.g. -8614,
-29, 0,25,388,1466)

Variables and attributes form the domain on which a
probability distribution will be generated by facts and rules.
Step 1 : Define variables(cont.)
s
Figure 2. A view of variable and its values
Step 2 : Set facts and rules

Define suitable facts and rules, according to the SPIRIT
syntax of propositions.

Propositions are formed by the junctors
v = ‘or’
¬ = ‘not
^ = ‘and’
( ) = ‘parenthesis’
| = ‘given’

Variable’s dependencies are informed to the system with
the probabilistic conditionals.

e.g.
MARITAL=s |YOUNG => P = 0.80
(Rules can be set as active or inactive)
Step 2 : Set facts and rules(cont.)

Conditional conventions
^ t f i
t t f t
f
f f
i
i
T = True

v
t f i
t t t t
f
f f
i
i
F = False
¬
| t f i
t f
f t
i i
t t i t
f f i f
i i i I
i = inapplicable
B|A[x] is valid in P , iff P(BA) = x.P(A)
When x is the probabilistic conditional and P is probability
distribution. (the epistemic state with valid conditionals)
Step 2 : Set facts and rules(cont.)

Facts about the domain => Knowledge acquisition

The knowledge engineer supplies conditionals Bi|Ai i = 1,...,I
and estimate their probabilities xi to be true in the population.

This knowledge ,supplied by the rules and facts, is then
implemented in a distribution P*.

P* = arg minR(Q,P0), s.t. Q |= R
When P* is the basic knowledge generated under MinREnt.
R is the relative entropy of distribution of variable Q.
P0 is the uniform probability distribution.
Step 2 : Set facts and rules(cont.)

SPIRIT provides entropies H(P0) and H(P*) , so the shell
informs the amount of acquired knowledge (H(P0) - H(P*)) in
[bit].
Figure 3. Knowledge acquisition
Step 3 : Generate a structure to
enable inference

SPIRIT provides the dependency structure of a model’s
variables with Markov net and optional inference net.

Inference is the result of logical assumption about the
vague population (e.g. all animals).

Inference takes place in spite of incomplete information
about this population.

Knowledge adaptation is inference and answering
questions is based on inference as well.
Step 3 : Generate a structure to
enable inference
Figure 4. Markov net on dependencies window
Step 4 : Generate a joint probability
distribution

SPIRIT calculates a special joint distribution(global
distribution).

However, global distribution, formed in a hypertree,
suffers to store an exponential growth of the number of
probabilities with an increasing number of variables.

Global distribution is decomposed in marginal
distributions(Local Events Groups – LEGs). LEGs form a
knowledge base’s junction tree where edges(links) can
connect any number of vertices(nodes).
Step 4 : Generate a joint probability
distribution(cont.)
Figure 5. Junction tree in SPIRIT
Query and Response

Query has three parts
– Focus
– The addition to focus
– A question plus response

Focus (E) is about domain’s temporary assumptions with a rich
set of probabilistic conditionals. Focus will be discarded when
query is over.

E = {Fj|Ej [yi], j=1,…,J}
When Fj|Ej are further conditionals and yi are their probabilities.
Query and Response(cont.)

The addition to focus => The adaptation of P** to focus E
P** = arg minR(Q,P*), s.t. Q |= E

P** is the probability distribution that preserves the
indefiniteness of P* as much as possible, but adapts it to
hypothetical facts and rules.

This inference process respects the principle of minimum
relative entropy.
Query and Response(cont.)

A question plus response
P**(H|G) = z

A question is any conditional(H|G) and the response or answer
to the question is represented by z.

The goal is to evaluate the probabilities of conditional questions
from user.

The response is about the probability of H given G derived from
the knowledge subjective in P* and from the evident situation.
Query and Response(cont.)
Figure 6. (Un)certainty query and response
Terminology

P presc = The prescribed probability of the rule in range
[0..1].

P act = The current probability of the rule in the
distribution. When P presc = P act, the rule is valid.

Entropy = A measure of the uncertainty associated with
random variable. The relative entropy is changed by the
rule.

Knowledge base = a database created by experts that
can be retrieve and update in machine language and
human language.
Terminology(cont.)

Expert system = The system that provide an answer or
clarify uncertainties with existing knowledge bases.

Statistical inference = The use of statistics and facts from
random data to make inferences of unknown aspect of a
population.

Conditional probability = The probability of some event
(B), given the occurrence of another event(A) => P(B|A)
Summarization

The shell XSPIRIT 3.0, a Java-version, is a professional
tool for information and knowledge processing.

SPIRIT processes probabilities rather than information
measures, but an additional module allows to handle
both.

Knowledge processing in 4 steps : Define variables, set
rules and facts, generate a structure for inference, and
create joint probability distribution.

Particular query can be answered based on a knowledge
model.
References

Rodder, W. and Xu, L. 1999. Entropy-driven Inference
and Inconsistency, Proc. Artificial Intelligence and
Statistics, Fort Lauderdale, 272-279.

Rodder, W. and Kern-Isberner, G. (2003a). From
Information to Probability - An Axiomatic Approach.
International Journal of Intelligent Systems, 18-4, 383–
403.

Rodder, W., Reucher, E., Kulmann, F. Features of the
Expert-System Shell SPIRIT, Logic Journal of the IGPL,
14-3 (2006) 483-500.
References
(cont.)

Reucher, E. and Kulmann, F. Probabilistic Knowledge
Processing and Remaining Uncertainty, Proc. 20th
International FLAIRS Conference -FLAIRS-20, May 7-9,
Key West, Florida (2007) 122-127.

Spirit (2009). http://www.xspirit.de., access 18/09/2009