Recommender systems have become popular through sites such as amazon.com and netflix.com These systems analyze a database of many users' ratings on products, for example, movies, and make predictions about users' ratings/preferences on unseen/un-bought products. Many state-of-the-art recommender systems rely on “collaborative filtering” to discover user preferences and patterns. The technique interprets user data as a large matrix, one dimension, say, rows are indexed by users, and then columns are indexed by products. Elements of the matrix are the ratings of users on products. This matrix is usually large, due to large numbers of users and products, and highly sparse, because each user gave ratings on a small number of products. Then collaborative filtering analyzes the patterns of those observed ratings and makes predictions on those unobserved/missing ratings. To discover the rich structure of a huge sparse rating matrix, empirical studies showed that the number of factors should be sufficiently large. In this sense, collaborative filtering is a matrix completion problem.
Conventional techniques include low-rank matrix factorization methods where data is stored in a database as an M by N matrix, where M represents the users' ratings on N products. Since only a small portion of the matrix's ratings are observed, this matrix is quite large and sparse. The Low-rank Factorization technique factorizes the matrix into a product of two matrices, one represent user-specific factors, and the other product-specific factors. An optimization procedure is employed to find the factors that can best explain the data. The number of either user factors or product factors is finite. The prediction of a user's rating on a product is done by retrieving the factor vector of the user and the factor vector of the product, and then calculating their inner product to give the result. With the sheer growth of online user data, it becomes a big challenge to develop learning algorithms that are accurate and scalable.
Recent advances in collaborative filtering has fueled the growth of low-rank matrix factorization methods. Low-rank matrix factorization algorithms for collaborative filtering can be roughly grouped into non-probabilistic and probabilistic approaches. In a recent Netflix competition, the matrix factorization technique is highly popular among the top participants. When matrix factorization is applied by multiplication of a number of user factors and movie factors, both sides of the factors are found by matrix factorization. For computational efficiency, all the techniques assume the number of factors is small. Therefore the matrix factorization is low-rank factorization. However, limiting the rank of the system often scarifies the predictive accuracy, as the large variety of user patterns needs a large number of factors to explain.
Systems and methods are disclosed for generating a recommendation by performing collaborative filtering using an infinite dimensional matrix factorization; generating one or more recommendations using the collaborative filtering; and displaying the recommendations to a user.
Advantages of the preferred embodiment may include one or more of the following. The recommender system uses a collaborative filtering technique with very large or even infinite number of factors. The instant filtering techniques provides scalability and efficiency to efficiently handle large amounts of data while maintaining high accuracy to make accurate predictions on user ratings/preferences. Due to the increased capacity, the system can more accurately predict user ratings/preferences. The computation is efficiently done such that the system can be scaled to very large-scale user rating databases. The system can improve the performance of many on-line services, including on-line store, news websites, online advertisement, which needs to have a better understanding about user preferences. The system can be used to analyze a wide range of user expressed preferences in an explicit way (e.g., numerical ratings), or in an implicit way (e.g., clickthroughs), more efficiently and more accurately, so that the user satisfaction and business revenue can be both improved.
The system of
The system uses infinite-dimensional matrix factorization methods such as Singular Value Decomposition (SVD) and probabilistic Principal Component Analysis (pPCA).
The dimensionality of two low-rank matrix factorization methods, singular value decomposition and probabilistic principal component analysis, are allowed to approach infinity. Learning with infinite dimensions surprisingly obtains excellent accuracy in predicting user ratings.
In the limit of infinite dimensions, both converge to simple and similar formulations called iSVD and iPCA, respectively. By exploiting the data sparsity and carefully reorganizing the computation, such infinite-dimensional models is efficient for handling large-scale sparse matrices. In tests, iPCA performs as fast as its non-probabilistic counterpart iSVD.
In the discussion below on Matrix, Vector, and Gaussian Distribution, uppercase letters are used to denote matrices and lowercase letters to denote vectors, which are by default column vectors. For example, YεRM×N is an matrix, its (i,j)-th element is Yi,j, and its i-th row is represented by an N×1 vector yi. The transpose, trace, and determinant of Y is denoted by YT, tr(Y), and det(Y), respectively. I denotes identity matrix with an appropriate dimensionality. Moreover, ∥y∥ is the vector l2-norm, ∥y∥F denotes the Frobenius norm, and ∥y∥* the trace norm, which equals to the sum of the singular values of Y. A multi-variate Gaussian distribution of a vector y with mean μ and covariance matrix Σ can be denoted by N(y;μ,Σ), or by y:N(μ,Σ) E(·) means the expectation of random variables such that E(y)=μ and E[(y−μ)(y−μ)T]=Cov(y)=Σ.
For a Sparse Matrix, if Y contains missing values, O denotes the indices of observed elements of Y, and |O| the number of observed elements. (i,j)εO if Yi,j is observed, (Y)O2=Σ(i,j)εOYi,j2 is the sum of the square of all observed of Y. Oi denotes the indices of non-missing elements of the i-th row yi. For example, if yi's elements are all missing except the 1st and the 3rd elements, then: (i) Oi=[1,3]T and yo
In Matrix Factorization and Collaborative Filtering, for an M×N rating matrix Y describing M users' numerical ratings on N items, a low-rank matrix factorization approach seeks to approximate Y by an multiplication of low-rank factors, namely
Y≈UVT (1)
where U is an M×L matrix and V an N×L matrix, L<min(M,N). Without loss of generality, M>N is assumed. Since each user rated only a small portion of the items, Y is usually extremely sparse. Collaborative filtering can be seen as a matrix completion problem, where the low-rank factors learned from observed elements are used to fill in unobserved elements of the same matrix.
In Singular Value Decomposition, SVD can be derived from the results of approximating a fully observed matrix Y by minimizing ∥Y−UVT∥F. However when Y contains a large number of missing values, a modified SVD seeks to approximate those known elements of Y
where γ1,γ2>0, the two regularization terms ∥U∥F2 and ∥V∥F2 are added to avoid overfitting. The optimization problem is non-convex. Gradient based approaches can be applied to find a local minimum and are among the most popular methods applied to collaborative filtering.
In Probabilistic Principle Component Analysis, pPCA assumes that each element of Y is an noisy outcome of a linear transformation
Y
i,j
=u
i
T
v
j
+e
i,j,(i,j)εO (3)
where U=[ui]εRM×L are the latent variables following a prior distribution ui:N(0,I), i=1, . . . , M, and ei,j:N(0,σ2) is an independent Gaussian noise. The learning can be done by maximizing the marginalized likelihood of observations using an Expectation-Maximization (EM) algorithm, which iteratively computes the sufficient statistics of p(ui|V,σ2),i=1, . . . , M at the E-step and then update V and σ2 at the M-step. The original formulation includes a mean of yi, as that data is pre-centralized for simplicity. Related probabilistic matrix factorizations have been applied in collaborative filtering.
Matrix Factorization with “Infinite Dimensions”
SVD in the Limit L→∞
In the limit of “infinite dimensions”, i.e., L→∞, the low-rank matrix factorization problem (2) converges to a convex optimization problem. At L→∞, if U and V are both full-rank, the problem (2) is equivalent to
Plugging the optimum condition
into (4), the equivalence to a convex learning problem which imposes trace norm regularization is obtained as:
This equivalence suggests that the problem (4) is convex. Therefore, its global optimum can be reached by any algorithm that pursuits a local optimum.
Despite of the equivalence, (5) resorts to semidefinite programming that can handle only small matrices, while (4) is much easier to solve and more scalable. (5) implies that it is unnecessary to distinguish γ1 and γ2, therefore γ=γ1=γ2. An EM-like algorithm can be used by alternatively updating X and K. A nice property is that the both updates have analytical solutions:
x
i
←K
:,o
(Ko
where K:,o
K←√{square root over (XTX)}=Q√{square root over (S)}QT (7)
where Q and S are the results of the standard eigenvalue decomposition XTX=QSQT, and √{square root over (S)} is a diagonal matrix formed by the square roots of eigenvalues.
Implementation of the algorithm requires basic matrix computations. The kernel regression problem (6) suggests that, though working with possibly “infinite dimensions”, the so-called “kernel trick” can be applied to exploit the huge sparsity of data. However, there is still a big room to achieve a higher efficiency, which will be discussed below.
pPCA in the Limit L→∞
For the pPCA model (3) in the limit of infinite dimensions, it is infeasible to directly handle either ui or vj so x=[Xi,l, . . . , Xi,N]T, where Xi,j=uiTvj. It is easy to see that xi following an N-dimensional Gaussian distribution with the mean E(xi)=VE(ui)=0, and covariance E(xixiT)=VE(uiuiT)VT=VVT. Let K=VVT, and relax the rank constraint such that K is a positive-definite kernel matrix, pPCA (3) is generalized to a simple generative model
y
i
=x
i
+e
i
,i=1, . . . , M (8)
where ei=[ei,l, . . . , ei,N] and xi: N(0,K) and ei:N(0,σ2I). The model describes a latent process X, and an observational process Y, whose marginal probability is
pPCA assumes that each row of Y is an i.i.d. sample drawn from a Gaussian distribution with covariance K+σ2I. To maximize the joint likelihood p(Y,X|K,σ2) with respect to X and K, a solution is obtained for the following optimization problem
Comparing the above problem with the SVD problem (4), the two formulations are very similar. One major difference is that (10) applies the log-determinant as a low-complexity penalty, instead of using the trace norm.
However (10) is not a probabilistic way to deal with uncertainties and missing data. A principled approach requires to integrate out all the missing/latent variables, and aims to maximize the marginalized likelihood (9). This is done by a canonical expectation-maximization (EM) algorithm:
E(xi)=K:,o
Cov(xi)=K−K:,o
where Ci,j is the j-th diagonal element of Cov(xi), i.e., the posterior variance of Xi,j.
The EM algorithm appears to be similar to the one presented in Section 3.1, because both involve a kernel regression procedure, (6) and (11), at the E-step. Since the optimization is non-convex, the above algorithm finds a local optimum.
For notational conveniences, the two algorithms are called iSVD (infinite-dimensional SVD) and pPCA (infinite-dimensional pPCA). Large-scale implementations of the two algorithms are discussed next. The two EM algorithms share a few common computational aspects: (1) Instead of estimating the latent factors U and V, they work on an approximating matrix X; (2) The major computational burden is the E-step; (3) In both cases, the E-step is decomposed into independent updates of xi, i=1, . . . , M; (4) For each update of xi, kernel trick is applied to exploit the sparsity of Y. Though the last two properties bring some hope, a naive implementation is still too expensive on large-scale data. For example, on the Netflix problem, only one E-step will consume over 40 hours by iSVD on a PC with a 3.0 GHz CPU and 3.0 G memory. Even worse, since pPCA takes into account the distribution of X and computes its second order statistics by (12), it costs additional 4000 hours in a single E-step. In the following, the computation cost of (6) or (11) can be significantly reduced, and the overhead caused by (12) is almost completely avoidable. As the result, iSVD is as fast as low-rank matrix factorization methods, while pPCA is as fast as its non-probabilistic counterpart—iSVD.
iSVD
The computational cost of (6), which is the bottleneck of iSVD, is reduced by rewriting the computation as
xi=Kzi,
where K is the N×N full kernel matrix, and ziεRN is a vector of zeros, excepts those elements at positions Oi, whose values are assigned by
z
o
=(Ko
The re-formulation of (6) suggests that (7) can be realized without explicitly computing X, since
The above analysis suggests that, for every row i, the system can avoid the multiplication of an N×|Oi| matrix K: with a vector zo
multiplication operations. On the Netflix data, this means a reduction of over 40 hours for one E-step, and the resulting computation takes less than 4 hours.
The next computation is the eigenvalue decomposition required by (7). Since the trace norm regularizer is a rank minimization heuristic, after some steps if K is rank R, based on (15) the next K has a rank no more than R. Thus at each iteration the system checks the rank R of K and at the next iteration compute only the leading R eigenvalues of K.
The pseudo code is described by Algorithm 1. To keep the description compact, minor details have been omitted including that (1) if the predictions deteriorate on a small set of validation elements and quit the program if that happens; (2) Q and S are used to compute step 1 via KBK=QS(QBQ)SQT, and the resulting matrix is stored in the memory used for K. The largest memory consumption happens during the inner loop, where the system stores two N×N matrices B and K, with totally N(N−1) memory cost. The major computation is also the inner loop, which is where
when |Oi|=N. After obtaining K, the prediction on a missing element at (i,j) is by Xi,j=Kj,o
← + ttT;
For the above process:
iPCA
Compared to the non-probabilistic iSVD, the E-step of iPCA has one additional step (12) to compute an N×N posterior covariance matrix for every i=1 . . . , M. However, the overhead is almost avoidable. Let B be an N×N matrix whose elements are initialized as zeros, then used to collect the local information by
B
o
←B
o
−G
i
+z
o
z
o
T, for i=1, . . . , M (16)
where Gi=(Ko
Therefore there is no need to explicitly perform (12) to compute an N×N posterior covariance matrix for every i, which saves
multiplications. On the Netflix problem, this reduces over 4,000 hours for one E-step. The pseudo code is given in Algorithm 2.
← − G + ttT;
← + t;
← − G + ttT;
In discussing
Referring now to
Comparing Algorithm 2 with Algorithm 1, the remaining computation overhead of the probabilistic approach lies in the steps that collect local uncertainty information for preparing to update the noise variance σ2, which costs additional
multiplications for each E-step. In order to further speed-up the algorithm, iPCA can be simplified. The essential modeling assumption of (8) is that Y is a collection of rows yi independently and identically following a Gaussian distribution N(0,K+σ2I). Then the idea is, rather than modeling the noise and signal explicitly, the process merges by K←K+σ2I and directly deal with the covariance of the noisy observations yi, i=1, . . . , M. The obtained model is simply:
Yi,j: δ(Xi,j), where xi:N(μ,K), (18)
and δ(Xi,j) is the distribution with a probability one if Yi,j=Xi,j and zero otherwise. For this model the EM algorithm is the following:
The implementation is summarized by Algorithm 2. Since there is no need to estimate the noise, the computational cost at the E-step has only minor differences from that of the non-probabilistic Algorithm 1. Compared with Algorithm 2, in one E-step, the new version saves about 11.7 hours on the Netflix data, and ends up with only 4 hours. The memory cost is also the same as Algorithm 1, which is N(N−1) for storing K and B. The prediction is made by computing the expectation E(Yi,j)=Kj,o
Next, the efficiency and accuracy of the described Algorithms 1 and 2 were tested against the two largest publicly available benchmarks, the EachMovie data and Netflix data.
The two algorithms were tested on the EachMovie data of size 74424×1648 and the Netflix data of size 480189×17770, the two largest public benchmarks to date, and achieved results that are, in term of both efficiency and accuracy, comparable or even superior to state-of-the-art performances achieved by low-rank matrix factorization methods.
EachMovie Data
A series of experiments on the whole EachMovie data, which includes 74424 users' 2811718 distinct numeric ratings on 1648 movies. This is a very sparse matrix because in average 97.17% of the elements are missing. Randomly, about 80% of each user's ratings were selected for training and the remaining 20% as test cases. The random selection was done 20 times independently. The following algorithms are tested: (1) SVDs: Low-rank SVDs with 20 and 40 dimensions, plus the iSVD described above. The two low-rank methods are optimized by conjugate gradient methods. The stopping criterion is based on the performance on a small hold-out set of the training elements. For each algorithm, the regularization parameter was set from γ=1, 5, 10, 20, 50, and 100 based on the performance on the hold-out set when testing the first partition. (2) PCAs: Low-rank pPCAs with 20 and 40 dimensions, plus the iPCA described above. For these three methods the stopping criterion was also based on the hold-out set, plus that the total number of EM iterations should not exceed 30. A nice advantage about these pPCA models is that, there is no regularization parameter to tune!
Instead of presenting the averaged results, the individual RMSE results of all the 20 trials are listed in the table below. For all the methods, variations over random train/test partitions are small. For each of the two categories, SVD and pPCA, the infinite models consistently outperformed their each own low-rank counterparts. This means, there are indeed advantages of relaxing the dimensionality constraints of models. Second, the probabilistic approaches consistently outperformed those SVD methods. In particular, iPCA is the winner over all the 20 trials. The average RMSE error of iPCA is 4.33% lower than that of iSVD, 6.90% lower than that of SVD (d=20). The results clearly advocate the advantage of probabilistic models in terms of predictive accuracy.
The algorithms were implemented using C++. The run time averaged over 20 trials are reported in Table 2. The SVD using conjugate gradients converged very slowly. As analyzed before, iSVD and iPCA have essentially the same computational cost. Here iPCA took longer time, because iSVD stopped usually after 5 iterations due to the detected overfitting, while overfitting was not observed for pPCA methods which finished all 30 iterations.
Netflix Data
The Netflix data were collected representing the distribution of ratings Netflix.com obtained during a period of 1998-2005. The released training data consists of 100,480,507 ratings from 480,189 users on 17,770 movies. In addition, Netflix also provides a set of validation data with 1,408,395 ratings. Therefore there are 98.81% of elements are missing in the rating matrix. In order to evaluate the prediction accuracy, there is a test set containing 2,817,131 ratings whose values are withheld and unknown for all the participants. In order to assess the RMSE on the test set, participants need to submit their results to Netflix, who then sends back an email informing the RMSE error. Since results are evaluated on exactly the same test data, it offers an excellent platform to compare different algorithms.
The Algorithms 1 and 2 were tested on the training data plus a random set of 95% of the validation data, the remaining 5% of the validation data were used for the stopping criterion. In the following Table 3 shows the results obtained by the two models, with state-of-the-art results reported in the literature by matrix-factorization methods. People have reported superior results by combining heterogenous models of different nature while the results achieved by the present system uses a single model. In the table, the Baseline result was made by Netflix's own algorithm. BPMF is Bayesian probabilistic matrix factorization using MCMC, which produced so far the state-of-the-art accuracy by low-rank methods. iPCA achieved an even better result than BPMF, improved the accuracy by 6.18% from the baseline. iSVD did not perform very well on this data set, perhaps due to a need to fine-tune the regularization parameter. However this contrasts the advantage of iPCA that has no parameter to tune. In terms of run-time efficiency, both algorithms used about 5 hours per iteration. The iPCA result was obtained by 30 iterations.
The infinite-dimensional matrix factorization models can solve large-scale collaborative filtering problems. Two examples of these models are singular value decomposition (SVD) and probabilistic principal component analysis (pPCA). Tests show that infinite-dimensional models are in fact efficient on very large-scale data containing 100 million ratings. Moreover, though probabilistic approaches are usually believed not as scalable as non-probabilistic methods, the iPCA is as fast as it non-probabilistic counterpart. In terms of the predictive accuracy, infinite-dimensional models often outperformed the low-rank methods, and probabilistic models delivered more accurate results than non-probabilistic models.
The invention may be implemented in hardware, firmware or software, or a combination of the three. Preferably the invention is implemented in a computer program executed on a programmable computer having a processor, a data storage system, volatile and non-volatile memory and/or storage elements, at least one input device and at least one output device.
By way of example, a block diagram of a computer to support the system is discussed next. The computer preferably includes a processor, random access memory (RAM), a program memory (preferably a writable read-only memory (ROM) such as a flash ROM) and an input/output (I/O) controller coupled by a CPU bus. The computer may optionally include a hard drive controller which is coupled to a hard disk and CPU bus. Hard disk may be used for storing application programs, such as the present invention, and data. Alternatively, application programs may be stored in RAM or ROM. I/O controller is coupled by means of an I/O bus to an I/O interface. I/O interface receives and transmits data in analog or digital form over communication links such as a serial link, local area network, wireless link, and parallel link. Optionally, a display, a keyboard and a pointing device (mouse) may also be connected to I/O bus. Alternatively, separate connections (separate buses) may be used for I/O interface, display, keyboard and pointing device. Programmable processing system may be preprogrammed or it may be programmed (and reprogrammed) by downloading a program from another source (e.g., a floppy disk, CD-ROM, or another computer).
Each computer program is tangibly stored in a machine-readable storage media or device (e.g., program memory or magnetic disk) readable by a general or special purpose programmable computer, for configuring and controlling operation of a computer when the storage media or device is read by the computer to perform the procedures described herein. The inventive system may also be considered to be embodied in a computer-readable storage medium, configured with a computer program, where the storage medium so configured causes a computer to operate in a specific and predefined manner to perform the functions described herein.
The invention has been described herein in considerable detail in order to comply with the patent Statutes and to provide those skilled in the art with the information needed to apply the novel principles and to construct and use such specialized components as are required. However, it is to be understood that the invention can be carried out by specifically different equipment and devices, and that various modifications, both as to the equipment details and operating procedures, can be accomplished without departing from the scope of the invention itself.
Although specific embodiments of the present invention have been illustrated in the accompanying drawings and described in the foregoing detailed description, it will be understood that the invention is not limited to the particular embodiments described herein, but is capable of numerous rearrangements, modifications, and substitutions without departing from the scope of the invention. The following claims are intended to encompass all such modifications.
Number | Date | Country | |
---|---|---|---|
61058385 | Jun 2008 | US |