Matrix completion explained

Matrix completion is the task of filling in the missing entries of a partially observed matrix, which is equivalent to performing data imputation in statistics. A wide range of datasets are naturally organized in matrix form. One example is the movie-ratings matrix, as appears in the Netflix problem: Given a ratings matrix in which each entry

(i,j)

represents the rating of movie

j

by customer

i

, if customer

i

has watched movie

j

and is otherwise missing, we would like to predict the remaining entries in order to make good recommendations to customers on what to watch next. Another example is the document-term matrix: The frequencies of words used in a collection of documents can be represented as a matrix, where each entry corresponds to the number of times the associated term appears in the indicated document.

Without any restrictions on the number of degrees of freedom in the completed matrix this problem is underdetermined since the hidden entries could be assigned arbitrary values. Thus we require some assumption on the matrix to create a well-posed problem, such as assuming it has maximal determinant, is positive definite, or is low-rank.

r

that matches the known entries. The illustration shows that a partially revealed rank-1 matrix (on the left) can be completed with zero-error (on the right) since all the rows with missing entries should be the same as the third row. In the case of the Netflix problem the ratings matrix is expected to be low-rank since user preferences can often be described by a few factors, such as the movie genre and time of release. Other applications include computer vision, where missing pixels in images need to be reconstructed, detecting the global positioning of sensors in a network from partial distance information, and multiclass learning. The matrix completion problem is in general NP-hard, but under additional assumptions there are efficient algorithms that achieve exact reconstruction with high probability.

In statistical learning point of view, the matrix completion problem is an application of matrix regularization which is a generalization of vector regularization. For example, in the low-rank matrix completion problem one may apply the regularization penalty taking the form of a nuclear norm

R(X)=λ\|X\|*

Low rank matrix completion

One of the variants of the matrix completion problem is to find the lowest rank matrix

X

which matches the matrix

M

, which we wish to recover, for all entries in the set

E

of observed entries. The mathematical formulation of this problem is as follows:

\begin{align} &\underset{X}{min

} & \text (X) \\& \text & X_ = M_ & \;\; \forall i,j \in E\\\end

Candès and Recht proved that with assumptions on the sampling of the observed entries and sufficiently many sampled entries this problem has a unique solution with high probability.

An equivalent formulation, given that the matrix

M

to be recovered is known to be of rank

r

, is to solve for

X

where

Xij=Mij  \foralli,j\inE

Assumptions

A number of assumptions on the sampling of the observed entries and the number of sampled entries are frequently made to simplify the analysis and to ensure the problem is not underdetermined.

Uniform sampling of observed entries

To make the analysis tractable, it is often assumed that the set

E

of observed entries and fixed cardinality is sampled uniformly at random from the collection of all subsets of entries of cardinality

|E|

. To further simplify the analysis, it is instead assumed that

E

is constructed by Bernoulli sampling, i.e. that each entry is observed with probability

p

. If

p

is set to
N
mn
where

N

is the desired expected cardinality of

E

, and

m,n

are the dimensions of the matrix (let

m<n

without loss of generality),

|E|

is within

O(nlogn)

of

N

with high probability, thus Bernoulli sampling is a good approximation for uniform sampling. Another simplification is to assume that entries are sampled independently and with replacement.

Lower bound on number of observed entries

Suppose the

m

by

n

matrix

M

(with

m<n

) we are trying to recover has rank

r

. There is an information theoretic lower bound on how many entries must be observed before

M

can be uniquely reconstructed. The set of

m

by

n

matrices with rank less than or equal to

r

is an algebraic variety in

{C}m x

with dimension

(n+m)r-r2

.Using this result,one can show that at least

4nr-4r2

entries must be observed for matrix completion in

{C}n

to have a unique solution when

r\leqn/2

.

Secondly, there must be at least one observed entry per row and column of

M

. The singular value decomposition of

M

is given by

U\SigmaV\dagger

. If row

i

is unobserved, it is easy to see the

ith

right singular vector of

M

,

vi

, can be changed to some arbitrary value and still yield a matrix matching

M

over the set of observed entries. Similarly, if column

j

is unobserved, the

jth

left singular vector of

M

,

ui

can be arbitrary. If we assume Bernoulli sampling of the set of observed entries, the Coupon collector effect implies that entries on the order of

O(nlogn)

must be observed to ensure that there is an observation from each row and column with high probability.

Combining the necessary conditions and assuming that

r\llm,n

(a valid assumption for many practical applications), the lower bound on the number of observed entries required to prevent the problem of matrix completion from being underdetermined is on the order of

nrlogn

.

Incoherence

The concept of incoherence arose in compressed sensing. It is introduced in the context of matrix completion to ensure the singular vectors of

M

are not too "sparse" in the sense that all coordinates of each singular vector are of comparable magnitude instead of just a few coordinates having significantly larger magnitudes. The standard basis vectors are then undesirable as singular vectors, and the vector
1
\sqrt{n
} \begin 1 \\ 1 \\ \vdots \\ 1 \end in

Rn

is desirable. As an example of what could go wrong if the singular vectors are sufficiently "sparse", consider the

m

by

n

matrix

\begin{bmatrix}1&0&&0\\vdots&&\vdots\ 0&0&0&0\end{bmatrix}

with singular value decomposition

Im\begin{bmatrix}1&0&&0\\vdots&&\vdots\ 0&0&0&0\end{bmatrix}In

. Almost all the entries of

M

must be sampled before it can be reconstructed.

Candès and Recht define the coherence of a matrix

U

with column space an

r-

dimensional subspace of

Rn

as

\mu(U)=

n
r

maxi\|PU

2
e
i\|
, where

PU

is the orthogonal projection onto

U

. Incoherence then asserts that given the singular value decomposition

U\SigmaV\dagger

of the

m

by

n

matrix

M

,

\mu(U),\mu(V)\leq\mu0

  1. The entries of

\sumkuk

\dagger
v
k
have magnitudes upper bounded by

\mu1\sqrt{

r
mn
}

for some

\mu0,\mu1

.

Low rank matrix completion with noise

In real world application, one often observe only a few entries corrupted at least by a small amount of noise. For example, in the Netflix problem, the ratings are uncertain. Candès and Plan showed that it is possible to fill in the many missing entries of large low-rank matrices from just a few noisy samples by nuclear norm minimization. The noisy model assumes that we observe

Yij=Mij+Zij,(i,j)\in\Omega,

where

{Zij:(i,j)\in\Omega}

is a noise term. Note that the noise can be either stochastic or deterministic. Alternatively the model can be expressed as

P\Omega(Y)=P\Omega(M)+P\Omega(Z),

where

Z

is an

n x n

matrix with entries

Zij

for

(i,j)\in\Omega

assuming that

\|P\Omega(Z)\|F\leq\delta

for some

\delta>0

.To recover the incomplete matrix, we try to solve the following optimization problem:

\begin{align} &\underset{X}{min

} & \|X\|_* \\& \text & \|P_\Omega(X-Y)\|_F \leq \delta\\\end

Among all matrices consistent with the data, find the one with minimum nuclear norm. Candès and Plan have shown that this reconstruction is accurate. They have proved that when perfect noiseless recovery occurs, then matrix completion is stable vis a vis perturbations. The error is proportional to the noise level

\delta

. Therefore, when the noise level is small, the error is small. Here the matrix completion problem does not obey the restricted isometry property (RIP). For matrices, the RIP would assume that the sampling operator obeys
2
(1-\delta)\|X\|
F

\leq

1
p
2
\|P
F

\leq

2
(1+\delta)\|X\|
F

for all matrices

X

with sufficiently small rank and

\delta<1

sufficiently small.The methods are also applicable to sparse signal recovery problems in which the RIP does not hold.

High rank matrix completion

The high rank matrix completion in general is NP-Hard. However, with certain assumptions, some incomplete high rank matrix or even full rank matrix can be completed.

Eriksson, Balzano and Nowak have considered the problem of completing a matrix with the assumption that the columns of the matrix belong to a union of multiple low-rank subspaces. Since the columns belong to a union of subspaces, the problem may be viewed as a missing-data version of the subspace clustering problem. Let

X

be an

n x N

matrix whose (complete) columns lie in a union of at most

k

subspaces, each of

rank\leqr<n

, and assume

N\ggkn

. Eriksson, Balzano and Nowak showed that under mild assumptions each column of

X

can be perfectly recovered with high probability from an incomplete version so long as at least

CrNlog2(n)

entries of

X

are observed uniformly at random, with

C>1

a constant depending on the usual incoherence conditions, the geometrical arrangement of subspaces, and the distribution of columns over the subspaces.

The algorithm involves several steps: (1) local neighborhoods; (2) local subspaces; (3) subspace refinement; (4) full matrix completion. This method can be applied to Internet distance matrix completion and topology identification.

Algorithms for Low-Rank Matrix Completion

Various matrix completion algorithms have been proposed. These include convex relaxation-based algorithm, gradient-based algorithm, and alternating minimization-based algorithm.

Convex relaxation

\|M\|*

(which gives the sum of the singular values of

M

) instead of

rank(M)

(which counts the number of non zero singular values of

M

). This is analogous to minimizing the L1-norm rather than the L0-norm for vectors. The convex relaxation can be solved using semidefinite programming (SDP) by noticing that the optimization problem is equivalent to

\begin{align} &\underset{W1,W2}{min

} & & \text (W_1) + \text (W_2) \\& \text & & X_ = M_ \;\; \forall i,j \in E\\& & & \begin W_1 & X \\ X^T & W_2 \end \succeq 0 \end

The complexity of using SDP to solve the convex relaxation is

O(max(m,n)4)

. State of the art solvers like SDPT3 can only handle matrices of size up to 100 by 100 An alternative first order method that approximately solves the convex relaxation is the Singular Value Thresholding Algorithm introduced by Cai, Candès and Shen.

Candès and Recht show, using the study of random variables on Banach spaces, that if the number of observed entries is on the order of

2,
max{\{\mu
1

\sqrt{\mu0}\mu1,\mu0n0.25\}}nrlogn

(assume without loss of generality

m<n

), the rank minimization problem has a unique solution which also happens to be the solution of its convex relaxation with probability
1-c
n3
for some constant

c

. If the rank of

M

is small (

r\leq

n0.2
\mu0
), the size of the set of observations reduces to the order of

\mu0n1.2rlogn

. These results are near optimal, since the minimum number of entries that must be observed for the matrix completion problem to not be underdetermined is on the order of

nrlogn

.

This result has been improved by Candès and Tao. They achieve bounds that differ from the optimal bounds only by polylogarithmic factors by strengthening the assumptions. Instead of the incoherence property, they assume the strong incoherence property with parameter

\mu3

. This property states that:

|\langleea,PUea'\rangle-

r
m

1a|\leq\mu3

\sqrt{r
} for

a,a'\leqm

and

|\langleeb,PUeb'\rangle-

r
n

1b|\leq\mu3

\sqrt{r
} for

b,b'\leqn

  1. The entries of

\sumiui

\dagger
v
i
are bounded in magnitude by

\mu3\sqrt{

r
mn
}

Intuitively, strong incoherence of a matrix

U

asserts that the orthogonal projections of standard basis vectors to

U

has magnitudes that have high likelihood if the singular vectors were distributed randomly.

Candès and Tao find that when

r

is

O(1)

and the number of observed entries is on the order of
4
\mu
3

n(logn)2

, the rank minimization problem has a unique solution which also happens to be the solution of its convex relaxation with probability
1-c
n3
for some constant

c

. For arbitrary

r

, the number of observed entries sufficient for this assertion hold true is on the order of
2
\mu
3

nr(logn)6

Another convex relaxation approach is to minimize the Frobenius squared norm under a rank constraint. This is equivalent to solving

\begin{align} &\underset{X}{min

} & & \Vert X \Vert_F^2 \\& \text & & X_ = M_ \;\; \forall i,j \in E\\& & & \text(X) \leq k.\end

By introducing an orthogonal projection matrix

Y

(meaning

Y2=Y,Y=Y'

) to model the rank of

X

via

X=YX,trace(Y)\leqk

and taking this problem's convex relaxation, we obtain the following semidefinite program

\begin{align} &\underset{X,Y,\theta}{min

} & & \text(\theta) \\& \text & & X_ = M_ \;\; \forall i,j \in E\\& & & \text(Y) \leq k, 0 \preceq Y \preceq I\\& & & \begin Y & X \\ X^\top & \theta \end\succeq 0.\end

If Y is a projection matrix (i.e., has binary eigenvalues) in this relaxation, then the relaxation is tight. Otherwise, it gives a valid lower bound on the overall objective. Moreover, it can be converted into a feasible solution with a (slightly) larger objective by rounding the eigenvalues of Y greedily. Remarkably, this convex relaxation can be solved by alternating minimization on X and Y without solving any SDPs, and thus it scales beyond the typical numerical limits of state-of-the-art SDP solvers like SDPT3 or Mosek.

This approach is a special case of a more general reformulation technique, which can be applied to obtain a valid lower bound on any low-rank problem with a trace-matrix-convex objective.

Gradient descent

Keshavan, Montanari and Oh consider a variant of matrix completion where the rank of the

m

by

n

matrix

M

, which is to be recovered, is known to be

r

. They assume Bernoulli sampling of entries, constant aspect ratio
m
n
, bounded magnitude of entries of

M

(let the upper bound be

Mmax

), and constant condition number
\sigma1
\sigmar
(where

\sigma1

and

\sigmar

are the largest and smallest singular values of

M

respectively). Further, they assume the two incoherence conditions are satisfied with

\mu0

and

\mu1

\sigma1
\sigmar
where

\mu0

and

\mu1

are constants. Let

ME

be a matrix that matches

M

on the set

E

of observed entries and is 0 elsewhere. They then propose the following algorithm:
  1. Trim

ME

by removing all observations from columns with degree larger than
2|E|
n
by setting the entries in the columns to 0. Similarly remove all observations from rows with degree larger than
2|E|
n
.
  1. Project

ME

onto its first

r

principal components. Call the resulting matrix

Tr(ME)

.
  1. Solve

minX,Y

min
S\inRr
1
2

\sumi,j(Mij-

\dagger)
(XSY
ij

)2+\rhoG(X,Y)

where

G(X,Y)

is some regularization function by gradient descent with line search. Initialize

X,Y

at

X0,Y0

where

Tr(ME)=X0S0

\dagger
Y
0
. Set

G(X,Y)

as some function forcing

X,Y

to remain incoherent throughout gradient descent if

X0

and

Y0

are incoherent.
  1. Return the matrix

XSY\dagger

.

Steps 1 and 2 of the algorithm yield a matrix

Tr(ME)

very close to the true matrix

M

(as measured by the root mean square error (RMSE)) with high probability. In particular, with probability
1-1
n3
,
1
2
mnM
max

\|M-Tr(ME)

2
\|
F

\leqC

r\sqrt{
m|E|
m
n
} for some constant

C

.

\|\|F

denotes the Frobenius norm. Note that the full suite of assumptions is not needed for this result to hold. The incoherence condition, for example, only comes into play in exact reconstruction. Finally, although trimming may seem counter intuitive as it involves throwing out information, it ensures projecting

ME

onto its first

r

principal components gives more information about the underlying matrix

M

than about the observed entries.

In Step 3, the space of candidate matrices

X,Y

can be reduced by noticing that the inner minimization problem has the same solution for

(X,Y)

as for

(XQ,YR)

where

Q

and

R

are orthonormal

r

by

r

matrices. Then gradient descent can be performed over the cross product of two Grassman manifolds. If

r\llm,n

and the observed entry set is in the order of

nrlogn

, the matrix returned by Step 3 is exactly

M

. Then the algorithm is order optimal, since we know that for the matrix completion problem to not be underdetermined the number of entries must be in the order of

nrlogn

.

Alternating least squares minimization

Alternating minimization represents a widely applicable and empirically successful approach for finding low-rank matrices that best fit the given data. For example, for the problem of low-rank matrix completion, this method is believed to be one of the most accurate and efficient, and formed a major component of the winning entry in the Netflix problem. In the alternating minimization approach, the low-rank target matrix is written in a bilinear form:

X=UVT

the algorithm then alternates between finding the best

U

and the best

V

. While the overall problem is non-convex, each sub-problem is typically convex and can be solved efficiently. Jain, Netrapalli and Sanghavi have given one of the first guarantees for performance of alternating minimization for both matrix completion and matrix sensing.

The alternating minimization algorithm can be viewed as an approximate way to solve the following non-convex problem:

\begin{align} &\underset{U,V\inRn x

} & \|P_\Omega(UV^T)-P_\Omega(M)\|^2_F \\\end

The AltMinComplete Algorithm proposed by Jain, Netrapalli and Sanghavi is listed here:

  1. Input: observed set

\Omega

, values

P\Omega(M)

  1. Partition

\Omega

into

2T+1

subsets

\Omega0,,\Omega2T

with each element of

\Omega

belonging to one of the

\Omegat

with equal probability (sampling with replacement)

\hat{U}0=SVD(

1
p
P
\Omega0

(M),k)

i.e., top-

k

left singular vectors of
1
p
P
\Omega0

(M)

  1. Clipping: Set all elements of

\hat{U}0

that have magnitude greater than
2\mu\sqrt{k
} to zero and orthonormalize the columns of

\hat{U}0

  1. for

t=0,,T-1

do

\hat{V}t+1\leftarrow

argmin
V\inRn x
\|P
\Omegat+1

(\hat{U}VT-M)\|

2
F

\hat{U}t+1\leftarrow

argmin
U\inRm x
\|P
\OmegaT+t+1

(U(\hat{V}t+1)T-M)\|

2
F
  1. end for
  2. Return

X=\hat{U}T(\hat{V}T)T

They showed that by observing

|\Omega|=O((

*
\sigma
1
*
\sigma
k

)6k7lognlog(k\|M\|F/\epsilon))

random entries of an incoherent matrix

M

, AltMinComplete algorithm can recover

M

in

O(log(1/\epsilon))

steps. In terms of sample complexity (

|\Omega|

), theoretically, Alternating Minimization may require a bigger

\Omega

than Convex Relaxation. However empirically it seems not the case which implies that the sample complexity bounds can be further tightened. In terms of time complexity, they showed that AltMinComplete needs time

O(|\Omega|k2log(1/\epsilon))

.

It is worth noting that, although convex relaxation based methods have rigorous analysis, alternating minimization based algorithms are more successful in practice.

Applications

Several applications of matrix completion are summarized by Candès and Plan as follows:

Collaborative filtering

Collaborative filtering is the task of making automatic predictions about the interests of a user by collecting taste information from many users. Companies like Apple, Amazon, Barnes and Noble, and Netflix are trying to predict their user preferences from partial knowledge. In these kind of matrix completion problem, the unknown full matrix is often considered low rank because only a few factors typically contribute to an individual's tastes or preference.

System identification

In control, one would like to fit a discrete-time linear time-invariant state-space model

\begin{align} x(t+1)&=Ax(t)+Bu(t)\\ y(t)&=Cx(t)+Du(t) \end{align}

to a sequence of inputs

u(t)\inRm

and outputs

y(t)\inRp,t=0,\ldots,N

. The vector

x(t)\inRn

is the state of the system at time

t

and

n

is the order of the system model. From the input/output pair, one would like to recover the matrices

A,B,C,D

and the initial state

x(0)

. This problem can also be viewed as a low-rank matrix completion problem.

Internet of things (IoT) localization

The localization (or global positioning) problem emerges naturally in IoT sensor networks. The problem is to recover the sensor map in Euclidean space from a local or partial set of pairwise distances. Thus it is a matrix completion problem with rank two if the sensors are located in a 2-D plane and three if they are in a 3-D space.

Social Networks Recovery

Most of the real-world social networks have low-rank distance matrices. When we are not able to measure the complete network, which can be due to reasons such as private nodes, limited storage or compute resources, we only have a fraction of distance entries known. Criminal networks are a good example of such networks. Low-rank Matrix Completion can be used to recover these unobserved distances.

See also