Sampling Large Data on Graphs

Ilan Shomorony, A. Salman Avestimehr

Introduction

Graphs arise as a natural way to represent large datasets obtained in many practical contexts, such as social, biological, and sensor networks . For a graph G=(V,E)G=(V,E), the data can be embedded as scalar or vector-valued labels on the vertices v∈Vv\in V, while the weights wew_{e} of the edges e∈Ee\in E represent some underlying structure in the data. As an example, one can think of a graph where each vertex corresponds to a different movie title, and the edge weights represent a measure of similarity between the movies. In this case, the graph data can be the ratings given by a person to each movie title, and one would expect movies connected by edges with large weights to be given similar scores.

Particularly in big data scenarios, a natural question is how well a given sample of the data points can be used to estimate the remainder of the data. In other words, is it possible to predict the data point at one vertex by interpolating the data from another set of points? In the context of the movie ratings data, this can be viewed as the celebrated “Netflix” challenge , or more in general as data prediction problems for recommendation systems. Other applications include semi-supervised learning of categorized data and ranking problems .

Intuitively, the reason why this graph data interpolation should be at all possible is that the graph contains information about the underlying data structure; thus, a set of samples together with the graph edge weights should reveal information about the missing data points. As pointed out in , this can be viewed as assuming that the graph data is slow-varying or smooth on the graph. Therefore, analogous to the classical signal processing domain, where a smooth signal (i.e., a signal with a small bandwidth) can be recovered from a small set of samples, smoother graph signals should have a higher degree of redundancy in their data, and should be recoverable from a smaller set of samples. These ideas are part of what motivates the emerging field of signal processing on graphs and, in particular, the graph data sampling theory .

Classical sampling theory states that a signal with bandwidth WW can be recovered if we sample at a rate 2W2W. Therefore, given a sampling rate, one can compute the cut-off frequency; i.e., the highest frequency component that a given signal may have so that it is recoverable from the samples, which is known as the Nyquist frequency. In , the authors seek a similar characterization in the context of graph signals, by using tools from spectral graph theory. The notion of frequency is introduced via the eigenvalues and eigenvectors of the graph Laplacian. In order to obtain a sampling theorem for graph signals, they consider two questions: What is the maximum possible bandwidth (the cut-off frequency) of a graph signal such that it can be recovered from a given subset of nodes, and conversely, what is the smallest possible subset of nodes that allows the correct recovery of all signals up to a given bandwidth?

Several works prior to already dealt with these questions to some extent. For example, in , the cut-off frequency is established for bipartite graphs. For arbitrary graphs, sufficient conditions for unique recoverability from a sampling set are stated in , and then used to derive a lower bound on the cut-off frequency in . In , the authors make significant progress towards establishing a sampling theory for graph signals. They present linear-algebraic necessary and sufficient conditions for a given set of samples to correctly recover signals up to a given bandwidth, which is then used to obtain an increasing sequence of lower bounds on the cut-off frequency of a given sampling set. The drawback of such a characterization is that it is unclear in general whether this method can indeed provide arbitrarily close approximations to the cut-off frequency and, if so, how far in the sequence of lower bounds one needs to go.

In this work, we show that the linear-algebraic conditions from can be used in a different way, which yields an exact characterization of the cut-off frequency. This is done in Section 3. Then, in Section 4, we show that this characterization can be used to provide efficient algorithms for finding optimal sampling sets, in two senses. First, what is the subset of nodes of a given size with the largest cut-off frequency? Second, what is the smallest subset of nodes with a given cut-off frequency? In addition, in Section 5, we study the performance of random uniform sampling when compared to the centralized optimal sampling provided by the proposed algorithms.

Notation and Background

Characterizing the Cut-off Frequency

The cut-off frequency ωc(S)\omega_{c}({\mathcal{S}}) of a set S{\mathcal{S}} is the largest ω\omega such that S{\mathcal{S}} is a uniqueness set for PWω(G)PW_{\omega}(G).

Suppose that h∈M∩L2(Sc){\bf h}\in M\cap L_{2}({\mathcal{S}}^{c}) with h≠0{\bf h}\neq{\bf 0}. Then, for any f∈M−{0}{\bf f}\in M-\{{\bf 0}\}, we have g=f+h∈M{\bf g}={\bf f}+{\bf h}\in M. But this implies that f(S)=g(S){\bf f}({\mathcal{S}})={\bf g}({\mathcal{S}}) and f≠g{\bf f}\neq{\bf g}. By Definition 1, S{\mathcal{S}} is not a uniqueness set for MM. Conversely, suppose M∩L2(Sc)={0}M\cap L_{2}({\mathcal{S}}^{c})=\{\bf 0\}. Take any f,g∈M{\bf f},{\bf g}\in M with f(S)=g(S){\bf f}({\mathcal{S}})={\bf g}({\mathcal{S}}). Then we must have f(S)−g(S)=0{\bf f}({\mathcal{S}})-{\bf g}({\mathcal{S}})={\bf 0}, and f−g∈M∩L2(Sc){\bf f}-{\bf g}\in M\cap L_{2}({\mathcal{S}}^{c}), implying that f=g{\bf f}={\bf g}. ∎

In , the authors utilize the characterization of a uniqueness set given by Lemma 1 to estimate the cut-off frequency of a set S{\mathcal{S}}. More precisely, they show that S{\mathcal{S}} is uniqueness set for PWω(G)PW_{\omega}(G) for any ω≤Ωk≜(σ1,k)1/k\omega\leq\Omega_{k}\triangleq(\sigma_{1,k})^{1/k}, where σ1,k\sigma_{1,k} denotes the smallest eigenvalue of the reduced matrix (Lk)Sc({\mathcal{L}}^{k})_{{\mathcal{S}}^{c}}, obtained by restricting Lk{\mathcal{L}}^{k} to the rows and columns corresponding to nodes in Sc{\mathcal{S}}^{c}. Since, as shown in , (σ1,k)1/k(\sigma_{1,k})^{1/k} is increasing in kk, it provides an increasing sequence of lower bounds on the cut-off frequency ωc(S)\omega_{c}({\mathcal{S}}).

As it turns out, Lemma 1 can be used in a different way in order to characterize ωc(S)\omega_{c}({\mathcal{S}}) exactly. Notice that, from (2), S{\mathcal{S}} is a uniqueness set for PWω(G)PW_{\omega}(G) if and only if PWω(G)∩L2(Sc)={0}PW_{\omega}(G)\cap L_{2}({\mathcal{S}}^{c})=\{\bf 0\}. Now, since L2(Sc)=span{ej:j∈Sc}L_{2}({\mathcal{S}}^{c})={\rm span}\{{\bf e}_{j}:j\in{\mathcal{S}}^{c}\}, where ej{\bf e}_{j} is the jjth standard basis vector, characterizing the largest λi\lambda_{i} for which (2) holds with M=PWλi(G)M=PW_{\lambda_{i}}(G) can be done by simply testing, for i=1,...,ni=1,...,n, whether

This can in fact be done easily for each ii by noticing that

which implies that (3) holds if and only if the matrix [u1,...,ui,ej:j∈Sc][{\bf u}_{1},...,{\bf u}_{i},{\bf e}_{j}:j\in{\mathcal{S}}^{c}] is full column rank. Therefore, the cut-off frequency ωc(S)\omega_{c}({\mathcal{S}}) can be calculated exactly as described above and we have the following result:

For a graph GG with normalized Laplacian L{\mathcal{L}} with eigenvalues 0=λ1≤λ2≤...≤λn0=\lambda_{1}\leq\lambda_{2}\leq...\leq\lambda_{n} and corresponding eigenvectors u1,...,un{\bf u}_{1},...,{\bf u}_{n}, the cut-off frequency of a subset of nodes S{\mathcal{S}} is given by

Hence S{\mathcal{S}} is a uniqueness set for PWω(G)PW_{\omega}(G) if and only if ω≤ωc(S)\omega\leq\omega_{c}({\mathcal{S}}).

The advantage of computing the cut-off frequency using Theorem 1 in comparison to the previously known estimate is illustrated in Fig. 1. We randomly generated a 300300-node graph by adding each edge with probability 0.40.4 and choosing the weight of each existing edge independently and uniformly at random from (0,1)(0,1). We then selected a set S{\mathcal{S}} with 3030 nodes at random, and compared ωc(S)\omega_{c}({\mathcal{S}}) to the lower bound given by Ωk=(σ1,k)1/k\Omega_{k}=(\sigma_{1,k})^{1/k} for increasing values of kk. As shown in Fig. 1, the lower bound does seem to converge to ωc(S)\omega_{c}({\mathcal{S}}) but it seems to require large values of kk to be arbitrarily close.

In addition, we point out that more important than the actual value of ωc(S)\omega_{c}({\mathcal{S}}) is the number of eigenvalues of L{\mathcal{L}} below ωc(S)\omega_{c}({\mathcal{S}}). That corresponds to the dimension of the subspace PWωc(S)(G)PW_{\omega_{c}({\mathcal{S}})}(G), which is the set of graph signals that can be correctly reconstructed from S{\mathcal{S}}. While for k=120k=120, the approximation given by Ωk\Omega_{k} to ωc\omega_{c} seems to be good, as shown in Fig. 1, it implies that S{\mathcal{S}} can reconstruct signals in a subspace of dimension 1717, as opposed to 3030. Therefore, if we use the true cut-off frequency value as opposed to its estimate in an interpolation technique such as the one described in , a better prediction of the missing data can be obtained. Finally, we notice that since ∣S∣=30|{\mathcal{S}}|=30, by dimensionality considerations we cannot expect S{\mathcal{S}} to reconstruct signals in a space with dimension larger than 3030. Hence, S{\mathcal{S}} is optimal in the sense of having maximum cut-off frequency, even though it was chosen at random. As we discuss in Section 5, this seems to be the expected behavior, provided that the graph is connected.

Finding Optimal Sampling Sets

Besides characterizing the cut-off frequency of a set S{\mathcal{S}}, the approach from the previous section can be used to answer two optimization questions related to finding optimal sampling sets. Notice that finding an optimal sampling set, i.e., a set S{\mathcal{S}} with the highest cut-off frequency under some constraint, has significant practical relevance, since in big datasets, we are often interested in finding a small yet representative sampling set. The following two results and their proofs can be understood as providing approaches to selecting optimal sampling sets from the point of view of their cut-off frequencies.

The first problem we consider is to find, for a given ω\omega, the smallest set S{\mathcal{S}} with ωc(S)≥ω\omega_{c}({\mathcal{S}})\geq\omega.

For a graph GG with normalized Laplacian L{\mathcal{L}} with eigenvalues 0=λ1≤λ2≤...≤λn0=\lambda_{1}\leq\lambda_{2}\leq...\leq\lambda_{n} and corresponding eigenvectors u1,...,un{\bf u}_{1},...,{\bf u}_{n}, the problem

can be solved in polynomial time and an optimal S{\mathcal{S}} has size ∣S∣=m|{\mathcal{S}}|=m, where λm\lambda_{m} is the smallest eigenvalue of L{\mathcal{L}} such that λm≥ω\lambda_{m}\geq\omega.

From Theorem 1, we conclude that wc(S)≥λm≥ωw_{c}({\mathcal{S}})\geq\lambda_{m}\geq\omega. Moreover, for any S′{\mathcal{S}}^{\prime} with ∣S′∣<m|{\mathcal{S}}^{\prime}|<m, we will have ∣(S′)c∣>n−m|({\mathcal{S}}^{\prime})^{c}|>n-m, and we must have

and Theorem 1 now implies that ωc(S′)≤λm−1<ω\omega_{c}({\mathcal{S}}^{\prime})\leq\lambda_{m-1}<\omega.

Computing a set S{\mathcal{S}} of minimum size satisfying ωc(S)≥ω\omega_{c}({\mathcal{S}})\geq\omega requires first performing the eigendecomposition of L{\mathcal{L}}, and then constructing the basis [u1,...,um,ej1,...,ejn−m][{\bf u}_{1},...,{\bf u}_{m},{\bf e}_{j_{1}},...,{\bf e}_{j_{n-m}}] as described in Algorithm 1, all of which can be done in polynomial time, since L{\mathcal{L}} is positive semidefinite. ∎

The second optimization question is to find, for a given size, the sampling set S{\mathcal{S}} with the maximum cut-off frequency. As it turns out, the same algorithm provides an efficient solution to this problem.

For a graph GG with normalized Laplacian L{\mathcal{L}} with eigenvalues 0=λ1≤λ2≤...≤λn0=\lambda_{1}\leq\lambda_{2}\leq...\leq\lambda_{n} and corresponding eigenvectors u1,...,un{\bf u}_{1},...,{\bf u}_{n}, the problem

can be solved in polynomial time and the optimal S{\mathcal{S}} has ωc(S)=λm\omega_{c}({\mathcal{S}})=\lambda_{m}.

We know from the previous corollary that we can find a set S{\mathcal{S}} of size ∣S∣=m|{\mathcal{S}}|=m and cut-off frequency ωc(S)=λm\omega_{c}({\mathcal{S}})=\lambda_{m} using Algorithm 1 in polynomial time. Moreover, for any S{\mathcal{S}} with ∣S∣≤m|{\mathcal{S}}|\leq m, we have ∣Sc∣≥n−m|{\mathcal{S}}^{c}|\geq n-m, and Theorem 1 implies that ωc(S′)≤λm\omega_{c}({\mathcal{S}}^{\prime})\leq\lambda_{m}. ∎

In Fig. 2, we illustrate the application of Algorithm 1 to find the optimal set S{\mathcal{S}} in two scenarios. First we consider a random graph with 200200 nodes on the plane, where edges are added between nodes whose distance is below a fixed threshold and all edges have weight 11. In Fig. 2, we see the optimal set S{\mathcal{S}} with ∣S∣=25|{\mathcal{S}}|=25. As intuition would suggest, the nodes in S{\mathcal{S}} try to cover the graph evenly, and the number of nodes in each connected component seems proportional to its size.

In Fig. 2, we consider a cycle with 200200 nodes and additional edges connecting a set AA of 44 consecutive nodes to a set BB of 4040 consecutive nodes. We see that an optimal set S{\mathcal{S}} contains one node in AA and is essentially evenly distributed over the nodes in V−BV-B, since nodes in BB are close to the one node chosen from AA.

Performance of Random Sampling

As we noticed in Section 3, for the example illustrated in Fig. 1, a random set S{\mathcal{S}} of size ∣S∣=30|{\mathcal{S}}|=30 has ωc(S)=λ30\omega_{c}({\mathcal{S}})=\lambda_{30}. From Corollary 2, this is in fact an optimal choice of S{\mathcal{S}} under the constraint ∣S∣≤30|{\mathcal{S}}|\leq 30. Theorem 1 in fact suggests that this should be the case under fairly general conditions, since it is reasonable that by picking a set of n−mn-m standard basis vectors ej1,...,ejn−m{\bf e}_{j_{1}},...,{\bf e}_{j_{n-m}} at random we will have

Notice however that, if the graph has disconnected components, random sampling may lead to one of the components not being sampled at all and, as illustrated in the example in Fig. 2, the optimal sampling set tries to keep the number of samples per connected component proportional to the size of the component. We conjecture the following:

Consider a connected graph G=(V,E)G=(V,E) and an arbitrary set S⊂V{\mathcal{S}}\subset V with ∣S∣=m|{\mathcal{S}}|=m. For almost all assignments of the edge weights, if we let 0=λ1≤...≤λn0=\lambda_{1}\leq...\leq\lambda_{n} be the eigenvalues of the normalized Laplacian L{\mathcal{L}},

implying that ωc(S)=λm\omega_{c}({\mathcal{S}})=\lambda_{m}.

Numerical experiments where we assign the weights to the edges of a connected graph at random give strong support for this claim. If true, this shows that, in terms of the cut-off frequency, sampling uniformly at random from the nodes in a graph is optimal. From a practical point of view this is significant since it would obviate the need for a centralized algorithm such as Algorithm 1 to determine an optimal sampling set.

Nonetheless, this also shows a drawback of choosing a sampling set solely based on the cut-off frequency. For example, consider the graph in Fig. 3. The left half of the 100100 nodes is densely connected, while the right half is not. As intuition suggests, the optimal sampling set of size ∣S∣=30|{\mathcal{S}}|=30 picks many more points from the right half of the graph.

Acknowledgements

We would like to thank Aamir Anis and Prof. Antonio Ortega for motivating the problem studied in this paper and for fruitful discussions on the subject.

References