outline - university of california, irvinedechter/talks/ijcai2016-tutorial-2.pdf · ijcai 2016...

79
IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search AND/OR search spaces Depth-first AND/OR branch and bound Best-first AND/OR search Advanced searches and tasks Exploiting parallelism Software

Upload: others

Post on 28-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search

– AND/OR search spaces

– Depth-first AND/OR branch and bound

– Best-first AND/OR search

– Advanced searches and tasks

● Exploiting parallelism● Software

Page 2: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search

– AND/OR search spaces

– Depth-first AND/OR branch and bound

– Best-first AND/OR search

– Advanced searches and tasks

● Exploiting parallelism● Software

Page 3: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Solution Techniques

Search: Conditioning

Complete

Incomplete

Simulated Annealing

Gradient Descent

Complete

Incomplete

Adaptive ConsistencyTree Clustering

Variable EliminationResolution

Local Consistency

Unit Resolution

Mini-bucket(i)

Stochastic Local SearchDFS search

Branch-and-Bound

A*

Inference: Elimination

Time: exp(treewidth)Space:exp(treewidth)

Time: exp(n)Space: linear

AND/OR searchTime: exp(treewidth*log n)

Space: linear

Hybrids

Space: exp(treewidth)Time: exp(treewidth)

Time: exp(pathwidth)Space: exp(pathwidth)

Page 4: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Classic OR Search SpaceA

E

C

B

F

D

A B f10 0 20 1 01 0 11 1 4

A C f20 0 30 1 01 0 01 1 1

A E f30 0 00 1 31 0 21 1 0

A F f40 0 20 1 01 0 01 1 2

B C f50 0 00 1 11 0 21 1 4

B D f60 0 40 1 21 0 11 1 0

B E f70 0 30 1 21 0 11 1 0

C D f80 0 10 1 41 0 01 1 0

E F f90 0 10 1 01 0 01 1 2

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 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 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 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

C

D

F

E

B

A 0 1

Objective function:

Page 5: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

The AND/OR Search TreeA

E

C

B

F

D

OR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

A

D

B

EC

F

Pseudo tree[Freuder and Quinn, 1985]

[Dechter and Mateescu, 2007]

Page 6: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

The AND/OR Search TreeA

E

C

B

F

D

OR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

A

D

B

EC

F

Pseudo tree

A solution subtree is (A=0, B=1, C=0, D=0, E=1, F=1)

Page 7: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Weighted AND/OR Search Tree

A

E

C

B

F

D

A

D

B

EC

F

A B f10 0 20 1 01 0 11 1 4

A C f20 0 30 1 01 0 01 1 1

A E f30 0 00 1 31 0 21 1 0

A F f40 0 20 1 01 0 01 1 2

B C f50 0 00 1 11 0 21 1 4

B D f60 0 40 1 21 0 11 1 0

B E f70 0 30 1 21 0 11 1 0

C D f80 0 10 1 41 0 01 1 0

E F f90 0 10 1 01 0 01 1 2

A

0

B

0

E

F F

0 1 0 1

OR

AND

OR

AND

OR

OR

AND

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

5 6 4 2 3 0 2 2

5 2 0 2

5 2 0 2

3 3

6

5

5

5

3 1 3 5

2

2 4 1 0 3 0 2 2

2 0 0 2

2 0 0 2

4 1

5

5 4 1 3

0

1

w(A,0) = 0 w(A,1) = 0

Node Value(bottom-up evaluation)

OR – minimizationAND – summation

Objective function:

Page 8: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AND/OR versus OR SpacesOR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

54 nodes

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 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 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 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

C

D

F

E

B

A 0 1

126 nodes

A

E

C

B

F

D

A

D

B

EC

F

Page 9: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Complexity of AND/OR Tree Search

AND/OR tree OR tree

Space

Time

[Freuder & Quinn85], [Collin, Dechter & Katz91], [Bayardo & Miranker95], [Darwiche01]

d = domain sizet = depth of pseudo tree

n = number of variablesw* = induced width

Page 10: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

From Search Trees to Search Graphs

● Any two nodes that root identical sub-trees or sub-graphs can be merged

Page 11: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

From Search Trees to Search Graphs

● Any two nodes that root identical subtrees or subgraphs can be merged

Page 12: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Merging Based on Contexts

● One way of recognizing nodes that can be merged (based on the graph structure)– context(X) = ancestors of X in the pseudo tree that

are connected to X or to descendants of X

[ ]

[A]

[AB]

[AE][BC]

[AB]

A

D

B

EC

F

pseudo tree

A

E

C

B

F

D

A

E

C

B

F

D

Page 13: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AND/OR Search Graph

A

E

C

B

F

D

A

D

B

EC

F

A B fab0 0 20 1 01 0 11 1 4

A C fac0 0 30 1 01 0 01 1 1

A E fae0 0 00 1 31 0 21 1 0

A F faf0 0 20 1 01 0 01 1 2

B C fbc0 0 00 1 11 0 21 1 4

B D fbd0 0 40 1 21 0 11 1 0

B E fbe0 0 30 1 21 0 11 1 0

C D fcd0 0 10 1 41 0 01 1 0

E F fef0 0 10 1 01 0 01 1 2

AOR

0AND

BOR

0AND

OR E

OR

AND

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

0 1

1

E

0 1

C

0 1

B C Value0 00 11 01 1 Context minimal AND/OR search graph

Cache table for D

Objective function:

Page 14: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

How Big Is The Context?

● Theorem: The maximum context size for a pseudo tree is equal to the treewidth of the graph along the pseudo tree.

C

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

H

J

D

K M

L

N

OP

max context size = treewidth

Page 15: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Complexity of AND/OR Graph Search

AND/OR graph OR graph

Space

Time

d = domain sizew* = induced width

n = number of variablespw* = pathwidth

w* ≤ pw* ≤ w* log n

Page 16: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

All Four Search Spaces

Full OR search tree

126 nodes

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 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 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 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

C

D

F

E

B

A 0 1

Full AND/OR search tree

54 AND nodes

AOR

0AND

BOR

0AND

OR E

OR F F

AND 0 1 0 1

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

Context minimal OR search graph

28 nodes

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

C

D

F

E

B

A 0 1

Context minimal AND/OR search graph

18 AND nodes

AOR0ANDBOR

0AND

OR E

OR F F

AND0 1

AND 0 1

C

D D

0 1

0 1

1

EC

D D

0 1

1

B

0

E

F F

0 1

C

1

EC

A

E

C

B

F

D

A

D

B

EC

F

Page 17: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

All Four Search Spaces

Full OR search tree

126 nodes

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 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 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 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

C

D

F

E

B

A 0 1

Full AND/OR search tree

54 AND nodes

AOR

0AND

BOR

0AND

OR E

OR F F

AND 0 1 0 1

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

Context minimal OR search graph

28 nodes

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

C

D

F

E

B

A 0 1

Context minimal AND/OR search graph

18 AND nodes

AOR0ANDBOR

0AND

OR E

OR F F

AND0 1

AND 0 1

C

D D

0 1

0 1

1

EC

D D

0 1

1

B

0

E

F F

0 1

C

1

EC

A

E

C

B

F

D

A

D

B

EC

F

Page 18: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

All Four Search Spaces

Full OR search tree

126 nodes

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 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 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 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

C

D

F

E

B

A 0 1

Full AND/OR search tree

54 AND nodes

AOR

0AND

BOR

0AND

OR E

OR F F

AND 0 1 0 1

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

Context minimal OR search graph

28 nodes

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

C

D

F

E

B

A 0 1

Context minimal AND/OR search graph

18 AND nodes

AOR0ANDBOR

0AND

OR E

OR F F

AND0 1

AND 0 1

C

D D

0 1

0 1

1

EC

D D

0 1

1

B

0

E

F F

0 1

C

1

EC

A

E

C

B

F

D

A

D

B

EC

F

Any query is best computedover the c-minimal AO space

Page 19: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

All Four Search Spaces

Full OR search tree

126 nodes

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 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 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 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

C

D

F

E

B

A 0 1

Full AND/OR search tree

54 AND nodes

AOR

0AND

BOR

0AND

OR E

OR F F

AND 0 1 0 1

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

Context minimal OR search graph

28 nodes

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

C

D

F

E

B

A 0 1

Context minimal AND/OR search graph

18 AND nodes

AOR0ANDBOR

0AND

OR E

OR F F

AND0 1

AND 0 1

C

D D

0 1

0 1

1

EC

D D

0 1

1

B

0

E

F F

0 1

C

1

EC

A

E

C

B

F

D

A

D

B

EC

F

Any query is best computedover the c-minimal AO space

AND/OR graph OR graph

Space

Time

Page 20: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

All Four Search Spaces

Full OR search tree

126 nodes

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 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 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 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

C

D

F

E

B

A 0 1

Full AND/OR search tree

54 AND nodes

AOR

0AND

BOR

0AND

OR E

OR F F

AND 0 1 0 1

AND 0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

B

0

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

1

E

F F

0 1 0 1

0 1

C

D D

0 1 0 1

0 1

Context minimal OR search graph

28 nodes

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

C

D

F

E

B

A 0 1

Context minimal AND/OR search graph

18 AND nodes

AOR0ANDBOR

0AND

OR E

OR F F

AND0 1

AND 0 1

C

D D

0 1

0 1

1

EC

D D

0 1

1

B

0

E

F F

0 1

C

1

EC

A

E

C

B

F

D

A

D

B

EC

F

Any query is best computedover the c-minimal AO space

AND/OR graph OR graph

Space

Time

Computes any query:• Constraint satisfaction• Optimization• Weighted counting• Marginal MAP• Maximum expected utility

Page 21: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo Tree

B A

C

E

F G

HJ

D

K M

L

N

OP

Page 22: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

Page 23: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

C0

K0

H0

L0 1

N N0 1 0 1

F F F

1 1

0 1 0 1F

G0 1

1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

G0 1

G0 1

G0 1

M0 1

M0 1

M0 1

M0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

K0

H0

L0 1

N N0 1 0 1

1 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

C

0 1

D0 1

N0 1

D0 1

K0 1

K0 1

B0 1

B0 1

B0 1

B0 1

M0 1

M0 1

M0 1

M0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

F0 1

F0 1

F0 1

F0 1

G0 1

G0 1

G0 1

G0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

E1E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

O0 1

O0 1

O0 1

O0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

Page 24: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

What is a good pseudo-tree?

How to find a good one?

C0

K0

H0

L0 1

N N0 1 0 1

F F F

1 1

0 1 0 1F

G0 1

1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

G0 1

G0 1

G0 1

M0 1

M0 1

M0 1

M0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

K0

H0

L0 1

N N0 1 0 1

1 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

C

0 1

D0 1

N0 1

D0 1

K0 1

K0 1

B0 1

B0 1

B0 1

B0 1

M0 1

M0 1

M0 1

M0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

F0 1

F0 1

F0 1

F0 1

G0 1

G0 1

G0 1

G0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

E1E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

O0 1

O0 1

O0 1

O0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

Page 25: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

w=4, h=8

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

w=5, h=6

What is a good pseudo-tree?

How to find a good one?

C0

K0

H0

L0 1

N N0 1 0 1

F F F

1 1

0 1 0 1F

G0 1

1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

G0 1

G0 1

G0 1

M0 1

M0 1

M0 1

M0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

K0

H0

L0 1

N N0 1 0 1

1 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

C

0 1

D0 1

N0 1

D0 1

K0 1

K0 1

B0 1

B0 1

B0 1

B0 1

M0 1

M0 1

M0 1

M0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

F0 1

F0 1

F0 1

F0 1

G0 1

G0 1

G0 1

G0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

E1E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

O0 1

O0 1

O0 1

O0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

Page 26: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

w=4, h=8

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

w=5, h=6

What is a good pseudo-tree?

How to find a good one?

C0

K0

H0

L0 1

N N0 1 0 1

F F F

1 1

0 1 0 1F

G0 1

1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

G0 1

G0 1

G0 1

M0 1

M0 1

M0 1

M0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

K0

H0

L0 1

N N0 1 0 1

1 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

C

0 1

D0 1

N0 1

D0 1

K0 1

K0 1

B0 1

B0 1

B0 1

B0 1

M0 1

M0 1

M0 1

M0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

F0 1

F0 1

F0 1

F0 1

G0 1

G0 1

G0 1

G0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

E1E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

O0 1

O0 1

O0 1

O0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

HypergraphPartitioning(h-Metis)

Min-Fill (Kjaerulff90)

Page 27: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Impact of the Pseudo TreeC

HK

D

M

F

G

A

B

E

J

O

L

N

P

[AB]

[AF][CHAE]

[CEJ]

[CD]

[CHAB]

[CHA]

[CH]

[C]

[ ]

[CKO]

[CKLN]

[CKL]

[CK]

[C]

(C K H A B E J L N O D P M F G)

B A

C

E

F G

HJ

D

K M

L

N

OP

w=4, h=8

(C D K B A O M L N P J H E F G)

F [AB]

G [AF]

J [ABCD]

D [C]

M [CD]

E [ABCDJ]

B [CD]

A [BCD]

H [ABCJ]

C [ ]

P [CKO]

O [CK]

N [KLO]

L [CKO]

K [C]

w=5, h=6

What is a good pseudo tree?

How to find a good one?

C0

K0

H0

L0 1

N N0 1 0 1

F F F

1 1

0 1 0 1F

G0 1

1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

G0 1

G0 1

G0 1

M0 1

M0 1

M0 1

M0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

K0

H0

L0 1

N N0 1 0 1

1 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

A0 1

B B0 1 0 1

E EE E0 1 0 1

J JJ J0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

L0 1

N N0 1 0 1

P0 1

P0 1

O01

O01

O01

O01

D0 1

D0 1

D0 1

D0 1

C

0 1

D0 1

N0 1

D0 1

K0 1

K0 1

B0 1

B0 1

B0 1

B0 1

M0 1

M0 1

M0 1

M0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

A0 1

F0 1

F0 1

F0 1

F0 1

G0 1

G0 1

G0 1

G0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

J0 1

E1E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

E0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

H0 1

O0 1

O0 1

O0 1

O0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

L0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

P0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

N0 1

HypergraphPartitioning(h-Metis)

Min-Fill (Kjaerulff90)

• Optimization• Choose pseudo tree with a minimal search graph• But determinism is unpredictable• And pruning by BnB is even more unpredictable

Page 28: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search

– AND/OR search spaces

– Depth-first AND/OR branch and bound

– Best-first AND/OR search

– Advanced searches and tasks

● Exploiting parallelism● Software

Page 29: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Classic Depth-First Branch and Bound

n

g(n) : cost of the path from root to n

: under-estimates optimal cost below n

Prune if

(UB) Upper Bound = best solution so far

Each node is a COP sub-problem(defined by current conditioning)

(lower bound)

Page 30: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Partial Solution Tree

0

D

0

0

A

B C

0

0

A

B C

00

D

1

(A=0, B=0, C=0, D=1)

0

A

B C

01

D

0(A=0, B=1, C=0, D=0)

0

A

B C

01

D

1

(A=0, B=1, C=0, D=1)

A

B C

D

Pseudo tree

(A=0, B=0, C=0, D=0)

Extension(T’) – solution trees that extend T’

Page 31: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Exact Evaluation Function

OR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

D

E E

0 1 0 1

0 1

C

1

1

6 4 8 54 5

4 5

2 4

9

9

2 5 0 0

0 0

0

1

0

0

D

0

C

1

v(D,0)

3

3 5 0

0

9

tip nodes

F

1

3

3 5

0

F v(F)

A

B

C

D E

F

A

B

C D

E

F

f*(T’) = w(A,0) + w(B,1) + w(C,0) + w(D,0) + v(D,0) + v(F)

A B F f2(ABF)

0 0 0 30 0 1 50 1 0 10 1 1 41 0 0 61 0 1 51 1 0 61 1 1 5

B D E f3(BDE)

0 0 0 60 0 1 40 1 0 80 1 1 51 0 0 91 0 1 31 1 0 71 1 1 4

A B C f1(ABC)

0 0 0 20 0 1 50 1 0 30 1 1 51 0 0 91 0 1 31 1 0 71 1 1 2

Page 32: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Heuristic Evaluation Function

OR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

D

E E

0 1 0 1

0 1

C

1

1

6 4 8 54 5

4 5

2 4

9

9

2 5 0 0

0 0

0

1

0

0

D

0

C

1

h(D,0) = 4

3

3 5 0

0

9

tip nodes

F

1

3

3 5

0

F h(F) = 5

A

B

C

D E

F

A

B

C D

E

F

f(T’) = w(A,0) + w(B,1) + w(C,0) + w(D,0) + h(D,0) + h(F) = 12 ≤ f*(T')

A B F f2(ABF)

0 0 0 30 0 1 50 1 0 10 1 1 41 0 0 61 0 1 51 1 0 61 1 1 5

B D E f3(BDE)

0 0 0 60 0 1 40 1 0 80 1 1 51 0 0 91 0 1 31 1 0 71 1 1 4

A B C f1(ABC)

0 0 0 20 0 1 50 1 0 30 1 1 51 0 0 91 0 1 31 1 0 71 1 1 2

Page 33: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AND/OR Branch and Bound Search

OR

AND

OR

AND

OR

OR

AND

AND

A

0

B

0

D

E E

0 1 0 1

0 1

C

1

1

∞ 3 ∞ 4

3 4

3 4

∞ 4

5

5

5

∞ ∞ 1 ∞

0

5

0

0

111

0

0

D

E E

0 1 0 1

0 1

C

1

∞ 3 ∞ 4

3 4

3 4

2 3

∞ 2 0 2

0

B

0 111

11

0 0

UB (best solution found so far)

(prune)

Page 34: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AND/OR Branch and Bound (AOBB)

● Each node n: heuristic lower bound h(n) on v(n)● EXPAND (top-down)

– Evaluate f(T') and prune search if f(T') ≥ UB

– If not in cache, generate successors of the tip node n

● UPDATE (bottom-up)– Update value of the parent p of n

● OR nodes: minimization● AND nodes: summation

– Cache value of n based on context

[Marinescu and Dechter, 2006; 2009]

Page 35: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Breadth-Rotating AOBB● AND/OR decomposition vs. depth-first search:

– Compromises anytime property of AOBB

● Breadth-Rotating AOBB:– Combined breadth/depth-first schedule

– Maintains depth-first complexity

– Superior experimental results

[Otten and Dechter, 2012]

Page 36: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Mini-Bucket Heuristics for AND/OR Search

● The depth-first and best-first AND/OR search algorithms use h(n) that can be computed:– Static Mini-Bucket Heuristics

● Pre-compiled● Reduced computational overhead● Less accurate● Static variable ordering

– Dynamic Mini-Bucket Heuristics● Computed dynamically, during search● Higher computational overhead● High accuracy● Dynamic variable ordering

Page 37: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search

– AND/OR search spaces

– Depth-first AND/OR branch and bound

– Best-first AND/OR search

– Advanced searches and tasks

● Exploiting parallelism● Software

Page 38: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Basic Heuristic Search Schemes

Heuristic function computes a lower bound on the best extension of partial configuration and can be used to guide heuristic search. We focus on:

1. Branch-and-BoundUse heuristic function to prune the depth-first search treeLinear space - improve U from “above”

2. Best-First SearchAlways expand the node with the lowest heuristic valueNeeds lots of memory - improve L from “below”

Page 39: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AOBF: Best-First AND/OR Search

A

(revised)

[Marinescu and Dechter, 2006; 2009]

– Each node maintains a q-value – Node q-values revised bottom-up after each node expansion– Update current best partial solution subtree (a tip node expanded next)– All expanded nodes are stored in memory– Search terminates with optimal solution

B

C

(revised) (revised)

Page 40: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AOBF: Best-First AND/OR Search

● AO*-like traversal of the context minimal AND/OR graph– All nodes expanded are stored in memory

– Each node maintains a q-value: ● best lower bound on optimal cost below n

● Node q-values are revised bottom-up after each expansion– OR: minimization:

– AND: summation:● (initially, q(n) = h(n) – heuristic lower bound on cost below n)

● Current best partial solution tree updated using efficient arc-marking mechanism– OR nodes mark best AND successor, following cost revision

– Any of its tip nodes will be expanded at the next iteration

[Marinescu and Dechter, 2006; 2009]

Page 41: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Recursive Best-First Search1. Branch-and-Bound (AOBB)Use heuristic function to prune the depth-first search treeLinear space

2. Best-First Search (AOBF)Always expand the node with the lowest heuristic valueNeeds lots of memory

3. Recursive Best-First SearchExpand nodes best-first with the lowest heuristic valueLinear or Bounded memory

Page 42: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

RBFAOO: Recursive Best-First AND/OR Search

– Threshold of node is the second best cost to – Search sub-problem A (blow n) until revised exceeds threshold– Backtrack to node m and discard (or cache) nodes just expanded– Backup revised q(n) as new threshold for m and search sub-problem B – ...

A

B

C

[Kishimoto and Marinescu, 2014]

(revised)

(revised)

...

Page 43: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

RBFAOO: Recursive Best-First AND/OR Search

● AO*-like best-first search is transformed into depth-first search with a threshold– Backtrack whenever:

● Node q-values are updated in the usual manner– OR: minimization:

– AND: summation:

– (initially, q(n) = h(n) – heuristic lower bound on cost below n)

● Context-based caching is used for efficiency● Overestimation is used to avoid frequent node re-

expansions

[Kishimoto and Marinescu, 2014]

Page 44: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Empirical Evaluation

Exact MAP inference. Grid and Pedigree benchmarks. Time limit 1 hour.

Page 45: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Marginal MAP

A B

C

D

E

F G

H

A

B

C D

E FG

H

MAP variables

SUM variables

constrained pseudo tree

primal graph

A

10

B

10

DC

10 10

E

10

DC

10

E

10

10

B

10

DC

10 10

DC

10 10

E

10

E

10

E

10

E

10

E

10

E

10

G

10

F

10

H

10

H

10

G

10

F

10

G

10

F

10

G

10

F

10

H

10

H

10

● Node types– OR (MAP): max– OR (SUM): sum– AND: multiplication

● Arc weights– derived from input F

● Problem decomposition over MAP variables

(NPPP-complete)

Page 46: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

AND/OR Search for Marginal MAP

● New advances– AND/OR Branch and Bound

– Best-First and recursive best-first AND/OR Search

– Anytime depth-first and best-first search[Marinescu, Dechter, Ihler 2014,2015]; [Lee, Marinescu, Dechter, Ihler, 2016]

● Best-performing exact and anytime Marginal MAP solvers● Heuristics based on Weighted Mini-Buckets (WMB)

– WMB-MM: single pass with cost-shifting by moment matching– WMB-JG: iterative updates by message passing along the join-graph

Page 47: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Searching for M Best Solutions

● New inference and search based algorithms for the task of finding the m best solutions– Search: m-A*, m-BB

– Inference: elim-m-opt, BE+m-BF

● Extended m-A* and m-BB to AND/OR search spaces for graphical models– Algorithms: m-AOBB and m-AOBF

● Competitive and often superior to alternative (approximate) approaches based on LP relaxations [Fromer and Globerson, 2009], [Batra, 2012]

[Dechter, Flerova and Marinescu; 2012]

Page 48: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Searching for M Best SolutionsB

ette

r co

mp

lexi

ty

Exact algorithms!

Page 49: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Hybrid of Variable Elimination and Search

● Tradeoff space and time

Page 50: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Search Basic Step: ConditioningVariable Branching by Conditioning

C

ED

BA

Page 51: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Search Basic Step: ConditioningVariable Branching by Conditioning

C

ED

BSelect a variable A

Page 52: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Search Basic Step: ConditioningVariable Branching by Conditioning

C

ED

B

…...A = 0A = 1

A = k

…...C

ED

B

C

ED

B

C

ED

B

Select a variable A

Page 53: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Search Basic Step: ConditioningVariable Branching by Conditioning

C

ED

B

…...A = 0A = 1

A = k

…...C

ED

B

C

ED

B

C

ED

B

Select a variable General principle:

Condition until tractable

Solve each sub-problemefficiently

A

Page 54: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

The Cycle-Cutset Scheme

Space: exp(i), Time: O(exp(i+c(i))

• Cycle-cutset• i-cutset• C(i)-size of i-cutset

Condition until Treeness

E

D

F

C

A

B Cutset part

Tree part

E

D

F C

A

B

E

D

F

C

A

B

A A C

C

Page 55: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Eliminate First

Page 56: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Eliminate First

Page 57: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Eliminate First

Solve the rest of the problemby any means

Page 58: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Hybrid Variants

● Condition, condition, condition, ... and then only eliminate (w-cutset, cycle-cutset)

● Eliminate, eliminate, eliminate, ... and then only search

● Interleave conditioning and elimination steps (elim-cond(i), VE+C)

Page 59: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

[Larrosa and Dechter, 2002]

Page 60: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

Page 61: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

Page 62: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

Page 63: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

Page 64: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

Page 65: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2015

Interleaving Conditioning and Elimination

...

...

Page 66: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search● Exploiting parallelism

– Distributed and parallel search

● Software

Page 67: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

New Advances● Parallel AOBB, first of its kind

– Runs on computational grid

– Extends parallel tree search paradigm

– Two variants with different parallelization logic

[Otten and Dechter, 2012]

● Parallel shared-memory RBFAOO

– Parallelization of the sequential RBFAOO

[Kishimoto, Marinescu, Botea, 2015]

● Parallel dovetailing for AOBB, RBFAOO, SPRBFAOO

– Towards large-scale MAP/MMAP inference

[Kishimoto, Marinescu, Botea, 2016]

Page 68: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Parallel AOBB Illustrated● Master process applies partial condi-

tioning to obtain parallel subproblems.

Master search space

8 independent sub-problem search spaces

Partial

Conditioning

Parallelization frontier

Page 69: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Fixed-depth Parallel AOBB● Algorithm receives cutoff depth d as input:

– Expand nodes centrally until depth d.

– At depth d, submit to grid job queue.

● Explored sub-problem search spaces potentially very unbalanced.

Page 70: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Variable-depth Parallel AOBB● Given sub-problem count p and estimator N :

– Iteratively deepen frontier until size p reached:● Pick sub-problem n with largest estimate N(n) and split.

– Submit sub-problems into job queue by descending complexity estimates.

● Hope to achieve better sub-problem balance.

Page 71: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Parallel Scaling Summary● Plot speedup against CPU count.

– Trade off load balancing vs. overhead:● #subproblems ≈ 10 × #CPUs

Page 72: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

SPRBFAOO: Parallel Shared-Memory RBFAOO

● All threads start from the root with the same search strategy and with one shared cache table

● The virtual q-value vq(n) for node n is used to control parallel search– Initially, vq(n) is set to q(n)

– When a thread examines n, vq(n) is incremented by a small value ζ

– When all threads finish examining n, vq(n) is set to q(n)

● An effective load balancing is obtained without any sophisticated schemes, while promising portions of the search space are examined

● The algorithm guarantees solution optimality

Page 73: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Empirical Evaluation

(up to 7-fold speedup with 12 threads)

Page 74: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Parallel Dovetailing

● Simple distributed scheme

– Launch in parallel m instances of the inference algorithm (AOBB, AOBF, RBFAOO, SPRBFAOO) each one solving the same problem instance but with a different input parameter configuration

● e.g., parameter configuration = pseudo tree (ordering)

12 cores 12 nodes x 12 cores = 144 cores

Page 75: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Outline

● Introduction● Inference● Bounds and heuristics● AND/OR search● Exploiting parallelism● Software

– UAI probabilistic inference competitions

Page 76: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Software

● aolib – http://graphmod.ics.uci.edu/group/Software

(standalone AOBB, AOBF solvers)

● daoopt– https://github.com/lotten/daoopt

(distributed and standalone AOBB solver)

● merlin– https://developer.ibm.com/open/merlin

(standalone WMB, AOBB, AOBF, RBFAOO solvers)

open source, BSD license

Page 77: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

UAI Probabilistic Inference Competitions

● 2006

● 2008

● 2011

● 2014

MPE/MAP MMAP

(aolib)

(aolib)

(daoopt)

(daoopt) (daoopt) (merlin)

Page 78: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Summary

● Only a few principles– Inference and search should be combined

● Time-space tradeoff

– AND/OR search should be used

– Caching in search should be used

– Parallel search should be used if distributed and/or shared-memory environments are available

Page 79: Outline - University of California, Irvinedechter/talks/ijcai2016-tutorial-2.pdf · IJCAI 2016 Outline Introduction Inference Bounds and heuristics AND/OR search – AND/OR search

IJCAI 2016

Thank YouKalev KaskIrina RishBozhena BidyukRobert MateescuRadu MarinescuVibhav GogateEmma RollonLars OttenNatalia Flerova

For publication see: http://www.ics.uci.edu/~dechter/publications.html