两个版本:17年arXiv 和 18年kdd attention方式差异:使用
[v_i, v_u, v_i-v_u]
;后者使用[v_i, v_u, outer product(v_i, v_u)]
,相较于前者,外积是有方向的,且方向垂直于原向量,相当于增加了维度(从x,y扩展到x,y,z)
Motivation
把序列特征分别embedding后做sum/average pooling为一个定长的向量(group-wise embedding),平滑了用户的多兴趣,忽略了用户兴趣和候选广告直接的交互(用户emb,不会随着候选广告的变更而改变)
---> 怀人老师先前的特征解法(hard attention
):用判断候选广告在历史行为序列的出现次数,把这个当做特征喂给模型。
实现细节

Attention机制(activation unit):
- 用户的历史行为序列中的item embedding和候选集广告embedding以
[v_i, v_u, outer product(v_i, v_u)] + DICE + FC成1位weight)
生成权重 -
因此,候选集作为生成用于emb的一个参数
image.png
模型效果

其他创新点
激活函数:PReLU ---> DICE
PReLU (Parametric ReLU)

p(s)
是indicator function,截断太过“生硬”,长这样:

DICE
更泛化版PReLU,截断控制点考虑了数据的分布:

( E 和 Var 分别是min-batch内的均值和方差(test里使用移动平均))
模型相对衡量指标RelaImpr
Weight AUC (user-gAUC)

RelaImpr

附录
外积
参考:https://www.cnblogs.com/gxcdream/p/7597865.html
内积
对应元素相乘相加为标量:
- 表征向量的投影;
- 成乐模长后的夹角
外积
计算方式特殊,且计算完后是向量,方向为垂直于两向量

计算方式
a = np.array([1, 2, 3, 4, 5]).reshape([5,1])
b = np.array([6, 7, 8, 9, 10]).reshape([1,5])
a*b
#################################################
a = tf.expand_dims(a, axis=-1)
b = tf.expand_dims(b, axis=-1)
outer = tf.matmul(a, b, transpose_b=True)
WHY not LSTM
电商历史行为序列特定:Rapid jumping and sudden ending over these interests
网友评论