1 / 28

Explanation and Diagnoses Thomas Thomas & Jansen Orfan

Explanation and Diagnoses Thomas Thomas & Jansen Orfan. Previously. Deduction P → Q P Therefore Q. Induction Every P seen comes with a Q Qs sometimes occur without P. Maybe P → Q . And now. Abduction P → Q Q Posit: P? Example. If it rained, the grass is wet. The grass is wet.

Download Presentation

Explanation and Diagnoses Thomas Thomas & Jansen Orfan

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Explanation and Diagnoses Thomas Thomas & Jansen Orfan

  2. Previously... • Deduction • P → Q • P • Therefore Q. • Induction • Every P seen comes with a Q • Qs sometimes occur without P. • Maybe P → Q

  3. And now... • Abduction • P → Q • Q • Posit: P? • Example. • If it rained, the grass is wet. • The grass is wet. • I bet it rained.

  4. Diagnosis • Might have: • DiseaseA ^ someQualifiers → SymptomsA • The following is unlikely: • SymptomsA ^ someQualifiers → DiseaseA • We want an explanation for symtoms, we won't be able to know for certain a disease.

  5. Explanation So, what do we want in an explanation? • A is sufficient to account for B. • KB U {A} |= B or KB |= (A → B) • A is consistent with the KB • A is as simple and parsimonious as possible • A is in the the appropriate vocabulary • The abducibles

  6. Prime Implicates So how do we get an explanation out of a KB? • A clauce c is a prime implicate of a KB iff • KB |= c • For every proper subset c' of c, it is not the case that KB |= c' • We can use these implicates to form explanations for facts.

  7. Prime Implicates Continued KB: [(p ^ q ^ r > g), (~p ^ q > g), (~q ^ r > g)] • Convert to CNF... • [(~p v ~q v ~r v g), (p v ~q v g), (q v ~r v g)] • Resolve to get • (p v ~q v g), and (~r v g) • These are entailed by the KB but no subset of them are entailed. So they are among our prime implicants.

  8. Prime Implicants Continued. So if we want an explanation for g. • Find all the prime implicates containing g. • (p v ~q v g), (~r v g), (g v ~g) • Remove the atom g. • (p v ~q), (~r), (~g) • Negate the remaining clauses. • (~p ^ q), (r), (g)

  9. Unfortunately • Exponentially many prime implicants. • Worst case it's every possible combination of terms. • (a v b) (a v c) (a v d) (b v c) (b v d) (c v d) • Could all be prime implicants. • So we can't realistically precompute them without knowing what we're trying to explain.

  10. Drinks Example 1 • KB • Vodka_Tonic → Vodka ^ Tonic • Black_Russian → Vodka ^ Coffee_Liqueur • White_Russian → Vodka ^ Coffee_Liqueur ^ Cream • Whiskey_Sour → Whiskey ^ Lemon • Irish_Coffee → Whiskey ^ Coffee • Rum&Coke → Rum ^ Cola • I know I will be drinking a mixed drink tonight and my bar is currently stocked with Whiskey, Lemon, Coffee, and Rum. Given only these recopies, what might I be able to make?

  11. Drinks Example 1 • β= Whiskey V Lime V Lemon V Coffee • I will be drinking something • Start by finding the relevant prime implicants • ~Irish_Coffee V (Whiskey ^ Coffee) • ~Whiskey_Sour V (Whiskey ^ Lemon) • ~Rum&Coke V (Rum ^ Cola) • {Whiskey V ~Whiskey}, {Rum V ~Rum} etc. • Remove anything that implies β • ~Irish_Coffee • ~Whiskey_Sour • ~Rum&Coke V Cola • {~Whiskey}, {~Rum}, etc

  12. Drinks Example 1 • Negate • Irish_Coffee • Whiskey_Sour • Rum&Coke ^ ~Cola • Contradiction! (Rum&Coke → Cola) • {Whiskey}, {Rum}, etc • Remove any explanation not conforming to the vocabulary H • Since I plan on drinking a mixed drink, H is all of the mixed drinks • Irish_Coffee • Whiskey_Sour

  13. Drinks Example 2 • KB • Vodka_Tonic → Vodka ^ Tonic • Black_Russian → Vodka ^ Coffee_Liqueur • White_Russian → Vodka ^ Coffee_Liqueur ^ Cream • Whiskey_Sour → Whiskey ^ Lemon • Irish_Coffee → Whiskey ^ Coffee • Rum&Coke → Rum ^ Cola • β= Vodka V Coffee_Liqueur V Cream V Coffee

  14. Drinks Example 2 • Start by finding the relevant prime implicants • Vodka_Tonic → Vodka ^ Tonic • Black_Russian → Vodka ^ Coffee_Liqueur • White_Russian → Vodka ^ Coffee_Liqueur ^ Cream • Irish_Coffee → Whiskey ^ Coffee • {Vodka V ~Vodka}, etc. • Remove anything that implies β • ~Irish_Coffee V Whiskey • ~Vodka_Tonic V Tonic • ~Black_Russian • ~White_Russian • ~Irish_Coffee V Whiskey • {~Vodka}, etc.

  15. Drinks Example 2 • Negate • Irish_Coffee ^ ~Whiskey • Vodka_Tonic ^ ~Tonic • Black_Russian • White_Russian • Irish_Coffee ^ ~Whiskey • {Vodka}, etc. • Remove any explanation not consistent with KB or conforming to the vocabulary H • Black_Russian • White_Russian

  16. Circuit Example

  17. Circuits in Logic • Components • AndGate(a1), XorGate(b1), OrGate(o1) • fullAdder(f) • Connectives • In1(b1) = in1(f), in1(b2) = out(b1) • Normal behavior • AndGate(x) ^ ~Abnormal(X) => out(x) == and(in1(x), in2(x))

  18. Fault Model Then we might have a model for abnormal behavior. • Short Circuit: • [OrGate(x) v XorGate(x)] ^ Abnormal(x) => • out(x) = in2(x)

  19. Abductive Diagnosis • So we're given. • The previous KB • Some input settings • in1(f) = 1, in2(f) = 0, in3(f) = 1 • Some output observations • out1(f) = 1, out2(f) = 0 • We want an A such that • KB U settings U {A} |= observations

  20. Consistency-Based Diagnosis • As before, we're given... • The KB, some input settings, and some output observations • This time we want a set of components D such that the following two sets are consistent. • {ab(c) | c is in D} U {~ab(c) | c is not in D} • What does this mean? • KB U settings U observations

  21. Differences • Abductive diagnosis requires a fault model • Only finds those errors that are in the fault model. • Consistency based can use a fault model, but doesn't require it. • Checks every fault model that is consistent with the given one. • Abductive diagnosis gives a much stronger claim. But how to calculate?

  22. Calculation

  23. Calculation Continued. • All gates behaving abnormally is always consistent with the output but not helpful. • Remember that we're interested in minimal sets. • By default, nothing is wrong. • So we would prefer just b2 being abnormal • As given, we only have a fault model for short circuits on 'or' and 'xor' gates. So we cannot entail anything about other faults or about other gates.

  24. Possible Extensions • Variables and Quantifiers • Could we return variables or predicates rather than atoms? • ie. All canaries rather than Tweety Bird. • Propabilities • Could simpler be a part that is more likely to fail than some other part? • Could X make Y likely?

  25. Extensions Continued • Negative Evidence • So far we've insisted that explanations entail the thing to be explained. • Could we accept an explanation that does not entail fever as long as it didn't entail ~fever. • IE bird(x) explains flies(x)

  26. Other Applications • Object Recognition • Model ^ camera → image. • Would like to recover model. • Hypothetical Reasoning • What would I have to be told to believe that B is true? • What would I learn if I were told that A is true?

  27. Exercise • Probem 3, pg 283. • Consider the binary circuit for logical AND. • Figure 13.3 on page 284.

  28. Exersise • Write sentences describing this circuit – its coomponents, connectivity, and normal behavior. • Write a sentence for a fauilt model saying that a faulty inverter has it's output the same as its input. • Assuming the fault model and that the output is 1 given inputs of 0 and 1, generate the three abductive explanations for this behavior. • Generate the three consistency based diagnoses for thie circuit under the same conditions. • Compare the abductive and consistency based diagnoses and explain informally why they are different.

More Related