Subgraph Isomorphism Meets Cutting Planes Jakob Nordstr om KTH - - PowerPoint PPT Presentation

subgraph isomorphism meets cutting planes
SMART_READER_LITE
LIVE PREVIEW

Subgraph Isomorphism Meets Cutting Planes Jakob Nordstr om KTH - - PowerPoint PPT Presentation

Subgraph Isomorphism Meets Cutting Planes Jakob Nordstr om KTH Royal Institute of Technology NordConsNet 2019 Simula Research Laboratory Oslo, Norway May 21, 2019 Joint work in progress with Jan Elffers, Stephan Gocht, Ciaran McCreesh, . .


slide-1
SLIDE 1

Subgraph Isomorphism Meets Cutting Planes

Jakob Nordstr¨

  • m

KTH Royal Institute of Technology

NordConsNet 2019 Simula Research Laboratory Oslo, Norway May 21, 2019

Joint work in progress with Jan Elffers, Stephan Gocht, Ciaran McCreesh, . . .

Jakob Nordstr¨

  • m (KTH )

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 1/19

slide-2
SLIDE 2

Subgraph Isomorphism Meets Cutting Planes

Jakob Nordstr¨

  • m

KTH Royal Institute of Technology University of Copenhagen

NordConsNet 2019 Simula Research Laboratory Oslo, Norway May 21, 2019

Joint work in progress with Jan Elffers, Stephan Gocht, Ciaran McCreesh, . . .

Jakob Nordstr¨

  • m (KTH )

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 1/19

slide-3
SLIDE 3

The Problem

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Task Find all subgraph isomorphisms ϕ : V (P) → V (T ) I.e., if

1

ϕ(a) = u

2

ϕ(b) = v

3

(a, b) ∈ E(P)

then must have (u, v) ∈ E(T )

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 2/19

slide-4
SLIDE 4

The Problem

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Task Find all subgraph isomorphisms ϕ : V (P) → V (T ) I.e., if

1

ϕ(a) = u

2

ϕ(b) = v

3

(a, b) ∈ E(P)

then must have (u, v) ∈ E(T )

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 2/19

slide-5
SLIDE 5

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-6
SLIDE 6

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-7
SLIDE 7

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-8
SLIDE 8

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-9
SLIDE 9

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-10
SLIDE 10

Subgraph Isomorphism Example

Pattern Target 2nd target No subgraph isomorphism Has subgraph isomorphism In fact, two of them

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 3/19

slide-11
SLIDE 11

The Challenge

Subgraph isomorphism important in biochemistry compiler construction computer vision plagiarism and malware detection et cetera. . . But computationally very challenging!

1 How to solve efficiently? 2 How do we know if answer is correct?

(In particular, that we found all subgraph isomorphisms)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 4/19

slide-12
SLIDE 12

The Challenge

Subgraph isomorphism important in biochemistry compiler construction computer vision plagiarism and malware detection et cetera. . . But computationally very challenging!

1 How to solve efficiently? 2 How do we know if answer is correct?

(In particular, that we found all subgraph isomorphisms)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 4/19

slide-13
SLIDE 13

The Challenge

Subgraph isomorphism important in biochemistry compiler construction computer vision plagiarism and malware detection et cetera. . . But computationally very challenging!

1 How to solve efficiently? 2 How do we know if answer is correct?

(In particular, that we found all subgraph isomorphisms)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 4/19

slide-14
SLIDE 14

The Challenge

Subgraph isomorphism important in biochemistry compiler construction computer vision plagiarism and malware detection et cetera. . . But computationally very challenging!

1 How to solve efficiently? 2 How do we know if answer is correct?

(In particular, that we found all subgraph isomorphisms)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 4/19

slide-15
SLIDE 15

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-16
SLIDE 16

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-17
SLIDE 17

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-18
SLIDE 18

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-19
SLIDE 19

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-20
SLIDE 20

This Work

Analyze Glasgow Subgraph Solver [ADH+19, McC19] Show algorithm can be formalized in cutting planes proof system Consequences:

1

Produce efficient proofs of correctness with low overhead (hopefully)

2

Learn pseudo-Boolean no-goods ⇒ exponential speed-up (maybe)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 5/19

slide-21
SLIDE 21

Solving Subgraph Isomorphism

Graph Notation and Terminology

Undirected graphs G with vertices V (G) and edges E(G) No loops in this talk (for simplicity) Neighbours NG(v) = {u | (u, v) ∈ E(G)} Degree degG(v) =

  • NG(v)
  • Degree sequence degseqG(v) = sort>({degG(u) | u ∈ NG(v)})

deg(v) = 3 degseq(v) = (3, 3, 1)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 6/19

slide-22
SLIDE 22

Solving Subgraph Isomorphism

Graph Notation and Terminology

Undirected graphs G with vertices V (G) and edges E(G) No loops in this talk (for simplicity) Neighbours NG(v) = {u | (u, v) ∈ E(G)} Degree degG(v) =

  • NG(v)
  • Degree sequence degseqG(v) = sort>({degG(u) | u ∈ NG(v)})

v

deg(v) = 3 degseq(v) = (3, 3, 1)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 6/19

slide-23
SLIDE 23

Solving Subgraph Isomorphism

Graph Notation and Terminology

Undirected graphs G with vertices V (G) and edges E(G) No loops in this talk (for simplicity) Neighbours NG(v) = {u | (u, v) ∈ E(G)} Degree degG(v) =

  • NG(v)
  • Degree sequence degseqG(v) = sort>({degG(u) | u ∈ NG(v)})

v

deg(v) = 3 degseq(v) = (3, 3, 1)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 6/19

slide-24
SLIDE 24

Solving Subgraph Isomorphism

Graph Notation and Terminology

Undirected graphs G with vertices V (G) and edges E(G) No loops in this talk (for simplicity) Neighbours NG(v) = {u | (u, v) ∈ E(G)} Degree degG(v) =

  • NG(v)
  • Degree sequence degseqG(v) = sort>({degG(u) | u ∈ NG(v)})

v

deg(v) = 3 degseq(v) = (3, 3, 1)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 6/19

slide-25
SLIDE 25

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Degree and Degree Sequence

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Preprocessing

1 If

  • V (P)
  • >
  • V (T )
  • , then no solution

2 If degP(a) > degT (u), then a → u 3 If degseqP(a) degseqT (u) pointwise, then a → u Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 7/19

slide-26
SLIDE 26

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Degree and Degree Sequence

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Preprocessing

1 If

  • V (P)
  • >
  • V (T )
  • , then no solution

2 If degP(a) > degT (u), then a → u 3 If degseqP(a) degseqT (u) pointwise, then a → u Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 7/19

slide-27
SLIDE 27

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Degree and Degree Sequence

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Preprocessing

1 If

  • V (P)
  • >
  • V (T )
  • , then no solution

2 If degP(a) > degT (u), then a → u 3 If degseqP(a) degseqT (u) pointwise, then a → u Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 7/19

slide-28
SLIDE 28

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Degree and Degree Sequence

Input Pattern graph P with vertices V (P) = {a, b, c, . . .} Target graph T with vertices V (T ) = {u, v, w, . . .} Preprocessing

1 If

  • V (P)
  • >
  • V (T )
  • , then no solution

2 If degP(a) > degT (u), then a → u 3 If degseqP(a) degseqT (u) pointwise, then a → u Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 7/19

slide-29
SLIDE 29

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Shapes

Shapes Choose special shape graphs S with 2 special vertices s, t Shaped graph GS has

1

vertices V

  • GS

= V (G)

2

edges (u, v) ∈ E

  • GS

iff S subgraph of G with s → u and t → v

Further preprocessing If

1

a → u

2

b → v

3

(a, b) ∈ E

  • PS

then must have (u, v) ∈ E

T S

(Since S “local subgraph” of P, has to be “local subgraph” also of T ) So repeat degree & degree sequence preprocessing for shaped graphs Plus do some other stuff that we’re skipping in this talk

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 8/19

slide-30
SLIDE 30

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Shapes

Shapes Choose special shape graphs S with 2 special vertices s, t Shaped graph GS has

1

vertices V

  • GS

= V (G)

2

edges (u, v) ∈ E

  • GS

iff S subgraph of G with s → u and t → v

Further preprocessing If

1

a → u

2

b → v

3

(a, b) ∈ E

  • PS

then must have (u, v) ∈ E

T S

(Since S “local subgraph” of P, has to be “local subgraph” also of T ) So repeat degree & degree sequence preprocessing for shaped graphs Plus do some other stuff that we’re skipping in this talk

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 8/19

slide-31
SLIDE 31

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Shapes

Shapes Choose special shape graphs S with 2 special vertices s, t Shaped graph GS has

1

vertices V

  • GS

= V (G)

2

edges (u, v) ∈ E

  • GS

iff S subgraph of G with s → u and t → v

Further preprocessing If

1

a → u

2

b → v

3

(a, b) ∈ E

  • PS

then must have (u, v) ∈ E

T S

(Since S “local subgraph” of P, has to be “local subgraph” also of T ) So repeat degree & degree sequence preprocessing for shaped graphs Plus do some other stuff that we’re skipping in this talk

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 8/19

slide-32
SLIDE 32

Solving Subgraph Isomorphism Preprocessing

Preprocessing Using Shapes

Shapes Choose special shape graphs S with 2 special vertices s, t Shaped graph GS has

1

vertices V

  • GS

= V (G)

2

edges (u, v) ∈ E

  • GS

iff S subgraph of G with s → u and t → v

Further preprocessing If

1

a → u

2

b → v

3

(a, b) ∈ E

  • PS

then must have (u, v) ∈ E

T S

(Since S “local subgraph” of P, has to be “local subgraph” also of T ) So repeat degree & degree sequence preprocessing for shaped graphs Plus do some other stuff that we’re skipping in this talk

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 8/19

slide-33
SLIDE 33

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-34
SLIDE 34

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-35
SLIDE 35

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-36
SLIDE 36

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-37
SLIDE 37

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-38
SLIDE 38

Solving Subgraph Isomorphism Preprocessing

Example of Preprocessing Using Shapes

s t

Shape Pattern shaped Target shaped Now obvious that there can be no subgraph isomorphism!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 9/19

slide-39
SLIDE 39

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-40
SLIDE 40

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-41
SLIDE 41

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-42
SLIDE 42

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-43
SLIDE 43

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-44
SLIDE 44

Solving Subgraph Isomorphism Search

Main Search Loop (Very Rough Outline)

For every a ∈ V (P) maintain possible domain D(a) ⊆ V (T ) Pick a with smallest domain & iterate over a → u for u ∈ D(a) Repeat until saturation

1

Shrink domains of b ∈ NP(a) for assigned a to D(b) ∩ NT (u)

2

Propagate assignment for b ∈ V (P) with

  • D(b)
  • = 1

Run all-different propagation If ∃A with D(A) =

a∈A D(a) such that

1

|D(A)| < |A| ⇒ contradiction

2

|D(A)| = |A| ⇒ erase D(A) from other domains

Repeat from top of slide Backtrack at failure (or when solution found)

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 10/19

slide-45
SLIDE 45

Cutting Planes Syntax

Pseudo-Boolean Constraints

In this talk, “pseudo-Boolean” (PB) refers to 0-1 integer linear constraints Convenient to use non-negative linear combinations of literals, a.k.a. normalized form

  • i aiℓi ≥ A

coefficients ai: non-negative integers degree (of falsity) A: positive integer literals ℓi: xi or xi (where xi + xi = 1)

In what follows: all constraints assumed to be implicitly normalized “

i aiℓi ≤ A” is syntactic sugar for “ i aiℓi ≥ −A + i ai”

“=” is syntactic sugar for two inequalities “≥” and “≤”

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 11/19

slide-46
SLIDE 46

Cutting Planes Syntax

Pseudo-Boolean Constraints

In this talk, “pseudo-Boolean” (PB) refers to 0-1 integer linear constraints Convenient to use non-negative linear combinations of literals, a.k.a. normalized form

  • i aiℓi ≥ A

coefficients ai: non-negative integers degree (of falsity) A: positive integer literals ℓi: xi or xi (where xi + xi = 1)

In what follows: all constraints assumed to be implicitly normalized “

i aiℓi ≤ A” is syntactic sugar for “ i aiℓi ≥ −A + i ai”

“=” is syntactic sugar for two inequalities “≥” and “≤”

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 11/19

slide-47
SLIDE 47

Cutting Planes Syntax

Examples of Pseudo-Boolean Constraints

1 Clauses are pseudo-Boolean constraints

x ∨ y ∨ z ⇔ x + y + z ≥ 1

(So can view CNF formula as collection of pseudo-Boolean constraints)

2 Cardinality constraints

x1 + x2 + x3 + x4 + x5 + x6 ≥ 3

3 General constraints

x1 + 2x2 + 3x3 + 4x4 + 5x5 ≥ 7

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 12/19

slide-48
SLIDE 48

Cutting Planes Syntax

Examples of Pseudo-Boolean Constraints

1 Clauses are pseudo-Boolean constraints

x ∨ y ∨ z ⇔ x + y + z ≥ 1

(So can view CNF formula as collection of pseudo-Boolean constraints)

2 Cardinality constraints

x1 + x2 + x3 + x4 + x5 + x6 ≥ 3

3 General constraints

x1 + 2x2 + 3x3 + 4x4 + 5x5 ≥ 7

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 12/19

slide-49
SLIDE 49

Cutting Planes Syntax

Examples of Pseudo-Boolean Constraints

1 Clauses are pseudo-Boolean constraints

x ∨ y ∨ z ⇔ x + y + z ≥ 1

(So can view CNF formula as collection of pseudo-Boolean constraints)

2 Cardinality constraints

x1 + x2 + x3 + x4 + x5 + x6 ≥ 3

3 General constraints

x1 + 2x2 + 3x3 + 4x4 + 5x5 ≥ 7

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 12/19

slide-50
SLIDE 50

Cutting Planes The Proof System

Cutting Planes [CCT87]

Literal axioms ℓi ≥ 0 Linear combination

  • i aiℓi ≥ A
  • i biℓi ≥ B
  • i(cAai + cBbi)ℓi ≥ cAA + cBB

[cA, cB ≥ 0] Division

  • i aiℓi ≥ A
  • i⌈ai/c⌉ℓi ≥ ⌈A/c⌉

[c > 0]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 13/19

slide-51
SLIDE 51

Cutting Planes The Proof System

More About Cutting Planes

A toy example: 6x + 2y + 3z ≥ 5 x + 2y + w ≥ 1

Linear combination

(6x + 2y + 3z) + 2(x + 2y + w) ≥ 5 + 2 · 1 Literal axioms and linear combinations sound also over the reals Division is where the power of cutting planes lies Exponentially stronger than resolution/CDCL [Hak85, CCT87]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 14/19

slide-52
SLIDE 52

Cutting Planes The Proof System

More About Cutting Planes

A toy example: 6x + 2y + 3z ≥ 5 x + 2y + w ≥ 1

Linear combination

8x + 6y + 3z + 2w ≥ 7 Literal axioms and linear combinations sound also over the reals Division is where the power of cutting planes lies Exponentially stronger than resolution/CDCL [Hak85, CCT87]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 14/19

slide-53
SLIDE 53

Cutting Planes The Proof System

More About Cutting Planes

A toy example: 6x + 2y + 3z ≥ 5 x + 2y + w ≥ 1

Linear combination

8x + 6y + 3z + 2w ≥ 7

Division

3x + 2y + z + w ≥ 3 Literal axioms and linear combinations sound also over the reals Division is where the power of cutting planes lies Exponentially stronger than resolution/CDCL [Hak85, CCT87]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 14/19

slide-54
SLIDE 54

Cutting Planes The Proof System

More About Cutting Planes

A toy example: 6x + 2y + 3z ≥ 5 x + 2y + w ≥ 1

Linear combination

8x + 6y + 3z + 2w ≥ 7

Division

3x + 2y + z + w ≥ 3 Literal axioms and linear combinations sound also over the reals Division is where the power of cutting planes lies Exponentially stronger than resolution/CDCL [Hak85, CCT87]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 14/19

slide-55
SLIDE 55

Cutting Planes Encoding of Subgraph Isomorphism

Subgraph Isomorphism as a Pseudo-Boolean Formula

Recall: Pattern graph P with V (P) = {a, b, c, . . .} Target graph T with V (T ) = {u, v, w, . . .} No loops (for simplicity) Pseudo-Boolean encoding

  • v∈V (T )

xa→v = 1 [every a maps somewhere]

  • b∈V (P)

xb→u ≥

  • V (P)
  • − 1

[mapping is one-to-one] xa→u +

  • v∈N(u)

xb→v ≥ 1 [edge (a, b) maps to edge (u, v)]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 15/19

slide-56
SLIDE 56

Cutting Planes Encoding of Subgraph Isomorphism

Subgraph Isomorphism as a Pseudo-Boolean Formula

Recall: Pattern graph P with V (P) = {a, b, c, . . .} Target graph T with V (T ) = {u, v, w, . . .} No loops (for simplicity) Pseudo-Boolean encoding

  • v∈V (T )

xa→v = 1 [every a maps somewhere]

  • b∈V (P)

xb→u ≥

  • V (P)
  • − 1

[mapping is one-to-one] xa→u +

  • v∈N(u)

xb→v ≥ 1 [edge (a, b) maps to edge (u, v)]

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 15/19

slide-57
SLIDE 57

Our Work Proof logging

Key Finding

All reasoning steps in Glasgow Subgraph Solver can be formalized efficiently in the cutting planes proof system Means that

1 Solver can justify each step by writing local formal derivation 2 Local derivations can be concatenated to global proof of correctness 3 Proof checkable by stand-alone verifier

that knows nothing about graphs in time hopefully not much larger than solver execution

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 16/19

slide-58
SLIDE 58

Our Work Proof logging

Key Finding

All reasoning steps in Glasgow Subgraph Solver can be formalized efficiently in the cutting planes proof system Means that

1 Solver can justify each step by writing local formal derivation 2 Local derivations can be concatenated to global proof of correctness 3 Proof checkable by stand-alone verifier

that knows nothing about graphs in time hopefully not much larger than solver execution

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 16/19

slide-59
SLIDE 59

Our Work Proof logging

Key Finding

All reasoning steps in Glasgow Subgraph Solver can be formalized efficiently in the cutting planes proof system Means that

1 Solver can justify each step by writing local formal derivation 2 Local derivations can be concatenated to global proof of correctness 3 Proof checkable by stand-alone verifier

that knows nothing about graphs in time hopefully not much larger than solver execution

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 16/19

slide-60
SLIDE 60

Our Work Proof logging

Key Finding

All reasoning steps in Glasgow Subgraph Solver can be formalized efficiently in the cutting planes proof system Means that

1 Solver can justify each step by writing local formal derivation 2 Local derivations can be concatenated to global proof of correctness 3 Proof checkable by stand-alone verifier

that knows nothing about graphs in time comparable to the solver execution in time hopefully not much larger than solver execution

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 16/19

slide-61
SLIDE 61

Our Work Proof logging

Key Finding

All reasoning steps in Glasgow Subgraph Solver can be formalized efficiently in the cutting planes proof system Means that

1 Solver can justify each step by writing local formal derivation 2 Local derivations can be concatenated to global proof of correctness 3 Proof checkable by stand-alone verifier

that knows nothing about graphs in time comparable to the solver execution in time hopefully not much larger than solver execution

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 16/19

slide-62
SLIDE 62

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

Sum up all constraints & divide by 3 to obtain

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-63
SLIDE 63

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 Sum up all constraints & divide by 3 to obtain

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-64
SLIDE 64

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 Sum up all constraints & divide by 3 to obtain

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-65
SLIDE 65

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 xa→v ≥ 0 xa→w ≥ 0 xe→v ≥ 0 xe→w ≥ 0 Sum up all constraints & divide by 3 to obtain

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-66
SLIDE 66

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 xa→v ≥ 0 xa→w ≥ 0 xe→v ≥ 0 xe→w ≥ 0 Sum up all constraints & divide by 3 to obtain

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-67
SLIDE 67

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 xa→v ≥ 0 xa→w ≥ 0 xe→v ≥ 0 xe→w ≥ 0 Sum up all constraints & divide by 3 to obtain 3xa→u + 10 ≥ 11

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-68
SLIDE 68

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 xa→v ≥ 0 xa→w ≥ 0 xe→v ≥ 0 xe→w ≥ 0 Sum up all constraints & divide by 3 to obtain 3xa→u ≥ 1

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-69
SLIDE 69

Our Work Proof logging

Example: Degree Preprocessing with PB Reasoning

a b c d e u v w

xa→u + xb→v + xb→w ≥ 1 xa→u + xc→v + xc→w ≥ 1 xa→u + xd→v + xd→w ≥ 1 xa→v + xb→v + xc→v + xd→v + xe→v ≥ 4 xa→w + xb→w + xc→w + xd→w + xe→w ≥ 4 xa→v ≥ 0 xa→w ≥ 0 xe→v ≥ 0 xe→w ≥ 0 Sum up all constraints & divide by 3 to obtain 3xa→u ≥ 1 xa→u ≥ 1

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 17/19

slide-70
SLIDE 70

Our Work Speed-ups from Learning?

Better Subgraph Solvers by Learning No-Goods?

Subgraph isomorphism algorithm performs tree-like search Can we learn from failures and cut away larger parts of search space? Has been tried using CDCL solvers — doesn’t seem to work But CDCL only does resolution reasoning — very weak Pseudo-Boolean solvers Sat4j [LP10] and RoundingSat [EN18] can be exponentially stronger E.g., can do all-different propagation, which CDCL can’t Remains to be seen whether this will fly in practice for subgraph

  • isomorphism. . .

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 18/19

slide-71
SLIDE 71

Our Work Speed-ups from Learning?

Better Subgraph Solvers by Learning No-Goods?

Subgraph isomorphism algorithm performs tree-like search Can we learn from failures and cut away larger parts of search space? Has been tried using CDCL solvers — doesn’t seem to work But CDCL only does resolution reasoning — very weak Pseudo-Boolean solvers Sat4j [LP10] and RoundingSat [EN18] can be exponentially stronger E.g., can do all-different propagation, which CDCL can’t Remains to be seen whether this will fly in practice for subgraph

  • isomorphism. . .

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 18/19

slide-72
SLIDE 72

Our Work Speed-ups from Learning?

Better Subgraph Solvers by Learning No-Goods?

Subgraph isomorphism algorithm performs tree-like search Can we learn from failures and cut away larger parts of search space? Has been tried using CDCL solvers — doesn’t seem to work But CDCL only does resolution reasoning — very weak Pseudo-Boolean solvers Sat4j [LP10] and RoundingSat [EN18] can be exponentially stronger E.g., can do all-different propagation, which CDCL can’t Remains to be seen whether this will fly in practice for subgraph

  • isomorphism. . .

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 18/19

slide-73
SLIDE 73

Our Work Speed-ups from Learning?

Better Subgraph Solvers by Learning No-Goods?

Subgraph isomorphism algorithm performs tree-like search Can we learn from failures and cut away larger parts of search space? Has been tried using CDCL solvers — doesn’t seem to work But CDCL only does resolution reasoning — very weak Pseudo-Boolean solvers Sat4j [LP10] and RoundingSat [EN18] can be exponentially stronger E.g., can do all-different propagation, which CDCL can’t Remains to be seen whether this will fly in practice for subgraph

  • isomorphism. . .

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 18/19

slide-74
SLIDE 74

Take-Home Message

Subgraph isomorphism important problem with many applications Can often be efficiently solved, but what about correctness? This work: Glasgow Subgraph Solver captured by cutting planes Consequences:

1

Efficiently verifiable certificates of correctness

2

Potential for exponential speed-up from pseudo-Boolean no-goods?

Caveat: Still very much work in progress. . . Question: Can cutting planes formalize algorithms for other hard combinatorial problems in similar way?

Thank you for your attention!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 19/19

slide-75
SLIDE 75

Take-Home Message

Subgraph isomorphism important problem with many applications Can often be efficiently solved, but what about correctness? This work: Glasgow Subgraph Solver captured by cutting planes Consequences:

1

Efficiently verifiable certificates of correctness

2

Potential for exponential speed-up from pseudo-Boolean no-goods?

Caveat: Still very much work in progress. . . Question: Can cutting planes formalize algorithms for other hard combinatorial problems in similar way?

Thank you for your attention!

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 19/19

slide-76
SLIDE 76

References I

[ADH+19] Blair Archibald, Fraser Dunlop, Ruth Hoffmann, Ciaran McCreesh, Patrick Prosser, and James Trimble. Sequential and parallel solution-biased search for subgraph

  • algorithms. In Proceedings of the 16th International Conference on Integration of

Artificial Intelligence and Operations Research Techniques in Constraint Programming (CPAIOR ’19), June 2019. To appear. [CCT87] William Cook, Collette Rene Coullard, and Gy¨

  • rgy Tur´
  • an. On the complexity of

cutting-plane proofs. Discrete Applied Mathematics, 18(1):25–38, November 1987. [EN18] Jan Elffers and Jakob Nordstr¨

  • m. Divide and conquer: Towards faster

pseudo-Boolean solving. In Proceedings of the 27th International Joint Conference

  • n Artificial Intelligence (IJCAI ’18), pages 1291–1299, July 2018.

[Hak85] Armin Haken. The intractability of resolution. Theoretical Computer Science, 39(2-3):297–308, August 1985. [LP10] Daniel Le Berre and Anne Parrain. The Sat4j library, release 2.2. Journal on Satisfiability, Boolean Modeling and Computation, 7:59–64, 2010. [McC19] Ciaran McCreesh. Glasgow subgraph solver. https://github.com/ciaranm/glasgow-subgraph-solver, 2019.

Jakob Nordstr¨

  • m (UCPH)

Subgraph Isomorphism Meets Cutting Planes NordConsNet ’19 20/19