Seminar Features of the Expert-System-Shell SPIRIT Wilhelm Rödder, Elmar Reucher, Friedhelm Kulmann Overview Knowledge processing in SPIRIT Reliability of answers Graphs and hypergraphs Recall by a stimulus Conclusion and remarks CII 04 1 Knowledge processing in SPIRIT Step 1: Definition of a knowledge domain Specify variables Vl with respective values vl; Literal Vl= vl e.g.: MARITAL=single, STUDENT=true. Propositions formed by junctors ∧ (and), ∨ (or), − (not), Denoted by A,B,C ⇒ Propositional language L. Extension to conditional language L|L by binary conditional operator ⎪. e.g.: MARITAL=single | (STUDENT=true ∧ PARENT=true). B|A [x], A, B ∈ L, x ∈ [0;1]. CII 04 2 Excursus CII 04 14 Step 2: Knowledge acquisition Given set of rules R = {Bi|Ai [xi], i=1,…,I}. Adaption of uniform distribution P0 to R by solving P*=arg min R(Q, P0), s.t. Q ╞ R (1) R(Q, P0) relative entropy from P0 to Q. CII 04 3 Excursus CII 04 15 Step 3: Inference Focus E = {Dj|Cj [yj], j=1,…,J}. Adaption of P* to E by solving P**=arg min R(Q, P*), s.t. Q ╞ E. (2) Query: H|G Answer P**(H|G). CII 04 4 Excursus CII 04 16 Reliability of answers Given P*=arg min R(Q, P0), s.t. Q ╞ R (1) H|G = ? Lower bound u = min Q (H|G) s.t. Q ╞ R and Upper bound u = max Q (H|G) s.t. Q ╞ R. Second order uncertainty of H|G m = -ld u - (-ld u ) [bit]. CII 04 5 Excursus CII 04 17 Graphs and hypergraphs Example creditworthiness NB: No Bad earlier credits (t/f) SU: somebody offers SUrety (t/f) KN: client in KNown to the bank (t/f) ME: financial MEans available (t/f) IN: INcome sufficient (t/f) JO: JOb for more than 3 years (t/f) IA: Inquiry Agency (t/f) LO: LOan the money (t/f) GO: GOod credits (yes/no) U: RetUrn of investment. CII 04 6 Graphs and hypergraphs Markov net Given set of finite valued variables V = {V1,…,VL}. With respect to (V;P) if for any variable Vl, Vm: (Vl, Vm) ∉ E ⇔ (Vl⊥ Vm | V\{l,m};P). ⇒ Minimal independency graph CII 04 7 Graphs and hypergraphs Inference net Given set of finite valued variables V = {V1,…,VL}. Variables Vl and Vm are involved in a rule Bi|Ai Vl and Vm connected by an arrow, if a value vl involved in Ai and vm in Bi. Vl and Vm connected by an edge, if vl and vm appear in the conclusion Bi of the same rule. CII 04 8 Excursus CII 04 18 Graphs and hypergraphs Hypertree Given set of finite valued variables V = {V1,…,VL}. Denote Ei(Bi|Ai) ⊆ V set of variables involved in a rule Bi|Ai ⇒ Ei hyperedges of the hypergraph (V, ). E In general (V, ) not acyclic, E use “fill-in”-methods to construct (acyclic) hypertree For propagation: Hypertree ⇒ junctiontree (each node corresponds to an edge of the hypertree) CII 04 9 Excursus CII 04 19 Graphs and hypergraphs Application credit worthiness NB: No Bad earlier credits true KN: client in KNown to the bank true Amount of credits 10.000 € Credit’s lifespan: 4 years U = 723,06 € JO: JOb for more than 3 years (t/f) false SU: somebody offers SUrety (t/f) false ME: financial MEans available (t/f) true IN: INcome sufficient (t/f) true IA: Inquiry Agency (t/f) true LO: LOan the money (t/f) yes GO: GOod credits (yes/no) yes CII 04 10 Excursus CII 04 20 Recall by a stimulus Vl ∈ {V1,…,VL}, P* epistemic state. P** adaption of P* to a certain focus E = {F [1.]}. Impact measure: R((Vl; P**),(Vl; P*)) [bit]. CII 04 11 Excursus CII 04 21 Excursus CII 04 22 Conclusion and remarks Model no. variable s no. rules no. LEGs H(P 0) H(P*) utility yes/no decision yes/no BB 20 340 17 29.91 18.57 no no TS 76 574 50 76.00 12.83 no yes CR 18 38 13 22.68 6.00 no no BS 86 1051 36 104.79 87.12 no yes OD 6 18 3 8.17 4.08 yes yes CW 10 31 6 11.00 7.38 yes yes blue baby (BB) troubleshooter (TS) car repair (CR) business-to-business (BS) oil drilling problem (OD) credit worthiness support system (CW) CII 04 12 Knowledge processing in SPIRIT Reliability of answers Graphs and hypergraphs Recall by a stimulus Conclusion and remarks Step 1: Definition of a knowledge domain Specify variables Vl with respective values vl; Literal Vl= e.g.: MARITAL=single, STUDENT=true. Propositions formed by junctors ( (and), ( (or), ( (not), Denoted by A,B,C ( Propositional language L. Extension to conditional language L|L by binary conditional operator (. e.g.: MARITAL=single | (STUDENT=true ( PARENT=true). B|A [x], A, B ( L, x ( [0;1]. Step 2: Knowledge acquisition Given set of rules R = {Bi|Ai [xi], i=1,…,I}. Adaption of uniform distribution P0 to R by solving P*=arg min R(Q, P0), s.t. Q ╞ R (1) R(Q, P0) relative entropy from P0 to Q. Step 3: Inference Focus E = {Dj|Cj [yj], j=1,…,J}. Adaption of P* to E by solving P**=arg min R(Q, P*), s.t. Q ╞ E. (2) Query: H|G Answer P**(H|G). Given P*=arg min R(Q, P0), s.t. Q ╞ R (1) H|G = ? Lower bound = min Q (H|G) s.t. Q ╞ R and Upper bound = max Q (H|G) s.t. Q ╞ R. Second order uncertainty of H|G m = -ld - (-ld ) [bit]. Example creditworthiness NB: No Bad earlier credits (t/f) SU: somebody offers SUret KN: client in KNown to the bank (t/f) ME: financial MEans av IN: INcome sufficient (t/f) JO: JOb for more than 3 years IA: Inquiry Agency (t/f) LO: LOan the money (t/f) GO: GOod credits (yes/no) U: RetUrn of investment. Markov net Given set of finite valued variables V = {V1,…,VL}. With respect to (V;P) if for any variable Vl, Vm: (Vl, Vm) ( E ( (Vl( Vm | V\{l,m};P). ( Minimal independency graph Inference net Given set of finite valued variables V = {V1,…,VL}. Variables Vl and Vm are involved in a rule Bi|Ai Vl and Vm connected by an arrow, if a value vl involved in Vl and Vm connected by an edge, if vl and vm appear in the Hypertree Given set of finite valued variables V = {V1,…,VL}. Denote Ei(Bi|Ai) ( V set of variables involved in a rule Bi|Ai ( Ei hyperedges of the hypergraph (V, ). In general (V, ) not acyclic, use “fill-in”-methods to construct (acyclic) hypertree For propagation: Hypertree ( junctiontree (each node corresponds to an edge of the hypertree) Application credit worthiness NB: No Bad earlier credits true KN: client in KNown to the bank true JO: JOb for more than 3 years (t/f) false SU: somebody offers SUrety (t/f) false ME: financial MEans available (t/f) true IN: INcome sufficient (t/f) true IA: Inquiry Agency (t/f) true LO: LOan the money (t/f) yes GO: GOod credits (yes/no) yes Vl \( {V1,…,VL}, P* epistemic state. P** adaption of P* to a certain focus E = {F [1.]}. Impact measure: R((Vl; P**),(Vl; P*)) [bit]. blue baby (BB) troubleshooter (TS) car repair (CR) business-to-business (BS) oil drilling problem (OD) credit worthiness support system (