论文《Session-based Recommendation with Graph Neural Networks》阅读

论文概况

本文是2019年AAAI上的一篇论文,聚焦于使用图神经网络解决序列化推荐问题,提出了SRGNN(Session-based Recommendation with Graph Neural Networks)模型。

Introduction

作者提出了几个问题

  • 一般在一段会话中不会包含很多的用户行为,而传统的推荐方法依赖于足够的用户-项目交互,这导致这些方法效果不佳。同时,一些方法将RNN的隐向量作为用户兴趣表征,然而在推荐系统中,会话大多数是匿名且碎片化的(数量很多但容量很小)
  • 以往的研究表明,会话内物品的转换模式是非常重要的,但现有方法之研究了单向转换,而没有考虑到上下文之间的转换,距离较远的物品之间的相互作用。

对于上述问题,作者提出了SRGNN模型:(1)将离散的会话序列转化为图结构信息来捕获完整的物品转化模式。(2)使用最后一个物品的向量作为用户的兴趣进行会话嵌入

Method

在这里插入图片描述

A.Constructing Session Graphs

一个会话构建一个会话图,会话图中边的权重直接取决于该点所连接的点的数量,一个点的所有边权重和为1。根据会话图可以得到出度矩阵和入度矩阵。
在这里插入图片描述

B.Learning Item Embeddings on Session Graphs

下面根据会话图进行物品向量计算,SRGNN认为一个结点的向量与邻接节点向量和自己本身向量有关。首先根据各个节点的向量与节点之间的邻接关系进行聚合。
a s , i t = A s , i : [ v 1 t − 1 , … , v n t − 1 ] ⊤ H + b (1) \mathbf{a}_{s, i}^{t}=\mathbf{A}_{s, i:}\left[\mathbf{v}_{1}^{t-1}, \ldots, \mathbf{v}_{n}^{t-1}\right]^{\top} \mathbf{H}+\mathbf{b}\tag{1} as,it=As,i:[v1t1,,vnt1]H+b(1)
之后计算重置门和更新门,利用循环门控单元来更新节点向量。
z s , i t = σ ( W z a s , i t + U z v i t − 1 ) (2) \mathbf{z}_{s, i}^{t}=\sigma\left(\mathbf{W}_{z} \mathbf{a}_{s, i}^{t}+\mathbf{U}_{z} \mathbf{v}_{i}^{t-1}\right)\tag{2} zs,it=σ(Wzas,it+Uzvit1)(2)
r s , i t = σ ( W r a s , i t + U r v i t − 1 ) (3) \mathbf{r}_{s, i}^{t}=\sigma\left(\mathbf{W}_{r} \mathbf{a}_{s, i}^{t}+\mathbf{U}_{r} \mathbf{v}_{i}^{t-1}\right)\tag{3} rs,it=σ(Wras,it+Urvit1)(3)
v i t ~ = tanh ⁡ ( W o a s , i t + U o ( r s , i t ⊙ v i t − 1 ) ) (4) \widetilde{\mathbf{v}_{i}^{t}}=\tanh \left(\mathbf{W}_{o} \mathbf{a}_{s, i}^{t}+\mathbf{U}_{o}\left(\mathbf{r}_{s, i}^{t} \odot \mathbf{v}_{i}^{t-1}\right)\right)\tag{4} vit =tanh(Woas,it+Uo(rs,itvit1))(4)
v i t = ( 1 − z s , i t ) ⊙ v i t − 1 + z s , i t ⊙ v ~ i t (5) \mathbf{v}_{i}^{t}=\left(1-\mathbf{z}_{s, i}^{t}\right) \odot \mathbf{v}_{i}^{t-1}+\mathbf{z}_{s, i}^{t} \odot \widetilde{\mathbf{v}}_{i}^{t}\tag{5} vit=(1zs,it)vit1+zs,itv it(5)

C.Generating Session Embeddings

利用注意力机制将最后一个物品当作用户当前兴趣,生成整个会话的会话嵌入。
α i = q ⊤ σ ( W 1 v n + W 2 v i + c ) (6) \alpha_{i}=\mathbf{q}^{\top} \sigma\left(\mathbf{W}_{1} \mathbf{v}_{n}+\mathbf{W}_{2} \mathbf{v}_{i}+\mathbf{c}\right)\tag{6} αi=qσ(W1vn+W2vi+c)(6)
s g = ∑ i = 1 n α i v i (7) \mathbf{s}_{\mathrm{g}}=\sum_{i=1}^{n} \alpha_{i} \mathbf{v}_{i}\tag{7} sg=i=1nαivi(7)
将得到的长期兴趣与当前兴趣拼接再降维。
s h = W 3 [   s l ; s g ] (8) \mathrm{s}_{\mathrm{h}}=\mathrm{W}_{3}\left[\mathrm{~s}_{\mathrm{l}} ; \mathrm{s}_{\mathrm{g}}\right]\tag{8} sh=W3[ sl;sg](8)

D.Making Recommendation and Model Training

将得到的会话嵌入与物品向量做乘积,再通过softmax得到推荐结果
z ^ i = s h ⊤ v i (9) \hat{\mathbf{z}}_{i}=\mathbf{s}_{\mathrm{h}}^{\top} \mathbf{v}_{i}\tag{9} z^i=shvi(9)
y ^ = softmax ⁡ ( z ^ ) (10) \hat{\mathbf{y}}=\operatorname{softmax}(\hat{\mathbf{z}})\tag{10} y^=softmax(z^)(10)
使用交叉熵定义损失函数
y ^ = softmax ⁡ ( z ^ ) L ( y ^ ) = − ∑ i = 1 m y i log ⁡ ( y ^ i ) + ( 1 − y i ) log ⁡ ( 1 − y ^ i ) (11) \hat{\mathbf{y}}=\operatorname{softmax}(\hat{\mathbf{z}})\mathcal{L}(\hat{\mathbf{y}})=-\sum_{i=1}^{m} \mathbf{y}_{i} \log \left(\hat{\mathbf{y}}_{i}\right)+\left(1-\mathbf{y}_{i}\right) \log \left(1-\hat{\mathbf{y}}_{i}\right)\tag{11} y^=softmax(z^)L(y^)=i=1myilog(y^i)+(1yi)log(1y^i)(11)

总结

SRGNN弥补了传统方法的不足之处,将GNN引入会话推荐,许多更为有效的模型都是在SRGNN基础上改进而来的。但SRGNN没有解决GNN本身的缺陷,比如过渡平滑问题。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值