# DPMF: Decentralized Probabilistic Matrix Factorization for Privacy-Preserving Recommendation
## 2 Background
### Probabilistic Matrix Factorization  
The basic hypothesis for CF is that users with similar past behavior tend to like similar items. Matrix factorization (MF), as one of the most famous techniques in CF, aims to embedding users and items into low-dimensional dense vector space. By computing the inner product of user and item latent factor vector, it can predict user \(i\)'s preference on item \(j\):  
\[\hat{R}_{ij}=U_{i}^{T}V_{j}, \tag{1}\]  
where \(U_{i}^{T}\) and \(V_{j}\) represent the latent factor vector for user \(i\) and item \(j\), respectively. \(\hat{R}_{ij}\) is the predicted rating of user \(i\) for item \(j\).  
Based on this assumption, probabilistic matrix factorization (PMF) model [13] is proposed which defines the conditional distribution over the observed ratings:  
\[p(R|U,V,\sigma_{R}^{2})=\prod_{i=1}^{m}\prod_{j=1}^{n}[\mathcal{N}(R_{ij}|g(U_ {i}^{T}V_{j}),\sigma_{R}^{2})]^{t_{ij}^{B}}, \tag{2}\]  
where \(g(\cdot)\) defines the logistic function, with \(\mathcal{N}(x|\mu,\sigma^{2})\) representing the Gaussian distribution with its mean value \(\mu\) and variance \(\sigma^{2}\). The function \(I_{ij}^{R}\) equals \(1\) if \(R_{ij}\) is available in the observed data and \(0\) otherwise. Some other notations are defined in Table 1. Furthermore, they also place zero-mean spherical Gaussian priors on user and movie feature vectors:\[p(U|\sigma_{U}^{2}) =\prod\limits_{i=1}^{m}\mathcal{N}(U_{i}|0,\sigma_{U}^{2}I), \tag{3}\] \[p(V|\sigma_{V}^{2}) =\prod\limits_{i=1}^{n}\mathcal{N}(V_{j}|0,\sigma_{V}^{2}I). \tag{4}\]  
By introducing Bayesian method, it defines the posterior distribution over matrix \(U\) and \(V\):  
\[p(U,V|R,\sigma_{R}^{2},\sigma_{U}^{2},\sigma_{V}^{2})\propto p(U|\sigma_{U}^{2 })\cdot p(V|\sigma_{V}^{2})p(R|U,V,\sigma_{R}^{2}) \tag{5}\]  
To obtain optimal parameter \(U\) and \(V\), we maximize (5) and then have:  
\[E=\frac{1}{2}\sum\limits_{i=1}^{m}\sum\limits_{j=1}^{n}I_{ij}^{R}[R_{ij}-g(U_{ i}^{T}V_{j})]^{2}+\frac{\lambda_{U}}{2}||U||_{F}^{2}+\frac{\lambda_{V}}{2}||V||_{F}^{ 2}, \tag{6}\]  
where \(||\cdot||_{F}^{2}\) denotes the Frobenius norm of a matrix.  
Based on this, [PERSON] et al. [14] further propose constrained probabilistic matrix factorization which is called Constrained-PMF. It introduces an additional method of constraining user-specific feature vectors that has strong effect on infrequent users, which define the conditional distribution over the observed ratings as:  
\[p(R|U,V,Q,\sigma_{R}^{2})=\prod\limits_{i=1}^{m}\prod\limits_{j=1}^{n}[ \mathcal{N}(R_{ij}|g([U_{i}+\frac{\sum\limits_{k=1}^{n}I_{ik}^{R}Q_{k}}{\sum \limits_{k=1}^{n}I_{ik}^{R}}|V_{j}),\sigma_{R}^{2})]^{I_{ij}^{R}}, \tag{7}\]  
where \(U_{i}+(\sum\limits_{k=1}^{n}I_{ik}^{R}Q_{k})/\sum\limits_{k=1}^{n}I_{ik}^{R}\) denotes the user latent feature vector with \(I_{ik}^{R}Q_{k}\) capturing captures the effect of a user \(i\) having rated item \(k\). Moreover, it also places spherical Gaussian prior on matrix \(Q\) as:  
\[p(Q|\sigma_{Q}^{2})=\prod\limits_{k=1}^{m}\mathcal{N}(Q_{k}|0,\sigma_{Q}^{2}I). \tag{8}\]  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Notation** & **Definition** \\ \hline \(\mathcal{U}\) & user set \\ \(\mathcal{V}\) & item set \\ \(R\) & explicit feedback matrix \\ \(\hat{R}\) & predicted rating matrix \\ \(M\) & implicit feedback matrix \\ \(W\) & implicit feedback weighting matrix \\ \(U\) & user latent factor matrix \\ \(V\) & item rating latent factor matrix \\ \(Z\) & item selecting latent factor matrix \\ \(Q\) & user offset latent factor matrix \\ \hline \(m\) & size of the user set \\ \(n\) & size of the item set \\ \(g(\cdot)\) & logistic function \\ \(I\) & identity matrix \\ \(I_{ij}^{R}\) & indicator that equals 1 when user \(i\) rates item \(j\) \\  & and 0 otherwise \\ \(\mathcal{L}\) & loss function \\ \(\mathcal{N}^{d}(i)\) & \(d\) closest neighbors of user \(i\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Notation Table.