Facebook Friends and Matrix Functions Graduate Research Day Joint - - PowerPoint PPT Presentation

facebook friends and matrix functions
SMART_READER_LITE
LIVE PREVIEW

Facebook Friends and Matrix Functions Graduate Research Day Joint - - PowerPoint PPT Presentation

Facebook Friends and Matrix Functions Graduate Research Day Joint with Kyle Kloster David F David F. . Gleich Gleich, (Purdue), supported by Purdue University NSF CAREER 1149756-CCF Network Analysis Use linear algebra to study


slide-1
SLIDE 1

Facebook Friends and Matrix Functions

Kyle Kloster Purdue University

Joint with

David F David F. . Gleich Gleich,

(Purdue), supported by NSF CAREER 1149756-CCF

  • Graduate Research Day
slide-2
SLIDE 2

Network Analysis

Use linear algebra to study graphs

Graph

slide-3
SLIDE 3

Network Analysis

Use linear algebra to study graphs

Graph, G

V, vertices (nodes) E, edges (links) degree of a node = # edges incident to it. nodes sharing an edge are neighbors.

slide-4
SLIDE 4

Network Analysis

Use linear algebra to study graphs

Graph, G

V, vertices (nodes) E, edges (links)

Erdős Number Facebook friends Twitter followers Search engines Amazon/Netflix rec. Protein interactions Power grids Google Maps Air traffic control Sports rankings Cell tower placement Scheduling Parallel programming Everything Kevin Bacon

slide-5
SLIDE 5

Network Analysis Graph Properties

Diameter Is everything just a few hops away from everything else? Use linear algebra to study graphs

slide-6
SLIDE 6

Network Analysis Graph Properties

Diameter Clustering Are there tightly-knit groups of nodes? Use linear algebra to study graphs

slide-7
SLIDE 7

Network Analysis Graph Properties

Diameter Clustering Connectivity How well can each node reach every

  • ther node?

Use linear algebra to study graphs

slide-8
SLIDE 8

Network Analysis Graph Properties

Diameter Clustering Connectivity

Linear Algebra

Eigenvalues and matrix functions shed light

  • n all these questions.

These tools require a matrix related to the graph…

Use linear algebra to study graphs

slide-9
SLIDE 9

Graph Matrices

Adjacency matrix, A Random-walk transition matrix, P

Aij =

1, if nodes i, j share an edge (are adjacent) 0 otherwise where is the degree of node j.

dj Pij = Aij/dj

Stochastic! i.e. column-sums = 1

slide-10
SLIDE 10

Network analysis via Heat Kernel

Uses include Local clustering Link prediction Node centrality

Heat kernel is…

For G, a network’s matrix random-walk, adjacency, Laplacian, P A L a graph diffusion a function of a matrix exp (G) =

X

k=0 1 k!Gk

slide-11
SLIDE 11

Heat Kernel describes node connectivity

(Ak)ij = # walks of length k from node i to j

For a small set of seed nodes, s, describes nodes most relevant to s

exp (A) s

“sum up” the walks between i and j

exp (A)ij =

X

k=0 1 k!(Ak)ij

slide-12
SLIDE 12

diffusion score vector = f

f =

X

k=0

ckP ks

P =

random-walk transition matrix

s =

normalized seed vector

ck =

weight on stage k

Diffusion score

p0 c0 p1 c1 p2 c2 p3 c3

“diffusion scores” of a graph = weighted sum of probability vectors

+ + + + …

slide-13
SLIDE 13

Heat Kernel vs. PageRank Diffusions

Heat Kernel uses tk/k! Our work is new analysis and algorithms for this diffusion.

p0

t0 0!

p1 p2 p3

+ + +

t1 1! t2 2! t3 3!

+ …

p0 𝛽0 p1 𝛽1 p2 𝛽2 p3 𝛽3

PageRank uses 𝛽k at stage k.

Standard, widely-used diffusion we use for comparison. Linchpin of Google’s original success!

+ + + + …

slide-14
SLIDE 14

PR

Heat Kernel vs. PageRank Theory

HK good clusters fast algorithm

Local Cheeger Inequality: “PR finds near-optimal clusters” existing constant-time algorithm [Andersen Chung Lang 06]

slide-15
SLIDE 15

PR

Heat Kernel vs. PageRank Theory

HK good clusters fast algorithm

Local Cheeger Inequality: “PR finds near-optimal clusters” existing constant-time algorithm [Andersen Chung Lang 06] Local Cheeger Inequality [Chung 07]

slide-16
SLIDE 16

PR

Heat Kernel vs. PageRank Theory

HK good clusters fast algorithm

Local Cheeger Inequality: “PR finds near-optimal clusters” existing constant-time algorithm [Andersen Chung Lang 06] Local Cheeger Inequality [Chung 07]

Our work

slide-17
SLIDE 17

Algorithm outline

(1) Approximate with a polynomial (2) Convert to linear system (3) Solve with sparse linear solver

(Details in paper)

ˆ x ≈ exp (P) s

slide-18
SLIDE 18

Algorithm outline

(1) Approximate with a polynomial (2) Convert to linear system (3) Solve with sparse linear solver

(Details in paper)

ˆ x ≈ exp (P) s Ax(k) ≈ b r(k) := b − Ax(k) x(k+1) := x(k) + Ar (k)

big

Gauss-Southwell Sparse solver “relax” largest entry in r

slide-19
SLIDE 19

Algorithm outline

(1) Approximate with a polynomial (2) Convert to linear system (3) Solve with sparse linear solver

(Details in paper) We avoid doing these full matrix-vector products Key:

ˆ x ≈ exp (P) s exp (P) s ≈

N

X

k=0 1 k!Pks

slide-20
SLIDE 20

Algorithm outline

(1) Approximate with a polynomial (2) Convert to linear system (3) Solve with sparse linear solver

(Details in paper) We avoid doing these full matrix-vector products Key:

ˆ x ≈ exp (P) s exp (P) s ≈

N

X

k=0 1 k!Pks

(All my work was showing this actually can be done with bounded error.)

slide-21
SLIDE 21

Algorithms & Theory for

ˆ x ≈ exp (P) s

Algorithm 1, Weak Convergence

  • constant time on any graph,
  • outperforms PageRank in clustering
  • accuracy: kD−1x D−1 ˆ

xk∞ < ε ˜ O( e1

ε )

slide-22
SLIDE 22

Algorithms & Theory for

ˆ x ≈ exp (P) s

Conceptually Diffusion vector quantifies node’s connection to each other node. Divide each node’s score by its degree, delete the nodes with score < ε. Only a constant number of nodes remain in G!

Users spend “reciprocated time” with O(1) others.

kD−1x D−1 ˆ xk∞ < ε

slide-23
SLIDE 23

Algorithms & Theory for

ˆ x ≈ exp (P) s

Algorithm 2, Global Convergence (conditional)

slide-24
SLIDE 24

Power-law Degrees

1 10 100 1000 10000 100000 1e+06 1e+07 1 10 100 1000 10000 rank indegree

Realworld graphs have degrees distributed as

  • follows. This causes diffusions to be localized.

Power-law degrees Degrees of nodes in Ljournal-2008 Log-log scale

[Boldi et al., Laboratory for Web Algorithmics 2008]

slide-25
SLIDE 25

Local solutions

Accuracy of approximation using only large entries Magnitude of entries in solution vector

1 2 3 4 5 x 10

6

0.5 1 1.5 nnz = 4815948 magnitude

10 10

1

10

2

10

3

10

4

10

5

10

6

10

−14

10

−12

10

−10

10

−8

10

−6

10

−4

10

−2

10 1−norm error largest non−zeros retained 10 10

1

10

2

10

3

10

4

10

5

10

6

10

−14

10

−12

10

−10

10

−8

10

−6

10

−4

10

−2

10 1−norm error largest non−zeros retained

has ~5 million nnz!

X

k=0 1 k!Aks

slide-26
SLIDE 26

Local solutions

Accuracy of approximation using only large entries Magnitude of entries in solution vector

1 2 3 4 5 x 10

6

0.5 1 1.5 nnz = 4815948 magnitude

10 10

1

10

2

10

3

10

4

10

5

10

6

10

−14

10

−12

10

−10

10

−8

10

−6

10

−4

10

−2

10 1−norm error largest non−zeros retained 10 10

1

10

2

10

3

10

4

10

5

10

6

10

−14

10

−12

10

−10

10

−8

10

−6

10

−4

10

−2

10 1−norm error largest non−zeros retained

Only ~3,000 entries For 10-4 accuracy!

has ~5 million nnz!

X

k=0 1 k!Aks

slide-27
SLIDE 27

Algorithms & Theory for

ˆ x ≈ exp (P) s

Algorithm 2, Global Convergence (conditional)

  • sublinear (power-law)
  • accuracy: kx ˆ

xk1 < ε ˜ O(d log d(1/ε)C)

slide-28
SLIDE 28

Algorithms & Theory for

ˆ x ≈ exp (P) s kx ˆ xk1 < ε

Conceptually A node’s diffusion vector can be approximated with total error < ε using only O(d log d) entries. In realworld networks (i.e. with degrees following a power-law), no node will have nontrivial connection with more than O(d log d) other nodes.

slide-29
SLIDE 29

Experiments

slide-30
SLIDE 30

Runtime on the web-graph

|V| = O(10^8) |E| = O(10^9)

10 20 30 20 40 60 80 100 120 140 Trial Time (sec) EXMPV GSQ GS

GSQ, GS: our methods EXPMV: MatLab A particularly sparse graph benefits us best

slide-31
SLIDE 31

Thank you

Local clustering via heat kernel code available at

http://www.cs.purdue.edu/homes/dgleich/codes/hkgrow

Global heat kernel code available at

http://www.cs.purdue.edu/homes/dgleich/codes/nexpokit/

  • Questions or suggestions? Email Kyle Kloster at kkloste-at-purdue-dot-edu