introduction to model- based diagnosis meir kalech partially based on the slides of peter struss

38
Introduction to Model-Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Post on 22-Dec-2015

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Introduction to Model-Based

Diagnosis

Meir Kalech

Partially based on the slides of Peter Struss

Page 2: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Outline Last lecture:

1. What is a diagnosis?

2. Expert systems

3. Model-based systems

4. Case Based Reasoning (CBR)

5. Inductive learning

6. Probabilistic reasoning

Today’s lecture:

1. Knowledge-based systems and diagnosis

2. Some definitions for model-based diagnosis

3. Reiter’s MBD algorithm using HS-trees

4. Causal form

Page 3: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Knowledge-based Systems

are not simply Systems based on knowledge

are not simply Systems based on knowledge

but Systems grounding their

solution on a knowledge base

but Systems grounding their

solution on a knowledge base

Problem solver

Knowledge base

Model-based systems are knowledge-based systems

Model-based systems are knowledge-based systems

Page 4: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Knowledge base: an explicit declarative formal representation of knoweldge about a certain

domain and/or class of tasks

Knowledge base: an explicit declarative formal representation of knoweldge about a certain

domain and/or class of tasks

Provlem solver: A usually task-specific, possibly domain-independent algorithm which can process

the represented knowledge

Provlem solver: A usually task-specific, possibly domain-independent algorithm which can process

the represented knowledge

Knowledge Base and Problem Solver

Problem solver

Knowledge base

Page 5: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

hydraulic unit

front left wheel

rear right wheel

brake pedal

For instance: diagnosis

Observations: “When braking with ABS,

car is yawing to the right, and brake pedal feels harder than normally”

“Yawing”: under-braking at left side over-braking at right side

Observations: “When braking with ABS,

car is yawing to the right, and brake pedal feels harder than normally”

“Yawing”: under-braking at left side over-braking at right side

under-braked

under-braked

over-braked

over-braked

harderharder

Page 6: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

hydraulic unit

front left wheel

rear right wheel

brake pedal

under-braked

under-braked

over-braked

over-braked

harderharderKnowledge about the

subject „How is it structured?” “How does it work?” Knowledge about

Structure Componenten behavior

Knowledge about the subject

„How is it structured?” “How does it work?” Knowledge about

Structure Componenten behavior

Diagnosis Algorithm From knowledge about the

subject and observations of the

system behavior infer diagnosis hypotheses

Diagnosis Algorithm From knowledge about the

subject and observations of the

system behavior infer diagnosis hypotheses

Diagnosis: „What“ and „How“

Page 7: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Diagnosis

OBS?Task: Determine, based on a set of observations: What`s going on in the system?

Page 8: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Model-based Diagnosis

Task: Determine system models that are consistent with the observations

OBS?

MODEL

Page 9: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Outline Last lecture:

1. What is a diagnosis?

2. Expert systems

3. Model-based systems

4. Case Based Reasoning (CBR)

5. Inductive learning

6. Probabilistic reasoning

Today’s lecture:

1. Knowledge-based systems and diagnosis

2. Some definitions for model-based diagnosis

3. Reiter’s MBD algorithm using HS-trees

Page 10: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Model-Based Diagnosis – Formal

Based on:

R. Reiter, A theory of diagnosis from first principles, Artificial Intelligence 32 (1) (1987) 57--95.

Page 11: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: System

A system is a pair (SD, COMP) where:

(1) SD (system description), is a set of

first-order sentences.

(2) COMP={C1,…,Cn}, the system

components, is a finite set of

constants.

Page 12: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: System

Page 13: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: System

Etc…

Etc…

Page 14: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: Observation

An observation of a system is a finite set of first-order sentences.

We shall write (SD, COMP, OBS) for system (SD, COMP) with observation OBS.

Example:

Page 15: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: Diagnosis Problem

Given SD, COMP and OBS, the observation conflicts with the system description assuming all its components behaving correctly. Formally:

SD {¬AB(Ci)|CiCOMP} OBS ⊢⊥

Page 16: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: System is faulty

10

1

1

0

1

1

0

0 1

Page 17: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: DiagnosisA diagnosis for (SD, COMP, OBS) is a

minimal set ∆∈ COMP such that:

SD {AB(Ci)|Ci∈ Δ} {¬AB(Ci)|Ci∈COMP- Δ} OBS ⊢⊥

Example:

∆1={X1}, ∆2={X2, O1}, ∆3={X2, A2}

Page 18: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: ∆1={X1}

10

1

1

0

1

1

0

0 1

0

0

Page 19: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: ∆2={X2, O1}

10

1

1

0

1

1

0

0 1

Page 20: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: ∆3={X2, A2}

10

1

1

0

1

1

0

0 1

0

Page 21: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: Conflict setA conflict set for (SD, COMP, OBS) is a set {c1…

ck} COMP such that:

SD OBS {¬AB(C1)…¬AB(Ck)} ⊢⊥

A conflict set is minimal iff no proper subset of it is a conflict set.

Page 22: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

The relation between conflict set and diagnosis

Δ COMP is a diagnosis for (SD, COMP, OBS) iff Δ is a minimal set such that COMP-Δ is not a conflict set for (SD,COMP, OBS).

In other words:

1. the components that are normal (¬AB(Ci)) could not be a conflict set

2. a conflict set must contain at least one component of the diagnosis.

Page 23: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Definition: Hitting setSuppose C is a collection of sets. A hitting set for

C is a set H S∈CS such that HS{ } for

each S∈C. A hitting set for C is minimal iff no proper subset of it is a hitting set for C.

Example:S1={1,2,3} S2={2,4,5} S3={4,6}

Minimal: H1={1,5,6}, H2={2,4}, H3={2,6}Not minimal: H4={2,4,6}

Page 24: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Δ COMP is a diagnosis for (SD,COMP, OBS) iff Δ is a minimal hitting set for the collection of minimal conflict sets for (SD, COMP, OBS).

Example:The full adder has two minimal conflict sets:

{X1, X2} and {X1, A2, O1} There are three diagnoses, given by these

minimal hitting sets: {X1}, {X2, A2}, {X2, O1}.

Theorem of diagnosis

Page 25: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: conflict set {X1, X2}

10

1

1

Page 26: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Example: conflict set {X1,A2,O1}

10

1

1

0

Page 27: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

How to compute

1.Conflict sets2.Diagnosis

Page 28: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Outline Last lecture:

1. What is a diagnosis?

2. Expert systems

3. Model-based systems

4. Case Based Reasoning (CBR)

5. Inductive learning

6. Probabilistic reasoning

Today’s lecture:

1. Knowledge-based systems and diagnosis

2. Some definitions for model-based diagnosis

3. Reiter’s MBD algorithm using HS-trees

Page 29: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Computing diagnosisAssume conflict sets: {2,4,5},{1,2,3},{1,3,5},{2,4,6},{2,4},{2,3,5},{1,6}. HS-tree:

Page 30: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 1. If node n is labelled by √ and node n’ is such

that H(n)H(n'), close n’.

Page 31: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 1n3={1,2}, n9={1,3,2}, H(n3)H(n9): close n9.

Page 32: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 1. If node n is labelled by √ and node n’ is such

that H(n)H(n') then close n’.

2. If node n has been generated and node n' is such that H(n')= H(n) then close n'.

Page 33: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 2n6={5,4}, n8={4,5}, H(n6)=H(n8): close n8.

Page 34: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 1. If node n is labelled by √ and node n’ is such

that H(n)H(n'), close n’.

2. If node n has been generated and node n' is such that H(n')= H(n) then close n'.

3. If nodes n and n' have been respectively

labelled by sets S and S' of F, and if S'S,

then for eachS-S' mark as redundant the

edge from node n labelled by .

Page 35: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Pruning 3n10={2,4}, n0={2,4,5}, n10 n0: mark 5 as

redundant since {2,4} is not hit by it.

Page 36: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Finally tree after pruning

Page 37: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Diagnosis: {H(n)|n is labelled by √}

Page 38: Introduction to Model- Based Diagnosis Meir Kalech Partially based on the slides of Peter Struss

Computing conflict sets

Using “resolution theorem prover”.See the next slides.

Homework:1. Analyse the complexity of the diagnosis

process.2. Read Reiter’s paper (bib 1), describe the

algorithm he proposes for calculating the diagnosis and the conflict sets together.