【读书笔记】Deep Interest Evolution Network for Click-Through Rate Prediction

Zhou G, Mou N, Fan Y, et al. Deep Interest Evolution Network for Click-Through Rate Prediction[J]. arXiv preprint arXiv:1809.03672, 2018.
https://github.com/mouna99/dien

Abstract

对于CTR预测模型,很有必要捕捉用户兴趣的转移。因此设计了 interest extractor layer 从历史序列中捕捉用户暂时的兴趣。在训练的每一步中,我们为 interest extractor layer 引入了辅助loss。在 interest extractor layer 中加入了attention机制。

Introduction

遵循用户的兴趣是导致一系列行为的原因,我们设计了辅助 loss,用下一个行为来训练当前的 hidden state(称之为 interest states)。这样有助于捕捉更多的语义信息并且是的GRU更高效的表征兴趣。
基于由 interest extractor layer 提取的兴趣序列,设计了GRU with attentional update gate (AUGRU),增强在兴趣变化中相关兴趣的影响,减弱不相关兴趣的影响。

Interest Extractor Layer

用 GRU 的原因是因为它既可以避免梯度消失,有比 LSTM 速度快。GRU的表达为:
u t = σ ( W u i t + U u h t − 1 + b u ) u_t=\sigma(W^ui_t+U^uh_{t-1}+b^u) ut=σ(Wuit+Uuht1+bu)

r t = σ ( W r i t + U r h t − 1 + b r ) r_t=\sigma(W^ri_t+U^rh_{t-1}+b^r) rt=σ(Writ+Urht1+br)

h ~ t = t a n h ( W h i t + r t ∘ U h h t − 1 + b h ) \tilde{h}_t=tanh(W^hi_t+r_t\circ U^hh_{t-1}+b^h) h~t=tanh(Whit+rtUhht1+bh)

h t = ( 1 − u t ) ∘ h t − 1 + u t ∘ h ~ t h_t=(1-u_t)\circ h_{t-1}+u_t\circ\tilde{h}_t ht=(1ut)ht1+uth~t

u t u_t ut相当于遗忘门,控制更新 h t h_t ht的程度, r t r_t rt控制前一时刻对这一时刻的影响, h ~ t \tilde{h}_t h~t表示这一时刻的更新状态, h t h_t ht表示隐藏状态。
如果只用最后的click结果当作是 label,那么GRU不能得到充分的训练,因为用户的兴趣是导致一系列行为的原因,用下一个行为来训练当前的 hidden state,下一个行为当作是正样本,并随机负采样,当作是负样本
L a u x = − 1 N ( ∑ i = 1 N ∑ t [ l o g σ ( h t i , e b i [ t + 1 ] ) ) + l o g σ ( h t i , e b i [ t + 1 ] ) ) ] ) L_{aux}=-\frac{1}{N}(\sum_{i=1}^N\sum_t[log\sigma(h_t^i,e_b^i[t+1]))+log\sigma(h_t^i,e_b^i[t+1]))]) Laux=N1(i=1Nt[logσ(hti,ebi[t+1]))+logσ(hti,ebi[t+1]))])

整个神经网络的损失函数为
L t a r g e t = − 1 N ( ∑ i = 1 N [ y l o g   p ( x ) + ( 1 − y ) l o g   ( 1 − p ( x ) ) ] ) L_{target}=-\frac{1}{N}(\sum_{i=1}^N[ylog~p(x)+(1-y)log~(1-p(x))]) Ltarget=N1(i=1N[ylog p(x)+(1y)log (1p(x))])

L = L t a r g e t + α L a u x L=L_{target}+\alpha L_{aux} L=Ltarget+αLaux

α \alpha α用来平衡 interest representation 和 CTR prediction。有辅助loss的帮助,每一个 hidden state 充分的训练成为了 represent interest state。

Interest Evolving Layer

再点击序列中未必都是与最终结果相关的,我们需要增强在兴趣变化中相关兴趣的影响,减弱不相关兴趣的影响,所以给 GRU 增加 attention,权重因子
a t = e x p ( h t W e a ) ∑ j = 1 T e x p ( h j W e a ) a_t=\frac{exp(h_tWe_a)}{\sum_{j=1}^Texp(h_jWe_a)} at=j=1Texp(hjWea)exp(htWea)

其中 e a e_a ea为 concat of embedding vectors from fields in category ad。
下面介绍三种加 attention 的 GRU 模型

  • GRU with attentional input (AIGRU): i t ‘ = h t ⋅ a t i_t^‘ = h_t\cdot a_t it=htat,将 i t ‘ i_t^‘ it作为下一个GRU单元的输入
  • Attention based GRU(AGRU): h t ’ = ( 1 − a t ) ∘ h t − 1 ’ + a t ∘ h ~ t ’ h_t^’=(1-a_t)\circ h_{t-1}^’+a_t\circ\tilde{h}_t^’ ht=(1at)ht1+ath~t,用 attention score 代替 update gate
  • GRU with attentional update gate (AUGRU): u t ‘ = u t ⋅ a t u_t^‘ = u_t\cdot a_t ut=utat,通过控制 update gate 来实现 attention

总体架构

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值