论文《TAGNN: Target Atentive Graph Neural Networks for Session-based Recommendation》阅读

论文概况

本文是2020年SIGIR上的一篇论文,作者于2019年提出SRGNN,而这篇文章也是在SRGNN上做了稍许改进,提出了TAGNN(Target Atentive Graph Neural Networks)模型。

Introduction

作者提出了几个问题

  • 再次批评RNN,和SRGNN中说的一样
  • 现有方法只将会话表示成固定向量却没有注意用户对目标物品的喜好程度

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

Method

在这里插入图片描述

A.Constructing Session Graphs

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

B.Learning Item Embeddings on Session Graphs

下面根据会话图进行物品向量计算,TAGNN认为一个结点的向量与邻接节点向量和自己本身向量有关。首先根据各个节点的向量与节点之间的邻接关系进行聚合。
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.Constructing Target-Aware Embedding

这里是TAGNN相对于SRGNN的创新点,将目标物品作为查询向量,使用注意力机制来计算目标物品与用户兴趣的相关度
β i , t = softmax ⁡ ( e i , t ) = exp ⁡ ( v t ⊤ W v i ) ∑ j = 1 m exp ⁡ ( v t ⊤ W v j ) (6) \beta_{i, t}=\operatorname{softmax}\left(e_{i, t}\right)=\frac{\exp \left(\boldsymbol{v}_{t}^{\top} W \boldsymbol{v}_{i}\right)}{\sum_{j=1}^{m} \exp \left(\boldsymbol{v}_{t}^{\top} W \boldsymbol{v}_{j}\right)\tag{6}} βi,t=softmax(ei,t)=j=1mexp(vtWvj)exp(vtWvi)(6)
s target  t = ∑ i = 1 s n β i , t v i (7) s_{\text {target }}^{t}=\sum_{i=1}^{s_{n}} \beta_{i, t} \boldsymbol{v}_{i}\tag{7} starget t=i=1snβi,tvi(7)

D.Generating Session Embeddings

利用注意力机制将最后一个物品当作用户当前兴趣,生成整个会话的会话嵌入。
α i = q ⊤ σ ( W 1 v n + W 2 v i + c ) (8) \alpha_{i}=\mathbf{q}^{\top} \sigma\left(\mathbf{W}_{1} \mathbf{v}_{n}+\mathbf{W}_{2} \mathbf{v}_{i}+\mathbf{c}\right)\tag{8} αi=qσ(W1vn+W2vi+c)(8)
s g = ∑ i = 1 n α i v i (9) \mathbf{s}_{\mathrm{g}}=\sum_{i=1}^{n} \alpha_{i} \mathbf{v}_{i}\tag{9} sg=i=1nαivi(9)
将得到的目标嵌入与长期兴趣与当前兴趣拼接再降维。
s t = W 3 [ s target  t ; s local  ; s global  ] (10) s_{t}=W_{3}\left[s_{\text {target }}^{t} ; s_{\text {local }} ; s_{\text {global }}\right]\tag{10} st=W3[starget t;slocal ;sglobal ](10)

E.Making Recommendation and Model Training

将得到的会话嵌入与相应的物品向量做乘积,再通过softmax得到推荐结果
z t ^ = s t ⊤ v t (11) \hat{z_{t}}=s_{t}^{\top} \boldsymbol{v}_{t}\tag{11} zt^=stvt(11)
y ^ = softmax ⁡ ( z ^ ) (12) \hat{\mathbf{y}}=\operatorname{softmax}(\hat{\mathbf{z}})\tag{12} y^=softmax(z^)(12)
使用交叉熵定义损失函数
y ^ = softmax ⁡ ( z ^ ) L ( y ^ ) = − ∑ i = 1 m y i log ⁡ ( y ^ i ) + ( 1 − y i ) log ⁡ ( 1 − y ^ i ) (13) \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{13} y^=softmax(z^)L(y^)=i=1myilog(y^i)+(1yi)log(1y^i)(13)

总结

TAGNN在SRGNN基础上做了少许改动,考虑了目标物品的影响。但在物品较多的数据中,目标嵌入的计算量很大,每一个物品都要与会话中的项目进行注意力计算。且该模型还是在SRGNN的一个扩展,我认为可借鉴意义不大。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值