# + 1

Document Sample

					                   AND/OR Search for
• Mixed Networks
• #CSP

Robert Mateescu

ICS280 Spring 2004 - Current Topics in Graphical Models   Professor Rina Dechter
Mixed Networks

Belief Networks                                        Constraint Networks

A                                                        A
F                                                    F
B             C                                         B             C

E       D                                               E       D

Variables : A, B, C , D, E , F                     Variables : A, B, C , D, E , F
Domains : DA  DB  DC  DD  DE  DF  {0,1}      Domains : DA  DB  DC  DD  DE  DF  {0,1}
CPTS : P( A), P( B | A), P(C | A), P( D | B, C )   Relations : R( ABC), R( AFC), P( BCD), R( A, E )
P( E | A, B), P( F | A)
Mixed Networks
A                                                                                  A
F                                                                              F
B       C                                                                      B            C

E   D                                    A                                     E       D
F
B                C

        
PB x | x   
PB x   
, if x  
  
PΜ x                       
PB x        
E       D                   0, otherwise


Variables : A, B, C , D, E , F
Domains : DA  DB  DC  DD  DE  DF  {0,1}
CPTs : P ( A), P ( B | A), P (C | A), P ( D | B, C )
P ( E | A, B ), P ( F | A)
Relations : R ( ABC), R ( AFC), P ( BCD), R ( A, E )
– Belief updating: evaluating the posterior probability of each
singleton proposition given some evidence;
– Most probable explanation (MPE): finding a complete assignment
to all variables having maximum probability given the evidence;
– Maximum a posteriori hypothesis (MAP): finding the most likely
assignment to a subset of hypothesis variables given the evidence;

– Consistent: Decide if network is consistent
– Find solutions: Find one, some or all solutions

– Belief updating, MPE, MAP
– Constraint Probability Evaluation (CPE): Find the probability of
the constraint query
Auxiliary Network
Variables : A, B, C , D, E , F                             Variables : A, B, C , D, E , F
Domains : DA  DB  DC  DD  DE  DF  {0,1}              Domains : DA  DB  DC  DD  DE  DF  {0,1}
CPTS : P( A), P( B | A), P(C | A), P( D | B, C )           Relations : R( ABC), R( AFC), P( BCD), R( A, E )
P( E | A, B), P( F | A)

A                                                                                A
F                                                                             F
B            C                                                                      B        C
A
X
E       D                                                    F                      E    D
B        C
Q                           Y

E    D       Z

1, if t  R
P( X aux | t S )  
0, otherwise
Mixed Graph
• The mixed graph is the union of the belief network
graph and the constraint network graph

• The moral mixed graph is the union of the moral
graph of the belief network and the graph of the
constraint network

• Given a mixed graph GM = (GB,GR) of a mixed
network M(B,R) where GB is the directed graph of
B, and GR is the undirected constraint graph of R,
the ancestral graph of Y \in X in GM is the union of
GR and the ancestral graph of Y in GB
dm-separation
• Definition: Given a mixed graph, GM and given
three subsets of variables W, Y and Z which are
disjoint, we say that W and Y are dm-separated
given Z in the mixed graph GM, denoted <W,Z,Y>dm,
iff in the ancestral mixed graph of WUYUZ, all the
paths between W and Y are intercepted by variables
in Z.

• Theorem: Given a mixed network M = M(B,R) and its
mixed graph GM, then GM is a minimal I-map
relative to dm-separation
AND/OR Search for Mixed Networks

A                    A
F
B
B       C

E        C
E   D
D         F

Mixed network        DFS (legal) tree
AND/OR Search Space
A

B
OR                                                                                                                        A

E                       C
AND                                                       0                                                                                                                               1

D                       F
OR                                                        B                                                                                                                               B

AND                   0                                                               1                                                               0                                                               1

OR        E                           C                                   E                           C                                   E                           C                                   E                           C

AND   0       1       0                               1               0       1       0                               1               0       1       0                               1               0       1       0                               1

OR            D               F               D               F               D               F               D               F               D               F               D               F               D               F               D               F

AND       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1
Forward: Expanding an AND node
A

B
OR                                                                                                                        A

E                       C
AND                                                       0                                                                                                                               1

D                       F
OR                                                        B                                                                                                                               B

AND                   0                                                               1                                                               0                                                               1

OR        E                           C                                   E                           C                                   E                           C                                   E                           C

AND   0       1       0                               1               0       1       0                               1               0       1       0                               1               0       1       0                               1

OR            D               F               D               F               D               F               D               F               D               F               D               F               D               F               D               F

AND       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1

g-value(ANDnode) = ∏ Pi (or 1, if product is empty)
e.g. g-value(<B,1>) = P(B=1|A=0)
Forward: Expanding an OR node
A

B
OR                                                                                                                        A

E                       C
AND                                                       0                                                                                                                               1

D                       F
OR                                                        B                                                                                                                               B

AND                   0                                                               1                                                               0                                                               1

OR        E                           C                                   E                           C                                   E                           C                                   E                           C

AND   0       1       0                               1               0       1       0                               1               0       1       0                               1               0       1       0                               1

OR            D               F               D               F               D               F               D               F               D               F               D               F               D               F               D               F

AND       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1

g-value(ORnode) = 0
Backward: Propagating g-values
A

B
OR                                                                                                                        A

E                       C
AND                                                       0                                                                                                                               1

D                       F
OR                                                        B                                                                                                                               B

AND                   0                                                               1                                                               0                                                               1

OR        E                           C                                   E                           C                                   E                           C                                   E                           C

AND   0       1       0                               1               0       1       0                               1               0       1       0                               1               0       1       0                               1

OR            D               F               D               F               D               F               D               F               D               F               D               F               D               F               D               F

AND       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1       0       1

OR nodes perform summation
AND nodes perform product
The main idea

• Search algorithms can exploit a wide range of
constraint propagation techniques

• When generating AND nodes, consistency is
checked according to the desired level of
constraint propagation
AND/OR Search (1)
A
F

OR           A   g(A)=0   B       C

AND                       E   D

OR
A

AND
B

OR
E       C

AND
D       F

OR

AND
AND/OR Search (2)
A
F

OR                          A   g(A)=0                     B       C

AND   0   g(<A,0>)=P(A=0)                        1         E   D
g(<A,1>)=P(A=1)
OR
A

AND
B

OR
E       C

AND
D       F

OR

AND
AND/OR Search (3)
A
F

OR                          A   g(A)=0                     B       C

AND   0   g(<A,0>)=P(A=0)                        1         E   D
g(<A,1>)=P(A=1)
OR    B   g(B)=0
A

AND
B

OR
E       C

AND
D       F

OR

AND
AND/OR Search (4)
A
F

OR                                             A   g(A)=0                     B       C

AND                 0   g(<A,0>)=P(A=0)                             1         E   D
g(<A,1>)=P(A=1)
OR                  B   g(B)=0
A

AND   0   g(<B,0>)=P(B=0|A=0)    1   g(<B,1>)=P(B=1|A=0)
B

OR
E       C

AND
D       F

OR

AND
AND/OR Search (5)
A
F

OR                                                      A   g(A)=0                     B       C

AND                         0    g(<A,0>)=P(A=0)                             1         E   D
g(<A,1>)=P(A=1)
OR                          B    g(B)=0
A

AND          0   g(<B,0>)=P(B=0|A=0)      1   g(<B,1>)=P(B=1|A=0)
B

OR    E   g(E)=0    C   g(C)=0
E       C

AND
D       F

OR

AND
AND/OR Search (6)
A
F

OR                                                          A   g(A)=0                     B       C

AND                             0    g(<A,0>)=P(A=0)                             1         E   D
g(<A,1>)=P(A=1)
OR                              B    g(B)=0
A

AND              0   g(<B,0>)=P(B=0|A=0)      1   g(<B,1>)=P(B=1|A=0)
B

OR        E   g(E)=0    C   g(C)=0
E       C

AND   0
D       F
g(<E,0>)=P(E=0|A=0,B=0)
OR

AND
AND/OR Search (6)
A
F

OR                                                         A   g(A)=0                     B       C

AND                            0    g(<A,0>)=P(A=0)                             1         E   D
g(<A,1>)=P(A=1)
OR                             B    g(B)=0
A

AND             0   g(<B,0>)=P(B=0|A=0)      1   g(<B,1>)=P(B=1|A=0)
B

OR        E            C   g(C)=0
E       C
g(E)=P(E=0|A=0,B=0)
AND   0
D       F

OR

AND
AND/OR Search (8)
A
F

OR                                                  A   g(A)=0                     B       C

AND                        0   g(<A,0>)=P(A=0)                           1         E   D
g(<A,1>)=P(A=1)
OR                         B   g(B)=0
A

AND           0                         1 g(<B,1>)=P(B=1|A=0)
B
g(<B,0>)= P(B=0|A=0) * P(E=0|A=0,B=0)
OR        E       C   g(C)=0
E       C

AND   0
D       F

OR

AND
Constraint propagation

A                                  A

B          C                        B       C

>
D        E     F                    D       E   F

>
>
G       H    I     K                G       H   I   K

All domains are {1,2,3,4}
Constraint checking only

A

B           C
OR                                                                                    A

>
AND                                                       1                                       2               3   4
D       E       F

>
>
OR                                        B                               C               B               C       B   B   G       H   I       K

2                   3       4           2           3   4   3       4       3       4   4
AND

OR                D               E           D   D       E       F           F   F   D       D       F       F   D

AND
3           4       3       4       4               3       4       4       4               4

OR    G       H       G       I       I       G               K       K   K           G               K

AND   4       4               4                               4
Forward checking

A

B           C
OR                                                                                    A

>
AND                                                       1                                       2               3   4
D       E       F

>
>
OR                                        B                               C               B               C       B   B   G       H   I       K

2                   3       4           2           3   4   3       4       3       4   4
AND

OR                D               E           D   D       E       F           F   F   D       D       F       F   D

AND
3           4       3       4       4               3       4       4       4               4

OR    G       H       G       I       I       G               K       K   K           G               K

AND   4       4               4                               4
Maintaining arc-consistency

A

B           C
OR                                                                                    A

>
AND                                                       1                                       2               3   4
D       E       F

>
>
OR                                        B                               C               B               C       B   B   G       H   I       K

2                   3       4           2           3   4   3       4       3       4   4
AND

OR                D               E           D   D       E       F           F   F   D       D       F       F   D

AND
3           4       3       4       4               3       4       4       4               4

OR    G       H       G       I       I       G               K       K   K           G               K

AND   4       4               4                               4
AND/OR vs. OR Space
Linear space algorithms
Linear space algorithms
AND/OR search vs. Bucket Elimination
#CSP

• #CSP – Counting the solutions of a CSP problem
is very similar to the CPE task in mixed networks

• If the belief part in a mixed network is empty, we
can translate the AND/OR search for mixed
networks to an AND/OR search for CSPs.

• OR nodes are initialized with g-value 0
• AND nodes are initialized with g-value 1
Parent set and parent separator set

Parent set   Parent
A
separator set
A
B
B           A           AB
C          AB           ABC         E       C

D          BC            D
D       F
E          AB            E
F          AC             F
Caching in AND/OR search

• If space is available, parts of the search tree can be
cached, transforming the search space into a
search graph

• In principle, we can cache at OR level and/or at
AND level

• Caching at AND level => use parent separator set
• Caching at OR level => use parent set

size(parent separator set) ≤ size(parent set) + 1
ORcache, N20, K3, Nc20 ,Pc4, inst20
Time
10%       20%       30%       40%       50%       60%        70%

AUXILIARY BE   0.10110   0.10155   0.10115   0.10025   0.10000   0.08970    0.08805

i=0   AND/OR FC      0.00650   0.01250   0.02450   0.06555   0.22940   1.09355    5.81740
AND/OR RFC     0.00350   0.01005   0.02555   0.07660   0.27490   1.33295    6.94850
OR FC          0.00505   0.01200   0.02755   0.08670   0.52620   5.49720   65.68775
OR RFC         0.00400   0.01255   0.02800   0.09870   0.56040   5.72635   67.94275

i=3   AND/OR FC      0.00550   0.01210   0.02555   0.06410   0.22925   1.09505    5.79485
AND/OR RFC     0.00300   0.01305   0.02550   0.07810   0.27850   1.33705    6.90190
OR FC          0.00555   0.01250   0.02750   0.08765   0.52405   5.48500   65.83190
OR RFC         0.00400   0.01000   0.02810   0.09820   0.56400   5.72880   67.98520

i=6   AND/OR FC      0.00500   0.01250   0.02405   0.06455   0.21370   0.91375    4.33875
AND/OR RFC     0.00500   0.01100   0.02750   0.07555   0.25930   1.09625    5.08375
OR FC          0.00450   0.01250   0.02960   0.08860   0.49920   4.66985   49.77530
OR RFC         0.00300   0.01050   0.03200   0.09805   0.53625   4.87520   51.24910

i=9   AND/OR FC      0.00455   0.01155   0.02500   0.06405   0.17240   0.48865    1.22135
AND/OR RFC     0.00450   0.00950   0.02600   0.07310   0.20530   0.58830    1.46265
OR FC          0.00550   0.01355   0.02950   0.08160   0.40010   2.98980   23.39555
OR RFC         0.00450   0.01150   0.03020   0.09415   0.43620   3.15515   24.25300
ORcache, N20, K3, Nc20 ,Pc4, inst20
# of nodes

10%   20%   30%    40%     50%      60%       70%

i=0    AND/OR FC    225   518   1192   3552   16003   106651    735153
AND/OR RFC   154   387   1052   3407   15737   106617    735153
OR FC        225   519   1203   3810   28079   414463   6533674
OR RFC       154   387   1062   3664   27801   414428   6533674

i=3    AND/OR FC    225   518   1192   3552   16003   106651    735153
AND/OR RFC   154   387   1052   3407   15737   106617    735153
OR FC        225   519   1203   3810   28079   414463   6533674
OR RFC       154   387   1062   3664   27801   414428   6533674

i=6    AND/OR FC    224   512   1162   3306   12765    70273    436554
AND/OR RFC   154   384   1028   3175   12562    70238    436554
OR FC        225   519   1203   3764   24700   294525   3931078
OR RFC       154   387   1062   3618   24422   294491   3931078

i=9    AND/OR FC    224   499   1093   2883    8873    28038     79946
AND/OR RFC   153   371    962   2761    8705    28003     79946
OR FC        225   518   1192   3604   18729   166912   1516976
OR RFC       154   387   1052   3461   18457   166877   1516976


DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 0 posted: 2/25/2013 language: English pages: 34
How are you planning on using Docstoc?