Iterative Collaborative Filtering for Sparse Matrix Estimation
Christian Borgs, Jennifer Chayes, Devavrat Shah, Christina Lee Yu
Introduction
As a prototype for such a problem, consider a noisy observation of a social network where observed interactions are signals of true underlying connections. We might want to predict the probability that two users would choose to connect if recommended by the platform, e.g. LinkedIn. As a second example, consider a recommendation system where we observe movie ratings provided by users, and we may want to predict the probability distribution over ratings for specific movie-user pairs. A popular collaborative filtering approach suggests using “similarities” between pairs of users to estimate the probability that a connection is formed or the probability a user likes a particular movie. Traditionally, the similarities between pair of users in a social network is computed by comparing the set of their friends, or in the context of movie recommendation, by comparing commonly rated movies. In the sparse setting, most pairs of users have no common friends, or most pairs of users have no commonly rated movies; thus there is insufficient data to compute the traditional similarity metrics.
In this work, the primary interest is to provide a principled way to extend the simple, intuitive approach of computing similarities between pair of users or items in order to perform sparse matrix estimation via nearest neighbor collaborative filtering. We propose to do so by incorporating information within a larger radius neighborhood of the data graph rather than restricting only to immediate neighbors. This variation of collaborative filtering and its analysis in this work can be viewed as a natural extension of the work by in the context of stochastic block model and for traditional collaborative filtering.
The primary contribution of this work is an analysis of an iterative collaborative filtering algorithm in the sparse regime. We consider the setting of a latent variable model where the matrix can be described by a latent function evaluated over latent variables associated to the coordinates. In particular, we assume that where is a piece-wise Lipschitz function, and are coordinate latent variables sampled uniformly at random. Details of the model are described in Section 2.
Algorithmically and methodologically, our work builds on , which estimates clusters of the stochastic block model by computing distances from local neighborhoods around vertices. We improve upon their algorithm and analysis to provide bounds on the maximum entrywise estimation error for the general latent variable model with finite spectrum. This includes a larger class of generative models such as mixed membership stochastic block models, in contrast to their work which focuses on the stochastic block model with non-overlapping communities. We note that the algorithm considered in this work, uses the knowledge of which entries are observed and which are not, in line with the literature on matrix estimation. In the setting of clustering cf. , such a knowledge is absent from the purview of the algorithm.
Withthe exception of a few recent results, by and large the literature on matrix estimation has focused on providing estimation error bounds with respect to the normalized Frobenius norm. In contrast, we provide bounds on the max entry-wise estimation error which is a lot more challenging. Our bounds are restricted to the latent variable model, while the traditional matrix estimation literature considers the underlying matrix to be an arbitrary instance from the family of (approximately) low-rank matrices with ‘incoherence’-like conditions. Indeed, understanding the relationship between these two seemingly different model classes remains an important direction for future work.
A weaker version of this result was published in the NeurIPS conference as . In contrast, this paper provides sharper bounds for both the MSE and max-norm error that improves the exponent in the convergence rates. We have also included a perturbation analysis of the algorithm that shows under “adversarial” bounded noise, the error scales gracefully with the bound on the noise. This enables analysis of our work for the approximately low-rank setting. We have also included a modified algorithm that achieves the same rates with a reduced computational complexity, and we have shown extensions of our results to relaxed modeling assumptions on the latent variable model. We have added empirical evaluation of our method compared with state-of-art methods.
2 Related Work
The related work includes that of matrix estimation or completion, collaborative filtering, and graphon estimation arising from the asymptotic theory of graphs. We provide a brief overview of prior works for each of these topics.
In the context of matrix estimation or completion, there has been much progress under the low-rank assumption and additive noise model. Most theoretically founded methods are based on spectral decompositions or minimizing a loss function with respect to spectral constraints, c.f. . In a nutshell, this collection of works establishes that if the underlying matrix has rank , then it can be estimated so that the estimator has normalized Mean Squared Error (MSE) going to as as long as . Furthermore, showed that samples are necessarily required for such a guarantee. These near optimal sample complexity results hold when the noise in each entry of the matrix is independent and identically distributed. For the setting of generic noise and the general latent variable model where the latent function is analytic, provide an estimator for which the MSE decays to as as long as .
The guarantee with respect to MSE does not necessarily guarantee recovery of all entries accurately. Indeed, bounding max entrywise error provides such a guarantee as established by our result. In parallel with our work, there has been recent progress on developing matrix estimation methods that provide max entrywise bounds for matrices with rank . In particular, for sufficiently ‘nice’ rank matrices, establish that a simple spectral algorithm can recover the matrix with max entrywise error decaying to as long as . Indeed, improving such max entrywise guarantee has been actively pursued over the past few years witnessed in the growing body of works, cf. , , , and .
The collaborative filtering method has been successfully employed across industry applications (Netflix, Amazon, Youtube) due to its simplicity and scalability, c.f. ; however the theoretical results have been relatively sparse. We call special attention to the recent works by which provide a non-parametric statistical perspective for the traditional collaborative filtering method. In particular, they suggest that the practical success of these methods across a variety of applications may be due to its ability to capture local structure like the classical nearest neighbor or kernel regression method. They establish that as long as the latent function is Lipschitz, the MSE of the resulting estimator decays to as as long as . A key limitation of this approach is that it requires a dense dataset with sufficient entries in order to compute similarity metrics, requiring that each pair of rows or columns has a growing number of overlapped observed entries, which does not hold when .
Graphons emerged as the limiting object of a sequence of large dense graphs, c.f. , with recent work extending the theory to sparse graphs, c.f. . In the graphon estimation problem, one observes a single instance of a random graph sampled from an underlying latent variable model, and the goal is to estimate the function that governs the edge probabilities of the graph. provide minimax optimal rates for graphon estimation; however a majority of the proposed estimators are not computable in polynomial time, since they require optimizing over an exponentially large space (e.g. least squares or maximum likelihood), c.f. . provides a polynomial time method based on degree sorting in the special case when the expected degree function is monotonic. analyzes universal singular value thresholding (USVT) for graphon estimation in settings that the spectrum decays quickly, showing convergence rates which matches the minimax optimal rate for low dimensional smooth functions.
Stochastic block model (SBM) parameter estimation is an instance of graphon estimation, where the underlying function has a specific structure. Under the SBM, each vertex is associated to one of community types, and the probability of an edge is a function of the community types of both endpoints. This implies that the edge probability function is block constant. Estimating the parameter matrix becomes an instance of matrix estimation with a technical distinction – all entries are fully observed, i.e. each edge is present (1) or absent (0). In SBM, the expected matrix is at most rank due to its block structure. Precise thresholds for cluster detection (better than random) and estimation have been established by . As mentioned before, our work, both algorithmically and methodically is closely related to their work. The mixed membership stochastic block model (MMSBM) allows each vertex to be associated to a length vector, which represents its weighted membership in each of the communities. The probability of an edge is a function of the weighted community memberships vectors of both endpoints, resulting in an expected matrix with rank at most . Recent work by provides an algorithm for weak detection for MMSBM with sample complexity , when the community membership vectors are sparse and evenly weighted. They provide partial results to support a conjecture that is a computational lower bound, separated by a gap of from the information theoretic lower bound of . This gap was first shown in the simpler context of the stochastic block model . proposed a spectral clustering method for inferring the edge label distribution for a network sampled from a generalized stochastic block model. When the expected function has a finite spectrum decomposition, i.e. low rank, then they provide a consistent estimator for the sparse data regime, with samples.
In the above discussion, we have focused primarily on the sample complexity required for consistent estimation, i.e. the scaling of the number of samples required () such that the normalized estimation error such as the MSE or max-norm goes to . When consistent estimation is feasible, we can further consider the rate of decay of the error guarantees. To that end, we provide a brief overview of the minimax scaling with respect to boudns on the MSE. identifies a minimax lower bound on the scaling of the MSE for a generic matrix estimation task characterized by the nuclear norm of the target matrix. In particular, for symmetric matrices with nuclear norm bounded by , the minimax MSE scaling is lower bounded by \min\big{(}\frac{\delta}{\sqrt{n^{3}p}},\frac{\delta^{2}}{n^{2}},1\big{)}; furthermore argues that the universal singular value thresholding achieves this scaling. This bound holds even in the scenario where observed entries are noiseless. This characterization however is loose for the setting of low-rank matrices. Observe that for rank symmetric matrices with entries bounded in $n\sqrt{r}\sqrt{\frac{r}{np}}pr\frac{r}{np}p=\Omega(1/n)r\frac{\log r}{pn}p=\Omega(\log r/n)$; however the existence of a computationally efficient estimator that achieves this lower bound under the more general noise setting of graphon estimation is still an open research direction.
Setup
Assume that each is associated to a latent feature variable , which is drawn independently across indices uniformly on the unit interval. We assume that the expected data matrix can be described by the latent function , i.e. , where is a symmetric bounded function. The symmetry assumption can be easily relaxed but is assumed for ease of notation in the analysis. The latent function is assumed to be fixed and independent of the dimension . We additionally impose local neighborhood properties that are primarily used in the nearest neighbor portion of the analysis. We will assume that is Lipschitz, but this assumption can be relaxed as discussed in Section 2.2.
Low Rank.
We assume that the latent function has finite spectrum with rank when regarded as an integral operator, i.e. for any ,
The finite spectrum assumption also implies that the model can be represented by latent variables in the dimensional Euclidean space, where the latent variable for node would be the vector , and the latent function would be bilinear, having the form
This condition also implies that the expected matrix is low rank, which includes scenarios such as the mixed membership stochastic block model and finite degree polynomials. The function is fixed with respect to , the rank is assumed to be finite in the low rank setting.
Approximately Low Rank.
More generally, we shall consider approximately low-rank cf. . Specifically, for a given , a symmetric function is said to have -approximate rank if
2 Discussion on Latent Variable Model
The latent variable model assumes a random generative model on the underlying matrix , as opposed to the typical deterministic incoherence style conditions found in the literature. The generative model assuming i.i.d. sampled latent variables and boundedness of the eigenfunctions of guarantee similar properties as incoherence with high probability, as any single row or column will not dominate the signal in a way that deviates too much from the typical values of . The i.i.d. sampling assumption on the latent variables is used in analyzing the local neighborhoods of the observation graph, however this assumption can likely be replaced by regularity assumptions over the empirical distribution of the latent factors for large , e.g. if the latent factors are close to a typical sample set from a well-behaved underlying distribution.
The Lipschitzness assumption of together with the assumption that , guarantees that for any given there are sufficiently many other coordinates such that the observed entries are similar across both rows or columns. These assumptions can be relaxed as long as the key property of “sufficiently many similarly behaving coordinates” is maintained. As examples, a piecewise Lipschitz function or a setting with finite latent types would also satisfy the needed local neighborhood properties. Similarly, the scalar assumption on the latent variables and the uniform distribution are not crucial and can be relaxed to i.i.d. sampled random latent vectors from a larger class of distributions. The critical conditions to maintain are the finite spectrum of , boundedness of eigenfunctions, and local neighborhood properties. The local measure needs to be concentrated enough relative to the rate of change in the function so that when points are sampled from the space, there are sufficently many “nearby neighbors” for whom the function behaves similarly for any given point we would want to estimate. This primarily affects the nearest neighbor portion of the algorithm and analysis. also provides a formal discussion and results for extending the nearest neighbor analysis to accommodate settings beyond scalar Lipschitz functions. Our model can also be extended to asymmetric matrix settings and categorical data. Section 6 discuss how our theorem extend to some of these model variations.
3 Goal
The goal is to produce , an estimate of , using observation matrix and knowledge of . We measure the estimation error through the maximum entry-wise error and the mean squared error. The maximum entry-wise error or -norm of the error matrix is defined as
We will provide bounds on this that hold with high probability, that is, with probability converging to as . The mean squared error (MSE) is defined as
In measuring error either with high probability or in expectation, the randomness is considered over the data generation process.
Algorithm
We propose and analyze a variation of the similarity based collaborative filtering algorithm. At its core, the collaborative filtering algorithm attempts to produce the estimate by averaging over observed entries for a subset of tuples such that is “similar” to and is “similar” to .
Noisy Nearest Neighbor Algorithm. We consider the following noisy nearest neighbor algorithm described below, followed by three different subroutines to compute distances depending on the sparsity regime of the dataset. (1) Compute distances between pairs of coordinates using and . (2) For each , produce an estimate
where for some small enough .
We will choose the threshold depending on the local geometry of the latent feature space with respect to , in order to guarantee that is small enough to drive the bias to zero, yet large enough to ensure diverges so that the variance due to observation noise is small. The key part of the algorithm is determining how to estimate the distances . In what follows, we describe three variations depending upon the observation density, .
Dense Regime. When , it is feasible to compute distances by simply looking at the overlapping entries; this is popularly done in practice as well as analyzed theoretically in the recent works . For any ,
where . This is a finite sample approximation of . When , it follows that for all with high probability, so that . subsequently prove that for any Lipschitz latent function the MSE decays to as as long as . The arguments of can be adapted to show that the maximum entry-wise error decays to with high probability as well. However, for , for most , with high probability and hence a different approach is needed – overcoming the sparse regime is the primary interest of this work.
Sparse Regime. Consider the sparse regime where for any ; in this regime the overlap is small and thus new distance estimates are required. Recall that the function has finite spectrum, i.e. . We propose an estimator which approximates by comparing depth neighborhoods of and in the data graph . Specifically, let the weight of an edge in graph be the observed value (). By assumption, in expectation this weight equals . Therefore, the product of weights along a path from to , of length , denoted as with , in expectation equals
Therefore, the product of weights along the path connecting to is a good proxy of quantity . Recall that each entry is observed independently with probability due to our assumed Bernoulli sampling model. Therefore, for any , the number of neighbors of in scale as . More generally, for , the number of nodes at distance from scale as . We choose large enough to guarantee that for any two nodes and , there is a sufficient overlap between the two subset of nodes at distance from nodes and respectively. This suggests that we choose so that , which in effect aggregates enough data in the sparse regime to match the expected number of observations per row in the dense regime. We formalize this intuition in the following construction of the distance estimates.
Let denote the set of vertices which are at distance from vertex in the graph defined by edge set . Specifically, if the shortest path in from to has a length of . Let denote a breadth-first tree in rooted at vertex . The breadth-first property ensures that the length of the path from to within is equal to the length of the shortest path from to in . Let denote the sub-tree containing all nodes and edges in up to and including depth . If there is more than one valid breadth-first tree rooted at , choose one uniformly at random. Let denote the following vector with support on the boundary of the depth- neighborhood of vertex (we also call the neighborhood boundary):
2 Reducing computation by subsampling vertices
The pairwise distances can only be estimated up to a limited precision depending on the sparsity of the data and amount of noise in the observations, and furthermore we tune the nearest neighbor threshold to tradeoff between bias and variance. As a result, the performance of the algorithm can be maintained with reduced computation by clustering the coordinates so that not all pairwise distances need to be computed. This would involve adding an extra step at the beginning of the algorithm that samples sufficiently many “anchor” vertices that cover the space well. should be chosen large enough such that for any vertex , there exists some anchor vertex which is “close” to in the sense that is small. For all vertices, we only compute the distances to each of the anchor vertices, and we let be a mapping from each vertex to the anchor vertex that minimizes the estimated distance as computed in the original algorithm statement, . The final estimate then is given by
where denotes the set of undirected edges such that and both and are less than some threshold . We can compute by the clustering assignments and distances of all vertices to the anchor vertices.
3 Computational Complexity
To analyze the computational complexity of the algorithm, we consider each step. Growing local neighborhoods around each vertex costs at most , since there are vertices and the BFS trees visit each edge at most once. Computing the inner product for all pairs of vertices given the local neighborhood vectors costs at most , since there are vertex pairs and entries in the data matrix . The final nearest neighbor estimator involves a (weighted) average of the datapoints, which costs at most , as there are entries in the matrix to estimate, and at worst the estimate would involve averaging over datapoints. This extremely crude bound leads to a computational complexity of . The bottleneck of the algorithm is the final nearest neighbor estimate, which may be reduced by using approximate nearest neighbor methods.
If we instead used the modified algorithm that subsamples anchor vertices at random and treats them as “cluster centers”, there are only pairwise distances computed, for a computational cost of instead of . Once we cluster the vertices, the final estimate is only computed for the pairwise cluster blocks, as the final estimate is a block constant matrix with only distinct valued estimates. This results in computation for the final step of the estimation. The computational complexity reduces from to . The choice of depends on the distribution of latent variables, the shape of the latent function, and the error tolerance. In a setting with finitely many latent types, then would be roughly linear in the number of latent types.
A practical benefit of our algorithm is that it is amenable to a distributed and parallelized implementation. The key computational step of our algorithm involves comparing the expanded local neighborhoods of pairs of vertices to find the “nearest neighbors”. As the algorithm is inherently local with respect to the data graph, it can be easily implemented for large scale datasets where the data may be stored in a distributed fashion optimized for local graph computations. The local neighborhoods can be computed in parallel, as they are independent computations. Using approximate nearest neighbor techniques and subsampling vertices to cluster will additionally reduce the computation.
4 Discussion
In practice, we may not know the model parameters, and we would use cross validation to tune the BFS tree depth and nearest neighbor threshold . If the depth is either too small or too large, then the vector will be too sparse, and will not optimally aggregate the datapoints. The threshold trades off between bias and variance of the final estimate. When the sampled observations are not uniform across entries, the algorithm may require more modifications to properly normalize for high degree hub vertices, as the optimal choice of depth may differ depending on the local sparsity.
In our algorithm, we assumed that we observed the edge set . Specifically, this means that we are able to distinguish between entries of the matrix that have value zero because they are not observed, i.e. , or if the entry was observed to be value zero, i.e. and . This fits well for applications such as recommendations, where the system does know the information of which entries are observed or not. Some social network applications contain this information (e.g. facebook would know if they have recommended a link which was then ignored) but other network information may lack this information, e.g. we do not know if link does not exist because observations are sparse, or because observations are dense but the probability of an edge is small. The absence of this knowledge would primarily affect the normalization of the neighborhood vectors as well as the normalization in the final averaging step.
The idea of comparing vertices by looking at larger radius neighborhoods was introduced in , and has connections to belief propagation and the non-backtracking operator . The non-backtracking operator was introduced to overcome the issue of sparsity. For sparse graphs, vertices with high-degree dominate the spectrum, such that the informative components of the spectrum get hidden behind the high degree vertices. The non-backtracking operator avoids paths that immediately return to the previously visited vertex in a similar manner as belief propagation, and its spectrum has been shown to be more well-behaved, perhaps adjusting for the high degree vertices, which get visited very often by paths in the graph. In our algorithm, the neighborhood paths are defined by first selecting a rooted tree at each vertex, thus enforcing that each vertex along a path in the tree is unique. This is important in our analysis, as it guarantees that the distribution of vertices at the boundary of each subsequent depth of the neighborhood is unbiased, since the sampled vertices are freshly visited.
Results
In all of the results below, we assume the latent variable model assumptions laid out in Section 2. As a reminder, we assume uniform Bernoulli sampling with density , independent bounded observation noise, and a generative latent variable model where coordinates are associated to i.i.d. sampled latent variables and the underlying matrix behaves according to a bounded latent function that is Lipschitz and low rank (or approximately low rank) with bounded eigenfunctions.
We first provide theoretical bounds for the estimation error in both sparse regimes mentioned above when has finite spectrum with rank .
Sparse Regime. Theorem 4.1 shows that the maximum entrywise error of the collaborative filtering algorithm using distance function (7) converges to zero in the sparse regime when for some .
Let have rank , for some so that is not an integer. Consider the estimates produced by the nearest neighbor algorithm using the distance defined in (7) for and selecting the nearest neighbor distance threshold to satisfy for any . Let denote the condition number of the latent function . With probability ,
Sparser Regime. Theorem 4.2 shows that the maximum entrywise error of the collaborative filtering algorithm using distance function (8) converges to zero in the sparser regime when for some .
Let have rank , for some . Consider the estimates produced by the nearest neighbor algorithm using the distance defined in (8) for and selecting the nearest neighbor distance threshold to satisfy \eta=\Theta\Big{(}(\ln n)^{-\frac{1}{2}(\kappa-\rho)}\Big{)} for any . With probability ,
Theorems 4.1 and 4.2 show that for symmetric sparse matrix estimation, as long as the fraction of entries observed at random scale as for any fixed , the estimation error of our proposed iterative variant of the classical collaborative filtering algorithm with respect to the -norm decays to as assuming the underlying matrix of interest has constant rank .
2 f𝑓f has ε𝜀\varepsilon-approximate rank r𝑟r
We extend the above stated result to the setting when the latent function has -approximate rank ; this captures settings where may have infinite but quickly decaying spectrum. We formally state the extension in the sparse regime (), but we believe that a similar result is likely to hold for the sparser regime () as well, which we omit for simplicity of presentation.
Let have -approximate rank for some , for some so that is not an integer. Consider the estimates produced by the nearest neighbor algorithm using the distance defined in (7) for and selecting the nearest neighbor distance threshold to satisfy for any . Let denote the condition number of the rank approximation to the latent function . With probability ,
As we assume the function values are bounded in $\varepsilon\inO\Big{(}rC_{f,r}^{1/\kappa}n^{-\frac{1}{4}(\kappa-\rho)}\Big{)}+O\Big{(}\sqrt{\varepsilon r|\lambda_{r}|^{-\frac{2}{\kappa}}\kappa^{-1}}\Big{)}O\Big{(}r^{2}C_{f,r}^{2/\kappa}n^{-\frac{1}{2}(\kappa-\rho)}\Big{)}+O\Big{(}\varepsilon r|\lambda_{r}|^{-\frac{2}{\kappa}}\kappa^{-1}\Big{)}fnf\varepsilonnrC_{f,r}\varepsilon\varepsilonrC_{f,r}fr|\lambda_{r}|\varepsilon$. Below we present a specific example as a consequence of Theorem 4.3.
Let for some so that is not an integer. Consider such that for any , it has -approximate rank with corresponding to rank approximation with being the condition number such that and
Then, for any , for all large enough, with probability , \|\hat{F}-F\|_{\max}=O\Big{(}\sqrt{\delta}\Big{)}. Further, \text{MSE}(\hat{F})=O\Big{(}\delta\Big{)}.
For any , by (15), there exists large enough such that . Due to , . Given choice of , for large enough we have . By (13) of Theorem 4.3 it follows that with probability at least . By (14) of Theorem 4.3, it follows that .
From Corollary 4.4, it follows that with probability and when the spectrum decays in such a way that
3 Discussion
In our latent variable model, the latent function is fixed with respect to , so the max norm of the truth matrix is constant , and the Frobenius norm of the truth matrix scales linear with the matrix dimension so that . As a result the above stated results also show the convergence rates with respect to the relative errors of the max norm and normalized Frobenius norm.
The overall proof sketch can be split into two parts. First we prove that the estimated pairwise distances concentrate to a metric computed with respect to the true latent function . Second we prove that given well behaved estimated distances, the nearest neighbor estimate with properly chosen thresholds to balance mean and variance will converge at the above stated rate. This second part of the proof is straightforward and follows the standard proof for any nearest neighbor style algorithm. The crux of the proof is arguing that in sparse settings the computed distances concentrate well. This relies on the uniform sampling assumption, independence of the observation noise, regularity of the latent feature variables, and the finite spectrum assumption of the latent function. The assumptions on the specific distribution of the latent variables and the Lipschitzness of the latent function are in fact primarily used for the second nearest neighbor portion of the proof, and thus can be relaxed. The key property needed is that there are sufficiently many “nearest neighbor” coordinates; the precise distribution of the latent variables and shape of the latent function will affect the tuning of the threshold parameter to tradeoff between bias and variance. We provide formal statements for a few variations of the model in Section 6.
In addition to providing bounds on the MSE, our theorem also provides bounds on the maximum entrywise error of the estimate. The rate of our maximum entrywise error is the square root of the MSE rate, which suggests that the error is uniformly spread across all entries. This is a stronger guarantee that the typical MSE bounds found in the literature, and it can be useful for downstream results that use the estimates for decision making such as ranking and recommendations.
Thus far, we have focused on finding conditions on that allow for consistent estimation with respect to both the MSE and max entrywise error. Our results also provide the rate at which the error decays. Specifically, our bound for the mean squared error (MSE) scales as for any arbitrarily small constant , and our bound for the max entrywise error is for any small .
Proof Sketch for Analyzing Noisy Nearest Neighbors
As the algorithm uses a fixed radius nearest neighbor estimate, the analysis boils down to arguing that the distance functions as defined in (7) and (8) have certain desired properties that enable the classical nearest neighbor algorithm to be effective. In this section we characterize the needed properties for the convergence of noisy nearest neighbors.
Our algorithm estimates , i.e. , according to (4), which simply averages over datapoints corresponding to tuples for which is close to and is close to according to the estimated distance function . This simple nearest neighbor averaging estimator suggests that the last step of the analysis involves choosing the threshold to tradeoff between bias and variance.
Property 5.1 follows from choosing an appropriate ideal distance function . In particular we will choose with respect to the spectral representation of , and the desired property and the expression for will follow from the low rank assumption as well as the boundedness of the eigenfunctions.
Showing property 5.2 is the crux of the proof and follows from the design of the algorithm along with the assumptions of uniform sampling and the latent variable model. It essentially uses all the model assumptions except for Lipschitzness of .
Property 5.3 is only used for the final step of the nearest neighbor analysis. In particular, as the estimate averages datapoints within an estimated nearby region of the target coordinates, there is a bias variance tradeoff that depends on how the datapoints are locally distributed. In particular, we need to guarantee that for any , there exists sufficiently many observed pairs such that the function behaves similarly, i.e. is close to . This property follows from our assumption that the latent variables are sampled i.i.d. from , and that the function is -Lipschitz. As discussed in section 2, these assumptions can be relaxed, but alternative assumptions would need to guarantee property 5.3 for some reasonable local measure function .
Given the above three properties, we can then prove Lemma 5.1, which characterizes the error of the noisy nearest neighbor algorithm as a function of the bias function, meas function, and estimation error . Section 8 uses Lemma 5.1 to establish Theorems 4.1, 4.2, and 4.3 by simply showing the three properties for suitable choices of and , and tuning accordingly to balance between different terms of the error. Proving that the distance estimates concentrate well, i.e. property 5.2, is the most involved part of the analysis, which we defer to sections 9 and 10. Property 5.1 follows from the low rank assumption and property 5.3 arises from the latent variable model assumptions, in particular the distribution of the latent variables and shape of the latent function.
Assume that properties 5.1-5.3 hold with probability for some and ; in particular is a bias-good distance function, as estimated from and is a -good distance estimate for , and is meas-represented. The noisy nearest neighbor estimate computed according to (4) satisfies
for any . Furthermore, for any ,
Inequality follows from Properties 5.1-5.2: and . By definition for all , which implies for all . Define . Assuming property 5.3,
By the Bernoulli sampling model and sample splitting process, each tuple belongs to with probability independently. By a straightforward application of Chernoff’s bound, it follows that for any ,
Therefore, by assuming property 5.2, it follows that with probability at least ,
We add an additional in the final MSE bound to account for the probability that properties 5.1-5.3 are violated.
This completes the proof of Lemma 5.1.
Extensions
As mentioned in Section 3.2, we can reduce the computational complexity of the algorithm by subsampling a set of anchor vertices and only computing pairwise distances relative to the anchor vertices, equivalent to computing a clustering amongst vertices and using that to estimate. For pairs of anchor vertices which we also refer to as cluster centers, the algorithm estimates according to the original stated algorithm with no modifications. For , we denote to be a clustering that maps from to the closest anchor vertex in . The final estimate for is then given by the estimate of the associated anchor vertices, which act as cluster centers, .
The original argument provides high probability bounds on for cluster centers , as nothing changed in the algorithm for the cluster centers. The only additional part of the proof is to bound the additional bias for non cluster centers, as . The first term is directly bounded by the current analysis, and the bias from the second term will depend on the size of . Recall our latent variable model assumption that each vertex is associated to a latent variable such that and is -Lipschitz with respect to the latent variables. For , with probability at least , each interval for contains at least one anchor point in , as the latent variables of these anchor points are chosen at random. Under this good event, then .
We discuss the results and analysis for the sparse setting when for some , however a similar argument applies for the sparser setting of as well. Equation (20) will show that , so that for some , the closest anchor point with respect to the latent representation will also satisfy . As Property 5.2 guarantees for all estimated distances, it follows that for all . By Property 5.1, . We choose so that , and we plug in the choice of and from Theorem 4.1, resulting in so that . This choice of will guarantee that the extra added bias does not change the existing guarantees in Theorem 4.1 by more than a constant.
2 Local Geometry
We can generalize the latent variable model beyond scalar valued latent variables and Lipschitz latent functions. These assumptions only affect the function meas in Property 5.3, and thus it only changes the last portion of the nearest neighbor proof in which we tune the threshold to tradeoff between the bias and variance terms. We present two examples of extending our results to a different local geometry, illustrating the modifications for the sparse setting when for some .
Next we discuss a higher dimensional setting. Assume the latent variables are sampled uniformly over a -dimensional hypercube such that and the latent function is -Lipschitz with respect to an underlying metric , such that the measure of a ball with radius is . Property 5.3 would instead hold for , resulting in a different choice of threshold to balance between bias and variance. If , then the current term dominates such that we would choose , and the error convergence rate will be the same as that stated in Theorem 4.1. For high dimension , we choose the threshold such that the MSE bound will scale as and the max entrywise error bound will scale as .
3 Asymmetric Matrix
Even though our stated results are for symmetric models, we can transform an asymmetric latent variable model to a symmetric model as long as the row and column dimensions grow proportionally to one another. Consider an matrix which we would like to learn, where , and has finite spectrum. We can construct a matrix where is placed on the off-diagonal blocks and the diagonal and blocks are set to zero. We can argue that this constructed matrix is sampled form a symmetric latent model, so that we can apply our algorithm and analysis directly.
4 Categorical Valued Data
5 Non-Uniform Sampling
We assumed a uniform sampling model, where each entry is observed independently with probability . However, in reality the probability that entries are observed may not be uniform across all pairs . Our results can be extended to a setting where the sampling probability is instead a function of the latent variable, i.e. entry is observed with probability where is a Lipschitz low rank function independent of and is a scaling factor governing the density. The observed data would then be sampled according to
We can essentially then apply our algorithm twice, first using data matrix to estimate the product up to a scaling factor. Second we apply our algorithm to the binary adjacency matrix representing the sparsity of the observation set in order to estimate up to scaling factor. The one nuance one would have to handle is that since the set of observed entries is not uniformly sampled, the constructed BFS trees will grow non-uniformly, which will affect the normalization and scaling terms. As the model is only recoverable up to scaling, this is the best we can do. If we had data from a two-step sampling process in which we first observe binary edges sampled uniformly with probability , and then subsequently observed datapoints sampled with an additional probability , then the model would exactly fall into our assumptions and the results could directly be applied to estimating and the product .
Experiments
We show results on synthetic data to illustrate the performance of our algorithm. We did not do sample splitting as it is primarily introduced for the purpose of the analysis. We computed distances according to equation (7) (but again without sample splitting) for fixed radius parameters of . Note that the depth for expanding the BFS tree is until . We did not specifically tune the nearest neighbor threshold , but simply chose it to be the 70th percentile amongst all estimated distances. As a result, the expected number of entries used to compute the final weighted average estimate is . We compare against a naive baseline which predicts using the column-wise mean. And we compare against the softimpute implementation in python’s fancyimpute package and alternating least squares with rank 2 from parafac algorithm in the python tensorly package (higher rank performed more poorly in the sparse setting as it overfit to noise). Nuclear norm minimization was too slow for the size of instances that we show and thus was omitted.
For a , the density is chosen to be , and each entry is observed (and thus included in sample set ) with probability independently of all other entries. For each observed entry , there is an added independent Gaussian noise , where where is chosen to be the 40th percentile of the magnitude of entries in . We show results for and .
We compute an adjusted mean squared error (MSE), limited to the error in predicting missing entries, and we normalize by the squared error of predicting with zeros. When the adjusted MSE is larger than 1, it means the estimate is worse than predicting all zeros.
Figure 1 shows the adjusted MSE of the algorithms with respect to the sampling probability . When is very small, then our algorithm with the optimal choice of the depth parameter performs better than ALS and SoftImpute, however when it is too sparse than either the simple mean estimate or predicting with all zeros is best. Note that we did not do any tuning of the nearest neighbor parameter , and thus there may be additional gains possible for our algorithm. If we consider the minimum density for which the algorithm performs better than the simple mean, SoftImpute requires the most dense observation. The minimum density required for our algorithm depends on optimally choosing the depth parameter , but for an optimal choice of , our algorithm requires less data than ALS before it performance better than the simple mean.
Figure 2 shows the adjusted MSE of the algorithms with respect to the exponent of the density parameter where . This rescales the -axis so that the small values of are more visible. We plot only up to as we are focusing on the sparse regime with little overlaps in entries between pairs of rows and columns. Notice the dependence on the performance of our algorithm with respect to the radius parameter as illustrated best in Figure LABEL:fig:5000_mse_kappa. For too small values of the alg is suboptimal as it does not aggregate data sufficiently, but for too large values of the algorithm again is suboptimal as it simply estimates zeros due to the BFS trees running out of vertices.
Figure 3 shows the time each of the algorithms took to run. We can see that our proposed algorithm is faster than SoftImpute, and this gap in speed is amplified with large . Alternating Least Squares (ALS) is very fast, nearly as fast as the simple mean. Nuclear norm minimization was too slow to run on the size of instances in our example and thus was not included.
Proofs for Theorems 4.1, 4.2, and 4.3
In this section, we use the noisy nearest neighbor lemma 5.1 along with to establish Theorems 4.1, 4.2, and 4.3. Proofs of the concentration of distance estimates is deffered to sections 9 and 10.
We prove that as long as for any , with high probability, properties 5.1-5.3 hold for an appropriately chosen function , and for distance estimates computed according to (7) with . We subsequently use Lemma 5.1 to conclude Theorem 4.1. The most involved part in the proof is establishing that property 5.2 holds with high probability for an appropriately chosen , which is delegated to Lemma 8.1.
Good distance and Property 5.1. We start by defining the ideal distance as follows. For all , let
Recall that . Assuming ,
where (a) follows from assuming that for all and . In summary, property 5.1 is satisfied for distance function defined according to (17) and .
Good distance estimate and Property 5.2. We state the following Lemma when has rank , whose proof is delegated to Section 9.
Let has rank , for such that is not an integer. Consider as computed in (7) with . For any
with probability at least 1-O\Big{(}n^{2}\exp\big{(}-\Theta(n^{\min(\rho,\kappa(t-\frac{1}{2}))})\big{)}\Big{)}.
Lemma 8.1 implies that property 5.2 holds with probability for some and any . The distance error bound is minimized by choosing arbitrarily close to 0 so that can be arbitrarily close to .
The corresponding statement for that has -approximate rank is stated below.
Let have -approximate rank , for such that is not an integer. Consider as computed in (7) with . For any
with probability at least 1-O\Big{(}n^{2}\exp\big{(}-\Theta(n^{\min(\rho,\kappa(t-\frac{1}{2}))})\big{)}\Big{)}.
We assumed that the latent parameters are sampled i.i.d. uniformly over $\theta_{u}\inv\in[n]\eta^{\prime}>0$,
for all . By an application of Chernoff’s bound and a simple majorization argument, it follows that for all and ,
By using union bound over all indices, it follows that for any , with probability at least , property 5.3 is satisfied with meas as defined in (21).
Concluding Proof of Theorem 4.1. In summary, with probability at least for
properties 5.1-5.3 are satisfied for the estimate computed from (7) with , and the choices of
for any , , and . By substituting the expressions for bias, meas, and into Lemma 5.1, it follows that
Additionally, for any ,
By selecting \eta=\Theta\big{(}Br|\lambda_{1}|^{2/\kappa}n^{-\frac{1}{2}(\kappa-\rho)}\big{)} with a large enough constant, it follows that
By substituting this choice of and into (23), it follows that
By choosing , it follows that . Therefore, by substituting into (24), it follows that with probability ,
This completes the proof of Theorem 4.1.
Concluding Proof of Theorem 4.3. Like Proof of Theorem 4.1, with probability at least for
properties 5.1-5.3 are satisfied for the estimate computed from (7) with , and the choices of
for any , , and . Note that the only difference is in choice of due to Lemma 8.2 for that has -approximate rank . By substituting the expressions for bias, meas, and into Lemma 5.1, it follows that
Additionally, for any ,
By selecting \eta=\Theta\big{(}Br|\lambda_{1}|^{2/\kappa}n^{-\frac{1}{2}(\kappa-\rho)}\big{)}+\Theta(t\varepsilon(1+\varepsilon)^{t}+t^{2}\varepsilon^{2}(1+\varepsilon)^{2t-1}\Big{)} with appropriately large enough constants, it follows that
By substituting this choice of and into (23), and using , it follows that
By choosing , it follows that . Therefore, by substituting into (24), it follows that with probability ,
This completes the proof of Theorem 4.3.
2 Analyzing Sparser Regime: Proof of Theorem 4.2
Similar to the proof of Theorem 4.1, we prove that as long as for any , with high probability, properties 5.1-5.3 are satisfied for an appropriately chosen function and for distance estimates computed according to (8) with . We subsequently use Lemma 5.1 to conclude Theorem 4.2. The most involved part in the proof is establishing that property 5.2 holds with high probability for an appropriately chosen , which is delegated to Lemma 8.3.
Good distance and Property 5.1. We start by defining the ideal distance as follows. For all ,
For any with corresponding ,
Good distance estimation and Property 5.2. We state the following Lemma whose proof is delegated to Section 9.
Assume that for some . Consider as computed in (8) with
where is independent of and .
Therefore, property 5.2 is satisfied with probability for some for any .
Note that the only difference in (20) and (34) is the constant versus . It follows by a similar argument that with probability at least , for any , property 5.3 is satisfied with .
Concluding Proof of Theorem 4.2. In summary, with probability at least for
properties 5.1-5.3 are satisfied for the estimate computed from (8) with , and the choices of
for any , , and . By substituting the expressions for bias, meas, and into Lemma 5.1, it follows that
Additionally, for any ,
By selecting \eta=\Theta\left(\left(\frac{\ln^{1+\rho}n}{np}\right)^{1/2}\right)=\Theta\Big{(}(\ln n)^{-\frac{1}{2}(\kappa-\rho)}\Big{)} with a large enough constant, it follows that
By substituting this choice of and into (36) it follows that
By choosing , it follows that . Therefore, by substituting into (37), it follows that with probability ,
This completes the proof of Theorem 4.2.
Proving distance estimates are close when f𝑓f has rank r𝑟r
This section is dedicated to establishing that the distance estimates (7) and (8) are good approximations of the desired ideal distances as claimed in the statements of Lemmas 8.1 and 8.3 when has rank . We start by establishing key auxiliary concentration results which will lead to their proofs.
Recall that we grow the neighborhood of each in and use associated observations in as well as to compute the distance estimates . By the assumed Bernoulli sampling model, any tuple is independently included in with probability . Therefore, the expected number of immediate neighbors of (not including itself) is . The expected number of nodes at distance from a given scales as . We define some necessary notation before we present the formal statement of this event. Given , define
For any p=\omega\big{(}\frac{1}{n}\big{)} and ,
For any given , is well defined for large enough since .
Let , . For ,
The proof of Lemma 9.1 follows from standard argument using repeated application of Chernoff’s bound and is well known in the literature in various forms. For completeness, we have included it in the Appendix. Lemma 9.1 suggests definition of events that will hold with high probability. Specifically, for any and , define
We note that by event we simply require that the number of nodes at distance from a given node is nearly . However, it does not impose any restrictions on how the nodes are connected or the latent parameters associated with the nodes themselves.
2 Concentration of a Quadratic Form One
as long as .
where for , we define
Conditioned on , for is determined and so is . However, is conditionally independent random variable. Also, given the construction of the breadth-first-search tree, for any given any of the is equally likely to be its parent with probability . Therefore, we have that are independent and
where we use the orthonormality of . Therefore,
Therefore, we conclude that for
where (a) follows from the assumption that has sparsity and has entries bounded in $X_{i}\mathcal{F}_{u,h-1}$ is sub-exponential with parameters
Now is sum of such for which are independent of each other conditioned on . Therefore, it follows that conditioned on , is sub-exponential with parameters
By Azuma’s concentration inequality, for ,
This completes the proof of Lemma 9.2.
3 Concentration of a Quadratic Form Two
We state a useful concentration that builds on Lemma 9.2 towards establishing Lemma 8.1.
4 Concentration of a Quadratic Form Three
We establish a final concentration that will lead us to the proof of good distance function property.
Let us define where
Next, we prove that with high probability,
where each term of the summation is bounded in . Let
where inequality follows from the assumption that observed entries are within $$. Therefore,
5 Proof of Lemma 8.1
By statement of Lemma 8.1, we have with where is not an integer. We wish to establish that distance , as defined in (7) is a good proxy of distance as defined in (17). We shall establish this result under event where
We shall use Lemmas 9.1, 9.2, 9.3 and 9.4 to conclude the desired result. To that end, we verify that appropriate conditions required in the statement of these Lemmas are satisfied.
A crucial condition is that originally imposed by Lemma 9.1. By definition of , it is sufficient to establish that
where recall . We shall fix for the convenience through the remainder of the proof. To that end, it can be checked that . Therefore, it is sufficient to have
We have chosen . That is,
for large enough. That is, for all large enough, . Since is not an integer, for some
For , we use in statement of Lemmas 9.2, 9.3 and 9.4, and in statement of Lemma 9.4. We need to verify condition on and . Note that are all constant with respect to . Lemma 9.2 requires
Since and with , both of the above conditions are satisfied for sufficiently large . For Lemma 9.4, we require
Now . By (57), . By choice, for . Therefore, for sufficiently large , the above condition is also satisfied.
Now we are ready to bound the difference between and for any . Recall,
Under event as defined in (55), by Lemmas 9.3 and 9.4,
where the last equality follows from observing that the first term asymptotically dominates with respect to as . Similarly, all other three terms on the right hand side in (58) and (59) can be bounded by same quantities. Therefore, we conclude that for any
where we used .
To conclude the proof, we need to argue that event holds with high enough probability. To that end, through union bound and Lemmas 9.1, 9.2, and 9.4, we have
By union bound and Lemma 9.4, we have that
where the inequality follows from the choice of , and the fact that and are constant with respect to . By union bound and Lemma 9.2, we have that
By union bound and Lemma 9.1, we have that
In summary, (60) holds with probability 1-O\big{(}n^{2}\exp\big{(}-\Theta(n^{\min(\rho,\kappa(t-\frac{1}{2}))})\big{)}\big{)}. This completes the proof of Lemma 8.1.
6 Concentration in The Sparser Regime
We state consequence of earlier results that will help establish Lemma 8.3.
Fix , for some . Let
for some constant , independent of with .
We would like to verify that for . By definition of , it is sufficient to establish that
where recall . For , it can be verified that . Therefore, it is sufficient to have
For , . We choose , which implies . Throughout the proof, we will denote . It follows that for sufficiently large ,
is satisfied. Let us define a diagonal matrix with . Therefore the explicit expression for is given by
Theorem 1 of provides bounds on the sum of entries of the inverse of a Vandermonde matrix. It states that for a Vandermonde matrix such that , if denotes the inverse of , then
where is the minimum gap between eigenvalues only amongst the distinct eigenvalues,
Conditioned on events and given that all conditions of Lemma 9.3 are satisfied, it follows that
where (a) follows using (65) as well as the fact that and hence for sufficiently large, for any ; (b) follows using (66).
Observe that due to (62), and , hence there exists some constant , independent of , such that
Recall that we chose such that by (61),
It follows by that,
This implies that for some constant , the square of the first term in (70) satisfies
Putting everything together, we have that for some constant
Replacing , we obtain the desired result.
7 Proof of Lemma 8.3
The proof of Lemma 8.3 would follow from Lemma 9.5 and once we verify the probability of events required to hold for Lemma 9.5 to be applicable. To that end, given so that , let be parameter of choice. We set
We shall use Lemmas 9.1, 9.2, 9.3 and 9.4 to conclude the desired result. To that end, we verify that appropriate conditions required in the statement of these Lemmas are satisfied.
To argue that holds with high probability, we wish to apply Lemmas 9.1 which requires verifying which is done in proof of Lemma 9.5. To argue that and hold with high probability, we will utilize Lemmas 9.2, 9.3 and 9.4 with as well as in statement of Lemma 9.4. We need to verify condition on and . Lemma 9.2 requires
For sufficiently large these conditions are satisfied by our choice of due to . For Lemma 9.4, we require
Conditioned on event , by Lemma 9.5 it follows immediately that for distances defined as per (32) and (8),
To conclude the proof, we need to argue that event holds with high enough probability. To that end, through union bound and Lemmas 9.1, 9.2, and 9.4, we have
By union bound and Lemma 9.4, we have that
By the choice of to satisfy (61), it follows that . Therefore,
where we used the fact that are all constants, while and . By union bound and Lemma 9.2, we have that
By union bound and Lemma 9.1, we have that
In summary, the desired claim holds with probability 1-O\Big{(}n^{2}\exp\big{(}-\Theta((\ln n)^{1+\rho})\big{)}\Big{)}. This completes the proof of Lemma 8.3.
Proving distance estimate is close when f𝑓f has ε𝜀\varepsilon-approximate rank r𝑟r
In this section, we extend the result that distance estimate (7) is good approximation of the desired ideal distance as claimed in the statement of Lemma 8.2 when has -approximate rank . We will primarily establish robustness of the distance estimate with respect to arbitrary, additional error of magnitude at most in each observed entry. This will help conclude Lemma 8.2 from Lemma 8.1.
When has -approximate rank , the with . In contrast, when has rank , , i.e. . That is, the setting of has -approximate rank can be viewed as a perturbation of the setting with having rank : each observation is first generated as per rank setting and then arbitrary perturbation or adversarial noise is added to it where . Therefore, we shall analyze the distance estimate as defined in (7) for the setting of that has -approximate rank by bounding the perturbation (or change) induced in distance estimates for the setting of that is rank , due to the addition of such an arbitrary perturbation .
Let have rank , , , with and . Let . As before, define event
We condition on the event that holds. Let be the distance estimate computed according to (7). Upon adding arbitrary to for each , with probability at least
changes at most by .
Let denote all the information related to and , including the node latent parameters and observations in that are associated to edges in . Furthermore, let be conditioned on the event that holds, which is fully determined by the realization of edges and weights in and . We wish to understand how changes if we perturb each entry by adding arbitrary so that for all . To that end, define
2 Proof of Lemma 8.2
Using Lemma 10.1 and Lemma 8.1, we establish the proof of Lemma 8.2. As argued in the proof of Lemma 8.1, for choice of with where is not an integer and , we have that for large enough. Further, and with . As in Lemma 8.1, we choose for in Lemma 10.1. By this selection, we have for large enough. As in Lemma 8.1, the event (recall definition from (55)) holds with probability at least 1-O\big{(}n^{2}\exp\big{(}-\Theta(n^{\min(\rho,\kappa(t-\frac{1}{2}))})\big{)}\big{)}. Indeed, implies the condition required for Lemma 10.1 to hold with for all . Finally, given this, the conclusion of Lemma 10.1 holds for all with probability at least 1-\exp\Big{(}n^{2}\exp\big{(}-\Theta(n^{\kappa})\big{)}\Big{)}. In summary, from Lemma 10.1 and Lemma 8.1, it follows that
holds with probability at least 1-O\big{(}n^{2}\exp\big{(}-\Theta(n^{\min(\rho,\kappa(t-\frac{1}{2}))})\big{)}\big{)}. This completes the proof of Lemma 8.2.
Acknowledgements
We gratefully acknowledge funding from the NSF under grants CCF-1948256, CNS-1955997, CMMI-1462158, CMMI-1634259, and a TRIPODS phase I project.
References
Appendix A Proof of Extra Lemmas
We use two simple inequalities to argue when a summation is dominated by the single largest term. For any ,
For any , it holds that for all . If additionally ,
Recall the definitions of and ,
For any p=\omega\big{(}\frac{1}{n}\big{)} and ,
For any given , is well defined for large enough since . Event is defined as
Let , . For ,
By definition, implies that
Let us denote . Conditioned on , we can upper bound by
where the last step follows from Lemma A.1 showing that the summation is dominated by the largest term for sufficiently large . By assuming , it follows that for sufficiently large , because ,
Conditioned on the set and the set , any vertex is in independently with probability . Thus the number of vertices in is distributed as a binomial random variable. By Chernoff’s bound,
Conditioned on , the above two inequalities show that holds with high probability. The upper bound follows from
where equality follows from the fact that we constructed such that .
where inequality follows from the assumption that such that the largest term in the summation dominates.