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 , the data can be embedded as scalar or vector-valued labels on the vertices , while the weights of the edges 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 can be recovered if we sample at a rate . 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 of a set is the largest such that is a uniqueness set for .
Suppose that with . Then, for any , we have . But this implies that and . By Definition 1, is not a uniqueness set for . Conversely, suppose . Take any with . Then we must have , and , implying that . ∎
In , the authors utilize the characterization of a uniqueness set given by Lemma 1 to estimate the cut-off frequency of a set . More precisely, they show that is uniqueness set for for any , where denotes the smallest eigenvalue of the reduced matrix , obtained by restricting to the rows and columns corresponding to nodes in . Since, as shown in , is increasing in , it provides an increasing sequence of lower bounds on the cut-off frequency .
As it turns out, Lemma 1 can be used in a different way in order to characterize exactly. Notice that, from (2), is a uniqueness set for if and only if . Now, since , where is the th standard basis vector, characterizing the largest for which (2) holds with can be done by simply testing, for , whether
This can in fact be done easily for each by noticing that
which implies that (3) holds if and only if the matrix is full column rank. Therefore, the cut-off frequency can be calculated exactly as described above and we have the following result:
For a graph with normalized Laplacian with eigenvalues and corresponding eigenvectors , the cut-off frequency of a subset of nodes is given by
Hence is a uniqueness set for if and only if .
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 -node graph by adding each edge with probability and choosing the weight of each existing edge independently and uniformly at random from . We then selected a set with nodes at random, and compared to the lower bound given by for increasing values of . As shown in Fig. 1, the lower bound does seem to converge to but it seems to require large values of to be arbitrarily close.
In addition, we point out that more important than the actual value of is the number of eigenvalues of below . That corresponds to the dimension of the subspace , which is the set of graph signals that can be correctly reconstructed from . While for , the approximation given by to seems to be good, as shown in Fig. 1, it implies that can reconstruct signals in a subspace of dimension , as opposed to . 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 , by dimensionality considerations we cannot expect to reconstruct signals in a space with dimension larger than . Hence, 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 , 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 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 , the smallest set with .
For a graph with normalized Laplacian with eigenvalues and corresponding eigenvectors , the problem
can be solved in polynomial time and an optimal has size , where is the smallest eigenvalue of such that .
From Theorem 1, we conclude that . Moreover, for any with , we will have , and we must have
and Theorem 1 now implies that .
Computing a set of minimum size satisfying requires first performing the eigendecomposition of , and then constructing the basis as described in Algorithm 1, all of which can be done in polynomial time, since is positive semidefinite. ∎
The second optimization question is to find, for a given size, the sampling set with the maximum cut-off frequency. As it turns out, the same algorithm provides an efficient solution to this problem.
For a graph with normalized Laplacian with eigenvalues and corresponding eigenvectors , the problem
can be solved in polynomial time and the optimal has .
We know from the previous corollary that we can find a set of size and cut-off frequency using Algorithm 1 in polynomial time. Moreover, for any with , we have , and Theorem 1 implies that . ∎
In Fig. 2, we illustrate the application of Algorithm 1 to find the optimal set in two scenarios. First we consider a random graph with nodes on the plane, where edges are added between nodes whose distance is below a fixed threshold and all edges have weight . In Fig. 2, we see the optimal set with . As intuition would suggest, the nodes in 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 nodes and additional edges connecting a set of consecutive nodes to a set of consecutive nodes. We see that an optimal set contains one node in and is essentially evenly distributed over the nodes in , since nodes in are close to the one node chosen from .
Performance of Random Sampling
As we noticed in Section 3, for the example illustrated in Fig. 1, a random set of size has . From Corollary 2, this is in fact an optimal choice of under the constraint . 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 standard basis vectors 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 and an arbitrary set with . For almost all assignments of the edge weights, if we let be the eigenvalues of the normalized Laplacian ,
implying that .
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 nodes is densely connected, while the right half is not. As intuition suggests, the optimal sampling set of size 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.