linear algebraic primitives beyond laplacian solvers · 2020-03-21 · graph decompositions to...

23
Linear Algebraic Primitives Beyond Laplacian Solvers FOCS 2018 Workshop Laplacian Paradigm 2.0 Aaron Sidford Contact Info: email: [email protected] website: www.aaronsidford.com

Upload: others

Post on 01-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Linear Algebraic Primitives Beyond Laplacian Solvers

FOCS 2018 WorkshopLaplacian Paradigm 2.0

Aaron Sidford

Contact Info:• email: [email protected]• website: www.aaronsidford.com

Page 2: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

“The Laplacian Paradigm”

Undirected Graph Laplacian Matrix

𝐺 = (𝑉, 𝐸, 𝑤)

• 𝑛 vertices V• 𝑚 edges E• 𝑤𝑒 ≥ 0 weight of edge E

𝓛 ∈ ℝ𝑛×𝑛

• 𝓛 = 𝓛⊤

• 𝓛𝒊𝒋 ≤ 0 for 𝑖 ≠ 𝑗

• 𝓛𝒊𝑖 = σ𝑗≠𝑖−𝓛𝒋𝒊

Can solve 𝓛 𝑥 = 𝑏 in nearly linear time

[ST04, …]

Can obtain faster graph algorithms

𝑖, 𝑗 ∈ 𝐸 ⇔ 𝓛𝒊𝒋 = −𝑤𝑗𝑖

Combinatorial Object Linear Algebraic Object

Very successful paradigm and many faster algorithms for undirected graph problems.

An algorithmic revolution over the last decade …

Spectral Graph Theory

Natural bijection(𝓛(𝐺) = 𝑫(𝐺) − 𝑨(𝐺))

Page 3: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Laplacian System SolvingLinear Algebraic Problem

Solve 𝓛𝑥 = 𝑏

• 𝓛 = 𝓛⊤,𝓛1 = 0• 𝓛𝑖𝑗 ≤ 0, 𝑖 ≠ 𝑗

Combinatorial ProblemCompute electric current

in a resistor network.

Continuous OptimizationIterative methods that converge to

answer (maybe slowly)(e.g. gradient descent)

Combinatorial OptimizationGraph decompositions to decreasing

iteration costs and speeding up convergence.(e.g. trees, spanners)

Idea • Couple them together• Improve each

L x = b

Random Walk ProblemFor all vertices 𝑣 the probability

random walk on undirected graph gets to 𝑎 before 𝑏.

a

b

Beyond applications of solvers, broader applications

of solving machinery.

Applications: maximum flow, multicommodity flow, matrix scaling, sampling random spanning trees, graph sparsification, graph partitioning, graph routing, lossy flow, and more.

Page 4: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Beyond Laplacian Systems?

• Symmetric diagonally dominant (SDD) systems• 𝑨 = 𝑨⊤ where 𝑨𝑖𝑖 ≥ σ𝑗≠𝑖 |𝑨𝑖𝑗|• Nearly linear time by direct reduction to Laplacians

• Block diagonally dominant (BDD) Systems• 𝑨 = 𝑨⊤ where 𝜆𝑚𝑖𝑛(𝑨𝐼𝐼) ≥ σ𝐽≠𝐼 𝑨𝐼𝐽 2• Nearly linear time solver when block sizes are constant [KLPSS16]

• Factored Factor Width 2 Matrices• Given 𝑪 ∈ ℝ𝑚×𝑛 where every row of 𝑪 has at most two non-zero entries• Can solve (𝑪⊤𝑪)𝑥 = 𝑏 in nearly linear time [DS08]• Applications to lossy flow problems

What other structured problems can we solve exactly in nearly linear time?

FrontierDirected Graphs?

Asymmetric Matrices?

Page 5: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Inherent Barriers for Directed Graphs

• Don’t always have sparse cut sparsifiers• Don’t always have sparse spanners• Low radius decompositions don’t always exist

Nearly linear time algorithms have been more elusive….

Electric Flow View

Can find minimum norm projection onto subspace of circulations in a graph and use in

interior point methods.

• Unit capacity directed maximum flow [M13,M17]• Dense directed minimum cost [LS14]• Shortest path with negative costs [CMSV16]

Undirected Enough

If directed graph is undirected in some way, can get fast algorithms.

• Approximate max flow on “balanced graphs” in nearly linear time [EMPS16] + [P16]

Directed Graphs?

Maximum Flow Running Time on Unit Capacitated Graphs

• 𝑂(min{𝑚3/2, 𝑚𝑛2/3}) [ET75,K73]• 𝑂(𝑚10/7) [M13]• ෨𝑂(𝑚 𝑛) [LS14]

Page 6: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

What is the right notion of a directed Laplacian system?

Directed Spectral Graph Theory• Directed cheeger inequality [C05]• Directed local partitioning [ACL07]

Are there nearly linear time linear algebraic primitives for directed graphs / asymmetric matrices?

New Linear Algebraic Primitives? Is there a directed primitive missing from our toolkit?

Page 7: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

“The Laplacian Paradigm”

Undirected Graph Laplacian Matrix

𝐺 = (𝑉, 𝐸, 𝑤)

• 𝑛 vertices V• 𝑚 edges E• 𝑤𝑒 ≥ 0 weight of edge E

𝓛 ∈ ℝ𝑛×𝑛

• 𝓛 = 𝓛⊤

• 𝓛𝒊𝒋 ≤ 0 for 𝑖 ≠ 𝑗

• 𝓛𝒊𝑖 = σ𝑗≠𝑖−𝓛𝒋𝒊

𝑖, 𝑗 ∈ 𝐸 ⇔ 𝓛𝒊𝒋 = −𝑤𝑗𝑖

Combinatorial Object Linear Algebraic Object

Natural bijection(𝓛(𝐺) = 𝑫(𝐺) − 𝑨(𝐺))

Page 8: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

“The Laplacian Paradigm”

UnDirected Graph Laplacian Matrix

𝐺 = (𝑉, 𝐸, 𝑤)

• 𝑛 vertices V• 𝑚 edges E• 𝑤𝑒 ≥ 0 weight of edge 𝑒

𝓛 ∈ ℝ𝑉×𝑉

• 𝓛 = 𝓛⊤

• 𝓛𝒊𝒋 ≤ 0 for 𝑖 ≠ 𝑗

• 𝓛𝒊𝑖 = σ𝑗≠𝑖−𝓛𝒋𝒊

𝑖, 𝑗 ∈ 𝐸 ⇔ 𝓛𝒊𝒋 = −𝑤ji

Combinatorial Object Linear Algebraic Object

Directed?

Is this actually meaningful?

Natural bijection(𝓛 𝐺 = 𝑫𝑜𝑢𝑡 𝐺 − 𝑨⊤(𝐺))

Page 9: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Directed Graph Problems

Random Walk ModelPick a random outgoing edge proportional

to weight, follow edge, repeat.

Natural Problems• Stationary distribution: limit

distribution of random walk.

• Escape probabilities: probability random from 𝑎 gets to 𝑏 before 𝑐.

• Commute times: expected amount of time random walk takes to go from 𝑎 to 𝑏.

• MDP Policy Evaluation: each state yields some reward and want computed expected average reward per step.

Can solve all of these problems essentially in time needed to solve

directed Laplacian.

Page 10: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Faster Algorithms for Computing the Stationary Distribution, Simulating Random Walks, and More (FOCS 2016)

(Michael B. Cohen, Jonathan A. Kelner, John Peebles, Richard Peng, Aaron Sidford, Adrian Vladu)

Almost-Linear-Time Algorithms for Markov Chains and New Spectral Primitives for Directed Graphs (STOC 2016)

(Michael B. Cohen, Jonathan A. Kelner, John Peebles, Richard Peng, Anup B. Rao, Aaron Sidford, Adrian Vladu)

Solving Directed Laplacian Systems in Nearly-Linear Time through Sparse LU Factorizations (FOCS 2018)

(Michael B. Cohen, Jonathan Kelner, Rasmus Kyng, John Peebles, Richard Peng, Anup Rao, and Aaron Sidford)

Aaron Sidford

AdrianVladu

RichardPeng

JonathanKelner

Michael B. Cohen

JohnPeebles

AnupRao

RasmusKyng

Page 11: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Solving Directed Laplacian?

Eulerian Laplacians

• 𝓛 ∈ ℝ𝑉×𝑉

• 𝓛𝑖𝑗 ≤ 0 for all 𝑖 ≠ 𝑗

• 𝓛 1 = 𝓛⊤1 = 0

• Graph Connection• 𝓛 = 𝑫 𝐺 − 𝑨 𝐺 𝑇

• 𝐺 is an Eulerian graph, i.e. in-degree = out degree

• 𝑫 𝐺 = degree matrix• 𝑨 𝐺 = adjacency matrix

Runtime for Solving Eulerian Laplacians

• Naïve 𝑂(𝑛𝜔) for 𝜔 < 2.373 [W12]

• Faster algorithms than naïve for sparse systems [CKPPSV16]

• Sparsifiers and almost linear time algorithms [CKPPRSV16]

• Sparse approximate LU factorizationsand nearly linear time algorithms [CKKPPRS18, Tues!]

Can solve directed Laplacian in time needed to solve Eulerian Laplacians

[CKPPSV16]

We’ll get back to this

Page 12: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

What else can we do with an Eulerian solver?

Row Column Diagonally Dominant (RCDD Systems)• 𝑨𝑖𝑖 ≥ σ𝑗≠𝑖 |𝑨𝑗𝑖| and 𝑨𝑖𝑖 ≥ σ𝑗≠𝑖 |𝑨𝑖𝑗|

• Can solve in time needed to solve Eulerian Laplacians• Analogous to SDD → Laplacian reductions

Directed Laplacians• Properties of random walk on directed graph

Eulerian Laplacian Solver

What else?

Perron-Frobenius Theory in Nearly Linear Time:Positive Eigenvectors, M-matrices, Graph Kernels, and Other Applications

(arXiv, to appear in SODA 2019)

A New Proof

AmirMahdiAhmadinejad

ArunJambulapati

AminSaberi

Aaron Sidford

Page 13: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Perron-Frobenius Theorem

• Let 𝑨 ∈ ℝ≥0𝑛×𝑛 be non-negative irreducible square matrix

• (i.e. associated graph is strongly connected)

• Let 𝜌 𝑨 = max𝑖

|𝜆𝑖(𝑨)| = lim𝑘→∞

𝑨𝑘2

1/𝑘denote spectral radius of 𝑨

• Theorem• 𝜌(𝑨) is an eigenvalue of 𝑨

• There exist unique left and right eigenvectors of eigenvalue 𝜌(𝑨)

• These eigenvectors, called Perron vector are all positive

• ∃𝑣ℓ, 𝑣𝑟 ∈ ℝ>0𝑛 such that 𝑣ℓ

⊤𝑨 = 𝜌 𝑨 𝑣ℓ⊤ and 𝑨𝑣𝑟 = 𝜌 𝑨 𝑣𝑟

Fundamental linear algebra theorem of early 1900s with implications for analyzing Markov chains,

dynamical systems, economic models, networks, etc.

Can “compute” 𝜌(𝑨),𝑣ℓ,𝑣𝑟 in Eulerian Laplacian solver time [AJSS18].

Linear Algebraic Primitive

Page 14: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

M-Matrices

M-Matrices

• Prevalent class of matrices containing directed Laplacians

• Many characterizations• “A Z-matrix where the real part of every eigenvalue is positive”

• A matrix of the form 𝑴 = 𝑠𝑰 − 𝑨 where 𝑨 ∈ ℝ≥0𝑛×𝑛 with 𝜌 𝑨 ≤ 𝑠.

𝑴−1 =1

𝑠

𝑖=0

∞ 1

𝑠𝑨

𝑖

Linear Algebraic Primitive

For geometrically distributed random walk compute expected product of edge weights.

Can solve check if a matrix is a M-matrix and solve linear systems in it in nearly Eulerian Laplacian solver time [AJSS18].

Can check if σ𝑖 𝑨𝑖

converges or diverges.

Page 15: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Applications

• Directed Laplacian related results are a special case• Stationary distribution is a Perron vector of random walk matrix• Directed Laplacians are M-matrices

• Singular Vectors• Can compute top left-right singular vectors of positive matrix in nearly linear time

• Graph Measures• Faster algorithms for graph kernels and Katz centrality

• Factor Width Two• Can checking if a matrix is factor width two (without the factorization) and solving it

in nearly linear time.

• Leontief economies

Page 16: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Rest of Talk

Proof Sketch

Solving Eulerian Laplacians

Computing Perron Vectors

Solving 𝑀-Matrices For more on this, stay tuned to rest of workshop and conference.

Just a sketch; will hide lots of details.

Technical, but very short.

Page 17: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Perron Vectors ⇒𝐌-Matrix Solver

• Let 𝑴 = 𝑠𝑰 − 𝑨 be an invertible M-matrix

• Let 𝑣ℓ, 𝑣𝑟 ∈ ℝ>0𝑛 be Perron vectors of 𝑨

• 𝑣ℓ⊤𝑨 = 𝜌 𝑨 𝑣ℓ

⊤ and 𝑨𝑣𝑟 = 𝜌 𝑨 𝑣𝑟

• Claim: 𝑳𝑴𝑹 is RCDD for 𝑳 = 𝑑𝑖𝑎𝑔(𝑣ℓ) and 𝑹 = 𝑑𝑖𝑎𝑔(𝑣𝑟)

• Proof• 𝑳𝑴𝑹 𝑖𝑗 ≤ 0 for all 𝑖 ≠ 𝑗

• 𝑳𝑴𝑹 1 ≥ 0 and1⊤ 𝑳𝑴𝑹 ≥ 0⊤

RCDD ScalingAny positive diagonal 𝑳 and 𝑹

such that 𝑳𝑴𝑹 is RCDD.

RCDD Scaling

Page 18: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

M-Matrix Solver ⇒ RCDD Scaling

• Let 𝑴 = 𝑠𝑰 − 𝑨 be an invertible M-matrix

• Claim: 𝑟 = 𝑴−11 and ℓ = 𝑴⊤ −11 yield RCDD scalings• 𝑹 = 𝑑𝑖𝑎𝑔(𝑟) and 𝑳 = 𝑑𝑖𝑎𝑔(ℓ)

• Proof

• 𝑴−1 =1

𝑠σ𝑖=0∞ 1

𝑠𝑨

𝑖and therefore ℓ and 𝑟 are positive

• 𝑳𝑴𝑹 1 = ℓ ≥ 0 and1⊤ 𝑳𝑴𝑹 = 𝑟⊤ ≥ 0⊤

RCDD ScalingAny positive diagonal 𝑳 and 𝑹

such that 𝑳𝑴𝑹 is RCDD.

Chicken and Egg ProblemGiven scaling can solve and

given solver can scale.

Page 19: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Solution: Regularization + Preconditioning

Regularization

• Let 𝑴𝛼 = 𝛼𝑰 +𝑴

• If 𝑀 M-Matrix so is 𝑀𝛼 for 𝛼 ≥ 0

• Easy to solve for large 𝛼

• Suffices to solve for small 𝛼

Preconditioning

• Suppose want to solve 𝑨𝑥 = 𝑏

• Suppose can solve systems in 𝑩

• Preconditioned Richardson• 𝑥𝑘+1 = 𝑥𝑘 − 𝜂𝑩−1[𝑨𝑥𝑘 − 𝑏]

• Converges fast if 𝑨 ≈ 𝑩

This shows up over and over again [LMPS13,KLMMS14,…, CKPPSV16,…]

Claim [AJSS18]𝑀𝛼 ≈ 𝑀𝛼/2

(in appropriate norm)*

Page 20: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Algorithm

Notation

• Let 𝑀𝛼 = 𝛼𝑰 −𝑴

• Let 𝑟𝛼 = 𝑴𝛼−11

• Let ℓ𝛼 = 𝑴𝛼⊤ −11

Algorithm

• Pick large 𝛼 > 0

• While 𝛼 is too big• Use solver for 𝛼 in preconditioned

Richardson to compute 𝑟𝛼/2 and ℓ𝛼/2• Use Eulerian solver to have solver for 𝑳𝛼/2𝑴𝛼/2𝑹𝛼/2 and therefore 𝑴𝛼/2

Note: if 𝑀 is symmetric then symmetry is preserved (i.e. only need to use symmetric Laplacian solvers)

NoteThis is hiding lots of precision issues. See paper for details.

Page 21: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Rest of Talk

Proof Sketch

Solving Eulerian Laplacians

Computing Perron Vectors

Solving 𝑀-Matrices For more on this, stay tuned to rest of workshop and conference.

Page 22: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Hopefully this is just the beginning

• “Directed Laplacian Paradigm”• We have new nearly linear time primitives for directed graphs and asymmetric matrices, can

we use this to design faster algorithms for combinatorial problems? [e.g. MDPs]

• Broader classes of systems or hardness• For example, other Laplacian-like block structure [KZ17, KPSZ18]• For example, Laplacian inversion [MNSUW18]

• Complexity implications• For example, RL v.s. L [MSRV17]

• More practical algorithms and broader implications• Stick around

Page 23: Linear Algebraic Primitives Beyond Laplacian Solvers · 2020-03-21 · Graph decompositions to decreasing iteration costs and speeding up convergence. (e.g. trees, spanners) Idea

Thank youQuestions?

Contact Info:• email: [email protected]• website: www.aaronsidford.com