Efficiently Enumerating Minimal Triangulations Nofar Carmeli Batya - - PowerPoint PPT Presentation

efficiently enumerating minimal triangulations
SMART_READER_LITE
LIVE PREVIEW

Efficiently Enumerating Minimal Triangulations Nofar Carmeli Batya - - PowerPoint PPT Presentation

Efficiently Enumerating Minimal Triangulations Nofar Carmeli Batya Kenig Benny Kimelfeld Recent Trends in Knowledge Compilation 09/2017 1 Outline Short background TDs in probabilistic inference and knowledge compilation The


slide-1
SLIDE 1

Nofar Carmeli Batya Kenig Benny Kimelfeld

1

Efficiently Enumerating Minimal Triangulations

Recent Trends in Knowledge Compilation 09/2017

slide-2
SLIDE 2

Outline

  • Short background
  • TDs in probabilistic inference and knowledge compilation
  • The enumeration algorithm
  • Case study
  • An open problem

2

slide-3
SLIDE 3

Tree Decompositions

Every edge is contained in some bag Tree Every node

  • ccurs in a

connected subtree

Graph Tree decomposition

3

slide-4
SLIDE 4

Generate a tree decomposition

4

  • 1. Triangulate the graph
  • (, )

Every cycle of length > 3 has a chord Now ( + ) is chordal, and is called a triangulation of A triangulation is minimal if no edge can be removed while maintaining chordality

slide-5
SLIDE 5

Generate a tree decomposition

5

  • 2. Extract the maximal cliques = , … , in (, + )
  • (, )

, , , , , ,

  • A chordal graph has at most || maximal cliques [Fulkerson+1965]
  • Can be easily and efficiently found
  • 3. Connect the maximal cliques into a graph (, ℰ) where ,

∈ ℰ iff ∩ ≠ ∅ = 2 = 2 = 1

  • 4. Let (, ℰ′) be a maximum weight spanning tree of (, ℰ)

(, ℰ′) is a TD of (, )

  • The weight of each edge ,
  • ∈ ℰ is = | ∩

|

(, ℰ)

slide-6
SLIDE 6

Outline

  • Short background
  • TDs in probabilistic inference and knowledge compilation
  • The enumeration algorithm
  • Case study
  • An open problem

6

slide-7
SLIDE 7

Tree Decompositions in KC and Probabilistic Inference

  • Find a set of variables ! that decompose the problem into one
  • r more independent subproblems
  • For every possible assignment to the variables in !
  • Independently solve smaller subproblems
  • Merge results (product)
  • Aggregate results corresponding to different assignments (sum,

max)

7

Guided by a TD We want ! to be small

slide-8
SLIDE 8

Concrete Examples

  • C2D compiler [Darwiche’01, Darwiche ‘04, Chavira+Darwiche ’08,…]
  • Guided by a d-tree
  • Min-fill heuristic
  • Repeatedly apply hypergraph partitioning (hmetis)
  • Choose one with smallest width
  • MiniC2D compiler [Oztok+Darwiche ‘15]
  • Guided by a Decision-Vtree
  • Min-fill heuristic
  • Repeatedly apply of Hypergraph partitioning (hmetis)
  • Choose one with smallest width
  • AND/OR search [Dechter ‘13, Marinescu+ ‘14, Otten+ ’14, Lam+ ’16,…]
  • Guided by a Pseudo-Tree
  • Various heuristics: MCS, Min-Degree, Min-Fill,3

8

A form of tree-decomposition

slide-9
SLIDE 9

Which TD to use ??

9

width time

BN: 100 vars Choosing the right TD can have a profound impact

  • n running time.

What makes these so much better for the problem?

slide-10
SLIDE 10

Which TD to use ??

  • Improving the Efficiency of Dynamic Programing on Tree

Decompositions via Machine Learning [Abseher+ IJCAI ‘15]

  • Even TDs of the same width may yield extremely diverging runtimes
  • Other parameters influence the runtime at least to the same extent as width
  • Main idea: generate a pool of TDs and then choose the one with the “greatest

promise”

  • Authors generate 10 TDs for every problem instance using min-fill
  • Apply ML algorithms for ranking the TDs according to their expected performance

10

Required: Large amounts of diverse TDs in

  • rder to extract important features
slide-11
SLIDE 11

Which TDs not to use?

Graph Better tree decomposition

11

Tree decomposition Better tree decomposition

Avoid:

  • 1. Redundant bags
  • 2. Redundant edges

(bag equivalent) Proper

tree decompositions Minimal triangulations

slide-12
SLIDE 12

Outline

  • Short background
  • TDs in probabilistic inference and knowledge compilation
  • The enumeration algorithm
  • Case study
  • An open problem

12

slide-13
SLIDE 13

Goal

Problem: Enumerating all minimal triangulations of a graph

  • 1. Complexity guarantees
  • 2. Effective practical solution

13

Exponentially many minimal triangulations, what is an “efficient” algorithm?

slide-14
SLIDE 14

Efficiency of enumeration algorithms

[Johnson,Papadimitriou,Yannakakis 88]

14

incremental polynomial time

Delay before answer i is polynomial in input + i start time start time

polynomial delay

Delay between successive answers is poly(input)

slide-15
SLIDE 15

The main theoretical result Main Theorem:

Given a graph, it is possible to enumerate in incremental polynomial time:

  • The minimal triangulations
  • The proper TDs

15

slide-16
SLIDE 16

Goal: Enumerate Minimal Triangulations

  • A bijection [Parra&Scheffler97]:

minimal triangulations ↔ maximal sets of saturated non-crossing minimal vertex separators

16

slide-17
SLIDE 17

Goal: Enumerate Maximal Independent Sets

17

Problem: The graph may be of exponential size! Challenge: Solve without generating the graph

Enumerating max independent sets can be done in polynomial delay [Johnson+88]

… …

slide-18
SLIDE 18

The Enumeration Algorithm

  • Separator graph !, ℇ of (, ) may be of exponential size but3
  • We can efficiently enumerate the minimal separator set !
  • Polynomial-delay iterator [Berry+99]
  • We can efficiently test whether a pair #, $ ∈ ℇ
  • Size of each maximal independent set % ⊆ ! of is less than ||
  • A triangulation of has at most − 1 minimal vertex separators [Fulkerson+1965]
  • We can efficiently (P-time) extend any independent set to one that is

maximal

  • Extension Triangulation
  • We can apply any known triangulation algorithm for extension
  • MCS-M [Berry+02]
  • LB_TRIANG [Berry+06]

18

slide-19
SLIDE 19

Shifting a Min-Triangulation with a Min-Separator

19

s

  • 1. Add s to T
  • 2. Extract max. subset of non-crossing min-separators containing s
  • 3. Extend to a minimal triangulation

s-shifting T: s s

s-shift of T

Min-Fill MCS …

T

Maximal Independent set of non-crossing minimal separators Node

slide-20
SLIDE 20

The Enumeration Algorithm

20

  • 1. Generate a minimal triangulation T0
  • 2. Insert T0 into Q

P Q

Algorithm Min-Sep Iterator next()

(

Repeat until Q is empty:

  • 1. Move some T from Q to P
  • 2. Print T
  • 3. Insert into Q an s-shift of T for all

minimal separators s in (

  • 4. Repeat until Q is non-empty or !Iterator.hasNext()
  • 1. + ← Iterator. -./0()
  • 2. Insert into Q an s-shift of T for all minimal

triangulations T in P Validate that the s-extension is not already in Q or P

Output:

+-extension

slide-21
SLIDE 21

Experiments

21

Is the algorithm effective? Does it help improve standard measures?

slide-22
SLIDE 22

Experiments

22

  • C++ implementation
  • Triangulation algorithms: MCS-M [Berry+02]

LB-Triang [Berry+06] with min fill heuristics

  • Datasets:
  • Database queries, TPC-H (LogicBlox translation)

2-19 nodes, 1-46 edges

  • Probabilistic graphical models, UAI inference challenge

60-1039 nodes, 135-1696 edges

  • Random

30-200 nodes, 131-13955 edges

slide-23
SLIDE 23

Experiments

23

  • A single run (UAI, 414 nodes, 801 edges, MCS-M, 30 minutes)

1000 2000 3000 4000 5000 6000 7000 5 10 15 20 25 30 35 40 45 50 5 10 15 20 25 30

fill width time (minutes)

500 1000 1500 2000 2500 3000 3500 4000 4500 5 10 15 20 25 30

number of results time (minutes)

46 39 6232 3934 all results Min width results ≤ results

slide-24
SLIDE 24

Outline

  • Short background
  • TDs in probabilistic inference and knowledge compilation
  • The enumeration algorithm
  • Case study
  • An open problem

24

slide-25
SLIDE 25

Case Study

25

On the Impact of Pseudo-Trees on the Performance of Optimization Algorithms over AND/OR Search Spaces

Héctor Otero Mediero Rina Dechter

slide-26
SLIDE 26

AND/OR Search Tree [Dechter and Mateescu 2007, Dechter 20133]

OR AND OR AND OR OR AND AND

26 A B B

1 1 1

F

1

G

1

G

1

F

1

G

1

G

1

C

1

E

0 1

D

0 1

E

0 1

D

0 1

C

1

E

0 1

D

0 1

E

0 1

D

0 1

C

1

E

0 1

D

0 1

E

0 1

D

0 1

C

1

E

0 1

D

0 1

E

0 1

D

0 1

F

1

G

1

G

1

F

1

G

1

G

1

A B C D E F G

Solution tree: corresponds to a complete configuration of all variables primal graph

A B C F G D E

pseudo tree

[Freuder and Quinn 1985] ℎ ≤ ∗ ⋅ log8

slide-27
SLIDE 27

Experiments

  • Use enumeration algorithm to generate pseudo trees of

varying width and height ℎ

  • Test the influence of , ℎ, and their ratio 1 ≤

9 : ≤ 8 on

execution times.

27

slide-28
SLIDE 28

Experiments

28

width width time time

BN: 100 vars, domain size: 2 Pedigree: 385 vars

slide-29
SLIDE 29

Experiments

29

width time time

Promedas: 1005 vars WCSP: 143 vars,

width time

slide-30
SLIDE 30

Outline

  • Short background
  • TDs in probabilistic inference and knowledge compilation
  • The enumeration algorithm
  • Case study
  • An open problem

30

slide-31
SLIDE 31

Polynomial Delay ??

  • We could enumerate minimal triangulations in p-delay if we could

answer the following decision problem efficiently

31

Given (, ) and two sets ;, < of vertex pairs X, Y ⊆ × Is there a minimal triangulation ℎ(, + ) such that: 1.; ⊆ 2.< ∩ = ∅

slide-32
SLIDE 32

The Decision Problem

32

Does there exist a minimal triangulation ℎ(, + ) of (, ) such that:

  • 1. ; ⊆
  • 2. < ∩ = ∅

Does there exist a chordal supergraph of , ℎ(, ℇ) such that: ∪ ; ⊆ ℇ ⊆ ( × ) ∖ < The chordal graph sandwich problem is NP-complete [Golumbick+1994]

slide-33
SLIDE 33

Future Work

  • Theoretical
  • Polynomial delay
  • Practical
  • Optimizing / parallelizing the algorithm
  • Heuristically ranked enumeration

33

slide-34
SLIDE 34

Thank you

34

slide-35
SLIDE 35

Tree Decompositions

  • Databases
  • Query evaluation [Yannakakis81],[Chekuri&Rajaraman97]
  • Bioinformatics
  • prediction of RNA secondary structure [Zhao+06]
  • Probabilistic graphical models
  • statistical inference [Lauritzen&Spiegelhalter88]
  • Constraint-satisfaction problems [Kolaitis&Vardi00]
  • Weighted model counting [Li+08]
  • ...

35

slide-36
SLIDE 36

Future Work

  • Theoretical
  • Polynomial delay
  • Ranked enumeration
  • Approximately ranked enumeration (w/ approx. guarantee)
  • Practical
  • Optimizing / parallelizing the algorithm
  • Heuristically ranked enumeration

36

slide-37
SLIDE 37

Generate a tree decomposition

37

  • 1. Triangulate the graph
  • (, )

Every cycle of length > 3 has a chord Now ( + ) is chordal, and is called a triangulation of A triangulation is minimal if no edge can be removed while maintaining chordality

slide-38
SLIDE 38

Generate a tree decomposition

38

  • 2. Extract the maximal cliques = , … , in (, + )
  • (, )

, , , , , ,

  • A chordal graph has at most || maximal cliques [Fulkerson+1965]
  • Can be easily and efficiently found
  • 3. Connect the maximal cliques into a graph (, ℰ) where ,

∈ ℰ iff ∩ ≠ ∅ = 2 = 2 = 1

  • 4. Let (, ℰ′) be a maximum weight spanning tree of (, ℰ)

(, ℰ′) is a TD of (, )

  • The weight of each edge ,
  • ∈ ℰ is = | ∩

|

(, ℰ)

slide-39
SLIDE 39
  • A graph can have many TDs
  • Common – minimize the cardinality of the largest bag (smallest width)
  • Smallest width is NP-hard [Arnborg+87]

Graph Tree decompositions

39

Which TD to use?

a) b)

slide-40
SLIDE 40

Which TD to use?

  • Common: Use heuristics
  • Width isn’t enough
  • Different applications – different requirements
  • Goals:
  • TDs with lower width
  • Many TDs with low width

Flexible Caching in Trie Joins [Kalinsky+16]

Query TD1 TD2

TD1 runs 100 times faster!

40

slide-41
SLIDE 41

TD enumeration is needed

  • Related work:
  • Query plans using generalized hypertree decompositions [Tu&Ré15]
  • Generate all, choose one
  • No complexity guarantees
  • Works for small graphs
  • Improving the efficiency of dynamic programing on tree

decompositions using machine learning [Abseher+15]

  • Generate a pool, choose using machine learning
  • Heuristically generated pool, may not contain the best
  • Can we enumerate the TDs with efficiency guarantees?

41

slide-42
SLIDE 42

Goal

Problem: Enumerating all TDs of a graph

  • 1. Complexity guarantees
  • 2. Effective practical solution

?

42

all

slide-43
SLIDE 43

Which TDs to Generate?

Graph Better tree decomposition

43

Tree decomposition Better tree decomposition

Avoid:

  • 1. Redundant bags
  • 2. Redundant edges

(bag equivalent) Proper

tree decompositions Minimal triangulations

slide-44
SLIDE 44

Goal: Enumerate Proper TDs

  • A bijection:

classes of bag equivalent proper TDs ↔ min triangulations

44

Every cycle of length>3 has a chord

slide-45
SLIDE 45

The Algorithm (Enumerating max independent sets)

45

  • Redesign of an algorithm for hereditary

graph properties [Cohen+08]

  • Assuming:
  • Efficiently enumerating nodes
  • Efficiently checking edges
  • Polynomial size of max independent sets
  • Efficiently extending an independent set
  • Steps of extending an independent set
  • We can use any triangulation or TD algorithm
  • First result = algorithm’s result
slide-46
SLIDE 46

Solution Summary

Enumerate proper TDs Enumerate min triangulations Enumerate max independent sets

46

Minimal Triangulation algorithms