Skip to content
ImagineWorld

Dynamic Heterogeneous Graph Representation

node_idnode-book_heterogeneous-graph-representations_chapter-05-dynamic-heterogeneous-graph-representation
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num5
chapter_titleDynamic Heterogeneous Graph Representation
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 5 — Dynamic Heterogeneous Graph Representation

Section titled “Chapter 5 — Dynamic Heterogeneous Graph Representation”

Abstract Graphs are gradually generated with multiple temporal heterogeneous interactions in real-world scenarios, containing both abundant structures and complex ‘dynamics. Compared to static heterogeneous graphs, the dynamics express not only the changing graph topology but also the sequential evolution as well as multiple temporal preferences, indicating the necessity of dynamic heterogeneous graph modeling. This chapter focuses on simultaneously modeling both the evolving dynamics and heterogeneous semantics, and introduces three representative approaches, including DyHNE to handle structure changes via matrix perturbation theory based incremental learning, SHCF to tackle evolving sequences via heterogeneous sequential neural collaborative filtering, and THIGE to model multiple long- and short-term preferences via temporal heterogeneous GNNs.

Heterogeneous graphs in real-world scenarios usually exhibit high dynamics with the evolution of various types of nodes and edges, e.g., the newly added (deleted) nodes or edges, forming the dynamic heterogeneous graph or temporal heterogeneous graph. The complex but valuable temporal heterogeneity introduces essential challenges for representation. Specifically, heterogeneous interactions are accumulated over time, leading to the continuous changes of graphic topologies. Besides, interactions are often sequentially generated, which indicate the corresponding evolution of interests. Furthermore, there are multiple temporal interactions, expressing both heterogeneous sequential evolution of current demands and multi-view historical habits.

However, the current heterogeneous graph embedding methods [3, 6, 16, 36, 42] cannot model the dynamics within structural semantics, which have to be retrained repeatedly at each time step. Focusing on modeling the evolving dynamics, some researchers attempt to integrate with Recurrent Neural Networks (RNNs) [13, 14, 22, 31] and Transformers [18, 37, 46], and some recent approaches [25, 26, 39] pay attention to combine both short-term and long-term interests to generate fine-

© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 C. Shi et al., Heterogeneous Graph Representation Learning and Applications, Artificial Intelligence: Foundations, Theory, and Algorithms, https://doi.org/10.1007/978-981-16-6166-2_5

ed node representations. Unfortunately, almost all of these sequential methods construct user embeddings based on only their own sequential item interactions while ignoring the abundant heterogeneous information.

In this chapter, we introduce three dynamic heterogeneous graph representation learning methods to solve the challenges in incremental learning, sequential information, and temporal interactions. First, we introduce the Dynamic Heterogeneous Network Embedding (named DyHNE) [26] to handle the incremental learning of temporal semantics by utilizing matrix perturbation theory. Second, we introduce the Sequence-aware Heterogeneous graph neural Collaborative Filtering (called SHCF) [24] to model the heterogeneous evolution of sequential information for recommendation. Third, we introduce the Temporal Heterogeneous Interaction Graph Embedding (named THIGE) [17] to model both long-term habits and short-term demands of temporal interactions via temporal heterogeneous GNNs.

Heterogeneous graph are often gradually formatted with dynamic edges. The current HG embedding methods can hardly handle such complex evolution effectively in a dynamic heterogeneous graph. Basically, there are two fundamental problems which need to be carefully considered for dynamic heterogeneous graph embedding. One is how to effectively preserve the structure and semantics in a dynamic heterogeneous graph. As the heterogeneous graph evolves with a newly added node, the local structure centered on this node will be changed, and such changes will be gradually propagated across all the nodes via different meta-paths, leading to changes in the global structure. The other problem is how to efficiently update the node embeddings without retraining on the whole heterogeneous graph, when the heterogeneous graph evolves over time. For each time step, retraining a heterogeneous graph embedding method is the most straightforward way to get the optimal embeddings. However, apparently, this strategy is very time-consuming, especially when the change of network structure is very slight. In the era of big data, retraining manner becomes unrealistic. These problems motivate us to seek an effective and efficient method to preserve the structure and semantics for dynamic heterogeneous graph embedding.

This section designs the DyHNE with meta-path based proximity to effectively and efficiently learn the node embeddings. Inspired by the perturbation theory [10] widely used for capturing changes of a system, we learn the node embeddings by solving the generalized eigenvalue problem and model the evolution of the heterogeneous graph with the eigenvalue perturbation. We firstly adopt meta-path augmented adjacency matrices to capture the structure and semantics in dynamic heterogeneous graphs. For capturing the evolution of the heterogeneous graph, we then utilize the perturbations of multiple meta-path augmented adjacency matrices to model the changes of the structure and semantics of the heterogeneous graph in a natural manner. Finally, we employ the eigenvalue perturbation theory to incorporate the changes and derive the node embeddings efficiently.

The core idea of DyHNE is to build an effective and efficient architecture that can capture the changes of structure and semantics in a dynamic heterogeneous graph and derive the node embeddings efficiently.

To achieve this, we first introduce the meta-path based first-order and second-order proximity to preserve structure and semantics in heterogeneous graphs. As shown in Fig.5.1, three augmented adjacency matrices based on meta-path APA, APCPA, and APTPA are defined and fused with weights, which gives rise to the fused matrix W(t)\mathbf{W}^{(t)} at time tt. Then, we learn node embeddings U(t)\mathbf{U}^{(t)} by solving the generalized eigenvalue problem in terms of the fused matrix W(t)\mathbf{W}^{(t)}. As the heterogeneous graph evolves from time tt to t+1t + 1, new nodes and edges are added into the network (i.e. nodes a3a_3, p4p_4, and t3t_3; edges (a3,p4)(a_3, p_4), (a1,p4)(a_1, p_4), (p4,c2)(p_4, c_2), (p4,t2)(p_4, t_2), and (p4,t3)(p_4, t_3)), leading to the changes of meta-path augmented adjacency matrices. Since these matrices are actually the realization of structure and semantics in the heterogeneous graph, we naturally capture changes of structure and semantics with the perturbation of the fused matrix (i.e. ΔW\Delta \mathbf{W}). Further, we tailor the embeddings update formulas for dynamic heterogeneous graph with matrix perturbation theory, so that our DyHNE can efficiently derive the changed embedding ΔU\Delta \mathbf{U} and update network embedding from U(t)\mathbf{U}^{(t)} to U(t+1)\mathbf{U}^{(t+1)} with U(t+1)=ΔU+U(t)\mathbf{U}^{(t+1)} = \Delta \mathbf{U} + \mathbf{U}^{(t)}.

[!visual-conversion] Converted from the surrounding model description.

flowchart LR
    subgraph StHNE["StHNE (static)"]
        APA["APA adjacency matrix"] --> Fuse["Fused matrix W(t)"]
        APCPA["APCPA adjacency matrix"] --> Fuse
        APTPA["APTPA adjacency matrix"] --> Fuse
        Fuse --> Eig["Generalized eigenvalue problem"] --> Ut["Node embeddings U(t)"]
    end
    subgraph DyHNE["DyHNE (dynamic)"]
        NewEdges["New nodes/edges at t+1"] --> DeltaW["Perturbation of adjacency matrices -> delta W"]
        DeltaW --> Perturb["Eigenvalue perturbation theory"]
        Ut --> Perturb
        Perturb --> DeltaU["delta U"]
        DeltaU --> Ut1["U(t+1) = delta U + U(t)"]
    end

Fig. 5.1 The overall architecture of the proposed StHNE and DyHNE

In a nutshell, the proposed StHNE is capable of capturing the structures and semantics in a heterogeneous graph with meta-path based first-order and second-order proximity, and DyHNE achieves the efficient update of network embeddings with the perturbation of meta-path augmented adjacency matrices.

2.2.1 Static Modeling

Before achieving effective update node embeddings when the heterogeneous graph evolves over time, a proper static heterogeneous graph embedding for capturing structural and semantic information is a must. Hence, we next propose a Static Heterogeneous Network Embedding model (named StHNE), which preserves the meta-path based first- and second-order proximity. The meta-path based first-order proximity models the local proximity in heterogeneous graphs, which means that the nodes connected via path instances are similar. Given a node pair (vi,vj)(v_i, v_j) connected via path instances following mm, we model the meta-path based first-order proximity as:

p1m(vi,vj)=wijm∣∣ui−uj∣∣22,(5.1)p_1^m(v_i, v_j) = w_{ij}^m ||\mathbf{u}_i - \mathbf{u}_j||_2^2, \tag{5.1}

where ui∈Rd\mathbf{u}_i \in \mathbb{R}^d is the dd-dimension representation vector of node viv_i. To preserve the meta-path based first-order proximity in heterogeneous graphs, we minimize the following objective function:

L1m=∑vi,vj∈Vwijm∣∣ui−uj∣∣22.(5.2)\mathcal{L}_1^m = \sum_{v_i, v_j \in \mathcal{V}} w_{ij}^m ||\mathbf{u}_i - \mathbf{u}_j||_2^2. \tag{5.2}

As larger wijmw_{ij}^m indicates that viv_i and vjv_j have more connections via the meta-path mm, which makes nodes viv_i and vjv_j closer in the low-dimensional space.

The meta-path based second-order proximity is determined through the shared neighborhood structure of nodes. Given the neighbors of node vpv_p under the meta-path mm, denoted as N(vp)m\mathcal{N}(v_p)^m, we can model the second-order proximity based on meta-path as follows:

p2m(vp,N(vp)m)=∣∣up−∑vq∈N(vp)mwpqmuq∣∣22.(5.3)p_2^m(v_p, \mathcal{N}(v_p)^m) = ||\mathbf{u}_p - \sum_{v_q \in \mathcal{N}(v_p)^m} w_{pq}^m \mathbf{u}_q||_2^2. \tag{5.3}

Here, we normalize wpqmw_{pq}^m so that ∑vq∈N(vp)mwpq=1\sum_{v_q \in \mathcal{N}(v_p)^m} w_{pq} = 1.

With Eq. (5.3), we keep the node pp close to its neighbors under a specific meta-path. Equation (5.3) guarantees that unconnected nodes are close to each other if they contain the similar neighbors. To preserve the meta-path based second-order proximity in heterogeneous graphs, we minimize the following object function, namely

L2m=∑vp∈V∥up−∑vq∈N(vp)mwpqmuq∥22.(5.4)\mathcal{L}_2^m = \sum_{v_p \in \mathcal{V}} \left\| \mathbf{u}_p - \sum_{v_q \in \mathcal{N}(v_p)^m} w_{pq}^m \mathbf{u}_q \right\|_2^2. \tag{5.4}

Intuitively, minimizing Eq.(5.4) will cause the small distance between node vpv_p and its neighbors in the low-dimensional space. Thus, nodes that share the same neighbors with node vpv_p will also be close to vpv_p. In this way, the meta-path based second-order proximity can be preserved. Considering multiple semantic relations in a heterogeneous graph, we define a set of meta-paths M\mathcal{M} and assign weights {θ1,θ2,…,θ∣M∣}\{\theta_1, \theta_2, \ldots, \theta_{|\mathcal{M}|}\} to each meta-path, where ∀θi>0\forall \theta_i > 0 and ∑i=1∣M∣θi=1\sum_{i=1}^{|\mathcal{M}|} \theta_i = 1. Thus, our unified model combines multiple meta-paths while preserving both of the meta-path based first- and second-order proximity, namely

L=∑m∈Mθm(L1m+γL2m),(5.5)\mathcal{L} = \sum_{m \in \mathcal{M}} \theta_m (\mathcal{L}_1^m + \gamma \mathcal{L}_2^m), \tag{5.5}

where γ\gamma is the trade-off factor. Now, the static heterogeneous graph embedding problem is turned to:

arg⁡min⁡U⊤DU=I∑m∈Mθm(L1m+γL2m),(5.6)\arg \min_{\mathbf{U}^\top \mathbf{D} \mathbf{U} = \mathbf{I}} \sum_{m \in \mathcal{M}} \theta_m (\mathcal{L}_1^m + \gamma \mathcal{L}_2^m), \tag{5.6}

where D\mathbf{D} is the degree matrix that will be described later. The constraint U⊤DU=I\mathbf{U}^\top \mathbf{D} \mathbf{U} = \mathbf{I} removes an arbitrary scaling factor in the embedding and avoids the degenerate case where all node embeddings are equal.

Inspired by spectral theory [2, 27], we transform the problem of Eq.(5.6) as the generalized eigenvalue problem, so that we can get a closed-form solution and dynamically update embeddings with the eigenvalue perturbation theory [10]. Hence, we reformulate Eq.(5.2) as follows:

L1m=∑vi,vj∈Vwijm∥ui−uj∥22=2tr(U⊤LmU),(5.7)\mathcal{L}_1^m = \sum_{v_i, v_j \in \mathcal{V}} w_{ij}^m \| \mathbf{u}_i - \mathbf{u}_j \|_2^2 = 2 \mathrm{tr}(\mathbf{U}^\top \mathbf{L}^m \mathbf{U}), \tag{5.7}

where tr(⋅)\mathrm{tr}(\cdot) is the trace of the matrix, U\mathbf{U} is the embedding matrix, Lm=Dm−Wm\mathbf{L}^m = \mathbf{D}^m - \mathbf{W}^m is the Laplacian matrix under the meta-path mm, and Dm\mathbf{D}^m is a diagonal matrix with Diim=∑jwijm\mathbf{D}_{ii}^m = \sum_j w_{ij}^m. Similarly, Eq.(5.4) can be rewritten as follows:

L2m=∑vp∈V∥up−∑vq∈N(vp)mwpqmuq∥22=2tr(U⊤HmU),(5.8)\mathcal{L}_2^m = \sum_{v_p \in \mathcal{V}} \left\| \mathbf{u}_p - \sum_{v_q \in \mathcal{N}(v_p)^m} w_{pq}^m \mathbf{u}_q \right\|_2^2 = 2 \mathrm{tr}(\mathbf{U}^\top \mathbf{H}^m \mathbf{U}), \tag{5.8}

where Hm=(I−Wm)⊤(I−Wm)\mathbf{H}^{m} = (\mathbf{I} - \mathbf{W}^{m})^{\top}(\mathbf{I} - \mathbf{W}^{m}) is symmetric. As discussed earlier, we fuse all meta-paths in M\mathcal{M}, which gives rise to:

W=∑m∈MθmWm,D=∑m∈MθmDm.(5.9)\mathbf{W} = \sum_{m \in \mathcal{M}} \theta_{m} \mathbf{W}^{m}, \quad \mathbf{D} = \sum_{m \in \mathcal{M}} \theta_{m} \mathbf{D}^{m}. \tag{5.9}

Hence, the StHNE can be reformulated as:

L=tr(U⊤(L+γH)U),(5.10)\mathcal{L} = tr(\mathbf{U}^{\top}(\mathbf{L} + \gamma \mathbf{H})\mathbf{U}), \tag{5.10}

where L=D−W\mathbf{L} = \mathbf{D} - \mathbf{W} and H=(I−W)⊤(I−W)\mathbf{H} = (\mathbf{I} - \mathbf{W})^{\top}(\mathbf{I} - \mathbf{W}). Now, the problem of static heterogeneous graph embedding reduces to:

arg⁡min⁡U⊤DU=Itr(U⊤(L+γH)U),(5.11)\arg \min_{\mathbf{U}^{\top} \mathbf{D} \mathbf{U} = \mathbf{I}} tr(\mathbf{U}^{\top}(\mathbf{L} + \gamma \mathbf{H})\mathbf{U}), \tag{5.11}

where L+γH\mathbf{L} + \gamma \mathbf{H} is symmetric. The problem of Eq. (5.11) boils down to the generalized eigenvalue problem [40] as follows:

(L+γH)U=DλU,(5.12)(\mathbf{L} + \gamma \mathbf{H})\mathbf{U} = \mathbf{D} \boldsymbol{\lambda} \mathbf{U}, \tag{5.12}

where λ=diag(λ1,λ2,…,λNM)\boldsymbol{\lambda} = diag(\lambda_{1}, \lambda_{2}, \ldots, \lambda_{N_{\mathcal{M}}}) is the eigenvector matrix, NMN_{\mathcal{M}} is the number of nodes in the meta-path set M\mathcal{M}.

Having transformed the StHNE as the generalized eigenvalue problem, the embedding matrix U\mathbf{U} is given by the top-dd eigenvectors with the smallest non-zero eigenvalues. As the heterogeneous graph evolves from time tt to t+1t + 1, the dynamic heterogeneous graph embedding model focuses on efficiently updating U(t)\mathbf{U}^{(t)} to U(t+1)\mathbf{U}^{(t+1)}. That is, update the eigenvectors and eigenvalues.

The core idea of a dynamic heterogeneous graph embedding model is to learn node embeddings efficiently in a dynamic manner, thus we next to effectively update the eigenvectors and eigenvalues based on matrix perturbation.

Following the previous works [21, 50], we assume that the network evolves on a common node set of cardinality NN. A nonexistent node is treated as an isolated node with zero degree, and thereby the evolution of a network can be regarded as the change of edges [1]. Besides, the addition (deletion) of edges may vary by types. It is naturally appealing to capture the evolution of a dynamic heterogeneous graph with the perturbation of meta-path augmented adjacency matrix ΔW=∑m∈MθmΔWm\Delta \mathbf{W} = \sum_{m \in \mathcal{M}} \theta_m \Delta \mathbf{W}^m. Thus, the changes of L\mathbf{L} and H\mathbf{H} can be calculated as follows:

ΔL=ΔD−ΔW,(5.13)\Delta \mathbf{L} = \Delta \mathbf{D} - \Delta \mathbf{W}, \tag{5.13} ΔH=ΔW⊤ΔW−(I−W)⊤ΔW−ΔW⊤(I−W).(5.14)\Delta \mathbf{H} = \Delta \mathbf{W}^\top \Delta \mathbf{W} - (\mathbf{I} - \mathbf{W})^\top \Delta \mathbf{W} - \Delta \mathbf{W}^\top (\mathbf{I} - \mathbf{W}). \tag{5.14}

Since perturbation theory can give approximate solution to a problem by adding a perturbation term [10], we can update eigenvalues and eigenvectors from the eigenvalues and eigenvectors at the previous time with the eigenvalue perturbation. Hence, at new time step, we have the following equation based on Eq. (5.12):

(L+ΔL+γH+γΔH)(U+ΔU)=(D+ΔD)(λ+Δλ)(U+ΔU),(5.15)(\mathbf{L} + \Delta \mathbf{L} + \gamma \mathbf{H} + \gamma \Delta \mathbf{H})(\mathbf{U} + \Delta \mathbf{U}) = (\mathbf{D} + \Delta \mathbf{D})(\lambda + \Delta \lambda)(\mathbf{U} + \Delta \mathbf{U}), \tag{5.15}

where ΔU\Delta \mathbf{U} and Δλ\Delta \lambda are the changes of the eigenvectors and eigenvalues. Here, we omit the (t)(t) superscript for brevity since the perturbation process for any time step tt is the same. Let us focus on a specific eigen-pair (ui,λi)(\mathbf{u}_i, \lambda_i), Eq. (5.15) is rewritten as

(L+ΔL+γH+γΔH)(ui+Δui)=(λi+Δλi)(D+ΔD)(ui+Δui).(5.16)(\mathbf{L} + \Delta \mathbf{L} + \gamma \mathbf{H} + \gamma \Delta \mathbf{H})(\mathbf{u}_i + \Delta \mathbf{u}_i) = (\lambda_i + \Delta \lambda_i)(\mathbf{D} + \Delta \mathbf{D})(\mathbf{u}_i + \Delta \mathbf{u}_i). \tag{5.16}

Hence, the dynamic heterogeneous graph embedding problem is how to calculate the changes of the ii-th eigen-pair (Δui,Δλi)(\Delta \mathbf{u}_i, \Delta \lambda_i), because if we have ΔU\Delta \mathbf{U} and Δλ\Delta \lambda between tt and t+1t+1, we can efficiently update the embedding matrix with U(t+1)=U(t)+ΔU\mathbf{U}^{(t+1)} = \mathbf{U}^{(t)} + \Delta \mathbf{U}.

We first introduce how to calculate Δλi\Delta \lambda_i. By expanding Eq. (5.16) and removing the higher-order terms that have limited effects on the accuracy of the solution [10], such as ΔLΔui\Delta \mathbf{L} \Delta \mathbf{u}_i and ΔλiΔDΔui\Delta \lambda_i \Delta \mathbf{D} \Delta \mathbf{u}_i, then based on the fact (L+γH)ui=λiDui(\mathbf{L} + \gamma \mathbf{H}) \mathbf{u}_i = \lambda_i \mathbf{D} \mathbf{u}_i, we have

(L+γH)Δui+(ΔL+γΔH)ui=λiDΔui+λiΔDui+ΔλiDui.(5.17)(\mathbf{L} + \gamma \mathbf{H}) \Delta \mathbf{u}_i + (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i = \lambda_i \mathbf{D} \Delta \mathbf{u}_i + \lambda_i \Delta \mathbf{D} \mathbf{u}_i + \Delta \lambda_i \mathbf{D} \mathbf{u}_i. \tag{5.17}

Furthermore, left multiplying both sides by ui⊤\mathbf{u}_i^\top, we have

ui⊤(L+γH)Δui+ui⊤(ΔL+γΔH)ui=λiui⊤DΔui+λiui⊤ΔDui+Δλiui⊤Dui.(5.18)\mathbf{u}_i^\top (\mathbf{L} + \gamma \mathbf{H}) \Delta \mathbf{u}_i + \mathbf{u}_i^\top (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i = \lambda_i \mathbf{u}_i^\top \mathbf{D} \Delta \mathbf{u}_i + \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_i + \Delta \lambda_i \mathbf{u}_i^\top \mathbf{D} \mathbf{u}_i. \tag{5.18}

As L+γH\mathbf{L} + \gamma \mathbf{H} and D\mathbf{D} are symmetric, then based on the fact (L+γH)ui=λiDui(\mathbf{L} + \gamma \mathbf{H}) \mathbf{u}_i = \lambda_i \mathbf{D} \mathbf{u}_i and right multiplying both sides by Δui\Delta \mathbf{u}_i, we have ui⊤(L+γH)Δui=λiui⊤DΔui\mathbf{u}_i^\top (\mathbf{L} + \gamma \mathbf{H}) \Delta \mathbf{u}_i = \lambda_i \mathbf{u}_i^\top \mathbf{D} \Delta \mathbf{u}_i. Thus, we can rewrite Eq. (5.18) as follows:

ui⊤(ΔL+γΔH)ui=λiui⊤ΔDui+Δλiui⊤Dui.(5.19)\mathbf{u}_i^\top (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i = \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_i + \Delta \lambda_i \mathbf{u}_i^\top \mathbf{D} \mathbf{u}_i. \tag{5.19}

Based on Eq. (5.19), we get the changes of the eigenvalue λi\lambda_i:

Δλi=ui⊤ΔLui+γui⊤ΔHui−λiui⊤ΔDuiui⊤Dui.(5.20)\Delta \lambda_i = \frac{\mathbf{u}_i^\top \Delta \mathbf{L} \mathbf{u}_i + \gamma \mathbf{u}_i^\top \Delta \mathbf{H} \mathbf{u}_i - \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_i}{\mathbf{u}_i^\top \mathbf{D} \mathbf{u}_i}. \tag{5.20}

It is easy to see that D\mathbf{D} is a positive-semidefinite matrix, so we have ui⊤Dui=1\mathbf{u}_i^\top \mathbf{D} \mathbf{u}_i = 1 and ui⊤Duj=0(i≠j)\mathbf{u}_i^\top \mathbf{D} \mathbf{u}_j = 0 (i \ne j) [10, 29]. Thus,

Δλi=ui⊤ΔLui+γui⊤ΔHui−λiui⊤ΔDui.(5.21)\Delta \lambda_i = \mathbf{u}_i^\top \Delta \mathbf{L} \mathbf{u}_i + \gamma \mathbf{u}_i^\top \Delta \mathbf{H} \mathbf{u}_i - \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_i. \tag{5.21}

Having got the change of eigenvalue Δλi\Delta \lambda_i between two continuous time steps, our next goal is to calculate the changes of eigenvectors Δui\Delta \mathbf{u}_i.

As a heterogeneous graph usually evolves smoothly [1], the network changes based on meta-paths (i.e., ΔW\Delta \mathbf{W}) are subtle. We assume the perturbation of the eigenvectors Δui\Delta \mathbf{u}_i is linearly weighted by the top-dd eigenvectors with the smallest non-zero eigenvalues [10]:

Δui=∑j=2,j≠id+1αijuj,(5.22)\Delta \mathbf{u}_i = \sum_{j=2, j \ne i}^{d+1} \alpha_{ij} \mathbf{u}_j, \tag{5.22}

where αij\alpha_{ij} indicates the weight of uj\mathbf{u}_j on Δui\Delta \mathbf{u}_i. Thus, the problem of calculating Δui\Delta \mathbf{u}_i now is transformed into how to determine these weights. Considering Eq. (5.16), by replacing Δui\Delta \mathbf{u}_i with Eq. (5.22) and removing the higher-order terms that have limited effects on the accuracy of the solution [19], we obtain the following:

(L+γH)∑j=2,j≠id+1αijuj+(ΔL+γΔH)ui=λiD∑j=2,j≠id+1αijuj+λiΔDui+ΔλiDui.(5.23)\begin{aligned} (\mathbf{L} + \gamma \mathbf{H}) \sum_{j=2, j \ne i}^{d+1} \alpha_{ij} \mathbf{u}_j + (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i \\ = \lambda_i \mathbf{D} \sum_{j=2, j \ne i}^{d+1} \alpha_{ij} \mathbf{u}_j + \lambda_i \Delta \mathbf{D} \mathbf{u}_i + \Delta \lambda_i \mathbf{D} \mathbf{u}_i. \tag{5.23} \end{aligned}

With the fact that (L+γH)∑j=2d+1αijuj=D∑j=2d+1αijλjuj(\mathbf{L} + \gamma \mathbf{H}) \sum_{j=2}^{d+1} \alpha_{ij} \mathbf{u}_j = \mathbf{D} \sum_{j=2}^{d+1} \alpha_{ij} \lambda_j \mathbf{u}_j, and by multiplying up⊤(2≤p≤d+1,p≠i)\mathbf{u}_p^\top (2 \le p \le d+1, p \ne i) on both sides of Eq. (5.23), we get

up⊤D∑j=2,j≠id+1αijλjuj+up⊤(ΔL+γΔH)ui=λiup⊤D∑j=2,j≠id+1αijuj+λiup⊤ΔDui+Δλiup⊤Dui.(5.24)\begin{aligned} \mathbf{u}_p^\top \mathbf{D} \sum_{j=2, j \ne i}^{d+1} \alpha_{ij} \lambda_j \mathbf{u}_j + \mathbf{u}_p^\top (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i \\ = \lambda_i \mathbf{u}_p^\top \mathbf{D} \sum_{j=2, j \ne i}^{d+1} \alpha_{ij} \mathbf{u}_j + \lambda_i \mathbf{u}_p^\top \Delta \mathbf{D} \mathbf{u}_i + \Delta \lambda_i \mathbf{u}_p^\top \mathbf{D} \mathbf{u}_i. \tag{5.24} \end{aligned}

115

Based on ui⊤Dui=1\mathbf{u}_i^\top \mathbf{D} \mathbf{u}_i = 1 and ui⊤Duj=0(i≠j)\mathbf{u}_i^\top \mathbf{D} \mathbf{u}_j = 0 (i \ne j), we can simplify the above formula and get

λpαip+up⊤(ΔL+γΔH)ui=λiαip+λiup⊤ΔDui.(5.25)\lambda_p \alpha_{ip} + \mathbf{u}_p^\top (\Delta \mathbf{L} + \gamma \Delta \mathbf{H}) \mathbf{u}_i = \lambda_i \alpha_{ip} + \lambda_i \mathbf{u}_p^\top \Delta \mathbf{D} \mathbf{u}_i. \tag{5.25}

Finally, we obtain the weight αip\alpha_{ip} as follows:

αip=up⊤ΔLui+γup⊤ΔHui−λiup⊤ΔDuiλi−λp,i≠p.(5.26)\alpha_{ip} = \frac{\mathbf{u}_p^\top \Delta \mathbf{L} \mathbf{u}_i + \gamma \mathbf{u}_p^\top \Delta \mathbf{H} \mathbf{u}_i - \lambda_i \mathbf{u}_p^\top \Delta \mathbf{D} \mathbf{u}_i}{\lambda_i - \lambda_p}, \quad i \ne p. \tag{5.26}

To sum up, we now have the changes of eigenvalues and eigenvectors based on Eqs. (5.21), (5.22), and (5.26). The new eigenvalues and eigenvectors at t+1t+1 can be updated as follows:

λ(t+1)=λ(t)+Δλ,U(t+1)=U(t)+ΔU.(5.27)\lambda^{(t+1)} = \lambda^{(t)} + \Delta \lambda, \quad \mathbf{U}^{(t+1)} = \mathbf{U}^{(t)} + \Delta \mathbf{U}. \tag{5.27}

A straightforward idea to update the embeddings is to calculate Eqs. (5.21), (5.22), and (5.26) for Eq. (5.27). However, the calculation of Eq. (5.21) is time-consuming due to the definition of ΔH\Delta \mathbf{H} (i.e., Eq. (5.14)). Thus, we propose an acceleration solution tailored for dynamic heterogeneous graph embedding.

Let us focus on Δλi\Delta \lambda_i and αij\alpha_{ij} in a more detailed way. We replace ΔH\Delta \mathbf{H} with Eq. (5.14) and remove the higher-order terms as earlier, Eqs. (5.21) and (5.26) can be reformulated as follows:

Δλi=ui⊤ΔLui−λiui⊤ΔDui+γ{[(W−I)ui]⊤ΔWui+(ΔWui)⊤(W−I)ui},(5.28)\Delta \lambda_i = \mathbf{u}_i^\top \Delta \mathbf{L} \mathbf{u}_i - \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_i + \gamma \{[(\mathbf{W} - \mathbf{I}) \mathbf{u}_i]^\top \Delta \mathbf{W} \mathbf{u}_i + (\Delta \mathbf{W} \mathbf{u}_i)^\top (\mathbf{W} - \mathbf{I}) \mathbf{u}_i\}, \tag{5.28} αij=uj⊤ΔLui−λiuj⊤ΔDuiλi−λj\alpha_{ij} = \frac{\mathbf{u}_j^\top \Delta \mathbf{L} \mathbf{u}_i - \lambda_i \mathbf{u}_j^\top \Delta \mathbf{D} \mathbf{u}_i}{\lambda_i - \lambda_j} +γ{[(W−I)uj]⊤ΔWui+(ΔWuj)⊤(W−I)ui}λi−λj.(5.29)+ \frac{\gamma \{[(\mathbf{W} - \mathbf{I}) \mathbf{u}_j]^\top \Delta \mathbf{W} \mathbf{u}_i + (\Delta \mathbf{W} \mathbf{u}_j)^\top (\mathbf{W} - \mathbf{I}) \mathbf{u}_i\}}{\lambda_i - \lambda_j}. \tag{5.29}

For the sake of convenience, we rewrite Δλi\Delta \lambda_i and αij\alpha_{ij} as follows:

Δλi=C(i,i)+γ[A(:,i)⊤B(:,i)+B(:,i)⊤A(:,i)],(5.30)\Delta \lambda_i = \mathbf{C}(i, i) + \gamma [\mathbf{A}(:, i)^\top \mathbf{B}(:, i) + \mathbf{B}(:, i)^\top \mathbf{A}(:, i)], \tag{5.30} αij=C(j,i)+γ[A(:,j)⊤B(:,i)+B(:,j)⊤A(:,i)]λi−λj,(5.31)\alpha_{ij} = \frac{\mathbf{C}(j, i) + \gamma [\mathbf{A}(:, j)^\top \mathbf{B}(:, i) + \mathbf{B}(:, j)^\top \mathbf{A}(:, i)]}{\lambda_i - \lambda_j}, \tag{5.31}

where A(:,i)=(W−I)ui\mathbf{A}(:, i) = (\mathbf{W} - \mathbf{I}) \mathbf{u}_i, B(:,i)=ΔWui\mathbf{B}(:, i) = \Delta \mathbf{W} \mathbf{u}_i, and C(i,j)=ui⊤ΔLuj−λiui⊤ΔDuj\mathbf{C}(i, j) = \mathbf{u}_i^\top \Delta \mathbf{L} \mathbf{u}_j - \lambda_i \mathbf{u}_i^\top \Delta \mathbf{D} \mathbf{u}_j.

Obviously, the calculation of A\mathbf{A} is time-consuming. Hence, we define A(t+1)(:,i)\mathbf{A}^{(t+1)}(:, i) at time step t+1t + 1 as follows:

A(t+1)(:,i)=(W−I+ΔW)(ui+Δui).(5.32)\mathbf{A}^{(t+1)}(:, i) = (\mathbf{W} - \mathbf{I} + \Delta\mathbf{W})(\mathbf{u}_i + \Delta\mathbf{u}_i). \tag{5.32}

Replacing Δui\Delta\mathbf{u}_i with Eq. (5.22), we have

A(t+1)(:,i)=(W−I+ΔW)(ui+∑j=2,j≠id+1αijuj)=∑j=2d+1βij(W−I+ΔW)uj,(5.33)\mathbf{A}^{(t+1)}(:, i) = (\mathbf{W} - \mathbf{I} + \Delta\mathbf{W}) \left( \mathbf{u}_i + \sum_{j=2, j\ne i}^{d+1} \alpha_{ij}\mathbf{u}_j \right) = \sum_{j=2}^{d+1} \beta_{ij}(\mathbf{W} - \mathbf{I} + \Delta\mathbf{W})\mathbf{u}_j, \tag{5.33}

where βij=αij\beta_{ij} = \alpha_{ij} if i≠ji \ne j, otherwise, βij=1\beta_{ij} = 1. Furthermore, we can obtain the following:

A(t+1)(:,i)=∑j=2d+1βij(At(:,j)+Bt(:,j)).(5.34)\mathbf{A}^{(t+1)}(:, i) = \sum_{j=2}^{d+1} \beta_{ij}(\mathbf{A}^t(:, j) + \mathbf{B}^t(:, j)). \tag{5.34}

Now, we reduce the time complexity of updating A(t+1)\mathbf{A}^{(t+1)} from O(ed)O(ed) to O(d2)O(d^2), which guarantees the efficiency of DyHNE.

Datasets We evaluate models on three datasets, including two academic networks (i.e., DBLP and AMiner) and a social Yelp. Yelp dataset extracts information related to restaurants of three sub-categories: “American (New) Food”, “Fast Food,” and “Sushi Bars” [23]. The meta-paths that we are interested in are BRURBBRURB (i.e., the user reviewed on two businesses) and BSBBSB (i.e., the same star level businesses). DBLP is an academic network in computer science where the authors are labeled with their research areas. We consider meta-paths including APAAPA (i.e., the co-author relationship), APCPAAPCPA (i.e., authors sharing conferences), and APTPAAPTPA (i.e., authors sharing terms). AMiner is also an academic network, which evolved from 1990 to 2005 in five research domains and the meta-paths are APAAPA, APCPAAPCPA, and APTPAAPTPA.

Baselines We compare our proposed StHNE and DyHNE with comprehensive state-of-the-art alternatives, including two homogeneous network embedding methods (i.e., DeepWalk [30] and LINE [38]); two heterogeneous information network embedding methods (i.e., ESim [33] and metapath2vec [8]); and two dynamic homogeneous network embedding methods (i.e., DANE [21], DHPE [50], and DHNE [47]). Additionally, in order to verify the effectiveness of the meta-path based first-order and second-order proximity, we test the performance of StHNE-1st and StHNE-2nd. We use codes of the baseline methods provided by their authors.

To evaluate the effectiveness of StHNE, here we learn the node embeddings with the static embedding methods on the whole heterogeneous graph without considering the evolution of the network. In other words, given a dynamic network with 10 time steps {G1,⋯ ,G10}\{ \mathcal{G}^1, \cdots, \mathcal{G}^{10} \}, we conduct all static network embedding methods, including StHNE, on the union network, i.e., G1∪G1∪⋯G10\mathcal{G}^1 \cup \mathcal{G}^1 \cup \cdots \mathcal{G}^{10}.

Node Classification Node classification is a common task to evaluate the performance of representation learning on networks. In this task, after learning the node embeddings on the fully evolved network, we train a logistic regression classifier with node embeddings as input features. The ratio of training set is set as 40%, 60%, and 80%. We set the weights of BSBBSB and BRURBBRURB in Yelp to 0.4 and 0.6. In DBLP, we assign weights {0.05,0.5,0.45}\{0.05, 0.5, 0.45\} to {APA,APCPA,APTPA}\{APA, APCPA, APTPA\}. In AMiner, we assign weights {0.25,0.5,0.25}\{0.25, 0.5, 0.25\} to {APA,APCPA,APTPA}\{APA, APCPA, APTPA\}. We report the results in terms of Macro-F1 and Micro-F1 in Table 5.1.

As we can observe, the StHNE outperforms all baselines on three datasets. It improves classification performance by about 8.7% in terms of Macro-F1 averagely with 80% training ratio, which is due to the weighted integration of meta-paths and the preservation of network structure. Both our model StHNE, ESim and metapath2vec fuse multiple meta-paths with weights, but the performances of ESim and metapath2vec are slight worse on three datasets. This may be caused by the separation of meta-paths fusion and model optimization, which loses some information between multiple relationships for heterogeneous graph embedding. We also notice that StHNE-1st and StHNE-2nd both outperform LINE-1st and LINE-2nd in most cases, which shows the superiority of the meta-path based first- and second-order proximity in heterogeneous graphs. From a vertical comparison, our StHNE continues to perform best against different sizes of training data, which implies the stability and robustness of our model.

Relationship Prediction For DBLP and AMiner, we are interested in the co-author relationships (APA). Hence, we generate training networks by randomly hiding 20% APAP in DBLP and 40% APAP in AMiner as AMiner is much larger. For Yelp, we want to find two businesses that one person has reviewed (BRURBBRURB), which can be used to recommend businesses for users. Thus, we randomly hide 20% BRBR to generate the training network. We set the weights of BSBBSB and BRURBBRURB in Yelp to 0.4 and 0.6. In DBLP, we assign weights {0.9,0.05,0.05}\{0.9, 0.05, 0.05\} to {APA,APCPA,APTPA}\{APA, APCPA, APTPA\}. In AMiner, we assign weights {0.4,0.3,0.3}\{0.4, 0.3, 0.3\} to {APA,APCPA,APTPA}\{APA, APCPA, APTPA\}. We evaluate the prediction performance on testing networks with AUC and Accuracy.

Table 5.2 shows the comparison results of different methods. Overall, we can see that StHNE achieves better relation prediction performance than other methods on

Table 5.1 Performance evaluation of node classification on static heterogeneous graphs (Tr.Ratio means the training ratio). Bold values denote the best performance of all baselines and the proposed model

[!visual-conversion] Table 5.1 (printed p. 118) scan-verified and corrected: the OCR pass produced a huge run of repeated placeholder values (e.g. “0.9347” repeated dozens of times) instead of real data. Rebuilt against assets/pages/page-122.png.

DatasetMetricTr.RatioDeepWalkLINE-1stLINE-2ndESimmetapath2vecStHNE-1stStHNE-2ndStHNE
YelpMacro-F140%0.60210.53890.54380.63870.58720.61930.53770.6421
60%0.59540.58650.55580.64640.60810.66390.56910.6644
80%0.61010.60120.60680.67930.63740.69090.57830.6922
Micro-F140%0.65200.60540.61050.68960.64270.68380.61180.6902
60%0.64720.65100.62330.70110.66810.71030.63090.7017
80%0.66730.66150.63670.71860.68750.72320.63670.7326
DBLPMacro-F140%0.92950.92710.91720.93540.92130.93920.92830.9473
60%0.93550.92980.92520.93620.93110.94360.93740.9503
80%0.93680.92730.93010.94510.94320.95110.94430.9611
Micro-F140%0.93310.93100.92190.93940.92280.94210.93120.9503
60%0.93830.93280.92910.94060.93050.94870.93890.9519
80%0.93920.93230.93470.95020.94840.95430.94960.9643
AMinerMacro-F140%0.88380.89290.89720.94490.94870.93890.93090.9452
60%0.88460.89090.89670.94820.94900.94010.93540.9499
80%0.88530.89470.89620.94910.94930.94120.93810.9521
Micro-F140%0.88790.89250.89580.94650.94690.94070.94120.9467
60%0.88810.89360.89600.94820.94970.94230.94310.9509
80%0.88820.89600.89620.95000.95110.94480.94230.9529

Table 5.2 Performance evaluation of relationship prediction on static heterogeneous graphs. Bold values denote the best performance of all baselines and the proposed model

[!visual-conversion] Table 5.2 (printed p. 119) scan-verified and corrected: the OCR pass dropped all dataset row labels and duplicated adjacent column values. Rebuilt against assets/pages/page-123.png.

DatasetMetricDeepWalkLINE-1stLINE-2ndESimmetapath2vecStHNE-1stStHNE-2ndStHNE
YelpAUC0.74040.65530.78960.66510.81870.80460.82330.8364
F10.68640.62690.73700.63610.73550.73480.73970.7512
ACC0.68190.61150.73260.63860.74360.72860.75260.7661
DBLPAUC0.92350.83680.76720.90740.92910.90020.92460.9385
F10.84240.76800.70540.83210.86450.83590.86310.8850
ACC0.85310.76800.68050.84160.85960.82660.85770.8751
AMinerAUC0.73660.51630.58350.86910.87830.89350.91800.8939
F10.52090.50120.52760.66360.66970.70370.80210.7085
ACC0.66860.64750.63440.74250.75060.76220.82510.7701

two metrics. The improvement indicates the effectiveness of our model to preserve structural information in heterogeneous graphs. Benefiting from the second-order proximity preserved based on meta-path, StHNE-2nd outperforms than StHNE-1st significantly. The reason is that the higher-order proximity is more conducive for preserving complex relationships in heterogeneous graphs.

In this section, our goal is to verify the effectiveness of DyHNE compared with these baselines designed for dynamic networks (i.e., DANE and DHPE). Since some baselines (e.g., DeepWalk, LINE, and StHNE) cannot handle dynamic networks and we have reported the performance of these methods in Sect.5.2, here we only apply these methods to initial networks as in [21, 50]. Specifically, given a dynamic network with 10 time steps {G1,⋯ ,G10}\{G^1, \cdots, G^{10}\}, for the static network embedding methods, including StHNE, we only conduct them on G1G^1 and report the results, while for the dynamic network embedding methods, i.e., DANE, DHPE, and DyHNE, we conduct them from G1G^1 to G10G^{10} to update the embedding incrementally, and report the final results to evaluate their performance in a dynamic environment.

Node Classification For each dataset, we generate the initial and growing heterogeneous graph from the original network. Each growing heterogeneous graph contains ten time steps. In Yelp, reviews are time-stamped, we randomly add 0.1% new UR and BR to the initial network at each time step. For DBLP, we randomly add 0.1% new PA, PC, and PT to the initial network at each time step. Since AMiner itself contains the published year of each paper, we divide the edges appearing in 2005 into 10 time steps uniformly.

We vary the size of the training set from 40% to 80% with the step size of 20% and the remaining nodes as testing. We repeat each classification experiment ten times and report the average performance in terms of both Macro-F1 and Micro-F1 scores, as shown in Table 5.3. We can see that DyHNE consistently performs better than other baselines on all datasets with all varying sizes of training data, which demonstrates the effectiveness and robustness of our learned node embeddings when served as features for node classification. (a) Especially, our DyHNE significantly outperforms the two dynamic homogeneous network embedding methods, DANE and DHPE. The reason is that our model considers the different types of nodes and relations and can capture the structure and semantic information in heterogeneous graphs. (b) We also notice that our DyHNE achieves better performance than DHNE which is also designed for dynamic heterogeneous graphs. We believe that the improvement is due to the preserved meta-path based first-order and second-order proximity in node embeddings learned by our DyHNE. (c) Compared with the baselines designed for static heterogeneous graphs (i.e., DeepWalk, LINE, ESim, and metapath2vec), our method also achieves the best performance, which proves the effectiveness of the update algorithm without losing important structure and semantic information in heterogeneous graphs.

Table 5.3 Performance evaluation of node classification on dynamic heterogeneous graphs (Tr.Ratio means the training ratio). Bold values denote the best performance of all baselines and the proposed model

[!visual-conversion] Table 5.3 (printed p. 121) scan-verified and corrected: the OCR pass dropped all dataset/metric row labels, mislabeled the second LINE column, and omitted the DHNE baseline column. Rebuilt against assets/pages/page-125.png.

DatasetMetricTr.RatioDeepWalkLINE-1stLINE-2ndESimmetapath2vecStHNEDANEDHPEDHNEDyHNE
YelpMacro-F140%0.58400.56230.52480.64630.57650.61180.61020.54120.62930.6459
60%0.59620.58630.53920.66420.61920.66440.63420.55460.63420.6641
80%0.60440.60010.60300.67440.62850.68820.64710.56160.65290.6893
Micro-F140%0.64430.62140.59010.69320.64570.68260.68940.58230.66890.6933
60%0.65580.63380.54350.69410.66560.70740.69210.59810.67940.6998
80%0.66340.64240.62970.71040.67220.72810.69590.60340.69310.7298
DBLPMacro-F140%0.92690.92660.91470.93720.91620.93950.88620.88930.93020.9434
60%0.92970.92830.91410.93690.92530.94610.89560.89460.93510.9476
80%0.93220.92910.92170.93760.93020.95020.90510.90870.94230.9581
Micro-F140%0.93750.93100.91980.93830.92540.94380.88830.88470.93520.9467
60%0.93460.92450.91920.94040.92810.94960.88790.89310.94040.9505
80%0.93710.92970.92610.94150.93540.95430.90710.90410.94890.9617
AMinerMacro-F140%0.81970.82190.82820.87970.86730.86280.76420.76940.89030.9014
60%0.82210.82180.83230.88070.87340.86510.77040.77350.90110.9131
80%0.82350.82380.83510.88210.87540.87780.77930.78510.91830.9212
Micro-F140%0.81570.81890.83230.87290.86520.85630.76980.76330.89920.9117
60%0.81750.81820.83610.87340.86930.85740.77230.76980.90450.9178
80%0.81910.82010.82980.87510.87250.87280.78570.77040.91320.9203

Relationship Prediction For each dataset, we generate the initial, growing, and testing heterogeneous graph from the original heterogeneous graph. For Yelp, we first build the testing network containing 20% BR. The remaining constitutes the initial and growing network, where the growing network is divided into 10 time steps, and 0.1% new UR and BR are added to the initial network at each time step. For DBLP, we use the similar approach as described above. For AMiner, we take the data involved in 1990–2003 as the initial network, 2004 as the growing network, and 2005 as the testing network.

We report the prediction performance in Table 5.4 and have some findings: (a) Our method consistently improves the relationships prediction accuracy on the three datasets, which is attributed to the structural information preserved by the meta-path based first-order and second-order proximity. (b) DANE and DHPE obtain poor performance due to the neglect of multiple types of nodes and relations in heterogeneous graphs. (c) Compared to DHNE, our DyHNE consistently performances better on three datasets, which is benefit from the effectiveness of update algorithm. Additionally, the meta-path based second-order proximity ensures that our DyHNE captures the high-order structures of heterogeneous graph, which is also preserved with the updated node embeddings.

Table 5.4 Performance evaluation of relationship prediction on dynamic heterogeneous graphs. Bold values denote the best performance of all baselines

[!visual-conversion] Table 5.4 (printed p. 123) scan-verified and corrected: the OCR pass dropped dataset labels (off by one row), mislabeled the second LINE column, and lost a column of data. Rebuilt against assets/pages/page-127.png.

DatasetMetricDeepWalkLINE-1stLINE-2ndESimmetapath2vecStHNEDANEDHPEDHNEDyHNE
YelpAUC0.73160.65490.78950.65210.81640.83410.79280.76290.80230.8346
F10.67710.61250.73500.61680.72930.75060.72210.68090.71940.7504
ACC0.67510.60590.73000.61850.73950.76160.72110.70230.70240.7639
DBLPAUC0.91250.82610.74320.90530.91960.92160.54130.64110.89450.9278
F10.84210.78400.70140.82150.84970.86210.71410.62230.83480.8744
ACC0.82210.72270.67540.83060.84050.84360.55110.57340.81950.8635
AMinerAUC0.86600.62710.56480.84590.86940.86590.84050.84120.82890.8823
F10.76580.56510.60710.71720.77610.75670.71670.71580.73860.7792
ACC0.78560.53280.58280.75940.77930.77330.75270.75450.74980.7889

The more detailed method description and experiment validation can be seen in [45]. While DyHNE mainly focuses on incremental learning of dynamic semantics, the sequential interactions of entities indeed express the evolution of heterogeneous interests, and we introduce the following model SHCF to extract such valuable information for recommender systems.

Heterogeneous graph modeling, as an effective information fusion method containing different types of nodes and links, can be used to integrate multiple types of objects and their complex interactions in the recommendation system that may produce more accurate recommendation results [35]. These methods mainly model a user’s static preference [34], while ignoring the interactions’ sequential pattern that a small set of the most recent interactions can better reflect a user’s dynamic interests over time. Considering the sequential pattern to model a user’s latest interests, there is another line of work called sequential recommendation. The sequential recommendation system is to predict which item a user most probably would like to interact with next time given her sequential interaction data as context. However, almost all of the sequential recommendation methods [13, 14, 22, 31] model user embeddings based on only their own sequential item interactions while ignoring the heterogeneous information widely existing in recommendation system, such like item attributes. When the data is sparse and there are few user interaction behaviors, these methods also suffer from cold-start problem.

[!visual-conversion] Converted from the surrounding description: a user–item heterogeneous graph with item attribute nodes, used to illustrate sequential and heterogeneous collaborative signals.

flowchart LR
    U((User)) -->|interacts, sequential order| I1[Item 1]
    U -->|interacts, sequential order| I2[Item 2]
    U -->|interacts, sequential order| I3[Item 3]
    I1 --> A1[Item attribute]
    I2 --> A1
    I3 --> A2[Item attribute]

Fig. 5.2 A toy example of user-item interactions with heterogeneous information

In this section, we construct a heterogeneous graph with user–item interactions and item attributes in Fig. 5.2 and propose the SHCF to fully consider both the sequential patterns and the high-order heterogeneous collaborative signals. For user embedding, we aggregate the static representation with a novel element-wise attention mechanism, and the dynamic interests by aggregating her interacted item sequence with a sequence-aware self-attention mechanism. For item embedding, we aggregate the heterogeneous information of its neighboring nodes including users and item attributes with dual-level attention. We can not only learn the importance of different nodes but also pay attention to important types of nodes. By stacking multiple message passing layers, we can enforce the embeddings to capture the high-order collaborative relationships.

Figure 5.3 shows the framework of our SHCF, which contains three major steps. First, we construct a heterogeneous graph with user–item interactions and item attributes as shown in Fig. 5.2. Notice that here we only consider item attributes to focus on clearly illustrating how to handle sequence patterns and heterogeneous information. In fact, user attributes and other heterogeneous information can be easily added into our SHCF through concatenating embedding learned from these heterogeneous attributes as item embedding does. Then we apply an embedding layer to initialize the representations of users, items, and item attributes (e.g., item categories). Second, we design multiple message passing layers over the heterogeneous graph to learn the user and item embeddings. For user embedding,

[!visual-conversion] Converted from the surrounding description.

flowchart TB
    Graph["Heterogeneous graph: user-item interactions + item attributes"] --> Embed["Embedding layer: user, item, item-attribute embeddings"]
    Embed --> MP["Message passing layers"]
    MP --> UserEmb["User embedding: static (element-wise attention) + dynamic (sequence-aware self-attention)"]
    MP --> ItemEmb["Item embedding: dual-level attention over neighboring users and item attributes"]
    UserEmb --> Pred["Prediction layer: aggregate across layers"]
    ItemEmb --> Pred
    Pred --> Out["Prediction for target user-item pair"]

Fig. 5.3 The framework of SHCF

we capture a user’s fine-grained static interests on different aspects of an item with an element-wise attention mechanism. We also consider a user’s dynamic interests by aggregating her interacted item sequence with a sequence-aware self-attention mechanism. For item embedding, we aggregate the heterogeneous information of its neighborhoods including users and item attributes with dual-level attention which considers the importance of different neighboring nodes with different types. Finally, the prediction layer aggregates the learned embeddings from different message passing layers for both user and item representations, and outputs the prediction of target user–item pairs.

The users, items, and item attributes in real datasets are usually identified by some unique IDs, whereas these original IDs have a very limited representation capacity. Therefore, we create a user embedding matrix U∈R∣U∣×d\mathbf{U} \in \mathbb{R}^{|\mathcal{U}| \times d}, where dd is dimensionality of the latent embedding spaces. The jjth row of the embedding matrix U\mathbf{U} encodes the user uju_j to the real-valued embedding uj\mathbf{u}_j, which is more informative. In the same way, we respectively create an item embedding matrix I∈R∣I∣×d\mathbf{I} \in \mathbb{R}^{|\mathcal{I}| \times d} and item attribute embedding matrices, e.g. item category embedding matrix C∈R∣C∣×d\mathbf{C} \in \mathbb{R}^{|\mathcal{C}| \times d}.

Positional Embedding Motivated by the recent works of transformer [7, 41], as for the interacted item sequence Su={i1,⋯ ,it−1,it}S_u = \{i_1, \cdots, i_{t-1}, i_t\} sorted by the time tt, we late each item with a learnable position embedding p∈Rd\mathbf{p} \in \mathbb{R}^d to capture the ential pattern of the items.

I^t=[it+p1it−1+p2⋯i1+pt].(5.35)\hat{\mathbf{I}}_t = \begin{bmatrix} \mathbf{i}_t + \mathbf{p}_1 \\ \mathbf{i}_{t-1} + \mathbf{p}_2 \\ \cdots \\ \mathbf{i}_1 + \mathbf{p}_t \end{bmatrix}. \tag{5.35}

Notice that we add the position embedding in a reverse order to capture the relevant distance to the target item.

5.3.2.2 Sequence-Aware Heterogeneous Message Passing

Section titled “5.3.2.2 Sequence-Aware Heterogeneous Message Passing”

To capture high-order heterogeneous collaborative information and the sequential information, we first construct a heterogeneous graph enriching user–item interactions with added item attributes as shown in Fig. 5.2. We also model a user’s interacted item sequence with a sequence-aware attention mechanism, in order to capture the user’s dynamic interests. In this way, we can not only better model user preferences but also alleviate the sparsity of the interactions. In the following, we will first present a single graph convolution layer to model item embedding and user embedding with considering heterogeneous information and sequential information, and then generalize it to multiple layers.

Item Modeling with Heterogeneous Information To alleviate the sparsity problem, we add item attribute information to the user–item bipartite graph and create a heterogeneous graph that includes different types of nodes. Inspired by HGAT [15], in this part, we present our proposed message passing layers which consider the heterogeneous information. Taking the item node as an example, it has different types of neighboring nodes such as users, categories, and cities. On one hand, different types of neighboring nodes may have different impacts on it. For example, the category of one item may be more informative than the user who interacted with it. On the other hand, different neighboring nodes of the same type could also have different importance. For example, different users may have different preference on one item. To capture both the different importance at both node level and type level, we design a dual-level attention mechanism when aggregating embeddings from neighboring nodes.

(a) Node-Level Attention. We design the node-level attention to learn the different importance of neighboring nodes with the same type and aggregate the representation of these neighbors to form a specific type embedding. Formally, given a specific item vv and its neighboring node v′∈Nvτ′v' \in \mathcal{N}_v^{\tau'} with type τ′\tau', the weight coefficient αvv′\alpha_{vv'} of the specific node pair (v,v′)(v, v') can be formulated as follows:

αvv′=exp⁡(σ(aτ′⊤⋅[iv∣∣hv′]))∑k∈Nvτ′exp⁡(σ(aτ′⊤⋅[iv∣∣hk])),(5.36)\alpha_{vv'} = \frac{\exp(\sigma(\mathbf{a}_{\tau'}^\top \cdot [\mathbf{i}_v || \mathbf{h}_{v'}]))}{\sum_{k \in \mathcal{N}_v^{\tau'}} \exp(\sigma(\mathbf{a}_{\tau'}^\top \cdot [\mathbf{i}_v || \mathbf{h}_k]))}, \tag{5.36}

where σ(⋅)\sigma(\cdot) is the activation function, such like LeakReLU, aτ′\mathbf{a}_{\tau'} is the attention vector for the type τ′\tau', h\mathbf{h} is the embedding of neighboring node, and ∣∣|| denotes the concatenate operation.

Then, for the item vv, we can get the specific type embedding gvτ′\mathbf{g}_v^{\tau'} by aggregating neighboring nodes of the same type with corresponding coefficients as follows:

gvτ′=σ(∑v′∈Nvτ′αvv′⋅hv′).(5.37)\mathbf{g}_v^{\tau'} = \sigma \left( \sum_{v' \in \mathcal{N}_v^{\tau'}} \alpha_{vv'} \cdot \mathbf{h}_{v'} \right). \tag{5.37}

(b) Type-Level Attention. For any type τ′\tau' belonging to the item vv‘s neighboring node type set T\mathcal{T}, we can get a type specific embedding hvτ′\mathbf{h}_v^{\tau'} following the Eq. (5.37). To capture different importance of different node types, we design a type-level attention defined as follows:

mvτ′=V⋅tanh⁡(w⋅gvτ′+b),(5.38)m_v^{\tau'} = V \cdot \tanh \left( \mathbf{w} \cdot \mathbf{g}_v^{\tau'} + b \right), \tag{5.38} βvτ′=exp⁡(mvτ′)∑τ∈Texp⁡(mvτ).(5.39)\beta_v^{\tau'} = \frac{\exp \left( m_v^{\tau'} \right)}{\sum_{\tau \in \mathcal{T}} \exp \left( m_v^{\tau} \right)}. \tag{5.39}

With the learned weights as coefficients, we can fuse these type embeddings gvτ′\mathbf{g}_v^{\tau'} to obtain the final item embedding i~v\tilde{\mathbf{i}}_v as follows:

i~v=σ(∑τ′∈Tβvτ′⋅gvτ′).(5.40)\tilde{\mathbf{i}}_v = \sigma \left( \sum_{\tau' \in \mathcal{T}} \beta_v^{\tau'} \cdot \mathbf{g}_v^{\tau'} \right). \tag{5.40}

Notice that the above is an example of how to obtain item embedding with heterogeneous information; other typed nodes in heterogeneous graph such as attribute nodes can be modeled in the same way.

User Modeling with Fine-Grained Static and Dynamic Interest A great challenge for recommendation is how to accurately model user preferences. For traditional collaborative filtering or heterogeneous graph based recommendation methods, on one hand, they usually view an item as an entirety, which ignore the fact that users may have different preferences on different aspects of an item; on the other hand, they always neglect the sequential information of a user’s interaction history, thus failing to capture the user’s dynamic interests. Therefore, for user nodes, we present a carefully designed message passing layer to capture a user’s fine-grained static interests and dynamic interests. More specifically, we propose an element-wise attention mechanism that assumes each dimension of the item embedding reflects a distinct aspect of the item. In addition, to capture a user’s dynamic interests, we adopt a sequence-aware self-attention mechanism where each item embedding is correlated with a position embedding, and self-attention is applied to pay attention to important items.

a) Element-Wise Attention. Here we present the details of element-wise attention to capture user’s fine-grained static preference. For a specific item iji_j in user uu‘s interaction sequence Su\mathcal{S}_u, we can calculate a weight vector γj\boldsymbol{\gamma}_j for different aspects of item iji_j as follows:

γj=tanh⁡(Wu⋅ij+b),(5.41)\boldsymbol{\gamma}_j = \tanh(\mathbf{W}_u \cdot \mathbf{i}_j + b), \tag{5.41}

where Wu∈Rd×d\mathbf{W}_u \in \mathbb{R}^{d \times d}, γj\boldsymbol{\gamma}_j is the attention coefficients of different aspects, and a large γjk\gamma_j^k means that the kkth aspect of item embedding ij\mathbf{i}_j is strongly relevant to the user’s preference.

Then we aggregate with element-wise product between the weight coefficients γj\boldsymbol{\gamma}_j, and the user integrated item ij\mathbf{i}_j to learn the embedding us\mathbf{u}_s reflects user’s fine-grained static interests:

us=∑j∈Suγj⊙ij.(5.42)\mathbf{u}_s = \sum_{j \in \mathcal{S}_u} \boldsymbol{\gamma}_j \odot \mathbf{i}_j. \tag{5.42}

(b) Sequence-Aware Self-attention. Motivated by the self-attention mechanism widely used in NLP tasks such like machine translation[7, 41], we adopt a sequence-aware self-attention mechanism. Specifically, each item i^u\hat{\mathbf{i}}_u is integrated with its position embedding and self-attention is used to pay attention to critical items, which to learn the embedding ud\mathbf{u}_d reflects user’s dynamic interests over time:

ATTENTION(Q,K,V)=softmax(QK⊤d)⋅V,(5.43)\text{ATTENTION}(\mathbf{Q}, \mathbf{K}, \mathbf{V}) = \text{softmax}\left(\frac{\mathbf{Q}\mathbf{K}^\top}{\sqrt{d}}\right) \cdot \mathbf{V}, \tag{5.43} ud=∥ATTENTION(i^uWQ,i^uWK,i^uWV)∥h=1H.(5.44)\mathbf{u}_d = \left\| \text{ATTENTION}\left(\hat{\mathbf{i}}_u \mathbf{W}^Q, \hat{\mathbf{i}}_u \mathbf{W}^K, \hat{\mathbf{i}}_u \mathbf{W}^V\right) \right\|_{h=1}^H. \tag{5.44}

Equation (5.43) is the paradigm of self-attention, where ATTENTION() calculates a weighted sum of all values V\mathbf{V} by queries Q\mathbf{Q} and keys K\mathbf{K}, and the scale factor d\sqrt{d} is to avoid overly large values of the inner product result. In Eq. (5.44), WQ,WK,WV∈Rd×d\mathbf{W}^Q, \mathbf{W}^K, \mathbf{W}^V \in \mathbb{R}^{d \times d} is the projection matrices and we extend the self-attention to multi-head attention by repeating it for HH times and concatenate the learned embeddings to get the final user dynamic interest representation.

After getting the static interest embedding us\mathbf{u}_s and dynamic interest embedding ud\mathbf{u}_d, we combine them with a balance weight to get the final user embedding u~\tilde{\mathbf{u}}:

u~=λud+(1−λ)us(5.45)\tilde{\mathbf{u}} = \lambda \mathbf{u}_d + (1 - \lambda) \mathbf{u}_s \tag{5.45}

(c) High-order Propagation. The above shows a single messaging passing layer with heterogeneous information and sequential information, which aggregates information from the first-order neighbors. To capture the high-order collaborative information, we can stack it to multiple layers in which each layer takes the last layer’s output representation as its input.¹ After LL-layer embedding propagation, we can get output embeddings of LL different layers.

The embeddings of different layers may have different contributions in reflecting user preferences; following [44], we concatenate the representation of each layer to constitute the final embedding for both users and items:

u=u~1∥u~2∥⋯∥u~L,i=i~1∥i~2∥⋯∥i~L.(5.46)\mathbf{u} = \tilde{\mathbf{u}}^1 \| \tilde{\mathbf{u}}^2 \| \cdots \| \tilde{\mathbf{u}}^L, \quad \mathbf{i} = \tilde{\mathbf{i}}^1 \| \tilde{\mathbf{i}}^2 \| \cdots \| \tilde{\mathbf{i}}^L. \tag{5.46}

Finally, we use the simple dot product to estimate the user’s preference towards the target item:

y^(u,i)=u⊤i.(5.47)\hat{y}(u, i) = \mathbf{u}^\top \mathbf{i}. \tag{5.47}

To optimize our model, we use the Bayesian Personalized Ranking (BPR) loss [32] as our loss function:

L=∑i∈Su,j∉Su−ln⁡σ(y^ui−y^uj)+η∥Θ∥,(5.48)\mathcal{L} = \sum_{i \in S_u, j \notin S_u} -\ln \sigma(\hat{y}_{ui} - \hat{y}_{uj}) + \eta \| \Theta \|, \tag{5.48}

where σ(⋅)\sigma(\cdot) is the sigmoid function, Θ\Theta denotes all the trainable parameters and η\eta is the regularization coefficient, SuS_u is the interaction sequence of the user uu, and for each positive sample (u,i)(u, i), we sample a negative sample jj for training.

Datasets To verify the effectiveness of our method, we conduct extensive experiments on three real-world datasets. MovieLens is a widely used benchmark dataset for recommendation task. In our experiments, we adopt a small version of 100K

[1] According to our experiments, fine-grained and dynamic user interest modeling layer is taken as the LL-th layer for user modeling.

actions ML100K and a larger version of 1M interactions ML1M. Yelp is a local ness recommendation dataset which records the user ratings on local businesses.

selines We compare our method with three groups of recommendation baseline thods, namely collaborative filtering methods (BPR-MF [32], NeuMF [12], NCF [43]), heterogeneous graph recommendation methods (NeuACF [11], HeRec [34]), and sequential recommendation methods (NARM [22], SR- GNN [13]).

Implementation Details For all the methods, we apply a grid search for hyper-parameters. For NGCF and SR-GNN, the layer of GNN is searched from 1 to 4. We implement our proposed model based on Tensorflow. The dimension of embeddings dd is set as 64. For the self-attention network, the attention head number HH is set as 8. The hyper-parameter λ\lambda to balance the weights of a user’s dynamic interests and static interests is set as 0.5 and 0.2 for MovieLens and Yelp, respectively. In addition, the learning rate is 0.0005 for MovieLens and 0.00005 for Yelp. The coefficient of L2 normalization η\eta for all the datasets is set to 10−510^{-5}. We set the depth of our proposed SHCF LL as 4. We randomly initialize the model parameters with Xavier initializer, then use the Adam as the optimizer. To avoid over-fitting, we apply early stopping strategy and apply dropout (dropout rate is 0.1) in every layer of our proposed SHCF.

We first compare the recommendation performance of all the methods. For a fair comparison, the embedding dimension of all the methods is set as 64. Table 5.5 shows the experiment results of different methods. We have the following observations: (1) heterogeneous graph based recommendation methods generally perform better than traditional collaborative filtering methods. They especially have great improvements on the sparse dataset (i.e., Yelp), which illustrates that applying heterogeneous graph to incorporate side information for recommendation can alleviate the data sparsity problem and improve recommendation performance. (2) For the dense datasets ML100K and ML1M that users have adequate interaction behaviors (the average number of interactions per user is 103.9 and 165.3, respectively), sequential recommendation methods perform better than collaborative filtering methods and heterogeneous graph based recommendation methods. But for the sparse dataset Yelp where the average number of interactions per user decreases to 10.0, the performance of sequential recommendation methods significantly declines. It illustrates the limitation of sequential recommendation methods in modeling user embeddings based on only the user’s own sequential item interactions without considering the collaborative information of similar users or items when the user does not have sufficient interaction records. (3) Our proposed model SHCF consistently outperforms all the baselines on all the datasets including the two dense datasets (i.e., ML100K and ML1M) and one sparse dataset (i.e., Yelp). These results verify the effectiveness of SHCF in modeling users and items in both sparse datasets by fully considering the high-order heterogeneous collaborative prior and sequential information.

Table 5.5 Recommendation performance of different models. The best result in each row is bold and the second best result is underlined. The improvements of our method over the second best models are shown in the last column

[!visual-conversion] Table 5.5 (printed p. 131) scan-verified: the ML1M HR@15 row and several Yelp rows had OCR-duplicated a neighboring column’s value into the NARM/SR-GNN columns. Corrected against assets/pages/page-135.png; the ML100K block was already accurate.

DatasetMetricsBPR-MFNeuMFNGCFNeuACFHeRecNARMSR-GNNSHCFImprove
ML100KHR@50.40300.40570.42740.43370.42550.52280.50100.54143.56%
NDCG@50.27470.26760.28890.28740.27980.36590.35100.38595.47%
HR@100.58010.56890.58640.60340.60120.67230.66600.71085.73%
NDCG@100.33120.31270.34020.34200.33250.41420.40480.44016.25%
HR@150.67870.67060.66490.70840.69810.75290.75980.78172.88%
NDCG@150.35730.34620.36110.36970.35210.43540.42980.45925.47%
HR@200.74550.75950.74340.77200.75240.80380.80480.83243.43%
NDCG@200.37510.36720.37960.38470.37210.44750.43960.46934.87%
HR@50.49210.50920.50170.50500.49230.67130.66340.69273.18%
NDCG@50.33760.35110.34370.35080.34550.52330.52990.57961.26%
HR@100.65770.68030.66880.66010.66010.76030.76990.79643.19%
NDCG@100.39100.40660.39770.40380.39820.55800.56390.57851.06%
HR@150.75510.77610.75870.75930.74030.82300.81840.85033.32%
NDCG@150.41680.43200.42160.42790.41940.56870.57090.57851.33%
HR@200.81590.83690.81670.82320.81050.86020.85840.88442.81%
NDCG@200.43110.44630.43530.44300.43280.57230.58030.59682.84%
YelpHR@50.30770.35710.40970.40940.39820.34900.37540.44217.91%
NDCG@50.20860.24190.28550.28440.27650.23730.25650.31008.58%
HR@100.43250.50180.55840.55530.55050.49000.52080.58785.27%
NDCG@100.24880.28850.33350.33140.33110.28280.30350.35727.11%
HR@150.50840.60060.64340.65040.64230.58510.60540.67253.40%
NDCG@150.26890.31460.35440.35650.34990.30800.32590.37966.48%
HR@200.56430.67170.70050.71380.69230.64960.66840.72601.71%
NDCG@200.28210.33150.36860.37150.36030.32320.34080.39225.57%

The more detailed methods and experiments description can be obtained in [24]. While the SHCF focuses on dealing with single-typed sequences, there are multiple interactions in real-world systems indeed, and the time span of recorded interactions becomes larger and larger, indicating not only short-term but also long-term heterogeneous preferences. The following section is to study the temporal heterogeneous interaction modeling.

By modeling historical user-item interactions, recommender systems play a fundamental role in e-commerce [25, 39]. Existing methods [20, 49] are mainly capable of modelling short-term preferences from relatively recent interactions; capturing long-term preferences (e.g., preferred brands) from historical habits is also an important element of temporal dynamics [39]. However, these methods usually model short- and long-term preferences independently, ignoring the role of habits in driving the current, evolving demands. Taking Fig. 5.4a as an example, when browsing similar items (e.g., two schoolbags), users prefer to click those with attributes they habitually care (e.g., the brands). This presents the first research challenge: How to effectively model the complex temporal dynamics, coupling both historical habits and evolving demands? Another dimension overlooked by existing sequential models is the abundant heterogeneous structural information, as shown in Fig. 5.4b. This leads to the second research challenge: How to make full use of the temporal heterogeneous interactions to model the preferences of different types?

In this section, we propose THIGE to effectively learn user and item embeddings on temporal heterogeneous interaction graphs for next-item recommendation. THIGE first encodes heterogeneous interactions with temporal information. Building upon the temporal encoding, we take into account the influence of long-term habits on short-term demands, and design a habit-guided attention mechanism to couple short- and long-term preferences. To fully exploit the rich heterogeneous interactions to enhance multifaceted preferences, we further capture the latent relevance of varying types of interaction via heterogeneous self-attention mechanisms.

The overall framework is shown in Fig. 5.5. Specifically, we divide the historical interactions of a user into long- and short-term based on their timestamps. For short-term preferences, we model users’ sequences of recent interactions with gated recurrent units (GRU), to embed users’ current demands hu(S)h_u^{(S)}. For long-term preference, we model users’ long-term interactions with a heterogeneous self-attention mechanism, to embed users’ historical habits hu(L)h_u^{(L)}. Different from the decoupled combination (e.g., simple concatenation) of long- and short-term embeddings in previous methods [20, 48], we propose to exploit the long-term historical habits to guide the learning of short-term demands using the habit-guided attention, which effectively captures the impact of habits on recent behaviors. Notice that Fig. 5.5 only shows the learning of user representations. For items, we do not distinguish their long- and short-term interactions, and only adopt a long-term model similar to that of users. The reason lies in the fact that there may be numerous users interacting with an item around a short period of time, and these users have no significant short-term sequential dependency.

[!visual-conversion] Converted from the description in the comments and caption.

flowchart LR
    subgraph a["(a) Temporal evolution of interactions"]
        t1["click (t1)"] --> t2["cart (t2)"] --> t3["buy (t3)"]
    end
    subgraph b["(b) Temporal Heterogeneous Interaction Graph (THIG)"]
        U((User)) -->|click| I1[Item]
        U -->|favorite| I2[Item]
        U -->|cart| I3[Item]
        U -->|buy| I4[Item]
    end

Fig. 5.4 Toy example of next-item recommendation, from (a) a temporal sequence of interactions, to (b) a Temporal Heterogeneous Interaction Graph (THIG)

[!visual-conversion] Converted from the surrounding description (user-side embedding only; items use a similar long-term-only path).

flowchart TB
    Hist["User's historical interactions"] --> Split{Split by recency}
    Split -->|short-term, recent| GRU["GRU over recent sequence -> h_u^S"]
    Split -->|long-term| SelfAttn["Heterogeneous self-attention -> h_u^L"]
    SelfAttn -->|habit-guided attention| GRU
    GRU --> UserRep["Final user representation"]

Fig. 5.5 Overall framework of user embedding in THIGE for next-item recommendation

5.4.2.1 Embedding Layer with Temporal Information

Section titled “5.4.2.1 Embedding Layer with Temporal Information”

Each interacted item of a user is associated with not only attributes but also a timestamp. As shown in Fig. 5.5, the timestamps is in the form of [t1,t2,⋯ ,tn][t_1, t_2, \cdots, t_n].

Thus, the temporal embedding of an item vv consists of both a static and a temporal component. The static component xv=Wϕ(v)avx_v = W_{\phi(v)} a_v, where the input vector av∈Rdϕ(v)a_v \in \mathbb{R}^{d_{\phi(v)}} encodes the attributes of vv, Wϕ(v)∈Rd×dϕ(v)W_{\phi(v)} \in \mathbb{R}^{d \times d_{\phi(v)}} denotes the latent projection, dϕ(v)d_{\phi(v)} and dd are the dimension of attributes and latent representation of vv. Moreover, at time tt, denoting Δt\Delta t as the time span before the current time TT and dividing the overall time span into BB buckets, the temporal component of vv is defined as Wξ(Δt)W \xi(\Delta t), where ξ(Δt)∈RB\xi(\Delta t) \in \mathbb{R}^B denotes the one-hot bucket representation of Δt\Delta t, and W∈RdT×BW \in \mathbb{R}^{d_T \times B} denotes the projection matrix, and dTd_T is the output dimension. Thus, the temporal embedding of an item vv at time tt is

xv,t=[Wξ(Δt)⊕xv],(5.49)x_{v,t} = [W \xi(\Delta t) \oplus x_v], \tag{5.49}

where ⊕\oplus denotes concatenation. Similarly, we generate the static representation of a user uu as xu∈Rdx_u \in \mathbb{R}^d, and temporal representation of uu at time tt as xu,tx_{u,t}.

To further consider the sequential evolution of heterogeneous interactions, we generate the iith interacted item embedding xvi,ti,ri=[xvi,ti⊕ri]\mathbf{x}_{v_i,t_i,r_i} = [\mathbf{x}_{v_i,t_i} \oplus \mathbf{r}_i] as the combination of the temporal embedding xvi,ti\mathbf{x}_{v_i,t_i} and the corresponding type embedding ri=WRI(ri)\mathbf{r}_i = \mathbf{W}_{\mathcal{R}} \mathbf{I}(r_i) where I(ri)\mathbf{I}(r_i) denotes the one-hot vector of rir_i with dimension ∣R∣|\mathcal{R}|, WR∈RdR×∣R∣\mathbf{W}_{\mathcal{R}} \in \mathbb{R}^{d_{\mathcal{R}} \times |\mathcal{R}|} is the projection matrix and dRd_{\mathcal{R}} is the latent dimension. For long-term preference modeling, we input the temporal embedding into type-aware aggregators to distinguish preferences of different types.

Recent interactions of users usually indicate the evolving current demands. For instance, as shown in Fig.5.4a, Tom’s current demand has been evolved from bags to notebooks. In order to model the short-term and evolving preferences, we adopt gated recurrent units (GRU) [5], which can capture the dependency of recent interactions. Given a user uu here, let his/her kk recent interactions be {(vi,ti,ri)∣1≤i≤k}\{(v_i, t_i, r_i) \mid 1 \leq i \leq k\}, where tkt_k is the most recent timestamp before the current time TT. Subsequently, we encode the user preference at time tit_i as hu,ti(S)\mathbf{h}_{u,t_i}^{(S)}, using a GRU based on the embedding of interaction (vi,ti,ri)(v_i, t_i, r_i) (i.e., xvi,ti,ri\mathbf{x}_{v_i,t_i,r_i}) and his/her preference at ti−1t_{i-1}, as follows:

hu,ti(S)=GRU(xvi,ti,ri,hu,ti−1(S)),∀1<i≤k,(5.50)\mathbf{h}_{u,t_i}^{(S)} = \text{GRU}\left(\mathbf{x}_{v_i,t_i,r_i}, \mathbf{h}_{u,t_{i-1}}^{(S)}\right), \quad \forall 1 < i \leq k, \tag{5.50}

where hu,ti(S)∈Rd\mathbf{h}_{u,t_i}^{(S)} \in \mathbb{R}^d. The time-dependent user embeddings {hu,ti(S)∣1≤i≤k}\{\mathbf{h}_{u,t_i}^{(S)} \mid 1 \leq i \leq k\} can be further aggregated to encode the current demand of user uu.

However, the current and evolving demands of user are not only influenced by their recent transactions. Their long-term preferences, i.e., historical habits such as brands and lifestyle inclinations, often play a subtle but important role. Thus, we enhance the encoding of short-term preferences under the guidance of historical habits, in order to discover more fine-grained and personalized preferences. Specially, we propose a habit-guided attention mechanism to aggregate short-term user preferences, as follows:

hu(S)=σ(W(S)⋅∑iau,ihu,ti(S)+bs),∀1≤i≤k,(5.51)\mathbf{h}_u^{(S)} = \sigma\left(\mathbf{W}^{(S)} \cdot \sum_{i} a_{u,i} \mathbf{h}_{u,t_i}^{(S)} + b_s\right), \quad \forall 1 \leq i \leq k, \tag{5.51}

where hu(S)∈Rd\mathbf{h}_u^{(S)} \in \mathbb{R}^d denotes the overall short-term preference of uu, W(S)∈Rd×d\mathbf{W}^{(S)} \in \mathbb{R}^{d \times d} denotes the projection matrix, σ\sigma is the activation function, and we adopt RELU here to ensure the non-linearity, bsb_s is the bias, and au,ia_{u,i} is the habit-guided weight:

au,i=exp⁡([hu(L)⊕xu]TWahu,ti(S))∑j=1kexp⁡([hu(L)⊕xu]TWahu,tj(S)),(5.52)a_{u,i} = \frac{\exp\left([\mathbf{h}_u^{(L)} \oplus \mathbf{x}_u]^T \mathbf{W}_a \mathbf{h}_{u,t_i}^{(S)}\right)}{\sum_{j=1}^{k} \exp\left([\mathbf{h}_u^{(L)} \oplus \mathbf{x}_u]^T \mathbf{W}_a \mathbf{h}_{u,t_j}^{(S)}\right)}, \tag{5.52}

hu(L)∈Rd\mathbf{h}_{u}^{(L)} \in \mathbb{R}^{d} is the long-term preference of uu which would have encoded habits of uu, and Wa∈R2d×dW_{a} \in \mathbb{R}^{2d \times d} is a mapping to quantify the fine-grained relevance between the short-term preference of uu and the long-term habits of uu at different times. Therefore, how to encode the long-term habits hu(L)\mathbf{h}_{u}^{(L)} in the context of heterogeneous interactions is the second key thesis of this work, as we will introduce next.

Besides short-term preferences to encode current and evolving demands, users also exhibit long-term preferences to express personal and historical habits. In particular, there exist multiple types of heterogeneous interactions which have different relevance w.r.t. each other. For example, a “click” is more relevant to a “cart” or “buy” on the same item or similar items; “favorite” could be less relevant to “cart” or “buy”, but is closely tied to the user’s brand or lifestyle choices in the long run. Thus, different types of interactions entail both latent relevance and multifaceted preferences. Thereby, our goal is to fully encode the latent, fine-grained relevance of multifaceted long-term preferences.

Consider a user uu, and his/her long-term interactions {(vi,ti,ri)∣1≤i≤n}\{(v_{i}, t_{i}, r_{i}) \mid 1 \leq i \leq n\} where n≫kn \gg k (kk is the count of recent interactions in short-term modeling). To differentiate the explicit interaction types, we first aggregate the embeddings of items which the user has interacted with under a specific type rr:

hu,r(L)=σ(Wr⋅aggre({xvi,ti∣1≤i≤n,ri=r})),(5.53)\mathbf{h}_{u, r}^{(L)} = \sigma \left( \mathbf{W}_{r} \cdot \text{aggre}(\{\mathbf{x}_{v_{i}, t_{i}} \mid 1 \leq i \leq n, r_{i} = r\}) \right), \tag{5.53}

where hu,r(L)∈Rd\mathbf{h}_{u, r}^{(L)} \in \mathbb{R}^{d} is the type-rr long-term preferences of user uu, Wr∈Rd×(dτ+d)\mathbf{W}_{r} \in \mathbb{R}^{d \times (d\tau + d)} is the type-rr learnable mapping, aggre(⋅)\text{aggre}(\cdot) is an aggregator, and we utilize mean-pooling here.

While we can simply sum or concatenate the type-specific long-term preferences into an overall representation, there exists latent relevance among the types (e.g., “click” and “buy”) and latent multifaceted preferences (e.g., brands and lifestyles). In this section, we design a heterogeneous self-attention mechanism to express the latent relevance of different-typed interactions and long-term multifaceted preferences. By concatenating all long-term preferences of different types as Hu(L)=⊕r∈Rhu,r(L)\mathbf{H}_{u}^{(L)} = \oplus_{r \in \mathcal{R}} \mathbf{h}_{u, r}^{(L)} with size dd-by-∣R∣|\mathcal{R}|, we first formulate the self-attention to capture the latent relevant of heterogeneous types in R\mathcal{R} w.r.t. each other:

hu,r(L)=∑r′∈R(exp⁡(Qu,rTKu,r′/da)∑r′′∈Rexp⁡(Qu,rTKu,r′′/da)Vu,r′),(5.54)\mathbf{h}_{u, r}^{(L)} = \sum_{r' \in \mathcal{R}} \left( \frac{\exp \left( \mathbf{Q}_{u, r}^{T} \mathbf{K}_{u, r'} / \sqrt{d_{a}} \right)}{\sum_{r'' \in \mathcal{R}} \exp \left( \mathbf{Q}_{u, r}^{T} \mathbf{K}_{u, r''} / \sqrt{d_{a}} \right)} \mathbf{V}_{u, r'} \right), \tag{5.54}

where Qu=WQHu(L)\mathbf{Q}_{u} = \mathbf{W}_{Q} \mathbf{H}_{u}^{(L)}, Ku=WKHu(L)\mathbf{K}_{u} = \mathbf{W}_{K} \mathbf{H}_{u}^{(L)}, Vu=WVHu(L)\mathbf{V}_{u} = \mathbf{W}_{V} \mathbf{H}_{u}^{(L)}, WQ,WK∈Rda×d\mathbf{W}_{Q}, \mathbf{W}_{K} \in \mathbb{R}^{d_{a} \times d}, and WV∈Rd×d\mathbf{W}_{V} \in \mathbb{R}^{d \times d} are the projection matrices, and dad_{a} is the dimension of keys and queries.

137

Next, to express multifaceted preferences, we adopt a multi-head approach to model latent fine-grained facets. Specifically, the original embeddings of preferences are split into multi-heads and we adopt the self-attention for each head. The type-rr long-term preference is concatenated from the hh heads:

hu,r(L)=⊕m=1hhu,r,m(L),(5.55)h_{u,r}^{(L)} = \oplus_{m=1}^{h} h_{u,r,m}^{(L)}, \tag{5.55}

where hu,r,m(L)h_{u,r,m}^{(L)} denotes the mmth head based preference and there are hh heads. The overall long-term preference can also be derived by fusing different types in R\mathcal{R}:

hu(L)=σ(W(L)(⊕r∈Rhu,r(L))+bl),(5.56)h_{u}^{(L)} = \sigma \left( W^{(L)} (\oplus_{r \in \mathcal{R}} h_{u,r}^{(L)}) + b_l \right), \tag{5.56}

where W(L)∈Rd×∣R∣dW^{(L)} \in \mathbb{R}^{d \times |\mathcal{R}|d} and blb_l are the projection parameters. By now, both short- and long-term preferences have not been modeled. Taking the inherent attributes of users into consideration, the final representation of user uu is calculated by

hu=σ(Wu[xu⊕hu(S)⊕hu(L)]+bu),(5.57)h_u = \sigma \left( W_u \left[ x_u \oplus h_u^{(S)} \oplus h_u^{(L)} \right] + b_u \right), \tag{5.57}

where hu∈Rdh_u \in \mathbb{R}^d will be used for next-item prediction, and Wu∈Rd×3dW_u \in \mathbb{R}^{d \times 3d} and bub_u are learnable parameters.

The temporal interactions of an item are significantly different from those of a user. In practice, on a mass e-commerce platform, it is typical that many users interact with the same item around the same time constantly, without a meaningful sequential effect among different users. In other words, it is more reasonable to only model the general, long-term popularity of items. Thus, we model item representation hv(L)h_v^{(L)} similar to the long-term preference modeling of users in Eq. (5.56) with heterogeneous multi-head self-attention, and then encode the item representation as follows:

hv=σ(Wv[xv⊕hv(L)]+bv),(5.58)h_v = \sigma \left( W_v \left[ x_v \oplus h_v^{(L)} \right] + b_v \right), \tag{5.58}

where hv∈Rdh_v \in \mathbb{R}^d is the final representation of item vv for next-item prediction, and WvW_v and bvb_v are learnable parameters and xvx_v is the attribute vector of item vv.

To deal with next-item recommendation, we predict y^u,v\hat{y}_{u,v} between user uu and item vv, indicating whether uu will interact with vv (under a given type) at the next time. Here utilize a Multi-Layer Perception (MLP) [28]:

y^u,v=sigmoid(MLP(hu⊕hv)),(5.59)\hat{y}_{u,v} = \text{sigmoid}(\text{MLP}(h_u \oplus h_v)), \tag{5.59}

where huh_u and hvh_v are the final representation of user uu and item vv, respectively. Model parameters can be optimized with the following cross-entropy loss:

L=−∑(u,v)(1−yu,v)log⁡(1−y^u,v)+yu,vlog⁡(y^u,v),(5.60)L = - \sum_{(u,v)} (1 - y_{u,v}) \log(1 - \hat{y}_{u,v}) + y_{u,v} \log(\hat{y}_{u,v}), \tag{5.60}

where (u,v)(u, v) is a sample of user uu and item vv, and yu,v∈{0,1}y_{u,v} \in \{0, 1\} is the ground truth of the sample. We also optimize the L2 regularization of latent parameters to ensure the robustness.

Datasets We evaluate the empirical performance of THIGE for next-item recommendation on three real-world datasets including Yelp, CloudTheme, and UserBehavior. For all datasets, we utilize the actual feedback of users as labels—among the candidates displayed to users.

Baselines We compare THIGE with six representative models, including sequential models (DIEN [49], STAMP [25]), long-term interest learning models (SHAN [48], M3R [39]), and heterogeneous GNNs (MEIRec [9], GATNE [4]).

Implementation Details For all baselines and our method, we set embedding size d=128,da=128,dT=16d = 128, d_a = 128, d_T = 16, heads h=8h = 8, the maximum iterations as 100, batch size as 128, learning rate as 0.001, and weight of regularization as 0.001 on all three datasets. The number of temporal buckets BB is set as 60, 14, and 7 on the three datasets, respectively. For DIEN, MEIRec, and our THIGE, we set three-layers MLP with dimensions 64, 32, and 1. For our THIGE and all baselines learning long- or short-term preferences, we consider the last 10, 10, and 50 interactions as the short term, and sample up to 50, 50, and 200 historical interactions as the long term for Yelp, CloudTheme, and UserBehavior, respectively. We evaluate the performance of next-item recommendation with the metrics of F1, PR-AUC, and ROC-AUC.

We report the results of different methods for next-item recommendation in Table 5.6. In general, THIGE achieves the best performance on the three datasets, outperform the second best method by 4.04% on Yelp, 5.84% on CloudTheme, and 0.51% on UserBehavior.

Table 5.6 Performance of next-item recommendation (with standard deviation). The best result is in bold while the second best is underlined. PR. denotes PR-AUC and ROC. denotes ROC-AUC

DatasetMetricDIENSTAMPSHANMERecGATNETHIGE
YelpF139.52 (1.31)40.37 (0.94)40.17 (1.10)42.86 (0.44)42.21 (0.96)43.77 (0.66)
PR.30.04 (0.37)31.36 (1.23)32.35 (1.10)32.69 (0.54)33.39 (1.42)36.45 (1.66)
ROC.74.69 (0.57)73.74 (1.15)70.91 (1.14)74.65 (0.23)76.15 (0.64)79.23 (0.80)
CT.F125.70 (1.25)21.42 (0.91)26.25 (1.09)25.02 (0.98)27.33 (0.50)37.17 (1.36)
PR.41.16 (0.22)25.65 (0.44)40.92 (1.09)43.86 (0.42)44.74 (0.20)51.94 (0.43)
ROC.68.41 (0.34)52.97 (0.52)67.48 (1.06)69.98 (0.35)71.22 (0.11)75.38 (0.33)
UB.F167.32 (3.45)63.06 (1.51)58.84 (7.83)66.48 (1.16)67.81 (1.14)67.19 (0.98)
PR.63.38 (0.19)59.09 (0.22)63.86 (4.76)64.94 (0.15)65.42 (0.05)65.71 (0.09)
ROC.62.90 (0.23)58.29 (0.40)57.82 (0.98)64.82 (0.16)65.06 (0.08)65.39 (0.06)

Compared with sequential models (DIEN, STAMP, SHAN, and M3R), the reason that THIGE is superior is twofold. First, THIGE designs a more effective way to integrate long- and short-term preferences, such that the current demands are explicitly guided by historical habits. Second, it also considers different types of interactions between users and items, leading to better performance.

Compared with GNN-based models (MEIRec and GATNE), the main improvement of THIGE comes from jointly modeling historical habits and evolving demands. Moreover, MEIRec models heterogeneous interactions in an entirely decoupled manner, whereas GATNE and THIGE achieve better performance by modeling their latent relevance. It is also not surprising that heterogeneous GNN-based methods typically outperform sequential models, as the former accounts for multi-typed interactions whereas the latter only models single-typed interactions.

The whole details and experimental analysis of THIGE are introduced in [17].

Focusing on the preserving dynamics on real-world heterogeneous graphs, this chapter introduces three representative models including DyHNE, SHCF, and THIGE to model the incremental heterogeneous structures, the type-aware sequential evolution of entities as well as the multiple long-term habits and short-term demands. Specifically, this chapter designs a matrix perturbation based DyHNE to model the changes between different semantic-level snapshots and learns the dynamic embedding of heterogeneous nodes in Sect. 5.2. And then, as the dynamical interactions are in the form of type-aware sequences, we present the heterogeneous graph neural collaborative filtering model to make full use of high-order heterogeneous collaborative singles and sequential information for sequential recommendation in Sect. 5.3. Furthermore, with the consideration that heterogeneous dynamics express the multiple historical habits and current demands of entities, this chapter proposes a unified model which integrates both heterogeneous long-/short-term preferences to handle the problem of next-item recommendation in Sect. 5.4.

  1. Aggarwal, C., Subbian, K.: Evolutionary network analysis: a survey. ACM Comput. Surv. 47(1), 10 (2014)

  2. Belkin, M., Niyogi, P.: Laplacian eigenmaps and spectral techniques for embedding and clustering. In: NeurIPS, pp. 585–591 (2002)

  3. Cai, H., Zheng, V.W., Chang, K.C.C.: A comprehensive survey of graph embedding: problems, techniques, and applications. IEEE Trans. Knowl. Data Eng. 30(9), 1616–1637 (2018)

  1. Cen, Y., Zou, X., Zhang, J., Yang, H., Zhou, J., Tang, J.: Representation learning for attributed multiplex heterogeneous network. Preprint. arXiv:1905.01669 (2019)

  2. Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., Bengio, Y.: Learning phrase representations using RNN encoder-decoder for statistical machine translation. Preprint. arXiv:1406.1078 (2014)

  3. Cui, P., Wang, X., Pei, J., Zhu, W.: A survey on network embedding. IEEE Trans. Knowl. Data Eng. 31(5), 833–852 (2018)

  4. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: Pre-training of deep bidirectional transformers for language understanding. Preprint. arXiv:1810.04805 (2018)

  5. Dong, Y., Chawla, N.V., Swami, A.: metapath2vec: Scalable representation learning for heterogeneous networks. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 135–144 (2017)

  6. Fan, S., Zhu, J., Han, X., Shi, C., Hu, L., Ma, B., Li, Y.: Metapath-guided heterogeneous graph neural network for intent recommendation. In: KDD ‘19: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2478–2486 (2019)

  7. Golub, G.H., Van Loan, C.F.: Matrix Computations. JHU Press, Baltimore (2012)

  8. Han, X., Shi, C., Wang, S., Philip, S.Y., Song, L.: Aspect-level deep collaborative filtering via heterogeneous information networks. In: IJCAI’18: Proceedings of the 27th International Joint Conference on Artificial Intelligence, pp. 3393–3399 (2018)

  9. He, X., Liao, L., Zhang, H., Nie, L., Hu, X., Chua, T.S.: Neural collaborative filtering. In: Proceedings of the 26th International Conference on World Wide Web, pp. 173–182 (2017)

  10. Hidasi, B., Karatzoglou, A., Baltrunas, L., Tikk, D.: Session-based recommendations with recurrent neural networks. Preprint. arXiv:1511.06939 (2015)

  11. Hidasi, B., Quadrana, M., Karatzoglou, A., Tikk, D.: Parallel recurrent neural network architectures for feature-rich session-based recommendations. In: RecSys, pp. 241–248 (2016)

  12. Hu, L., Yang, T., Shi, C., Ji, H., Li, X.: Heterogeneous graph attention networks for semi-supervised short text classification. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 4823–4832 (2019)

  13. Jacob, Y., Denoyer, L., Gallinari, P.: Learning latent representations of nodes for classifying in heterogeneous social networks. In: WSDM ‘14: Proceedings of the 7th ACM International Conference on Web Search and Data Mining, pp. 373–382 (2014)

  14. Ji, Y., Yin, F., Fang, Y., Yang, H., Wang, X., Jia, T., Shi, C.: Temporal heterogeneous interaction graph embedding for next-item recommendation. In: Proceedings of The European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, pp. 314–329 (2020)

  15. Kang, W.C., McAuley, J.: Self-attentive sequential recommendation. In: 2018 IEEE International Conference on Data Mining (ICDM), pp. 197–206 (2018)

  16. Kato, T.: Perturbation Theory for Linear Operators, vol. 132. Springer Science & Business Media, Berlin (2013)

  17. Le, D.T., Lauw, H.W., Fang, Y.: Modeling contemporaneous basket sequences with twin networks for next-item recommendation. In: Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (2018)

  18. Li, J., Dani, H., Hu, X., Tang, J., Chang, Y., Liu, H.: Attributed network embedding for learning in a dynamic environment. In: Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, pp. 387–396 (2017)

  19. Li, J., Ren, P., Chen, Z., Ren, Z., Lian, T., Ma, J.: Neural attentive session-based recommendation. In: Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, pp. 1419–1428 (2017)

  20. Li, X., Wu, Y., Ester, M., Kao, B., Wang, X., Zheng, Y.: Semi-supervised clustering in attributed heterogeneous information networks. In: Proceedings of the 26th International Conference on World Wide Web, pp. 1621–1629 (2017)

  1. Li, C., Hu, L., Shi, C., Song, G., Yuanfu, L.: Sequence-aware heterogeneous graph neural collaborative filtering. In: Proceedings of the 2021 SIAM International Conference on Data Mining (SDM) (2021)

  2. Liu, Q., Zeng, Y., Mokhosi, R., Zhang, H.: Stamp: short-term attention/memory priority model for session-based recommendation. In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1831–1839 (2018)

  3. Lu, Y., Wang, X., Shi, C., Yu, P.S., Ye, Y.: Temporal network embedding with micro-and macro-dynamics. In: Proceedings of the 28th ACM International Conference on Information and Knowledge Management, pp. 469–478 (2019)

  4. Ng, A.Y., Jordan, M.I., Weiss, Y.: On spectral clustering: analysis and an algorithm. In: Advances in Neural Information Processing Systems, pp. 849–856 (2002)

  5. Pal, S.K., Mitra, S.: Multilayer perceptron, fuzzy sets, and classification. IEEE Trans. Neural Netw. 3(5), 683–697 (1992)

  6. Parlett, B.N.: The symmetric eigenvalue problem, vol. 20. SIAM (1998)

  7. Perozzi, B., Al-Rfou, R., Skiena, S.: DeepWalk: online learning of social representations. In: Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701–710 (2014)

  8. Quadrana, M., Karatzoglou, A., Hidasi, B., Cremonesi, P.: Personalizing session-based recommendations with hierarchical recurrent neural networks. In: Proceedings of the Eleventh ACM Conference on Recommender Systems, pp. 130–137 (2017)

  9. Rendle, S., Freudenthaler, C., Gantner, Z., Schmidt-Thieme, L.: BPR: Bayesian personalized ranking from implicit feedback. Preprint. arXiv:1205.2618 (2012)

  10. Shang, J., Qu, M., Liu, J., Kaplan, L.M., Han, J., Peng, J.: Meta-path guided embedding for similarity search in large-scale heterogeneous information networks. Preprint. arXiv:1610.09769 (2016)

  11. Shi, C., Hu, B., Zhao, W.X., Yu, P.S.: Heterogeneous information network embedding for recommendation. IEEE Trans. Knowl. Data Eng. 31(2), 357–370 (2019)

  12. Shi, C., Li, Y., Zhang, J., Sun, Y., Philip, S.Y.: A survey of heterogeneous information network analysis. IEEE Trans. Knowl. Data Eng. 29(1), 17–37 (2016)

  13. Sun, Y., Barber, R., Gupta, M., Aggarwal, C.C., Han, J.: Co-author relationship prediction in heterogeneous bibliographic networks. In: 2011 International Conference on Advances in Social Networks Analysis and Mining, pp. 121–128 (2011)

  14. Sun, F., Liu, J., Wu, J., Pei, C., Lin, X., Ou, W., Jiang, P.: Bert4rec: sequential recommendation with bidirectional encoder representations from transformer. In: Proceedings of the 28th ACM International Conference on Information and Knowledge Management, pp. 1441–1450 (2019)

  15. Tang, J., Qu, M., Wang, M., Zhang, M., Yan, J., Mei, Q.: Line: large-scale information network embedding. In: Proceedings of the 24th International Conference on World Wide Web, pp. 1067–1077 (2015)

  16. Tang, J., Belletti, F., Jain, S., Chen, M., Beutel, A., Xu, C., H Chi, E.: Towards neural mixture recommender for long range dependent user sequences. In: The World Wide Web Conference, pp. 1782–1793 (2019)

  17. Trefethen, L.N., Bau III, D.: Numerical Linear Algebra, vol. 50. SIAM, Philadelphia (1997)

  18. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., Polosukhin, I.: Attention is all you need. In: Neural Information Processing Systems (NIPS 2017), pp. 5998–6008 (2017)

  19. Wang, H., Zhang, F., Hou, M., Xie, X., Guo, M., Liu, Q.: Shine: signed heterogeneous information network embedding for sentiment link prediction. In: Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, pp. 592–600 (2018)

  20. Wang, X., He, X., Wang, M., Feng, F., Chua, T.S.: Neural graph collaborative filtering. In: Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 165–174 (2019)

  21. Wang, X., Ji, H., Shi, C., Wang, B., Ye, Y., Cui, P., Yu, P.S.: Heterogeneous graph attention network. In: The World Wide Web Conference, pp. 2022–2032 (2019)

  1. Wang, X., Lu, Y., Shi, C., Wang, R., Cui, P., Mou, S.: Dynamic heterogeneous information network embedding with meta-path based proximity. IEEE Trans. Knowl. Data Eng. 1–1 (2020)

  2. Xu, C., Zhao, P., Liu, Y., Sheng, V.S., Xu, J., Zhuang, F., Fang, J., Zhou, X.: Graph contextualized self-attention network for session-based recommendation. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, vol. 19, pp. 3940–3946 (2019)

  3. Yin, Y., Ji, L.X., Zhang, J.P., Pei, Y.L.: DHNE: network representation learning method for dynamic heterogeneous networks. IEEE Access 7, 134,782–134,792 (2019)

  4. Ying, H., Zhuang, F., Zhang, F., Liu, Y., Xu, G., Xie, X., Xiong, H., Wu, J.: Sequential recommender system based on hierarchical attention networks. In: IJCAI International Joint Conference on Artificial Intelligence (2018)

  5. Zhou, G., Mou, N., Fan, Y., Pi, Q., Bian, W., Zhou, C., Zhu, X., Gai, K.: Deep interest evolution network for click-through rate prediction. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 5941–5948 (2019)

  6. Zhu, D., Cui, P., Zhang, Z., Pei, J., Zhu, W.: High-order proximity preserved embedding for dynamic networks. IEEE Trans. Knowl. Data Eng. 30(11), 2134–2144 (2018)

6.1 Introduction

Recently, some efforts begin to combine graph embedding methods and machine learning technologies to obtain better graph representations. Specifically, GNNs range out the idea of conventional learning to model the relationships and generators compete with each other to form better graph representations. Besides, maintenance sampling tends to reduce the operation overheads, which are more suitable to model data with a hierarchical structure.

Some heterogeneous graph embedding methods have shown the effectiveness in modeling graphs. For example, the heterogeneous graph embedding methods [10, 11] leverage attribute information to learn graph representations. The performance of these methods is limited by the underlying assumption that the graph structure is static. To overcome this limitation, we propose the probability of data changing in the graph structure to model the dynamic graph representations.

The rest of this paper is organized as follows. Section 2 introduces the problem formulation. Section 3 presents our proposed method. Section 4 evaluates the performance of our method on several benchmark datasets. Section 5 discusses the related work. Section 6 concludes the paper.