Title: Consistent-based Diagnosis
1Consistent-based Diagnosis
2Main concepts in this paper
- (Minimal) Diagnosis
- Conflict Set
- Proposition 3.3
- Corollary 4.5
- How to calculate minimal hitting set (algorithm
revised!) - Not required default logic (section 6) and
section 7
3Scope of this paper
- Only uses nominal/right/OK model
- OK/right modes / right behaviour
- Faulty modes / faulty behaviour
- Only consider minimal diagnosis (the minimal set
of abnormal components) - Is logic foundation for using first order logic
for diagnosis - Its revise
- Its extension
4Model
Structural model Multiplier(Mult1),
Multiplier(Mult2), Multiplier(Mult3),
Adder(Add1), Adder(Add2) out(Mult1)
inp1(Add1) out(Mult2) inp2(Add1)
inp1(Add2) out(Mult3) inp2(Add2)
- Behavioral model of each type of component
- Adder(X) ? not AB(X) ? out(X) inp1(X)
inp2(X) - Multiplier(X) ?? not AB(X) ? out(X) inp1(X)
inp2(X) - ...
5Diagnosis on models of structure and function
....
design
textbook
first principles
actual
model
device
of the device
observed
predicted
model of the structure
behaviour
behaviour
of the device and of
the (nominal) behaviour
of each type of component
diagnosis
From Luca Console
6Symbols used for system
- SD System description, a set of first-order
sentences - COMPONENTS a finite set of constants
- System a pair (SD, COMPONENTS)
- AB(.) unary predicate, abnormal
- ? imply, other forms ? or ?, other direction
?, -
7Symbol used for observation
- OBS observations, a finite set of first-order
sentence, value assignments to some variables. - Observables the variables can be
observed/measured
8Consistent
- There is an interpretation that makes a set of
formulas true. - Example
- Consistent A?B, A?B
- Inconsistent A?B,A??B, ?A?B, ?A??B
- Connect formula sets with union operator
- Example A?B, A?B ? ?A?B
9Some explanations
- Consistency means AND of the formulas in the
sets - Consistency of SD?OBS?AB(.)?AB(.)
10Definition diagnosis
- A diagnosis for (SD, COMPONENTS, OBS) is a
minimal set ? ? COMPONENTS such that - SD?OBS?AB(c)c???AB(c)c?COMPONENTS- ?
- is consistent
- ? is the smallest set of components
- SD is the right modes
11Diagnosis
- is a diagnosis if all components are in right
modes, i.e. - SD?OBS?AB(c)c?COMPONENTS is consistent
- Before computing diagnosis
- Should have enough observables
- Is a NP-hard problem
12Proposition 3.3
- If ? is a diagnosis for (SD, COMPONENTS, OBS),
then for each ci??. - SD?OBS?AB(c)c?COMPONENTS- ?AB(ci)
- faulty components are logically determined by the
normal components
13Compute diagnoses
- Direct compute
- Compute conflict set (by using ATMS) then compute
diagnoses from conflict set
14Definition Conflict set
- A conflict set for (SD, COMPONENTS, OBS) is a set
c1, ,ck?COMPONENTS such that - SD?OBS?AB(c1), , AB(ck)
- is inconsistent
- A conflict set for (SD, COMPONENTS, OBS) is
minimal iff no proper subset of it a conflict set
for (SD, COMPONENTS, OBS)
15How to compute diagnosis
- Theorem4.4 ??COMPONENTS is a diagnosis for (SD,
COMPONENTS, OBS) iff ? is a minimal hitting set
for the collection of conflict sets for (SD,
COMPONENTS, OBS) - (A diagnosis is the minimal hitting set of
conflict sets) - Corollary4.5 ??COMPONENTS is a diagnosis for
(SD, COMPONENTS, OBS) iff ? is a minimal hitting
set for the collection of minimal conflict sets
for (SD, COMPONENTS, OBS)
16Minimal hitting set
- A hitting set for a collection of sets C is a set
H ? ?S?CS such that H?S? for each S?C. - A hitting set is minimal iff no proper subset of
it is a hitting set for C.
17Compute Minimal Hitting Set
- Hitting set tree (HS-tree) a smallest
edge-labeled and node-labeled tree for C a
collection of sets - The root is labeled by ? if C is empty, otherwise
the root is labeled by an arbitrary set of C - For each node n of T, let H(n) be the set of edge
labels on the path in T from the root node to n.
The label for n is any set ? ?C such that ? ?H(n)
, if such a set ? exists. Otherwise, the
label for n is ?, If n is labeled by the set ?,
then for each ?? ?, n has a successor, n?, joined
to n by an edge labeled by ?
18Example
Prediction A12, B12
Observation A10, B12
12
A10 generates two conflicts A1, M1, M2 A1,
M1, M3, A2
10
12
12
19HS Tree
M1,M2,A1
M1
A1
M2
M3,A2,M1,A1
?
?
M3
A1
A2
M1
?
?
?
?
20Constructing HS-Tree
- Keep the HS-tree as small as possible
- Calculate only minimal hitting set
- Minimize the number of calls to the underlying
theorem prover
21Algorithm outline
- Generate a HS-tree
- Return H(n)n is a node labeled ?
22Algorithm more detail
- Select a set from C as root node, label the root
node with this set - For each ?, generate an arc labeled by ?
- For a new node n
- Select the first member x?C, such that H(n)?x,
label n by x. If such x doesnt exist, label n by
? . - If n is labeled by x, x? ?, for each ? ?x,
generate an arc labeled by ?. If ?m,
H(m)H(n)??, the arc points to m (a graph)
23Optimization Strategies
- Reusing Nodes
- If ?m, H(m)H(n)??, the arc points to m (a
graph) - Closing
- If ?n, n labeled by ? and H(n)?H(n), then
close n. - Pruning (Subset problem)
- A old node n, labeled S A new node n, labeled
? - If ??S, relabel n with ?. Remove arcs ??S- ?
- Interchange S and ? in collection
24New Measurements
- A diagnosis can predict some behavior ?
- Example
- SD ?OBS ?AB(c)c?COMPONENTS-? ?
- Confirming measurements preserve diagnoses (which
predict ?) - Disconfirming measurements reject diagnoses
(which predict ?)
25Observation vs. Prediction
(12)
10
(12)
12
SD ?OBS ?M1out(Mult1)4, out(Mult2)6
26Summary of Reiters Paper
- The diagnosis is the minimal hitting set of
conflict sets - An algorithm for computing minimal hitting set
27Assignment 1
- Use the revised algorithm to compute minimal
hitting set - Language Java
- Inputs F is conflict sets (vector of vectors) in
a file - Outputs minimal hitting sets (vector of vectors)
- Option functions
- Display the tree on the screen (good for debug)
- The number of times visiting conflict sets
(efficiency) - Single fault diagnoses (only first level)
- Write result to a file
- NO more than required
28Please notice
- The input vectors in different sequences
- Reduce the access times to conflict sets F
- Option functions can add points
- Functions beyond basic functions and option
functions can NOT add points
29My test cases
- 3-multi-2-adder
- Add1, Mult1, Mult2,Add1, Mult1, Mult3, Add2
- Full adder
- X1,X2,X1,A2,O1
- Case A
- a,b,b,c,a,c,b,d,b
- Case B
- 2,4,5,1,2,3,1,3,5,2,4,6,2,4,1,6
30Oral Test
- Read paper
- Randall Davis, Diagnostic Reasoning Based on
Structure and Behavior, Artificial Intelligence
24 (1984), 347-410 - Half hour presentation, half hour qa
- Audit students are invited to present