sparse newton’s methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 ·...

29
Sparse Newton’s Method Yu Cheng May 3, 2016

Upload: others

Post on 03-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Sparse Newton’s Method

Yu ChengMay 3, 2016

Page 2: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Large Graphs

May3,2016 Yu Cheng (USC) 2/40

Page 3: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Spectral Graph Theory

May3,2016 Yu Cheng (USC) 3/40

Graph algorithms

Paths FlowsCuts …

Combinatorial

Scientific computing

Matrices EigenvaluesIterative Methods …

Numerical

Scalable Algorithms

Page 4: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Electric Flow

• Electric flow / SDD linear systems• Direct methods: 𝑂(𝑛$.&')• Iterative methods: 𝑂 𝑚 𝜅�

• [ST’04, KMP ’11, KOSZ ’13, CKMPPRX’14]

𝑂 𝑚 log 𝑛� log 01

May3,2016 Yu Cheng (USC) 4/40

𝑛 = size of the graph / dimension of the matrix𝑚 = number of edges / number of non-zeros𝜖 = precision 𝜅 = condition number

Page 5: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Our Contributions

May3,2016 Yu Cheng (USC) 5/40

Graph algorithms

Spectral sparsification

Scientific computing

Newton’s method

Sparse Newton’s method

Page 6: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Our Contributions

First nearly-linear work and polylog depth algorithm for:

1. Sampling Gaussian MRF with SDD precision matrix

2. Computing 𝑝th power of SDDM matrices for 𝑝 ∈ −1,1

3. Spectral Sparsification of Random-Walk Matrix Polynomials

May3,2016 Yu Cheng (USC) 6/40

Page 7: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Sampling GaussianGraphical Models

May3,2016 Yu Cheng (USC) 7/40

Page 8: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Markov Random Field (MRF)

• Random variables described by an undirected graph

• Conditionally independence

• Gaussian MRF:• Pr 𝑥 Λ, ℎ ∝ exp − 0

$𝑥BΛ𝑥 + ℎB𝑥

• Precision matrix Λ = ΣE0• Potential vector ℎ

May3,2016 Yu Cheng (USC) 8/40

Page 9: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Previous Work

• Gibbs sampling

May3,2016 Yu Cheng (USC) 9/40

Ω(𝑛$)work, highly sequential

Page 10: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Our Result

• For Gaussian MRFs with SDD precision matrices ΛPr 𝑥 Λ, ℎ ∝ exp −

12 𝑥

BΛ𝑥 + ℎB𝑥

• Work: 𝑂 𝑚 logH 𝑛

• Depth: 𝑂 logH 𝑛

• Randomness: 𝑂 𝑛

May3,2016 Yu Cheng (USC) 10/40

Page 11: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Sampling Gaussian MRF

• Input: precision matrix Λ = ΣE0

potential vector ℎ

1. Compute mean 𝜇 = ΛE0ℎ2. Find 𝐶𝐶B = ΛE0

3. Draw 𝑧~𝒩 0, 𝐼Return 𝑥 = 𝐶𝑧 + 𝜇

May3,2016 Yu Cheng (USC) 11/40

Page 12: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Splitting

• Can assume Λ = 𝐼 − 𝑋• 𝜌 𝑋 = max 𝜆 𝑋 ≤ 1 − V

W

• 𝜅 = 𝜅 Λ = XYZ[ \XY]^ \

poly(𝑛)

• Goal: 𝐶𝐶B = 𝐼 − 𝑋 E0

May3,2016 Yu Cheng (USC) 12/40

Page 13: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

𝐼 − 𝑋 E0/$: First Attempt

• Cholesky factorization of ΛE0• 𝐶𝐶B = 𝐼 − 𝑋 E0

• Ω 𝑛$.&' work

• Edge-vertex incident matrices• 𝑚×𝑛 matrix 𝐵with 𝐵B𝐵 = 𝐼 − 𝑋• Use 𝐶 = 𝐵 𝐼 − 𝑋 E0

• 𝑂(𝑚)random numbers

May3,2016 Yu Cheng (USC) 13/40

Page 14: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

𝐼 − 𝑋 E0/$: Second Attempt

• Taylor expansion

• 𝐼 − 𝑋 E0/$ = 𝐼 + 0$𝑋 + &

c𝑋$ + d

0e𝑋& + ⋯

• 𝜌 𝑋 ≤ 1 − VW Need 𝑂(𝜅) terms

May3,2016 Yu Cheng (USC) 14/40

Page 15: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Newton’s Method

May3,2016 Yu Cheng (USC) 15/40

Page 16: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Newton’s Method

Find the root of 𝑓 𝑦 = 0ij− 1 − 𝑎 ⟹ 𝑦 = 0

0Em�

𝑦n = 1 = 𝑦o 1 + 0E 0Em ipj

$

May3,2016 Yu Cheng (USC) 16/40

𝑟n = 𝑎1 − 𝑟or0 = 1 + sp

$$ 1 − 𝑟o

𝑟o ≜ 1 − 1 − 𝑎 𝑦o$

𝑦o = ∏ 1 + sv$

owxn

𝑦or0 = 𝑦o −𝑓 𝑦o𝑓y 𝑦o

Page 17: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

𝐼 − 𝑋 E0/$: Newton’s Method

𝐼 − 𝑋 E0 = 𝐼 + 0$z 𝐼 − &

{zj − 0

{z| E0 𝐼 + 0

$z

Reduce factoring 𝐼 − 𝑋 E0 to factoring 𝐼 − |}z

j − V}z

| E0

May3,2016 Yu Cheng (USC) 17/40

𝑟n = 𝑎1 − 𝑟or0 = 1 + sp

$$ 1 − 𝑟o

𝑟o ≜ 1 − 1 − 𝑎 𝑦o$

𝑦o = ∏ 1 + sv$

owxn

Page 18: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

𝐼 − 𝑋 E0/$: Newton’s Method

𝐼 − 𝑋n E0 = 𝐼 + 0$z~ 𝐼 − &

{z~j − 0

{z~| E0 𝐼 + 0

$z~

= 𝐼 + Vjz~ 𝐼 − 𝑋0 E0 𝐼 + V

jz~

= 𝐼 + Vjz~ 𝐼 + V

jzV 𝐼 − |}zV

j − V}zV

| E0 𝐼 + VjzV 𝐼 + V

jz~

May3,2016 Yu Cheng (USC) 18/40

𝑋n = 𝑋 𝑋wr0 = |}zv

j + V}zv

|

𝐶 = 𝐼 + z~$ 𝐼 + zV

$ … 𝐼 + z�$

Page 19: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Factor Chain

• 𝑋n = 𝑋• 𝑋wr0 = |

}zvj + V

}zv|

• 𝑋� ⟶ 0

• 𝐶 = 𝐼 + �~j 𝐼 + �V

j … 𝐼 + ��j

• 𝐶𝐶B = 𝐼 − 𝑋 E0

• Convergence: 𝑑 = log log 𝜅 𝜖⁄

May3,2016 Yu Cheng (USC) 19/40

𝜌 𝑋 ≤ 1 − 0�

𝜌 𝑋wr0 = 𝜌 &{zv

j + 0{zv

| ≤ 𝜌 𝑋w $

Page 20: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Preserving Sparsity

May3,2016 Yu Cheng (USC) 20/40

𝐼 − &{zv

j + 0{zv

|𝐼 − 𝑋

Page 21: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Spectral Sparsification

May3,2016 Yu Cheng (USC) 21/40

Λ ≈1 Λ� ⟺ 𝑥BΛ�𝑥 ≈1 𝑥BΛ𝑥, ∀𝑥 ∈ ℝ�

Page 22: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Sparse Factor Chain

May3,2016 Yu Cheng (USC) 22/40

𝐼 − 𝑋wr0 ≈1 𝐼 − &{zv

j − 0{zv

|

• 𝑋n = 𝑋• 𝑋wr0 = |

}zvj + V

}zv|

• 𝑋� ⟶ 0

• 𝐶 = 𝐼 + �~j 𝐼 + �V

j … 𝐼 + ��j

• 𝐶𝐶B = 𝐼 − 𝑋 E0

• Convergence: 𝑑 = log log 𝜅 𝜖⁄

Page 23: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Sparse Factor Chain

• 𝑋n = 𝑋• 𝑋wr0 = |

}zvj + V

}zv|

• 𝑋� ⟶ 0

• 𝐶 = 𝐼 + �~j 𝐼 + �V

j … 𝐼 + ��j

• 𝐶𝐶B = 𝐼 − 𝑋 E0

• Convergence: 𝑑 = log log 𝜅 𝜖⁄

May3,2016 Yu Cheng (USC) 23/40

𝐼 − 𝑋wr0 ≈1 𝐼 − &{zv

j − 0{zv

|

Page 24: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Chain Convergence

• 𝑑 = log 𝜅 𝜖⁄ enough

May3,2016 Yu Cheng (USC) 24/40

0 21

0 21

𝜆 𝐼 − 𝑋n

𝜆 𝐼 − &{z~

j − 0{z~

| 𝜆 𝐼 − 𝑋0

𝜆 𝐼 − 𝑋n$ 𝜆 𝐼 − 𝑋n&

Page 25: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Chain Accuracy

May3,2016 Yu Cheng (USC) 25/40

𝐼 − 𝑋n E0 = 𝐼 + 0$z~ 𝐼 − &

{z~j − 0

{z~| E0 𝐼 + 0

$z~

≈1V 𝐼 + Vjz~ 𝐼 − 𝑋0 E0 𝐼 + V

jz~

= 𝐼 + Vjz~ 𝐼 + V

jzV 𝐼 − |}zV

j − V}zV

| E0 𝐼 + VjzV 𝐼 + V

jz~

≈1j 𝐼 + Vjz~ 𝐼 + V

jzV 𝐼 − 𝑋$ E0 𝐼 + VjzV 𝐼 + V

jz~

• Overall error ∑ 𝜖w�wx0 , set 𝜖w = 𝜖/𝑑

Page 26: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Computing 𝐼 − 𝑋 �

May3,2016 Yu Cheng (USC) 26/40

Page 27: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Computing 𝑝th Power

• Fundamental problem in numerical analysis

• Nick Higham’s quoted an email from a power company

May3,2016 Yu Cheng (USC) 27/40

I have an Excel spreadsheet containing the transition matrix of how a company’s [Standard & Poor’s] credit rating changes from one year to the next. I’d like to be working in eighths of a year, so the aim is to find the eighth root of the matrix.

Page 28: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Our Result

• 𝐼 − 𝑋 � = 𝐼 + Vjz

E� 𝐼 − |}z

j − V}z

| � 𝐼 + Vjz

E�

• How to evaluate 𝐼 + Vjz

E�?

• Taylor expansion!• 𝐼 + �

j

E0/$ = 𝐼 + 0$

�j − &

c�j

$ + d0e

�j

& + ⋯• 𝑂(log 𝜅) terms suffice

May3,2016 Yu Cheng (USC) 28/40

Page 29: Sparse Newton’s Methodhomepages.math.uic.edu/~yucheng/files/slides_2017_duke... · 2020-04-04 · Combinatorial Scientific computing Matrices Eigenvalues ... Scientific computing

Summary

May3,2016 Yu Cheng (USC) 29/40

• Newton’s Method + Spectral Sparsification

• First nearly linear work and polylog depth algorithm for• Gaussian Sampling• Computing 𝐼 − 𝑋 �

• Dense matrix ≈ product of sparse matrices