spectral sequencing based on graph distance

1
Spectral Sequencing Based on Graph Distance Rong Liu, Hao Zhang, Oliver van Kaick { lrong , haoz, ovankaic } @ cs.sfu.ca Introduction School of Computing Science, Simon Fraser University, Burnaby, Canada. Result Spectral Sequencing Practical Issues Linear Graph Layout Problem Our Approach Problem Spectral–Embed Graph Vertices in High Dimensional Space - (step 1) Project the Embedding to 1-D to obtain the Sequence - (step 2) Sub-sample to Reduce Complexity Avoid the Centering of Kernel Matrix K Comparison of Different Algorithms Model s a e b c d f g h We are interested in generating optimal linear mesh layouts (a sequence of mesh primitives) according to certain cost functions. Optimal mesh layouts generation has various applications: one particular example is Streaming Meshes [ Isenburg and Lindstrom, 2005 ], where streamability is measured using span and width. We cast optimal mesh layout generation problem as a more general graph layout generation problem. Consider an edge-weighted graph G=(V, E, w), a layout of G is a labeling : V→{1, 2, …, n}. To define an optimal labeling , different cost functions C ( , w) can be considered, such as: span: , is the largest index difference of the two end vertices of an edge in the labeling. One typical algorithm to generate labeling with small span is Cuthill-Mckee (CM) scheme. width: , measures, at a certain point of the linear layout, the number of edges for which only one end vertex has been encountered. Fiedler vector, the eigenvector corresponding to the second smallest eigenvalue of the graph Laplacian, is a frequently used heuristic to derive labeling with small width. | ) ( ) ( | max v u E uv | } , ) ( : ) ( { | max 1 E uv i v i u n i Although different cost functions can be considered for optimal graph layouts, we observe that it is generally desirable to have close vertices in the graph to be close in the layout . For this purpose, our algorithm (step 1) embeds graph vertices in a high dimensional space while keeping their relative distances in the graph. Then (step 2) the embedded vertices are projected onto a vector to generate the layout, with the least distance distortion. Given a weighted graph G=(V, E, w), build matrix which encodes the pair-wise distances between graph vertices. Convert D to the affinity matrix K, where K ij =exp(-D ij /2 ). Center K by setting . Consider K as a kernel matrix. With the concept of kernel method where K ij = ‹ (v i ), (v j )›, a vertex v is mapped to (v) in a high dimensional feature space. Thus K implicitly defines an embedding (V) = { (v) | v V } . The order of distances among graph vertices is preserved: closer vertices in the graph (with smaller D ij ) are also closer in the feature space (with smaller ij ). Order of Distances among Vertices are Preserved in the Embedding The squared distance between two points u and v in the feature space is: ij =||(v i ), (v j )|| 2 = (v i ) T (v i ) + (v j ) T (v j ) - 2 (v i ) T (v j ) = 2 - 2 exp(- D ij /2 ). For the sake of simplicity and efficiency, the embedding (V) is simply projected onto a vector p* along which the pair-wise distances are mostly preserved. The projections are sorted to give the sequence. The projection vector is chosen as . The underlying reason is simple. Since the length of the projection of any vector onto p is smaller than its original length, the objective function above tends to preserve the collective lengths of all the projections on p*. As the result, the relative distances between vertices are mostly preserved, in abovementioned sense, after the projection. It can be proven that the sequence obtained by ordering the projections of (V) on p* is identical to that obtained by ordering the elements of the largest eigenvector U 1 of K. Therefore we simply compute U 1 and order its elements to obtain the sequence. j i j i T p v v p p 2 2 1 || || || )) ( ) ( ( || max arg * ) ( n n R D ) 1 ( ) 1 ( : T T n I K n I K 11 11 The spectral sequencing algorithm is not practical yet due to the high computational overhead involved in the construction and the eigenvalue decomposition of K. We solve this problem by resorting to sub- sampling. To build K, the overhead comes from the construction of D where Dijkstra shortest path algorithm is applied to all vertices. With sub-sampling, we only compute a small subset of rows of K, reducing the complexity from O(n 2 log(n)) to O(lnlog(n)), where n is the problem size and l « n is the number of samples. To compute the eigenvectors of K when only its partial rows are available, we use Nyström method. Without loss of generality, consider the sampled rows, [A B], are the leading rows, where A encodes the affinities between samples and B contains the cross-affinities between samples and the remaining. Nyström method computes the approximate eigenvectors in columns of as follows: B A K U U A T 1 ˆ U B U U T partial kernel matrix: eigenvalue decomposition of A: approximate leading eigenvectors of K U ˆ ? As mentioned before, the kernel matrix K needs to be centered before the eigenvalue decomposition. When sub-sampling is applied, the problem is that K cannot be centered by only knowing the sampled rows, [A B]. Denote by the centered kernel matrix, it can be formally shown that when the kernel width is sufficiently large, its largest eigenvector is close to the second largest eigenvector of un-centered K. Resultantly, we do not center K explicitly; instead, we simply use its second largest eigenvector for sequencing. To verify its effectiveness, we take a graph with 600 vertices and construct its corresponding K and . Then we compute the L2 norm of the difference between , the largest eigenvector of and , and , the second largest eigenvector of K, against the size of As we can see from the plot, the difference between the two eigenvectors is negligible when is sufficiently large. In our application, we set to the average distance computed. K K 1 U 2 U K Conclusion and Future Work The results plotted are obtained on the mesh primal graph. Our approach outperforms Laplacian scheme in terms of span and CM scheme in terms of width. Therefore in applications where both measures are important, our approach could potentially provide a better trade-off. In the future, we plan to investigate the influence of kernel functions, which is used to convert distance matrix D to affinity matrix K, on the distribution of points in the feature space, so as to improve the performance of our approach for both span and width, and also other cost functions. It is also interesting to study other techniques to obtain the sequence (layout) from the high dimensional embedding. We compare our approach with CM and Laplacian schemes, which are effective for minimizing span and width, respectively. Another four cost functions are also considered.

Upload: vivienne-dotson

Post on 01-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Spectral Sequencing Based on Graph Distance. Rong Liu, Hao Zhang, Oliver van Kaick {lrong, haoz, ovankaic} @ cs.sfu.ca. School of Computing Science, Simon Fraser University, Burnaby, Canada. Introduction. Problem. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Spectral Sequencing Based on Graph Distance

Spectral Sequencing Based on Graph Distance Rong Liu, Hao Zhang, Oliver van Kaick {lrong, haoz, ovankaic} @ cs.sfu.ca

Introduction

School of Computing Science, Simon Fraser University, Burnaby, Canada.

Result

Spectral Sequencing Practical Issues

Linear Graph Layout Problem

Our Approach

Problem

Spectral–Embed Graph Vertices in High Dimensional Space - (step 1)

Project the Embedding to 1-D to obtain the Sequence - (step 2)

Sub-sample to Reduce

Complexity

Avoid the Centering of Kernel Matrix K

Comparison of Different Algorithms

Models

a eb c d f g h

We are interested in generating optimal linear mesh layouts (a sequence of mesh primitives) according to certain cost functions. Optimal mesh layouts generation has various applications: one particular example is Streaming Meshes [Isenburg and Lindstrom, 2005], where streamability is measured using span and width.

We cast optimal mesh layout generation problem as a more general graph layout generation problem.

Consider an edge-weighted graph G=(V, E, w), a layout of G is a labeling : V→{1, 2, …, n}.

To define an optimal labeling , different cost functions C (, w) can be considered, such as:

span: , is the largest index difference of the two end vertices of an edge in the labeling. One typical algorithm to generate labeling with small span is Cuthill-Mckee (CM) scheme.

width: , measures, at a certain point of the linear layout, the number of edges for which only one end vertex has been encountered. Fiedler vector, the eigenvector corresponding to the second smallest eigenvalue of the graph Laplacian, is a frequently used heuristic to derive labeling with small width.

|)()(|max vuEuv

|},)(:)({|max1 Euviviuni

Although different cost functions can be considered for optimal graph layouts, we observe that it is generally desirable to have close vertices in the graph to be close in the layout. For this purpose, our algorithm (step 1) embeds graph vertices in a high dimensional space while keeping their relative distances in the graph. Then (step 2) the embedded vertices are projected onto a vector to generate the layout, with the least distance distortion.

Given a weighted graph G=(V, E, w), build matrix which encodes the pair-wise distances between graph vertices.

Convert D to the affinity matrix K, where Kij=exp(-Dij/2).

Center K by setting .

Consider K as a kernel matrix. With the concept of kernel method where Kij= ‹(vi),

(vj)›, a vertex v is mapped to (v) in a high dimensional feature space. Thus K

implicitly defines an embedding (V) = {(v) | v V } .

The order of distances among graph vertices is preserved: closer vertices in the graph (with smaller Dij) are also closer in the feature space (with smaller ij).

Order of Distances among Vertices are Preserved in the

Embedding The squared distance between two points u and v in the feature space is:

ij=||(vi), (vj)||2 = (vi)T(vi) + (vj)T(vj) - 2 (vi)T(vj) = 2 - 2 exp(-Dij/2).

For the sake of simplicity and efficiency, the embedding (V) is simply projected onto a vector p* along which the pair-wise distances are mostly preserved. The projections are sorted to give the sequence.

The projection vector is chosen as . The

underlying reason is simple. Since the length of the projection of any vector onto p is smaller than its original length, the objective function above tends to preserve the collective lengths of all the projections on p*. As the result, the relative distances between vertices are mostly preserved, in abovementioned sense, after the projection.

It can be proven that the sequence obtained by ordering the projections of (V) on p* is identical to that obtained by ordering the elements of the largest eigenvector U1 of K. Therefore we simply compute U1 and order its elements to

obtain the sequence.

ji

ji

T

p

vvpp 2

21||||

||))()((||maxarg*

)( nnRD

)1

()1

(: TT

nIK

nIK 1111

The spectral sequencing algorithm is not practical yet due to the high computational overhead involved in the construction and the eigenvalue decomposition of K. We solve this problem by resorting to sub-sampling.

To build K, the overhead comes from the construction of D where Dijkstra shortest path algorithm is applied to all vertices. With sub-sampling, we only compute a small subset of rows of K, reducing the complexity from O(n2log(n)) to O(lnlog(n)), where n is the problem size and l « n is the number of samples.

To compute the eigenvectors of K when only its partial rows are available, we use Nyström method. Without loss of generality, consider the sampled rows, [A B], are the leading rows, where A encodes the affinities between samples and B contains the cross-affinities between samples and the remaining. Nyström method computes the approximate eigenvectors in columns of as follows:

BAK

UUA T

1

ˆUB

UU

Tpartial kernel matrix:

eigenvalue decomposition of A: approximate leading eigenvectors of K

U

?

As mentioned before, the kernel matrix K needs to be centered before the eigenvalue decomposition. When sub-sampling is applied, the problem is that K cannot be centered by only knowing the sampled rows, [A B].

Denote by the centered kernel matrix, it can be formally shown that when the kernel width is sufficiently large, its largest eigenvector is close to the second largest eigenvector of un-centered K. Resultantly, we do not center K explicitly; instead, we simply use its second largest eigenvector for sequencing.

To verify its effectiveness, we take a graph with 600 vertices and construct its corresponding K and . Then we compute the L2 norm of the difference between , the largest eigenvector of and , and , the second largest eigenvector of K, against the size of As we can see from the plot, the difference between the two eigenvectors is negligible when is sufficiently large. In our application, we set to the average distance computed.

K

K

1U

2UK

Conclusion and Future WorkThe results plotted are obtained on the mesh primal graph. Our approach

outperforms Laplacian scheme in terms of span and CM scheme in terms of width. Therefore in applications where both measures are important, our approach could potentially provide a better trade-off.

In the future, we plan to investigate the influence of kernel functions, which is used to convert distance matrix D to affinity matrix K, on the distribution of points in the feature space, so as to improve the performance of our approach for both span and width, and also other cost functions. It is also interesting to study other techniques to obtain the sequence (layout) from the high dimensional embedding.

We compare our approach with CM and Laplacian schemes, which are effective for minimizing span and width, respectively. Another four cost functions are also considered.