openhgnn.models.HPN

class HPN(meta_paths, category, in_size, out_size, dropout, k_layer, alpha, edge_drop)[source]

This model shows an example of using dgl.metapath_reachable_graph on the original heterogeneous graph.HPN from paper Heterogeneous Graph Propagation Network. The author did not provide codes. So, we complete it according to the implementation of HAN

\[\mathbf{Z}^{\Phi}=\mathcal{P}_{\Phi}(\mathbf{X})=g_\Phi(f_\Phi(\mathbf{X}))\]

where \(\mathbf{X}\) denotes initial feature matrix and \(\mathbf{Z^\Phi}\) denotes semantic-specific node embedding.

\[\mathbf{H}^{\Phi}=f_\Phi(\mathbf{X})=\sigma(\mathbf{X} \cdot \mathbf{W}^\Phi+\mathbf{b}^{\Phi})\]

where \(\mathbf{H}^{\Phi}\) is projected node feature matrix

\[\mathbf{Z}^{\Phi, k}=g_{\Phi}\left(\mathbf{Z}^{\Phi, k-1}\right)=(1-\gamma) \cdot \mathbf{M}^{\Phi} \cdot \mathbf{Z}^{\Phi, k-1}+\gamma \cdot \mathbf{H}^{\Phi}\]

where \(\mathbf{Z}^{\Phi,k}\) denotes node embeddings learned by k-th layer semantic propagation mechanism. \(\gamma\) is a weight scalar which indicates the importance of characteristic of node in aggregating process. We use MetapathConv to finish Semantic Propagation and Semantic Fusion.

Parameters:
  • meta_paths (list) – contain multiple meta-paths.

  • category (str) – The category means the head and tail node of metapaths.

  • in_size (int) – input feature dimension.

  • out_size (int) – out dimension.

  • dropout (float) – Dropout probability.

  • k_layer (int) – propagation times.

  • alpha (float) – Value of restart probability.

  • edge_drop (float, optional) – The dropout rate on edges that controls the messages received by each node. Default: 0.