lecture 8: geometric graph models. factorization and sdp ......radu balan (umd) geometric embeddings...

23
Lecture 8: Geometric Graph Models. Factorization and SDP Approach Radu Balan Department of Mathematics, AMSC, CSCAMM and NWC University of Maryland, College Park, MD April 3, 2018

Upload: others

Post on 11-Aug-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Lecture 8: Geometric Graph Models. Factorization andSDP Approach

Radu Balan

Department of Mathematics, AMSC, CSCAMM and NWCUniversity of Maryland, College Park, MD

April 3, 2018

Page 2: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Euclidean Embeddings of Weighted GraphsHigh-Level Introduction

The embedding problem is the following:

Main ProblemGiven a weighted graph G = (V,W ) with n nodes, find a dimension d anda set of n points {y1, · · · , yn} ⊂ Rd such that Wi ,j = ϕ(‖yi − yj‖) forsome monotonically decreasing function ϕ.

Approaches:1 Nearly Isometric Embeddings. Three steps: (1) convert weights

into geometric distances; (2) solve a SDP optimization problem; (3)perform a factorization (PCA) of the solution.

2 Laplacian Eigenmaps. Three steps: (1) Construct the symmetricnormalized weighted Laplacian matrix; (2) Solve for a set ofeigenvectors; (3) Perform embedding.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 3: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Euclidean Embeddings of Weighted GraphsHigh-Level Introduction

The embedding problem is the following:

Main ProblemGiven a weighted graph G = (V,W ) with n nodes, find a dimension d anda set of n points {y1, · · · , yn} ⊂ Rd such that Wi ,j = ϕ(‖yi − yj‖) forsome monotonically decreasing function ϕ.

Approaches:1 Nearly Isometric Embeddings. Three steps: (1) convert weights

into geometric distances; (2) solve a SDP optimization problem; (3)perform a factorization (PCA) of the solution.

2 Laplacian Eigenmaps. Three steps: (1) Construct the symmetricnormalized weighted Laplacian matrix; (2) Solve for a set ofeigenvectors; (3) Perform embedding.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 4: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Distance Models for Weighted Graphs

Let W = (Wi ,j)1≤i ,j≤n be a known weight matrix.Most frequently employed models:

1 Exponential Law: Wi ,j = e−d2i,j/σ

2.

2 Power Law: Wi ,j = Cdp

i,j.

where di ,j denotes the distance between points i and j .σ, C , p are parameters.

Without loss of generality one can scale the coordinates (points) andabsorb global constants. Hence we can assume σ = 1, C = 1.Therefore one can compute the estimated squared-distances by:

d2i ,j =

− log(Wi ,j) exponential law(1

Wi,j

)2/ppower law

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 5: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Distance Models for Weighted Graphs

Let W = (Wi ,j)1≤i ,j≤n be a known weight matrix.Most frequently employed models:

1 Exponential Law: Wi ,j = e−d2i,j/σ

2.

2 Power Law: Wi ,j = Cdp

i,j.

where di ,j denotes the distance between points i and j .σ, C , p are parameters.Without loss of generality one can scale the coordinates (points) andabsorb global constants. Hence we can assume σ = 1, C = 1.Therefore one can compute the estimated squared-distances by:

d2i ,j =

− log(Wi ,j) exponential law(1

Wi,j

)2/ppower law

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 6: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataProblem statement and Ambiguities

Solve the geometric problem:

Main ProblemGiven the set of all squared-distances {d2

i ,j ; 1 ≤ i , j ≤ n} find a dimensiond and a set of n points {y1, · · · , yn} ⊂ Rd so that ‖yi − yj‖2 = d2

i ,j ,1 ≤ i , j ≤ n .

Note the set of points is unique up to rigid transformations: translations,rotations and reflections: Rd × O(d). This means two sets of n points inRd have the same pairwise distances if and only if one set is obtained fromthe other set by a combination of rigid transformations.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 7: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataConverting pairwise distances into the Gram matrix

Let S = (Si ,j)1≤i ,j≤n denote the n × n symmetric matrix of squaredpairwise distances:

Si ,j = d2i ,j ,Si ,i = 0

Denote by 1 the n-vector of 1’s (the Matlab ones(n, 1)). Letν = (‖yi‖2)1≤i≤n denote the unknown n-vector of squared-norms. Finally,let G = (〈yi , yj〉)1≤i ,j≤n denote the Gram matrix of scalar productsbetweenWe can remove the translation ambiguity by fixing the center:

n∑i=1

yi = 0

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 8: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataConverting pairwise distances into the Gram matrix

Expand the square:d2

i ,j = ‖yi − yj‖2 = ‖yi‖2 + ‖yj‖2 − 2〈yi , yj〉Rewrite the system as:

2G = ν · 1T + 1 · νT − S (∗)The center condition reads: G · 1 = 0, which implies:

0 = 2nνT · 1− 1T · S · 1Let ρ := νT · 1 =

∑ni=1 ‖yi‖2. We obtain:

ρ = 12n 1T · S · 1 = 1

2n

n∑i=1

n∑j=1

d2i ,j

ν = 1n (S · 1− ρ1) = 1

n (S − ρI) · 1

that you substitute back into (*).Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 9: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataConverting pairwise squared-distances into the Gram matrix: Algorithm

AlgorithmInput: Symmetric matrix of squared pairwise distances S = (d2

i ,j)1≤i ,j≤n.1 Compute:

ρ = 12n 1T · S · 1 = 1

2n

n∑i=1

n∑j=1

d2i ,j

2 Set:ν = 1

n (S · 1− ρ1) = 1n (S − ρI) · 1

3 Compute:

G = 12ν ·1

T + 121 ·νT− 1

2S = 12n (S−ρI)1 ·1T + 1

2n 1 ·1T (S−ρI)− 12S.

Output: Symmetric Gram matrix GRadu Balan (UMD) Geometric Embeddings April 3, 2018

Page 10: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataFactorization of the G matrix

In the absence of noise (i.e. if Si ,j are indeed the Euclidean distances), theGram matrix G should have rank d , the minimum dimension of theisometric embedding.If S is noisy, then G has approximate rank d .To find d and Y , the matrix of coordinates, perform theeigendecomposition:

G = QΛQT

where Λ is the diagonal matrix of eigenvalues, ordered monotonicallydecreasing. Choose d as the number of significant positive eigenvalues(i.e. truncate to zero the negative eigenvalues, as well as the smallestpositive eigenvalues). Note G has always at least one zero eigenvalue:rank(G) ≤ n − 1.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 11: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataFactorization of the G matrix

Then we obtain an approximate factorization of G (exact in the absence ofnoise):

G ≈ Q1Λ1QT1

where Q1 is the n × d submatrix of Q containing the first d columns.Set Y = Λ1/2

1 QT1 , so that G ≈ Y T Y .

The d × n matrix Y contains the embedding vectors y1, · · · , yn as columns:

Y = [y1|y2| · · · |yn] .

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 12: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Full DataGram matrix factorization: AlgorithmAlgorithmInput: Symmetric n × n Gram matrix G.

1 Compute the eigendecomposition of G, G = QΛQT with diagonal ofΛ sorted in a descending order;

2 Determine the number d of significant positive eigevalues;3 Partition

Q = [Q1 Q2] , and Λ =[

Λ1 00 Λ2

]where Q1 contains the first d columns of Q, and Λ1 is the d × ddiagonal matrix of significant positive eigenvalues of G.

4 Compute:Y = Λ1/2

1 QT1

Output: Dimension d and d × n matrix Y of vectors Y = [y1| · · · |yn]Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 13: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Partial DataDimension estimation

Consider now the case that only a subset of the pairwise squared-distancesare known, indexed by Θ. Assume that only m distances (out ofn(n− 1)/2 possible values) are known – this means the cardinal of Θ is m.

RemarkMinimum number of measurements: m ≥ nd − d(d+1)

2 , because: nd is thenumber of degrees of freedom (coordinates) needed to describe n points inRd ; d(d + 1)/2 is the the dimension of the Lie group of Euclideantransformations: translations in Rd of dimension d and orthogonaltransformations O(d) of dimension d(d − 1)/2 (the dimension of the Liealgebra of anti-symmetric matrices).

In the absence of noise, for sufficiently large m but less than n(n − 1)/2,exact (i.e. isometric) embedding is possible.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 14: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Isometric Embeddings with Partial DataLinear constraints

Given any set of vectors {y1, · · · , yn} and their associated matrixY = [y1| · · · |yn] their invariant to the action of the rigid transformations(translations, rotations, and reflections) is the Gram matrix of the centeredsystem:

G = (I − 1n 1 · 1T )Y T Y (I − 1

n 1 · 1T ) =: LY T YL , L = I − 1n 1 · 1T .

On the other hand, the distance between points i and j can be computedby:

d2i ,j = ‖yi − yj‖2 = Gi ,i − Gi ,j + Gj,j − Gj,i = eT

ij Geij

whereeij = δi − δj = [0 · · · 0 1 · · · − 1 0 · · · 0]T

where 1 is on position i , −1 is on position j , and 0 everywhere else.Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 15: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Almost Isometric Embeddings with Partial DataThe SDP Problem

Reference [10] proposes to find the matrix G by solving the followingSemi-Definite Program:

minG = GT ≥ 0

G1 = 0|〈Geij , eij〉 − d2

i ,j | ≤ ε , (i , j) ∈ Θ

trace(G)

where d2i ,j are noisy estimates di ,j and ε is the maximum noise level. The

trace promotes low rank in this optimization. However, this is basically afeasibility problem: Decrease ε to the minimum value where a feasiblesolution exists. With probability 1 that is unique.How to do this: Use CVX with Matlab.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 16: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Nearly Isometric Embeddings with Partial DataStability to Noise

[10] proves the following stability result in the case of partialmeasurements. Here we denote Θr = {(i , j) , ‖yi − yj‖ ≤ r} the set of allpairs of points at distance at most r .

TheoremLet {y1, · · · , yn} be n nodes distributed uniformly at random in thehypercube [−0.5, 0.5]d . Further, assume that we are given noisymeasurement of all distances in Θr for some r ≥ 10

√d(log(n)/n)1/d and

the induced geometric graph of edges is connected. Let d2i ,j = d2

i ,j + νi ,jwith |νi ,j | ≤ ε. Then with high probability, the error distance between theestimated Y = [y1, | · · · |yn] returned by the SDP-based algorithm and thecorrect coordinate matrix Y = [y1| · · · |yn] is upper bounded as

‖LY T Y L− LY T YL‖1 ≤ C1(nrd )5 ε

r 4 .

Conversely, w.h.p., there exist adversarial measurement errors {zi ,j}(i ,j)∈Θrsuch that

‖LY T Y L− LY T YL‖1 ≥ C2min(1, εr 4 ).

Here, C1 and C2 denote universal constants that depend only on d.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 17: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Convex Sets. Convex Functions

A set S ⊂ Rn is called a convex set if for any points x , y ∈ S the linesegment [x , y ] := {tx + (1− t)y , 0 ≤ t ≤ 1} is included in S, [x , y ] ⊂ S.

A function f : S → R is called convex if for any x , y ∈ S and 0 ≤ t ≤ 1,f (t x + (1− t)y) ≤ t f (x) + (1− t)f (y).Here S is supposed to be a convex set in Rn.Equivalently, f is convex if its epigraph is a convex set in Rn+1. Epigraph:{(x , u) ; x ∈ S, u ≥ f (x)}.

A function f : S → R is called strictly convex if for any x 6= y ∈ S and0 < t < 1, f (t x + (1− t)y) < t f (x) + (1− t)f (y).

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 18: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Convex Optimization Problems

The general form of a convex optimization problem:

minx∈S

f (x)

where S is a closed convex set, and f is a convex function on S.Properties:

1 Any local minimum is a global minimum. The set of minimizers is aconvex subset of S.

2 If f is strictly convex, then the minimizer is unique: there is only onelocal minimizer.

In general S is defined by equality and inequality constraints:S = {gi (x) ≤ 0 , 1 ≤ i ≤ p} ∩ {hj(x) = 0 , 1 ≤ j ≤ m}. Typically hj arerequired to be affine: hj(x) = aT x + b.

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 19: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

Convex Programs

The hiarchy of convex optimization problems:1 Linear Programs: Linear criterion with linear constraints2 Quadratic Programs: Quadratic Criterion with Linear Constraints;

Quadratically Constrained Quadratic Problems (QCQP);Second-Order Cone Program (SOCP)

3 Semi-Definite Programs(SDP)Typical SDP:

minX = X T ≥ 0

trace(XBk) = yk , 1 ≤ k ≤ ptrace(XCj) ≤ zj , 1 ≤ j ≤ m

trace(XA)

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 20: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

CVXMatlab package

Downloadable from: http://cvxr.com/cvx/ . Follows ”Disciplined” ConvexProgramming – a la Boyd [2].

m = 20; n = 10; p = 4;A = randn(m,n); b = randn(m,1);C = randn(p,n); d = randn(p,1); e = rand;cvx_begin

variable x(n)minimize( norm( A * x - b, 2 ) )subject to

C * x == dnorm( x, Inf ) <= e

cvx_end

minCx = d‖x‖∞ ≤ e

‖Ax − b‖

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 21: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

CVXSDP Example

cvx_begin sdp

variable X(n,n) semidefinite;minimize trace(X);subject toX*ones(n,1) == zeros(n,1);abs(trace(E1*X)-d1)<=epsx;abs(trace(E2*X)-d2)<=epsx;

cvx_end

minimize trace(X )subject to X = X T ≥ 0

X · 1T = 0|trace(E1X )− d1| ≤ ε|trace(E2X )− d2| ≤ ε

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 22: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

ReferencesB. Bollobas, Graph Theory. An Introductory Course,Springer-Verlag 1979. 99(25), 15879–15882 (2002).

S. Boyd, L. Vandenberghe, Convex Optimization, available online at:http://stanford.edu/ boyd/cvxbook/

F. Chung, Spectral Graph Theory, AMS 1997.

F. Chung, L. Lu, The average distances in random graphs with givenexpected degrees, Proc. Nat.Acad.Sci. 2002.

F. Chung, L. Lu, V. Vu, The spectra of random graphs with GivenExpected Degrees, Internet Math. 1(3), 257–275 (2004).

R. Diestel, Graph Theory, 3rd Edition, Springer-Verlag 2005.

P. Erdos, A. Renyi, On The Evolution of Random Graphs

Radu Balan (UMD) Geometric Embeddings April 3, 2018

Page 23: Lecture 8: Geometric Graph Models. Factorization and SDP ......Radu Balan (UMD) Geometric Embeddings April 3, 2018 Geometric Graph Models Convex Optimizations Euclidean Embeddings

Geometric Graph Models Convex Optimizations

G. Grimmett, Probability on Graphs. Random Processes onGraphs and Lattices, Cambridge Press 2010.

C. Hoffman, M. Kahle, E. Paquette, Spectral Gap of Random Graphsand Applications to Random Topology, arXiv: 1201.0425 [math.CO]17 Sept. 2014.

[10]A. Javanmard, A. Montanari, Localization from Incomplete NoisyDistance Measurements, arXiv:1103.1417, Nov. 2012; also ISIT 2011.J. Leskovec, J. Kleinberg, C. Faloutsos, Graph Evolution: Densificationand Shrinking Diameters, ACM Trans. on Knowl.Disc.Data, 1(1) 2007.

Radu Balan (UMD) Geometric Embeddings April 3, 2018