Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´...

30
Graph Sparsification Matthew Begu ´ e Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Transcript of Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´...

Page 1: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Graph Sparsification

Matthew Begue

Norbert Wiener CenterDepartment of Mathematics

University of Maryland, College Park

Page 2: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Weighted Graphs

We will only consider undirected, weighted graphs representedG = G(V ,E , ω).V is the vertex set of size N <∞.E is the edge set, E = {(u, v) : u, v ∈ V and u ∼ v}.Each edge is assigned a weight ωu,v > 0.For any x ∈ V , the degree of x , dx , is the sum of weights ofedges originating from x .

dx =∑y∈V

ωx,y .

Page 3: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Graph Laplacian

For a finite graph, the Laplacian can be represented as a matrix.Let D denote the N × N degree matrix, D = diag(dx).Let W denote the N × N weighted adjacency matrix,

W (i , j) ={ωxi ,xj , if xi ∼ xj0, otherwise.

Then the unweighted graph Laplacian can be written as

L = D −W .

Equivalently,

L(i , j) =

dxi if i = j−ωxi ,xj if xi ∼ xj0 otherwise.

Page 4: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Spectrum of the Laplacian

L is a real symmetric matrix and therefore has nonnegativeeigenvalues {λk}N−1

k=0 with associated orthonormal eigenvectors{ϕk}N−1

k=0 .If G is finite and connected, then we have

0 = λ0 < λ1 ≤ λ2 ≤ · · · ≤ λN−1.

The spectrum of the Laplacian, σ(L), is fixed but one’s choice ofeigenvectors {ϕk}N−1

k=0 can vary.Since L is Hermetian (L = L∗), then we can choose theeigenbasis {ϕk}N−1

k=0 to be entirely real-valued.

Easy to show that ϕ0 ≡ 1/√

N.

Page 5: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

A weighted graph and its Laplacian

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

(a) A random graph on 30 vertices (b) Laplacian of the graph

Page 6: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Problems arise with graphs with many edges

Page 7: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

A connected graph on N vertices can have as few as N − 1edges,

-10 -5 0 5 10-0.3

-0.2

-0.1

0

0.1

0.2

and can have as many as N(N−1)2 edges

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Page 8: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

κ-approximation

Goal is to construct a subgraph, H = (V , E , ω), to be aκ-approximation of G.H is a κ-approximation of G if there exist B ≥ A > 0 withB/A ≤ κ such that for all x ∈ RN , we have

A · x>LGx ≤ x>LHx ≤ B · x>LGx .

We writeA · LG � LG � B · LG.

This means for any i = 0,1, ...,N − 1,

A ≤λ(H)i

λ(G)i

≤ B

Subgraph H has the same vertex set, V , as G. But we changethe edge set and the weights of those edges. In particular E ⊆ E .

Page 9: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

κ-approximation

Goal is to construct a subgraph, H = (V , E , ω), to be aκ-approximation of G.H is a κ-approximation of G if there exist B ≥ A > 0 withB/A ≤ κ such that for all x ∈ RN , we have

A · x>LGx ≤ x>LHx ≤ B · x>LGx .

We writeA · LG � LG � B · LG.

This means for any i = 0,1, ...,N − 1,

A ≤λ(H)i

λ(G)i

≤ B

Subgraph H has the same vertex set, V , as G. But we changethe edge set and the weights of those edges. In particular E ⊆ E .

Page 10: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

κ-approximation

Goal is to construct a subgraph, H = (V , E , ω), to be aκ-approximation of G.H is a κ-approximation of G if there exist B ≥ A > 0 withB/A ≤ κ such that for all x ∈ RN , we have

A · x>LGx ≤ x>LHx ≤ B · x>LGx .

We writeA · LG � LG � B · LG.

This means for any i = 0,1, ...,N − 1,

A ≤λ(H)i

λ(G)i

≤ B

Subgraph H has the same vertex set, V , as G. But we changethe edge set and the weights of those edges. In particular E ⊆ E .

Page 11: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Big Picture

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

(a) A random graph on 30 vertices (b) Laplacian of the graph

Page 12: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Eigenvalues of LG

0 5 10 15 20 25 30 35 40-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

Page 13: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Eigenvalues of LG

0 5 10 15 20 25 30 35 40-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

Page 14: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Eigenvalues of LH will be contained in red region

0 5 10 15 20 25 30 35 40-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

Page 15: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Spielman’s result

TheoremLet G be an undirected weighted graph on N vertices and let d > 1.There exists a weighted subgraph H with at most d · N edgessatisfying (

1− 1/√

d)2

LG � LH �(

1 + 1/√

d)2

LG.

Hence, H is a κ =(

1+1/√

d1−1/

√d

)2-approximation of G.

Joshua Batson, Daniel Spielman, Nikhil Srivastava,Twice-Ramanujan Sparsifiers, SIAM Review (2014) 56, no. 2, pp.315-334.

Page 16: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Method

The Laplacian matrix, LG, can be written as a sum of rank-1outer products

LG =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>.

The sparsified graph, H, will have Laplcian

LH =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>

where at most d · N of the ω 6= 0.The weights ωu,v that are nonzero will be chosen so that theeigenvalues “play nice.”

Page 17: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Method

The Laplacian matrix, LG, can be written as a sum of rank-1outer products

LG =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>.

The sparsified graph, H, will have Laplcian

LH =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>

where at most d · N of the ω 6= 0.The weights ωu,v that are nonzero will be chosen so that theeigenvalues “play nice.”

Page 18: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Method

The Laplacian matrix, LG, can be written as a sum of rank-1outer products

LG =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>.

The sparsified graph, H, will have Laplcian

LH =∑

(u,v)∈E

ωu,v (χu − χv )(χu − χv )>

where at most d · N of the ω 6= 0.The weights ωu,v that are nonzero will be chosen so that theeigenvalues “play nice.”

Page 19: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Sketch of algorithm

Starting from A0 = 0, we will construct An by adding a weightedouter product

An = An−1 + snvnv>n

where sn > 0 and vn = χu − χv for some (u, v) ∈ E .The algorithm requires the selection of four positive constants,εU , εL, δU , δL.

Page 20: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Step 0

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

A0 = 0

0−NεL

NεU

f

Page 21: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Step 1

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

A1 = A0 + s1v1v>1

0−NεL

NεU

−NεL

+ δLNεU

+ δUf f

Page 22: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Step 2

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

A2 = A1 + s2v2v>2

0−NεL

NεU

−NεL

+ 2δLNεU

+ 2δUf f f

Page 23: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Step 3

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

A3 = A2 + s3v3v>3

0−NεL

NεU

−NεL

+ 3δLNεU

+ 3δUf f ff

Page 24: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Step d · N

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

LH = AdN + sdNvdNv>dN

0−NεL

NεU

−NεL

+ dNδLNεU

+ dNδUf f ff ffff f ffff f

Page 25: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Logistics

For all d · N iterations of the algorithm, there will always exist atleast one admisible edge vi and scalar si > 0 provided that

0 ≤ 1/δU + εU ≤ 1/δL − εL.

Spielman gives constants

δL = 1, δU =

√d1√

d − 1, εL =

1√d, εU =

√d − 1

d +√

d,

that make the resulting graph H a κ-approximation of G for

κ =

(1 + 1/

√d

1− 1/√

d

)2

.

Theorem (B.)

This is the smallest value of κ that guarantees the Spielman algorithmwill produce a κ-approximation of G with only d · N edges.

Page 26: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Logistics

For all d · N iterations of the algorithm, there will always exist atleast one admisible edge vi and scalar si > 0 provided that

0 ≤ 1/δU + εU ≤ 1/δL − εL.

Spielman gives constants

δL = 1, δU =

√d1√

d − 1, εL =

1√d, εU =

√d − 1

d +√

d,

that make the resulting graph H a κ-approximation of G for

κ =

(1 + 1/

√d

1− 1/√

d

)2

.

Theorem (B.)

This is the smallest value of κ that guarantees the Spielman algorithmwill produce a κ-approximation of G with only d · N edges.

Page 27: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Logistics

For all d · N iterations of the algorithm, there will always exist atleast one admisible edge vi and scalar si > 0 provided that

0 ≤ 1/δU + εU ≤ 1/δL − εL.

Spielman gives constants

δL = 1, δU =

√d1√

d − 1, εL =

1√d, εU =

√d − 1

d +√

d,

that make the resulting graph H a κ-approximation of G for

κ =

(1 + 1/

√d

1− 1/√

d

)2

.

Theorem (B.)

This is the smallest value of κ that guarantees the Spielman algorithmwill produce a κ-approximation of G with only d · N edges.

Page 28: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Strengths/Weaknesses

StrengthsThis is a completely deterministic algorithm.There exists a method of sparsification via graph effectiveresistances which produces a κ-approximation of G with highprobability.Daniel A. Spielman and Nikhil Srivastava, Graph sparsification byeffective resistances, SIAM Journal on Computing, (2011)40 no.6, pp. 1913-1926.

WeaknessesVery computationally expensive. Each step requires inverting 3N × N matrices.No information on the eigenvectors of LH

Wildly different in numerical experimentsWant to preserve eigenvectors to Fourier transform on sparsifiedgraph.

Page 29: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Strengths/Weaknesses

StrengthsThis is a completely deterministic algorithm.There exists a method of sparsification via graph effectiveresistances which produces a κ-approximation of G with highprobability.Daniel A. Spielman and Nikhil Srivastava, Graph sparsification byeffective resistances, SIAM Journal on Computing, (2011)40 no.6, pp. 1913-1926.

WeaknessesVery computationally expensive. Each step requires inverting 3N × N matrices.No information on the eigenvectors of LH

Wildly different in numerical experimentsWant to preserve eigenvectors to Fourier transform on sparsifiedgraph.

Page 30: Matthew Begue´ - Norbert Wiener Center for Harmonic ...Graph Sparsification Matthew Begue´ Norbert Wiener Center Department of Mathematics University of Maryland, College Park

Register for FFT today!