用户对项目的预测评分 = 用户的编码 * 项目的编码
R
^
u
t
=
e
u
∗
⋅
e
t
(1)
\hat{\mathbf{R}}_{u t}=\mathbf{e}_{u}^{*} \cdot \mathbf{e}_{t} \tag1
R^ut=eu∗⋅et(1)
用户编码 = 用户自己的编码 + 朋友对用户的描述 + 用户偏好(通过用户购买过的商品进行刻画)
e
u
n
∗
=
γ
s
e
u
n
+
γ
u
h
u
(
n
)
+
γ
t
h
t
(
n
)
(2)
\mathbf{e}_{u_{n}}^{*}=\gamma_{s} \mathbf{e}_{u_{n}}+\gamma_{u} \mathbf{h}_{u}^{(n)}+\gamma_{t} \mathbf{h}_{t}^{(n)} \tag2
eun∗=γseun+γuhu(n)+γtht(n)(2) –
e
u
n
\mathbf{e}_{u_{n}}
eun:用户自己
u
n
u_{n}
un的编码; –
h
u
\mathbf{h}_{u}
hu:朋友对用户的描述的编码; –
h
t
\mathbf{h}_{t}
ht:用户偏好的编码。 注意:
e
u
∗
和
e
u
n
∗
应该表示的是同一个东西,本文作者符号系统有点乱。
\mathbf{e}_{u}^{*}和\mathbf{e}_{u_{n}}^{*}应该表示的是同一个东西,本文作者符号系统有点乱。
eu∗和eun∗应该表示的是同一个东西,本文作者符号系统有点乱。
朋友对用户的描述 = 用户所有朋友编码
e
u
p
\mathbf{e}_{u_{p}}
eup的加权和;用户偏好 = 用户购买过的商品编码
e
t
k
\mathbf{e}_{t_{k}}
etk的加权和
h
u
(
n
)
=
∑
p
=
1
P
α
n
p
W
h
e
u
p
,
h
t
(
n
)
=
∑
k
=
1
K
β
n
k
W
h
e
t
k
(3)
\mathbf{h}_{u}^{(n)}=\sum_{p=1}^{P} \alpha_{n p} \mathbf{W}_{h} \mathbf{e}_{u_{p}}, \quad \mathbf{h}_{t}^{(n)}=\sum_{k=1}^{K} \beta_{n k} \mathbf{W}_{h} \mathbf{e}_{t_{k}} \tag 3
hu(n)=p=1∑PαnpWheup,ht(n)=k=1∑KβnkWhetk(3) –
α
n
p
\alpha_{n p}
αnp:利用
o
n
p
=
LeakyReLU
(
a
⊤
[
W
1
e
u
n
∥
W
1
e
u
p
]
)
o_{n p}=\operatorname{LeakyReLU}\left(\mathbf{a}^{\top}\left[\mathbf{W}_{1} \mathbf{e}_{u_{n}} \| \mathbf{W}_{1} \mathbf{e}_{u_{p}}\right]\right)
onp=LeakyReLU(a⊤[W1eun∥W1eup]) 和
α
n
p
=
softmax
p
(
o
n
p
)
=
exp
(
o
n
p
)
∑
i
=
1
P
exp
(
o
n
i
)
\alpha_{n p}=\operatorname{softmax}_{p}\left(o_{n p}\right)=\frac{\exp \left(o_{n p}\right)}{\sum_{i=1}^{P} \exp \left(o_{n i}\right)}
αnp=softmaxp(onp)=∑i=1Pexp(oni)exp(onp),获得用户和朋友之间的关系紧密程度; –
W
h
\mathbf{W}_{h}
Wh:
W
h
∈
R
d
×
d
\mathbf{W}_{h} \in \mathbb{R}^{d \times d}
Wh∈Rd×d一个线性映射权重矩阵; –
e
u
p
\mathbf{e}_{u_{p}}
eup:用户朋友
u
p
u_{p}
up的编码; –
β
n
k
\beta_{n k}
βnk:利用
v
n
k
=
LeakyReLU
(
b
⊤
[
W
2
e
u
n
∥
W
2
e
i
k
]
)
v_{n k}=\operatorname{LeakyReLU}\left(\mathbf{b}^{\top}\left[\mathbf{W}_{2} \mathbf{e}_{u_{n}} \| \mathbf{W}_{2} \mathbf{e}_{i_{k}}\right]\right)
vnk=LeakyReLU(b⊤[W2eun∥W2eik])和
β
n
k
=
softmax
k
(
v
n
k
)
=
exp
(
v
n
i
)
∑
i
=
1
K
exp
(
v
n
i
)
\beta_{n k}=\operatorname{softmax}{ }_{k}\left(v_{n k}\right)=\frac{\exp \left(v_{n i}\right)}{\sum_{i=1}^{K} \exp \left(v_{n i}\right)}
βnk=softmaxk(vnk)=∑i=1Kexp(vni)exp(vni),获得用户购买过的商品对用户偏好的描述度; –
e
t
k
\mathbf{e}_{t_{k}}
etk:用户购买过的商品
t
k
t_{k}
tk的编码。
计算用户自身的注意力权重
γ
s
\gamma_{s}
γs,朋友的注意力权重
γ
u
\gamma_{u}
γu,用户购买过的商品的注意力权重
γ
t
\gamma_{t}
γt
γ
s
=
exp
(
c
⊤
[
h
s
(
n
)
∥
v
s
]
)
exp
(
c
⊤
[
h
u
(
n
)
∥
v
u
]
)
+
exp
(
c
⊤
[
h
t
(
n
)
∥
v
t
]
)
+
exp
(
c
⊤
[
h
s
(
n
)
∥
v
s
]
)
,
γ
u
=
exp
(
c
⊤
[
h
u
(
n
)
∥
v
u
]
)
exp
(
c
⊤
[
h
u
(
n
)
∥
v
u
]
)
+
exp
(
c
⊤
[
h
t
(
n
)
∥
v
t
]
)
+
exp
(
c
⊤
[
h
s
(
n
)
∥
v
s
]
)
,
γ
t
=
exp
(
c
⊤
[
h
t
(
n
)
∥
v
t
]
)
exp
(
c
⊤
[
h
u
(
n
)
∥
v
u
]
)
+
exp
(
c
⊤
[
h
t
(
n
)
∥
v
t
]
)
+
exp
(
c
⊤
[
h
s
(
n
)
∥
v
s
]
)
.
(4)
γs=exp(c⊤[h(n)s‖vs])exp(c⊤[h(n)u‖vu])+exp(c⊤[h(n)t‖vt])+exp(c⊤[h(n)s‖vs]),γu=exp(c⊤[h(n)u‖vu])exp(c⊤[h(n)u‖vu])+exp(c⊤[h(n)t‖vt])+exp(c⊤[h(n)s‖vs]),γt=exp(c⊤[h(n)t‖vt])exp(c⊤[h(n)u‖vu])+exp(c⊤[h(n)t‖vt])+exp(c⊤[h(n)s‖vs]).
γs=exp(c⊤[hu(n)∥vu])+exp(c⊤[ht(n)∥vt])+exp(c⊤[hs(n)∥vs])exp(c⊤[hs(n)∥vs]),γu=exp(c⊤[hu(n)∥vu])+exp(c⊤[ht(n)∥vt])+exp(c⊤[hs(n)∥vs])exp(c⊤[hu(n)∥vu]),γt=exp(c⊤[hu(n)∥vu])+exp(c⊤[ht(n)∥vt])+exp(c⊤[hs(n)∥vs])exp(c⊤[ht(n)∥vt]).(4) – 注意这个步骤引入了三个新的变量
v
s
,
v
u
,
v
t
{v}_{s}, {v}_{u}, {v}_{t}
vs,vu,vt,具体原因作者是这样解释的:The general aggregation process is illustrated in Figure 2(b). Intuitively, we should aggregate hidden embeddings and the center node embedding to infer the embedding of
u
n
u_n
un. However, social relation, user-item interactions and center node embedding are not equally contributed to the learning process [61]. We should also handle the heterogeneity during the aggregation step. Therefore, we propose to use three relation vectors to preserve their semantics, i.e.,
v
s
,
v
u
,
v
t
∈
R
{v}_{s}, {v}_{u}, {v}_{t} \in \mathbb{R}
vs,vu,vt∈R preserving the social semantics, user-item semantics and center node itself semantics respectively. 作者认为用户自己、用户的朋友及用户购买过的商品在聚合过程中贡献并不相同,所以引入了三个新的变量来保存它们的语义,以处理在聚合过程中的异构性。