34
On Tractable Approximations of Graph Isomorphism. Anuj Dawar University of Cambridge Computer Laboratory visiting RWTH Aachen joint work with Bjarki Holm Munich, 22 January 2014

On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

On Tractable Approximations of GraphIsomorphism.

Anuj Dawar

University of Cambridge Computer Laboratoryvisiting RWTH Aachen

joint work with Bjarki Holm

Munich, 22 January 2014

Page 2: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Graph Isomorphism

Graph Isomorphism: Given graphs G ,H, decide whether G ∼= H is

• not known to be in P

• not expected to be NP-complete.

In practice and on average, graph isomorphism is efficiently decidable.

Anuj Dawar January 2014

Page 3: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Tractable Approximations of Isomorphism

A tractable approximation of graph isomorphism is a polynomial-timedecidable equivalence ≡ on graphs such that:

G ∼= H ⇒ G ≡ H.

Practical algorithms for testing graph isomorphism typically decide suchan approximation.

If this fails to distinguish a pair of graphs G and H, more discriminatingtests are deployed.

Anuj Dawar January 2014

Page 4: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Vertex Classification

The following problem is easily seen to be computationally equivalent tograph isomorphism:

Given a graph G and a pair of vertices u and v, decide if thereis an automorphism of G that takes u to v.

Given G and H, let G + u denote the graph extending G with a newvertex u adjacent to all vertices in G , and similarly for H + v .

Then, G ∼= H if, and only if, in the graph (G + u)⊕ (H + v), there is anautomorphism taking u to v .

Anuj Dawar January 2014

Page 5: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Equivalence Relations

The algorithms we study decide equivalence relations on vertices (ortuples of vertices) that approximate the orbits of the automorphismgroup.

For such an equivalence relation ≡, we also write G ≡ H to indicate thatG and H are not distinguished by the corresponding isomorphism test.

Anuj Dawar January 2014

Page 6: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Equitable Partitions

An equivalence relation ≡ on the vertices of a graph G = (V ,E ) inducesan equitable partition if

for all u, v ∈ V with u ≡ v and each ≡-equivalence class S,

|w ∈ S | (u,w) ∈ E| = |w ∈ S | (v ,w) ∈ E|.

The naive vertex classification algorithm finds the coarsest equitablepartition of the vertices of G .

Anuj Dawar January 2014

Page 7: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Colour Refinement

Define, on a graph G = (V ,E ), a series of equivalence relations:

≡0 ⊇ ≡1 ⊇ · · · ⊇ ≡i · · ·

where u ≡i+1 v if they have the same number of neighbours in each≡i -equivalence class.

This converges to the coarsest equitable partition of G .

Anuj Dawar January 2014

Page 8: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Almost All Graphs

Naive vertex classification provides a simple test for isomorphism thatworks on almost all graphs:

For graphs G on n vertices with vertices u and v, theprobability that u ∼ v goes to 0 as n→∞.

But the test fails miserably on regular graphs.

Anuj Dawar January 2014

Page 9: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Weisfeiler-Lehman Algorithms

The k-dimensional Weisfeiler-Lehman test for isomorphism (as describedby Babai), generalises naive vertex classification to k-tuples.

We obtain, by successive refinements, an equivalence relation ≡k onk-tuples of vertices in a graph G :

≡k0 ⊇ ≡k

1 ⊇ · · · ⊇ ≡ki · · ·

The refinement is defined by an easily checked condition on tuples.The refinement is guaranteed to terminate within nk iterations.

Anuj Dawar January 2014

Page 10: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Induced Partitions

Given an equivalence relation ≡ki , each k-tuple u induces a labelled

partition of the vertices V , where each vertex u is laballed by the k-tuple

α1, . . . , αk

of ≡ki -equivalence classes obtained by substituting u in each of the k

positions in u.

Define ≡ki+1 to be the equivalence relation where u ≡k

i+1 v if, in thepartitions they induce, the correponding labelled parts have the samecardinality.

Anuj Dawar January 2014

Page 11: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Weisfeiler-Lehman Algorithms

If G ,H are n-vertex graphs and k < n, we have:

G ∼= H ⇔ G ≡WLn

H ⇒ G ≡WLk+1

H ⇒ G ≡WLk

H.

G ≡WLk

H is decidable in time nO(k).

The equivalence relations ≡WLk

form a family of tractable approximationsof graph isomorphism.

There is no fixed k for which ≡WLk

coincides with isomorphism.(Cai, Furer, Immerman 1992).

Anuj Dawar January 2014

Page 12: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Restricted Graph Classes

For many specific graph classes, there is a fixed value of k such that

≡WLk

coincides with isomorphism:

trees; planar graphs; graphs of tree-width at most t;and most generally, graphs that exclude a t-clique minor

(Grohe 2010)

The construction of Cai, Furer and Immerman shows that there is nosuch k for graphs of

• maximum degree 3; and

• colour class size 4.

Each of these restrictions gives a class with a polynomial-timeisomorphism test by other means.

Anuj Dawar January 2014

Page 13: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Counting Logic

C k is the logic obtained from first-order logic by allowing:

• counting quantifiers: ∃ix ϕ; and

• only the variables x1, . . . .xk .

Every formula of C k is equivalent to a formula of first-order logic, albeitone with more variables.

We write G ≡C k

H to denote that no sentence of C k distinguishes Gfrom H.

It is not difficult to show that G ≡C k+1

H if, and only if, G ≡WLk

H.

Anuj Dawar January 2014

Page 14: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Counting Tuples of Elements

Consider extending the counting logic with quantifiers that count tuplesof elements.

This does not add further expressive power.

∃ixy ϕ

is equivalent to ∨f∈F

∧j∈dom(f )

∃f (j)x ∃jy ϕ

where F is the set of finite partial functions f on N such that(∑

j∈dom(f ) jf (j)) = i .

In other words, in the characterisation of ≡WLk

in terms of inducedpartitions, there is no gain in considering partitions of V m instead of V .

Anuj Dawar January 2014

Page 15: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Infinite Hierarchy

(Cai, Furer, Immerman, 1992) show that there are polynomial-timedecidable properties of graphs that are not definable in fixed-point logicwith counting.

For each formula ϕ of FPC there is a k such that if G ≡C k

H, thenG |= ϕ if, and only if, H |= ϕ.

They construct a sequence of pairs of graphs Gk ,Hk(k ∈ ω) such that:

• Gk ≡C k

Hk for all k .

• There is a polynomial time decidable class of graphs that includes allGk and excludes all Hk .

Moreover, Gk ,Hk can be chosen to be 3-regular and of colour-class size 4.

Anuj Dawar January 2014

Page 16: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Cai-Furer-Immerman Construction

Given any graph G , we can define a graph XG by replacing every edgewith a pair of edges, and every vertex with a gadget.

The picture shows the gadget fora vertex v that is adjacent in G tovertices w1,w2 and w3.The vertex vS is adjacent toavwi (i ∈ S) and bvwi (i 6∈ S) andthere is one vertex for all even sizeS .The graph XG is like XG exceptthat at one vertex v , we includeV S for odd size S .

avw1bvw1

avw2

bvw2avw3

bvw3

v∅ v

1,2 v1,3

v2,3

Anuj Dawar January 2014

Page 17: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Properties

If G is connected and has treewidth at least k , then:

1. XG 6∼= XG ; and

2. XG ≡C k

XG .

(2) is proved by a game argument, combining cops and robber games onG with a bijection game on XG and XG .

The original proof of (Cai, Furer, Immerman) relied on theexistence of balanced separators in G . The characterisation interms of treewidth is from (D., Richerby 07).

Anuj Dawar January 2014

Page 18: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Graph Isomorphism Integer Program

Yet another way of approximating the graph isomorphism relation isobtained by considering it as a 0/1 linear program.

If A and B are adjacency matrices of graphs G and H, then G ∼= H if,and only if, there is a permutation matrix P such that:

PAP−1 = B or, equivalently PA = BP

Introducing a variable xij for each entry of P and adding the constraints:∑i

xij = 1 and∑j

xij = 1

we get a system of equations that has a 0-1 solution if, and only if, Gand H are isomorphic.

Anuj Dawar January 2014

Page 19: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Fractional Isomorphism

To the system of equations:

PA = BP;∑i

xij = 1 and∑j

xij = 1

add the inequalities0 ≤ xij ≤ 1.

Say that G and H are fractionally isomorphic (G ∼=f H) if the resultingsystem has any real solution.

G ∼=f H if, and only if, G ≡C 2

H.(Ramana, Scheiermann, Ullman 1994)

Anuj Dawar January 2014

Page 20: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Sherali-Adams Hierarchy

If we have any linear program for which we seek a 0-1 solution, we canrelax the constraint and admit fractional solutions.

The resulting linear program can be solved in polynomial time, butadmits solutions which are not solutions to the original problem.

Sherali and Adams (1990) define a way of tightening the linear programby adding a number of lift and project constraints.

Anuj Dawar January 2014

Page 21: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Sherali-Adams Hierarchy

The kth lift-and-project of a linear program is defined as follows:

For each constraint aTx = b in the linear program, and each set I ofvariables with |I | < k and J ⊆ I , multiply the constraint by∏

i∈I\J

xi∏j∈J

(1− xj)

and then linearize by replacing x2i by xi and

∏j∈K xj by a new variable

yK for each set K (along with constraints: y∅ = 1, yx = x andyK ≤ yK ′ for K ′ ⊆ K ).

Say that G ∼=f ,k H if the kth lift-and-project of the isomorphism programon G and H admits a solution.

Anuj Dawar January 2014

Page 22: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Sherali-Adams Isomorphism

For each k

G ≡C k+1

H ⇒ G ∼=f ,k H ⇒ G ≡C k

H

(Atserias, Maneva 2012)

For k > 2, the reverse implications fail. (Grohe, Otto 2012)

Anuj Dawar January 2014

Page 23: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Rank Logics

The Cai-Furer-Immerman construction can be reduced to the solvabilityof systems of equations over a 2-element field.

This motivates an extension of first-order logic with operators for the therank of a matrix over a finite field.

(D., Grohe, Holm, Laubner, 2009)

For each prime p and each arity m, we have an operator rkpm which binds2m variables and defines the rank (over GF(p)) of the V m × V m matrixdefined by a formula ϕ(x, y).

Anuj Dawar January 2014

Page 24: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Equivalences and Rank Logic

The definition of rank logics yields a family of approximations ofisomorphism.

G ≡Rk,Ω,m H if G and H are not distinguished by any formula of FOrk

with at most k variables using operators rkpm for p in the finite set ofprimes Ω.

We can obtain these relations by a process of iterated refinement.

Anuj Dawar January 2014

Page 25: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Induced Partitions

For simplicity, consider the case when m = 1 and Ω = p.Given an equivalence relation ≡ on V k , each k-tuple u induces a labelledpartition of V × V .

The labels of the partition are(k2

)-tuples α1, . . . , αl of ≡-equivalence

classes, and the corresponding part is the set:

(a, b) |∧

1≤i<j≤k

u[a/ui , b/uj ] ∈ αi,j.

Anuj Dawar January 2014

Page 26: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Induced Partitions

Let Pu1 , . . . ,P

us be the parts of this partition (seen as 0-1 V × V

matrices) and Pv1 , . . . ,P

vs be the corresponding parts for a tuple v.

Let u ≡i+1 v if, u ≡i v and for any tuple µ ∈ 0, . . . , p − 1[s], we have

rk(∑

j

µiPuj

)= rk

(∑j

µjPvj

).

where the rank is in the field GF(p).

≡Rk,p,1 is the relation obtained by starting with ≡k

0 and iterativelyrepeating this refinement.

For general m and Ω, we need to consider partitions of V m × V m andrank and linear combinations over GF(p) for all p ∈ Ω.

Anuj Dawar January 2014

Page 27: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Complexity of Refinement

We do not know if the relations ≡Rk,Ω,m are tractable

To check u ≡i+1 v, we have to check the rank of a potentiallyexponential number of linear combinations.

But, we can refine the relations further to obtain a tractable family:≡IM

k,Ω,m.(D., Holm 2012)

Anuj Dawar January 2014

Page 28: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Invertible Map Equivalence

The relation ≡IMk,p,1 is obtained as the limit of the sequence of

equivalence relations where:

u ≡i+1 v if u ≡i v and there is an invertible linear map S onthe vector space GF(p)V such that we have for all j

SPuj S−1 = Pv

j .

This implies, in particular, that all linear combinations have the samerank.

A result of (Chistov, Karpinsky, Ivanyov 1997) guarantees thatsimultaneous similarity of a collection of matrices is decidable inpolynomial time. So we get a family of polynomial-time equivalencerelations ≡IM

k,Ω,m.

Anuj Dawar January 2014

Page 29: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Coherent Algebras

Weisfeiler and Lehman presented their algorithm in terms of cellularalgebras.

These are algebras of matrices on the complex numbers defined in termsof Schur multiplication:

(A B)(i , j) = A(i , j)B(i , j)

They are also called coherent configurations in the work of Higman.

Definition:A coherent algebra with index set V is an algebra A of V × V matricesover C that is:

closed under Hermitian adjoints; closed under Schurmultiplication; contains the identity I and the all 1’s matrix J.

Anuj Dawar January 2014

Page 30: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Coherent Algebras

One can show that a coherent algebra has a unique basis A1, . . . ,Am (i.e.every matrix in the algebra can be expressed as a linear combination ofthese) of 0-1 matrices which is closed under adjoints and such that∑

i

Ai = J.

One can also derive structure constants pkij such that

AiAj =∑k

pkijAk .

Associate with any graph G , its coherent invariant, defined as thesmallest coherent algebra AG containing the adjacency matrix of G .

Anuj Dawar January 2014

Page 31: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Weisfeiler-Lehman method

Say that two graphs G1 and G2 are WL-equivalent if there is anisomorphism between their coherent invariants AG1 and AG2 .

G1 and G2 are WL-equivalent if, and only if, G1 ≡C 3

G2.

Friedland (1989) has shown that two coherent algebras with standardbases A1, . . . ,Am and B1, . . . ,Bm are isomorphic if, and only if, there isan invertible matrix S such that

SAiS−1 = Bi for all 1 ≤ i ≤ m.

Anuj Dawar January 2014

Page 32: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Complex Invertible Map Equivalence

Define ≡IMC,k as the greatest fixed point of the operator ≡ 7→ ≡′ where:

u ≡′ v if there is an invertible linear map S on the vector spaceCV such that we have for all i

SPui S−1 = Pv

i .

We can show ≡IMC,k+1 ⊆ ≡C k ⊆ ≡IM

C,k−1 .

Anuj Dawar January 2014

Page 33: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Research Directions

We can show that ≡IM4,2,1 is the same as isomorphism on graphs of

colour class size 4.

• For all t, are there fixed k ,Ω and m such that ≡IMk,Ω,m is

isomorphism on graphs of colour class size t?

• What about graphs of degree at most 3? or t?

Is the arity hierarchy really strict on graphs? Could it be that ≡IMk,Ω,m is

subsumed by ≡IMk′,Ω,1 for sufficiently large k ′?

Show that no fixed ≡IMk,Ω,m is the same as isomorphism on graphs.

Note: we can show that ≡IMk,Ω,1 is not the same as isomorphism for

any fixed k and Ω.

Anuj Dawar January 2014

Page 34: On Tractable Approximations of Graph Isomorphism.schulzef/2014-01-22-Anuj-Dawar.pdf · 1/22/2014  · The equivalence relations WLk form a family of tractable approximations of graph

Summary

The Weisfeiler-Lehman family of approximations of graph isomorphismhave a number of equivalent characterisations in terms of:

complex algebras; combinatorics; counting logics; bijectiongames; linear programming relaxations of isomorphism.

We have introduced a new and stronger family of approximations ofgraph isomorphism based on algebras over finite fields, and these captureisomorphism on some interesting classes.There remain many questions about the strength of these approximationsand their relations to logical definability.

Anuj Dawar January 2014