Definition

Neural graph collaborative filtering (NGCF) is a recommendation algorithm that uses GNN to enhance collaborative filtering.

Architecture

NGCF constructs a bipartite graph where users and items are nodes, and interactions form edges.

Embedding Propagation Layers

The embeddings of NGCF are updated through propagation.

\mathbf{e}_{u}^{(l+1)} &= \sigma\left( \sum_{i \in \mathcal{N}_{u} \cup \{u\}} \frac{1}{\sqrt{|\mathcal{N}_{u}||\mathcal{N}_{i}|}} (W_{1}\mathbf{e}_{i}^{(l)} + W_{2}(\mathbf{e}_{i}^{(l)} \odot \mathbf{e}_{u}^{(l)})) \right)\\ \mathbf{e}_{i}^{(l+1)} &= \sigma\left( \sum_{i \in \mathcal{N}_{i} \cup \{i\}} \frac{1}{\sqrt{|\mathcal{N}_{u}||\mathcal{N}_{i}|}} (W_{1}\mathbf{e}_{u}^{(l)} + W_{2}(\mathbf{e}_{i}^{(l)} \odot \mathbf{e}_{u}^{(l)})) \right) \end{aligned}$$ where - $\mathbf{e}_{u}^{(l)}$ is the embedding of user $u$ at the $l$-th layer - $\mathbf{e}_{i}^{(l)}$ is the embedding of item $i$ at the $l$-th layer - $\mathcal{N}_{u}$ is the set of items interacted with by user $u$. - $W_{1}$ and $W_{2}$ are learnable weight matrices - $\odot$ denotes element-wise multiplication - $\sigma$ is a non-linear [[Activation Function]] It can be written in a matrix form. $$E^{(l+1)} = \sigma\left( (\mathcal{L}+I) E^{(l)} W_{1}^{(l+1)} + \mathcal{L} (E^{(l)} \odot E^{(l)}) W_{2}^{(l+1)} \right)$$ where: - $\mathcal{L} = D^{-\frac{1}{2}}AD^{-\frac{1}{2}}$ is the [[Laplacian Matrix]] for the user-item graph - $A = \begin{bmatrix} O&R\\R^{\intercal}&O \end{bmatrix}$ is the [[Adjacency Matrix]], where $R$ is $N \times M$ user-item interaction matrix - $D$ is the [[Degree Matrix]] - $W_{1}^{(l+1)}$ and $W_{2}^{(l+1)}$ are learnable weight matrices at layer $k+1$ ## Model Prediction The final user and item embedding matrices are constructed by concatenating all the layer's embeddings $$\begin{aligned}\mathbf{e}_{u}^{*} &= \operatorname{CONCAT}(\{\mathbf{e}_{u}^{(l)}|l=1,\dots,L\})\\ \mathbf{e}_{i}^{*} &= \operatorname{CONCAT}(\{\mathbf{e}_{i}^{(l)}|l=1,\dots,L\}) \end{aligned}$$ where $L$ is the total number of layers. The score between $u$ and $i$ is calculated using the inner product $$\operatorname{score}_{\text{NGCF}}(u, i) = {\mathbf{e}_{u}^{*}}^{\intercal}\mathbf{e}_{i}^{*}$$