Online Identification and Tracking of Subspaces from Highly Incomplete Information

Laura Balzano, Robert Nowak, Benjamin Recht

Introduction

The evolution of high-dimensional dynamical systems can often be well summarized or approximated in low-dimensional subspaces. Certain patterns of computer network traffic including origin-destination flows can be well represented by a subspace model . Environmental monitoring of soil and crop conditions , water contamination , and seismological activity have all been demonstrated to be efficiently summarized by very low-dimensional subspace representations.

The subspace methods employed in the aforementioned references are based upon first collecting full-dimensional data from the systems and then using approximation techniques to identify an accurate low-dimensional representation. However, it is often difficult or even infeasible to acquire and process full-dimensional measurements. For example, collecting network traffic measurements at a very large number of points and fine time-scales is impractical. An alternative is to randomly subsample the full-dimensional data. If the complete full-dimensional data is well-approximated by a lower dimensional subspace, and hence is in some sense redundant, then it is conceivable that the subsampled data may provide sufficient information for the recovery of that subspace. This is the central intuition of our proposed on-line algorithm for identifying and tracking low-dimensional subspaces from highly incomplete (i.e., undersampled) data. Such an algorithm could enable rapid detection of traffic spikes or intrusions in computer networks or could provide large efficiency gains in managing energy consumption in a large office building .

In this paper, we present GROUSE (Grassmannian Rank-One Update Subspace Estimation), a subspace identification and tracking algorithm that builds high quality estimates from very sparsely sampled vectors. GROUSE implements an incremental gradient procedure with computational complexity linear in dimensions of the problem, and is scalable to very high-dimensional applications. An additional feature of GROUSE is that it can be immediately adapted to an ‘online’ version of the matrix completion problem, where one aims to recover a low-rank matrix from a small, streaming random subsets of its entries. GROUSE is not only remarkably efficient for online matrix completion, but additionally enables incremental updates as columns are added or entries are incremented over time. These features are particularly attractive for maintaining databases of user preferences and collaborative filtering.

Problem Set-up

We will use this definition in Section 3 to derive our algorithm. If the matrix UΩtTUΩtU_{\Omega_{t}}^{T}U_{\Omega_{t}} has full rank, then we must have that w=(UΩtTUΩt)−1UΩtTvΩtw=(U_{\Omega_{t}}^{T}U_{\Omega_{t}})^{-1}U_{\Omega_{t}}^{T}v_{\Omega_{t}} achieves the minimum in (1). Thus,

In the special case where the subspace is time-invariant, that is S[t]=S0S[t]=S_{0} for some fixed subspace S0S_{0}, then it is natural to consider the average cost function

The average cost function will allow us to estimate the steady-state behavior of our algorithm. Indeed, in the static case, our algorithm will be guaranteed to converge to a stationary point of Fˉ(S)\bar{F}(S).

In the scenario where the subspace does not evolve over time and we only observe vectors on a finite time horizon, then the cost function (2) is identical to the matrix completion optimization problem studied in . To see the equivalence, let Ω={(k,t) : k∈Ωt 1≤t≤T}\Omega=\{(k,t)~:~k\in\Omega_{t}\,1\leq t\leq T\}, and let V=[v1,…,vT]V=[v_{1},\ldots,v_{T}]. Then

That is, the global optimization problem can be written as min⁡U,A∑(i,j)∈Ω(UA−V)ij2\min_{U,A}\sum_{(i,j)\in\Omega}(UA-V)_{ij}^{2}, which is precisely the starting point for the algorithms and analyses in . The authors in use a gradient descent algorithm to jointly minimize both UU and AA while minimizes this cost function by first solving for AA and then taking a gradient step with respect to UU. In the present work, we consider optimizing this cost function one column at a time. We show that by using our online algorithm, where each measurement vtv_{t} corresponds to a random column of the matrix VV, we achieve state-of-the-art performance on matrix completion problems.

Stochastic Gradient Descent on the Grassmannian

We follow the program developed in . To compute the gradient of FF on the Grassmannian manifold, we first need to compute the partial derivatives of FF with respect to the components of UU. For a generic subspace, the matrix UΩtTUΩtU_{\Omega_{t}}^{T}U_{\Omega_{t}} has full rank provided that ∣Ωt∣>d|\Omega_{t}|>d, and hence the cost function (1) is differentiable almost everywhere. Let ΔΩt\Delta_{\Omega_{t}} be the n×nn\times n diagonal matrix which has 11 in the jthj^{th} diagonal entry if j∈Ωtj\in\Omega_{t} and has 00 otherwise. We can rewrite

from which it follows that the derivative of FF with respect to the elements of UU is

where r:=ΔΩt(vt−Uw)r:=\Delta_{\Omega_{t}}(v_{t}-Uw) denotes the (zero padded) residual vector and ww is the least-squares solution in (1).

Using Equation (2.70) in , we can calculate the gradient on the Grassmannian from this partial derivative

The final equality follows because the residual vector rr is orthogonal to all of the columns of UU. This can be verified from the definitions of rr and ww.

A gradient step along the geodesic with tangent vector −∇F-\nabla F is given by Equation (2.65) in , and is a function of the singular values and vectors of ∇F\nabla F. It is trivial to compute the singular value decomposition of ∇F\nabla F, as it is rank one. The sole non-zero singular value is σ=2∣∣r∣∣∣∣w∣∣\sigma=2||r||||w|| and the corresponding left and right singular vectors are r∥r∥\tfrac{r}{\|r\|} and w∥w∥\frac{w}{\|w\|} respectively. Let x2,…,xdx_{2},\ldots,x_{d} be an orthonormal set orthogonal to rr and y2,…,ydy_{2},\ldots,y_{d} be an orthonormal set orthogonal to ww. Then

forms an SVD for the gradient. Now using (2.65) from , we find that for η>0\eta>0, a step of length η\eta in the direction ∇F\nabla F is given by

where p:=Uwp:=Uw, the predicted value of the projection of the vector vv onto SS.

This geodesic update rule is remarkable for a number of reasons. First of all, it consists only of a rank-one modification of the current subspace basis UU. Second, the term sin⁡(ση)∥r∥∥w∥=sin⁡(ση)σ\frac{\sin(\sigma\eta)}{\|r\|\|w\|}=\frac{\sin(\sigma\eta)}{\sigma} is on the order of η\eta when ση\sigma\eta is small. That is, for small values of σ\sigma and η\eta this expression looks like a normal step along the gradient direction −2rwT-2rw^{T} given by (3). From the Taylor series of the cosine, we see that the second term is approximately equal to σ2η2pwT∥p∥∥w∥\sigma^{2}\eta^{2}\frac{pw^{T}}{\|p\|\|w\|}. That is, this term serves as a second order correction to keep the iterates on the Grassmannian. Surprisingly, this simple additive term maintains the orthogonality, obviating the need for orthogonalizing the columns of UU after a gradient step. Below, we will also discuss how this iterate relates to more familiar iterative algorithms from linear algebra which use full information.

The GROUSE algorithm simply follows geodesics along the gradients of FF with a prescribed set of step-sizes η\eta. The full computation is summarized in Algorithm 1. Our derivations have shown that computing a gradient step only requires the solution of the least squares problem (1), the computation of pp and rr, and then a rank one update to the previous subspace.

Each step of GROUSE can be performed efficiently with standard linear algebra packages. Computing the weights in Step 2 of Algorithm 1 requires solving a least squares problem in ∣Ωt∣|\Omega_{t}| equations and dd unknowns. Such a system is solvable in at most O(∣Ωt∣d2)O(|\Omega_{t}|d^{2}) flops in the worst case. Predicting the component of vv that lies in the current subspace requires a matrix vector multiply that can be computed in O(nd)O(nd) flops. Computing the residual then only requires O(∣Ωt∣)O(|\Omega_{t}|) flops, as we will always have zeros in the entries indexed by the complement of Ωt\Omega_{t}. Computing the norms of rr and pp can be done in O(n)O(n) flops. The final subspace update consists of adding a rank one matrix to an n×dn\times d matrix and can be computed in O(nd)O(nd) flops. Totaling all of these computation times gives an overall complexity estimate of O(nd+∣Ωt∣d2)O(nd+|\Omega_{t}|d^{2}) flops per subspace update.

In the static case where the subspace S[t]=S0S[t]=S_{0} for all tt, we can guarantee that the algorithm converges to a stationary point of (2) as long as the stepsizes ηt\eta_{t} satisfy

Selecting ηt∝1/t\eta_{t}\propto 1/t will satisfy this assumption. This analysis appeals to the classical ODE method , and we are guaranteed such convergence because G(n,d)\mathfrak{G}(n,d) is compact.

In the case that S[t]S[t] is changing over time, a constant stepsize is needed to continually adapt to the changing subspace. Of course, if a non-vanishing stepsize is used then the error will not converge to zero, even in the static case. This leads to the common tradeoff between tracking rate and steady-state error in adaptive filtering problems. We explore this tradeoff in Section 4.

2 Comparison to methods that use full information

GROUSE can be understood as an adaptation of an incremental update to a QR or SVD factorization. Most batch subspace identification algorithms that rely on the eigenvalue decomposition, the singular value decomposition, or their more efficient counterparts such as the QR decomposition or the Lanczos method, can be adapted for on-line updates and tracking of the principal subspace. A comprehensive survey of these methods can be found in .

In lieu of being able to exactly able to compute component of vtv_{t} that is orthogonal to our current subspace estimate, GROUSE computes this component only on the entries in Ωt\Omega_{t}. Recent work shows that for generic subspaces, the estimate for rr computed by Algorithm 1 in a single iteration is an excellent proxy for the amount of energy that lies in the subspace, provided that the number of measurements at each time step is greater than the true subspace dimension times a logarithmic factor. One can also verify that the GROUSE update rule corresponds to forming the matrix [U,r][U,r] and then truncating the last column of the matrix

where RηR_{\eta} denotes the (r+1)×(r+1)(r+1)\times(r+1) rotation matrix

That is, our algorithm computes a mixture of the current subspace estimate and a predicted orthogonal component. This mixture is determined both by the stepsize and the relative energy of vtv_{t} outside the current subspace.

Numerical Experiments

We first consider the problem of identifying a fixed subspace. In all of the following experiments, the full data dimension is n=700n=700, the rank of the underlying subspace is d=10d=10, and the sampling density is 0.170.17 unless otherwise noted. We generated a series of iid vectors vtv_{t} according to generative model:

We implemented GROUSE (see Algorithm 1 above) with a stepsize rule of ηt:=C/t\eta_{t}:=C/t for some constant C>0C>0. Figure 1(a) shows the steady state error of the tracked subspace with varying values of CC and the noise variance. All the data points reflect the error performance at t=14000t=14000. We see that GROUSE converges for CC ranging over an order of magnitude, however with additive noise the smaller stepsizes yield smaller errors. When there is no noise, i.e., ω2=0\omega^{2}=0, the error performance is near the level of machine precision and is flat for the whole range of converging stepsizes. In Figure 1(b) we show the number of input vectors after which the algorithm converges to an error of less than 10−610^{-6}. The results are consistent with Figure 1(a), demonstrating that smaller stepsizes in the suitable range take fewer vectors until convergence. We only ran the algorithm up to time t=14000t=14000, so the data points for the smallest and the largest few stepsizes only reflect that the algorithm did not yet reach the desired error in the allotted time. Figures 1(c) and 1(d) repeat identical experiments with a constant stepsize policy, ηt=C\eta_{t}=C. We again see a wide range of stepsizes for which GROUSE converges, though the region of stability is narrower in this case.

We note that the norm of the residual ∥r∥\|r\| provides an excellent indicator for whether tracking is successful. A shown in Figure 2(a), the error to the true subspace is closely approximated by ∥r∥/∥vt∥\|r\|/\|v_{t}\|. This confirms the theoretical analysis in which proves that this residual norm is an accurate estimator of the true subspace error when the number of samples is appropriately large.

Subspace Change Detection

As a first example of GROUSE’s ability to adapt to changes in the underlying subspace, we simulated a scenario where the underlying subspace abruptly changes at three points over the course of an experiment with 14000 observations. At each break, we selected a new subspace SS uniformly at random and GROUSE was implemented with a constant stepsize. As is to be expected, the algorithm is able to re-estimate the new subspace in a time depending on the magnitude of the constant stepsize.

Rotating Subspace

In this second synthetic experiment, the subspace evolves according to a random ordinary differential equation. Specifically, we sample a skew-symmetric matrix BB with independent, normally distributed entries and set

The resulting subspace at each iteration is thus U[t]=exp⁡(δtB)U[t]=\exp(\delta tB) where δ\delta is a positive constant. The resulting subspace at each iteration is thus U[t]=exp⁡(δtB)U[t]=\exp(\delta tB) where δ\delta is a positive constant. In Figure 3, we show the results of tracking the rotating subspace with δ=10−5\delta=10^{-5}. To demonstrate the effectiveness of the tracking, we display the projection of four random vectors using both the true subspace (in blue) and our subspace estimate at that time instant (in red).

Tracking Chlorine Levels

We also analyzed the performance of the GROUSE algorithm on simulated chlorine level monitoring in a pressurized water delivery system. The data were generated using EPANET http://www.epa.gov/nrmrl/wswrd/dw/epanet.html software and were previously analyzed . The input to EPANET is a network layout of water pipes and the output has many variables including the chemical levels, one of which is the chlorine level. The data we used is available from http://www.cs.cmu.edu/afs/cs/project/spirit-1/www/. This dataset has ambient dimension n=166n=166, and T=4610T=4610 data vectors were collected, once every 5 minutes over 15 days. We tracked an d=6d=6 dimensional subspace and compare this with the best 6-dimensional SVD approximation of the entire complete dataset. The results are displayed in Figure 4. The table gives the results for various constant stepsizes and various fractions of sampled data. The smallest sampling fraction we used was 20%20\%, and for that the best stepsize was 3e-2; we also ran GROUSE on the full data, whose best stepsize was 5e-3. As we can see, the performance error improves for the smaller stepsize of 5e-3 as the sampling fraction increases; Also the performance error improves for the larger stepsize of 3e-2 as the sampling fraction decreases. However for all intermediate sampling fractions there are intermediate stepsizes that perform near the best reconstruction error of about 0.12. The normalized error of the full data to the best 3-dimensional SVD approximation is 0.0704. Note that we only allow for one pass over the data set and yet attain, even with very sparse sampling, comparable accuracy to a full batch SVD which has access to all of the data.

Figure 4(a) and (b) show the original and the GROUSE reconstructions of five of the chlorine sensor outputs. We plot the last 500 of the 4310 samples, each reconstructed by the estimated subspace at that time instant.

2 Matrix Completion Problems

As described in Section 2.1, matrix completion can be thought of as a subspace identification problem where we aim to identify the column space of the unknown low-rank matrix. Once the column space is identified, we can project the incomplete columns onto that subspace in order to complete the matrix. We have examined GROUSE in this context with excellent results. Our approach is to do descent on the column vectors in random order, and allow the algorithm to pass over those same incomplete columns a few times.

Our simulation set-up aimed to complete 700×700700\times 700 dimensional matrices of rank 1010 sampled with density 0.170.17. We generated the low-rank matrix by generating two factors YLY_{L} and YRY_{R} with i.i.d. Gaussian entries, and added normally distributed noise with variance ω2\omega^{2}. The robustness to step-size and time to recovery are shown in Figure 5.

In Figure 6 we show a comparison of five matrix completion algorithms and GROUSE. Namely, we compare to the performance of OPT-SPACE , FPCA , SVT , SDPLR , and NNLS . We downloaded each of these MATLAB codes from the original developer’s websites when possible. We use the same random matrix model as in Figure 5. GROUSE is faster than all other algorithms, and achieves higher quality reconstructions on many instances. We subsequently compared against NNLS, the fastest batch method, on very large problems. Both GROUSE and NNLS achieved excellent reconstruction, but GROUSE was twice as fast.

Discussion and Future Work

The inherent simplicity and empirical power of the GROUSE algorithm merit further theoretical investigations to determine exactly when it provides consistent estimates. It is possible that an adaptation of the analysis of to this online setting will yield such consistency bounds. The main difficulty lies in characterizing the trajectory of the GROUSE algorithm from a random starting subspace. Though we can guarantee that there is a basin of attraction around the global minimum, it is not yet clear how to characterize when GROUSE will end up in this basin.

We would also like to investigate how to adapt step-size in the GROUSE algorithm automatically to varying data. This is the only parameter required to run the GROUSE algorithm, and we have seen that there are substantial performance gains when this parameter is optimized. Using techniques from Least-Squares Estimation, it may be possible to automatically tune the step size based on our current error residuals.

Acknowledgments

This work was partially supported by the AFOSR grant FA9550-09-1-0140. R. Nowak would also like to thank Trinity College and the Isaac Newton Institute at the University of Cambridge for support while this work was being completed.

References