# MBHAN: Motif-Based Heterogeneous Graph Attention Network
## 3 Preliminary Information  
Table 1 gives the notations used in this paper and their corresponding explanations. We will then define the most relevant concepts and the problem we are seeking to address, before introducing the MBHAN algorithm. **Definition 1**. : _Heterogeneous graphs [42]: A heterogeneous graph is a network data structure, \(\mathcal{G}=(\mathcal{V},\,\mathcal{E})\), with a node type that can be mapped as \(\,\varphi:\mathcal{V}\rightarrow\mathcal{T}\) and a link type that can be mapped as \(\,\psi:\,\mathcal{E}\rightarrow\mathcal{R}\,\), where \(|\mathcal{T}|>1\) represents the number of node types in the network or \(|\mathcal{R}|>1\) represents the number of link types in the network. If \(|\mathcal{T}|=1\) and \(|\mathcal{R}|=1\), this indicates that the graph, \(\mathcal{G}\), is a homogeneous network._  
**Example 1**. : _Typical examples of heterogeneous graphs are academic citation networks (see Figure 1). In Figure 1(a), DBLP consists of four different types of nodes (author (A), paper (P), conference (C), and term (T)) and multiple types of links (\(A-P:\) an author writes a paper or a paper is written by an author; \(P-C:\) a paper is published in a conference or a conference publishes the paper; \(T-P:\) a paper contains a term or a term is mentioned in a paper). Figure 1(b) again contains multiple types of nodes, e.g., author (A), paper (P), topic (S), and publication venue (V). These are similarly connected by multiple types of links. It is worth noting that in these kinds of academic citation heterogeneous graphs, different types of nodes have different feature spaces. So, for the DBLP and ACM datasets used in this paper, only the paper (P) type nodes have initial features (bag-of-words vectors)._  
**Definition 2**. : _Motif subgraphs: To be able to characterize different types of nodes under different motif patterns and from multi-perspectives in the representation learning process, \(\mathcal{G}_{\mathcal{M}}=(\mathcal{V}_{\mathcal{M}},\,\mathcal{E}_{\mathcal{ M}})\) can be defined as the motif subgraph corresponding to the motif pattern, \(\mathcal{M}\), where \(\mathcal{M}\) is one of the motif patterns in \(\mathcal{G}\), \(\mathcal{V}_{\mathcal{M}}\in\mathcal{V}\), and \(\mathcal{E}_{\mathcal{M}}\in\mathcal{E}\). The motif pattern, \(\mathcal{M}\), has a fixed form that can be naturally observed when the structure of the heterogeneous graph, \(\mathcal{G}\), has been determined._  
**Example 2**. : _MBHAN focuses on a motif pattern that consists of three nodes while taking into account node heterogeneity (see Figure 2). Given prior knowledge of the structural schema of the \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Explanation** \\ \hline \(\mathcal{G}\) & Heterogeneous graph \\ \(\mathcal{V}\) & Node set \\ \(\mathcal{E}\) & Link set \\ \(v_{i}\) & The \(i\)-th node \\ \(\mathcal{T}\) & Type of node set \\ \(\mathcal{R}\) & Type of link set \\ \(m_{i}\) & The \(i\)-th motif pattern \\ \(\mathcal{G}_{m}\) & The subgraph in \(\mathcal{G}\) that satisfies the motif pattern, \(m\) \\ \(\mathcal{N}_{i}^{m}\) & The set of neighboring nodes of \(v_{i}\) in \(\mathcal{G}_{m}\) \\ \(h\) & Node features \\ \(e_{ij}^{m}\) & Importance of node pair \(\left(v_{i},v_{j}\right)\) in \(\mathcal{G}_{m}\) \\ \(a_{m}\) & Node-level attention vector in \(\mathcal{G}_{m}\) \\ \(a_{ij}^{m}\) & Weight of \(\mathcal{G}_{m}\)-based node pair \(\left(v_{i},v_{j}\right)\) \\ \(q\) & Motif-level attention vector \\ \(w_{nr^{t}}\) & Importance of \(t\)-type nodes in \(\mathcal{G}_{m}\) \\ \(\beta_{nr^{t}}\) & Attention weight of \(t\)-type nodes in \(\mathcal{G}_{m}\) \\ \(\mathcal{Z}^{t}\) & Final representation vector of the \(t\)-type nodes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Notations and Explanations. Figure 1: Academic citation heterogeneous graphs for (**a**) DBLP and (**b**) ACM. heterogeneous graph, the motif subgraph is a subset of the original heterogeneous graph based on different node types and compositions.