ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Graph Convolutional Matrix Completion

2022-07-22 13:04:27  阅读:221  来源: 互联网

标签:Convolutional Completion Graph sum times ij text mathcal hat


目录

van den Berg R. Kipf T. N. and Weling M. Graph convolutional matrix completion. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (SIGKDD), 2017.

GCN 在推荐系统中的一次尝试.

符号说明

  • \(N_u\), 用户数量;
  • \(N_v\), 物品数量;
  • \(N = N_u + N_v\);
  • \(r \in \{0, 1, \ldots, R\} = \mathcal{R}\), 用户给物品的打分, 其中 \(0\) 表示未观测;
  • \(M \in \mathcal{R}^{N_u \times N_v}\), 打分矩阵;
  • \(u_i \in \mathcal{U}\), user;
  • \(v_j \in \mathcal{V}\), item;
  • \(\mathcal{N}_{u_i, r} := \{v_j : M_{ij} = r\}\)
  • \(\mathcal{N}_{u_i} = \bigcup_{r=1}^R \mathcal{N}_{u_i, r}\);
  • \(\mathcal{W}:= \mathcal{U} \bigcup \mathcal{V}\), 结点;
  • \(\mathcal{E} = \{(u_i, r_{ij}, v_j): r_{ij} \not = 0\}\), 边;
  • \(\mathcal{G} = (\mathcal{W}, \mathcal{E}, \mathcal{R})\), 所构成的无向图.

流程

  1. 为每个 user, item 初始化状态 \(X \in \mathbb{R}^{N \times D}\) (embeddings), 并定义:

    \[M_r \in \{0, 1\}^{N_u \times N_v}, \: r=1,2,\cdots, R \]

    \[[M_r]_{ij} = \left \{ \begin{array}{ll} 1 & \text{if } M_{ij} = r \\ 0 & \text{else}. \end{array} \right . \]

  2. Encoder \(f\) 将其映射为特征:

    \[[U, V] = f(X, M_1, \ldots, M_R) \in \mathbb{R}^{N \times E}; \]

  3. Decoder \(g\) 进行预测:

    \[\hat{M} = g(U, V); \]

  4. 通过如下损失进行训练:

    \[\mathcal{L} = - \sum_{i,j : M_{ij} \not = 0} \sum_{r=1}^R \mathbb{I}[M_{ij} = r] \log p(\hat{M}_{ij} = r). \]

Encoder

  1. 给定 \(X\), \(M_r\):

    \[\mu_{j \rightarrow i,r} := \frac{1}{c_{ij}} W_r x_j, \]

    其中 \(c_{ij}\) 为 \(|\mathcal{N}_i|\) 或者 \(|\mathcal{N}_i||\mathcal{N}_j|\);

  2. 为不同的 \(u, v\) 计算各自的特征:

    \[h_i = \sigma \Big[ \text{accum} (\sum_{j \in \mathcal{N}_{i, 1}} \mu_{j \rightarrow i, 1}, \ldots, \sum_{j \in \mathcal{N}_{i, 1}} \mu_{j \rightarrow i, R} ) \Big], \]

    其中 \(\text{accum}()\) 表示 \(\text{stack}()\) 或 \(\text{sum}()\);

  3. 最后得到:

    \[u_i = \sigma(Wh_i). \]

Decoder

  1. 计算概率:

    \[p(\hat{M}_{ij} = r) = \frac{e^{u_i^TQ_rv_j}}{\sum_{s=1}^R e^{u_i^T Q_s v_j}}; \]

  2. 用期望作为预测:

    \[\hat{M}_{ij} := g(u_i, v_j) = \mathbb{E}_{p(\hat{M}_{ij} = r)} [r] = \sum_{r=1}^R p(\hat{M}_{ij} = r). \]

注: 还有一些 weight sharing 和 引入其它属性信息的细节请回看原文.

代码

[official]

[PyTorch]

标签:Convolutional,Completion,Graph,sum,times,ij,text,mathcal,hat
来源: https://www.cnblogs.com/MTandHJ/p/16505347.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有