Models for Inexact ReasoningModels for Inexact Reasoning
Reasoning with Certainty Factors: The MYCIN ApproachThe MYCIN Approach
Miguel García RemesalDepartment of Artificial Intelligence
The MYCIN ApproachThe MYCIN Approach
• Developed in 1970 by Shortliffe & Buchanan• Developed in 1970 by Shortliffe & Buchanan (Stanford University)
• Focused on the Medical Domain– Selection of Therapies for Infectious Blood Diseases (Meningitis, Septicemia, etc.)
• Rule‐Based System (Backward Chaining)y ( g)• Use of Heuristics (“Rules of the Thumb”)• Only theoretical success• Only theoretical success
– Never was used in clinical practice
Overview of the Inference ProcessOverview of the Inference Process
• Goal: Test a hypothesis using a set of rules and• Goal: Test a hypothesis using a set of rules and facts (MYCIN KB)B k d h i i i f• Backward‐chaining inference process– Use of an inference treef di d li h ( G)• Inference Tree: a directed acyclic graph (DAG)
– Nodes: facts and hypotheses– Edges: rules
• Facts are not deductible• Hypothesis are deductible from facts and other hypothesis using rules
Inference TreeInference TreeH
• RulesR4
Rules– R1: IF E1 AND E2 THEN H1
H2
– R2: IF H1 THEN H2
– R3: IF E3 THEN H2
R2
– R4: IF H2 THEN HH1
R1 R3
E1 E2 E3
Rules in MYCINRules in MYCIN
l i i l i f• Rules in MYCIN involve certainty factors to deal with uncertain knowledge
IFThe stain of the organism is Gram negative, ANDThe stain of the organism is Gram negative, ANDThe morphology of the organism is rod, ANDThe aerobicity of the organism is aerobicThe aerobicity of the organism is aerobic
THENh l d ( ) h hThere is strongly suggestive evidence (0.8) that the class of the organism is Enterobacteriaceae
Certainty FactorsCertainty Factors• Certainty factors (rules)
– Degree of confirmation (disconfirmation) of a hypothesis given concrete evidenceExample (in the previous slide)– Example (in the previous slide)
• Certainty factors (evidence)Degree of belief (disbelief) associated to a given piece– Degree of belief (disbelief) associated to a given piece of evidence
– Example:Example: • CF(stain=gram‐negative) = 0.4• CF(morphology=rod) = 0.6CF( bi it bi ) 0 4• CF(aerobicity=aerobic) = ‐0.4
Certainty FactorsCertainty FactorsBelief
1
0.7
Total
Almost total
0.5 Moderate
[ 1,1]CF ∈ − 0 Unknown
-0.5 Moderate
-0.7
-1 Total
Almost total
Disbelief
Certainty FactorsCertainty Factors
• Given a rule [evidence hypothesis] its CF can be defined as follows:
( , ) ( , ) ( , )CF h e MB h e MD h e= −
• MB(h,e): Relative measure of increased belief
( , ) ( , ) ( , )
( , )
• MD(h,e): Relative measure of increased di b li fdisbelief
Measure of Increased BeliefMeasure of Increased Belief
• Relative measure of increased belief in hypothesis h resulting from the observation of yp gevidence e
• There is an increased belief in h if P(h|e) > P(h)• There is an increased belief in h if P(h|e) > P(h)
• Otherwise MB(h,e) = 0Increase in the probability of hafter introducing evidence e
( | ) ( )( , )1 ( )
P h e P hMB h eP h−
=R i i i i th “1 ( )P h− Remaining increase in the “a priori” probability of h to reach
total certainty
Measure of Increased DisbeliefMeasure of Increased Disbelief
• Relative measure of increased disbelief in hypothesis h resulting from the observation of yp gevidence e
• There is an increased disbelief in h if P(h|e) <• There is an increased disbelief in h if P(h|e) < P(h)
Decrease in the probability of h• Otherwise MD(h,e) = 0
Decrease in the probability of hafter introducing evidence e
( ) ( | )( , ) P h P h eMD h e −=( , )
( )P h “A priori” probability of the hypothesis
Certainty FactorsCertainty Factors
• A positive CF indicates that the evidence supports (totally or partially) the hypothesispp ( y p y) yp– i.e. MB > MD
• A negative CF indicates that the evidence discards (totally or partially) the hypothesis– i e MD > MBi.e. MD > MB
Soundness PropertiesSoundness Properties• There cannot be a
0 0MB MD> → =
• There cannot be a simultaneous belief and disbelief in an0 0
0 0MB MDMD MB
> → => → =
disbelief in an hypothesis
• The evidence e
( , ) (~ , ) 0CF h e CF h e+ =The evidence e supporting a given hypothesis h disfavours
( , ) 1n
iCF h e ≤∑its negation to an equal extent
1i= • Hypotheses must be mutually exclusive
Mutually Exclusive HypothesisMutually Exclusive Hypothesis
Assignment1
Assignment2
Assignment3
Winner=Claws 0.8 0.8 0.7
Winner=Raven 0.7 0.2 0
Winner=Rusty 0.9 0 ‐0.4
2.4 1.0 0.3{ }( , )CF winner i e=∑ 2.4 1.0 0.3{ }, ,i claws raven rusty∈
InferenceInference
• Firing a rule involves the use of two different CFs:– The CF associated to the antecedent of the rule (premises)(premises)
– The CF associated to the rule
E H
( )CF E
( )CF R
¿ ( )?CF H( )CF E ¿ ( )?RCF H
Certainty in Compound RulesCertainty in Compound Rules
• What happens if the rule involves several premises linked using standard connectives p g(AND, OR)?
1 2 ( )
1 2 1 2
:
( ) min( ( ), ( ), , ( ))n CF RR e e e h
CF e e e CF e CF e CF e
∧ ∧ ∧ ⎯⎯⎯→
∧ ∧ ∧ =
…
1 2 1 2( ) min( ( ), ( ), , ( ))n nCF e e e CF e CF e CF e
R h
∧ ∧ ∧… …
1 2 ( )
1 2 1 2
:
( ) max( ( ), ( ), , ( ))n CF R
n n
R e e e h
CF e e e CF e CF e CF e
∨ ∨ ∨ ⎯⎯⎯→
∨ ∨ ∨ =
…
… …
Certainty PropagationCertainty Propagation
• Calculation of the CF associated to the consequent of a rule (after firing the rule)q ( g )
:R e h→( ):
( ) 0 ( ) ( ) ( )CF RR e h
CF e CF h CF e CF R
⎯⎯⎯→
> → = ⋅( ) 0 ( ) ( ) ( )( ) 0 ( ) 0
CF e CF h CF e CF RCF e CF h> → = ⋅
≤ → =( ) ( )
Certainty AccumulationCertainty Accumulation
• What happens when two or more rules with the same consequent are fired?
• How do we calculate the accumulated CF associated to H1?1
H1
1 1 2 1( ): CF RR E E H∧ ⎯⎯⎯→R1 R2
1
2
1 1 2 1( )
2 3 4 1( )
:
:CF R
CF RR E E H
→
∧ ⎯⎯⎯→
E E E EE1 E2 E3 E4
Certainty AccumulationCertainty Accumulation
• Accumulation of CFs with the same sign:
1 1( )RCF H x=1
2
1
1( )R
RCF H y=
1 2 1( ) ( )R RCF H x y x y+ = + − ⋅
Certainty AccumulationCertainty Accumulation
• Accumulation of CFs with different signs
1 1( )RCF H x=
2 1( )RCF H y=
x y+1 2 1( )
1 min( , )R Rx yCF H
x y+
+=
−
ExampleExample• R1: IF [period holding driver license = between two and three years] THEN• R1: IF [period_holding_driver_license = between_two_and_three_years] THEN
(0.5) [senior_driver = yes]• R2: IF [period_holding_driver_license = more_than_three_years] THEN (0.9)
[senior_driver = yes]• R3: IF [driving time between 2 and 3 hours] THEN (0 5) [tired yes]• R3: IF [driving_time = between_2_and_3_hours] THEN (0.5) [tired = yes]• R4: IF [driving_time = more_than_4_hours] THEN (1) [tired = yes]• R5: IF [senior_driver = yes] AND [traveling_alone = no] THEN (‐0.5)
[responsible_for_the_accident = yes]• R6: IF [tired = yes] THEN (0.5) [responsible_for_the_accident = yes]• R7: IF [alcohol = yes] AND [young = yes] THEN (0.7) [responsible_for_the_accident
= yes]
• Facts for driver John Doe:– period_holding_driver_license: 2 years– driving_time: 30 minutes– traveling alone: no– traveling_alone: no– alcohol: yes CF(alcohol = yes) = 0.5– 32 years old CF(young = yes) = 0.4
Example: Inference TreeExample: Inference Treeresponsible for the accident =p _ _ _
yes
R5 R6 R7-0.5 0.5 0.7
senior_driver =yes
traveling_alone = no tired = yes alcohol = yes young = yes
R R
yes no
R R
y y y g y
0 5 0 9 0 5 1 0R1 R2 R3 R40.5 0.9 0.5 1.0
period_holding_driver_license = between_2_and_3_years
period_holding_driver_license = more_than_3_years
driving_time = between_2_and_3_hours
driving_time = more_than_4_hours
ExampleExample
• The resulting CF is very close to 0:• The resulting CF is very close to 0:– MYCIN cannot determine whether or not John Doe is responsible for the accident (unknown)Doe is responsible for the accident (unknown)
• Let us make inference for the other driver involved in the accident: Jane Smithinvolved in the accident: Jane Smith
• Facts for driver Jane Smith:period holding driver license: 1 year– period_holding_driver_license: 1 year
– driving_time: 2 hourstraveling alone: yes– traveling_alone: yes
– alcohol: yes CF(alcohol = yes) = 0.520 years old CF(young = yes) = 0 5– 20 years old CF(young = yes) = 0.5