Position-Enhanced and Time-aware Graph Convolutional Network for Sequential Recommendations

发布时间 2023-09-04 15:47:13作者: 馒头and花卷

Position-Enhanced and Time-aware Graph Convolutional Network for Sequential Recommendations

[Huang L., Ma Y., Liu Y., Du B., Wang S. and Li D. Position-enhanced and time-aware graph convolutional network for sequential recommendations. TOIS, 2021.]

Graph + Sequence + Time.

符号说明

PTGCN

Embedding Layer

  • User/Item Embedding: 就是正常的 embedding: \(\mathbf{U} \in \mathbb{R}^{|U| \times d}, \mathbf{V} \in \mathbb{R}^{|V| \times d}\). 我们用 \(\mathbf{u}_{i,t}, \mathbf{v}_{j,t}\) 来强调为时间戳 \(t\) 处的 embedding (虽然现在没看出来和 \(t\) 有啥关系).

  • Time Embedding: 首先, 将实际的时间划分为如下区间,

    \[[0, 1), [1, 2), [2, 4), \ldots, [2^k, 2^{k+1}) \]

    然后为每个 group 设定一 embedding, 接下来具体的时间只需要通过 look up 就可以了. 记为

    \[\mathbf{t} \in \mathbb{R}^d. \]

  • Position embedding: 此外, 我们希望模型知晓位置信息, 故而引入 position embedding, 采用的就是最常见的 sinusoidal encoding, 我们记为 \(\mathbf{p}_t\), 类似的, 严格来说它值和时间 \(t\) 没有关系.

Convolutional Layer

  • 一般的图卷积为如下的形式:

    \[\mathbf{h}_{N_u}^{(l)} = \text{AGGREGATE}(\{\mathbf{h}_{u'}^{(l-1)}| u' \in N_u\}), \\ \mathbf{h}_{u}^{(l)} = \sigma(\mathbf{W}^{(l)} \cdot \text{CONCAT} (\mathbf{h}_u^{(l-1)}, \mathbf{h}_{N_u}^{(l)})). \]

    不过显然它无法利用到时间和序列信息.

  • 所以作者采用如下的方式:

    \[\mathbf{h}_{N_{u_i, t_q}}^{(l)} = \text{AGGREGATE}(\{(\mathbf{v}_{j, t}^{(l-1)}, \mathbf{t}, \mathbf{p}_{j, t})| i_{u_i, v_j, t} \in N_{u_i, t_q}\}), \\ \mathbf{u}_{i, t_q}^{(l)} = \mathbf{W}_{U_2} \cdot \sigma(\mathbf{W}_{U_1} \cdot \text{CONCAT} (\mathbf{u}_{i, t_q}^{(l-1)}, \mathbf{h}_{N_{u_i, t_q}}^{(l)})). \]

    这里 \(N_{u_i, t_q} = \{i_{u_i, v_j, t_m}| v_j \in V, q - n < m \le q\}\). 对于 \(\mathbf{v}^{(l)}\), 其更新方式是类似的.

  • 具体的, AGGREGATE 部分, 作者是采用是自注意力机制实现的.

代码

[official]