motif2vec: Motif Aware Node Representation Learning for Heterogeneous Networks

Manoj Reddy Dareddy, Mahashweta Das, Hao Yang

Abstract

Representation learning in Heterogeneous Information Networks (HINs) has traditionally relied on linear metapaths, which often fail to capture the complex, non-linear structural patterns inherent in real-world interactions. We propose motif2vec, a novel framework that utilizes network motifs—statistically significant, higher-order sub-graph patterns—to generate node embeddings. By transforming HINs into motif-aware graphs and conducting hybrid biased random walks, motif2vec preserves intricate semantic relationships while maintaining broad network coverage. Experimental results on diverse datasets demonstrate significant improvements over state-of-the-art metapath-based methods in both node classification and link prediction.

1. Introduction

Heterogeneous Information Networks (HINs), characterized by multiple types of nodes and edges, are ubiquitous in domains such as social media, e-commerce, and academic publishing. While homogeneous graph embedding techniques like node2vec have seen success, they are ill-equipped for the multi-typed nature of HINs. Existing heterogeneous solutions, notably metapath2vec, utilize manually defined "metapaths" (linear sequences of node types). However, metapaths are limited by their structural simplicity, often failing to capture non-linear connectivity and higher-order functional relationships. Furthermore, nodes that do not align with specific meta-structures may suffer from poor representation.

2. The motif2vec Framework

The motif2vec algorithm addresses these limitations by shifting the focus from linear paths to network motifs. Motifs are recurring sub-graph patterns (e.g., triangles or bifans) that serve as the fundamental building blocks of complex networks.

2.1 Motif Discovery and Graph Transformation

The first stage of the framework involves identifying instances of pre-defined motifs within the HIN. These motifs represent higher-order semantic ties, such as a group of authors collaborating across multiple papers.

All 13 possible 3-node network motifs and a toy network example.

Following discovery, the algorithm constructs a "Motif Graph." This is a weighted adjacency matrix where edge weights between nodes reflect the frequency of their co-occurrence within shared motif instances. This transformation distills the network's higher-order structure into a format suitable for efficient processing.

2.2 Hybrid Biased Random Walks and Embedding

To ensure comprehensive node coverage and structural fidelity, motif2vec employs a hybrid biased random walk strategy. Walks are conducted on both the original heterogeneous graph and the newly constructed motif graphs. This dual-path approach provides a "safety net": nodes that are not part of frequent motifs are still captured via the original graph structure, preventing the sparsity issues common in purely motif-based methods.

The resulting walk sequences are processed using a heterogeneous skip-gram model to produce low-dimensional latent representations for every node in the network.

3. Experimental Evaluation

The authors evaluated motif2vec against state-of-the-art baselines, including metapath2vec++ and metagraph2vec++, across four real-world datasets: DBLP-P (bibliographic), AMiner-CS (large-scale bibliographic), Yelp-Restaurant (service), and Amazon-Electronics (product).

3.1 Performance Results

motif2vec demonstrated superior performance across all tasks:

  • Node Classification: On the DBLP-P dataset, motif2vec achieved an accuracy of 78.80%, representing a 22% relative improvement over the best baseline. On the massive AMiner-CS dataset, it showed a 24% improvement.
  • Link Prediction: In predicting user-restaurant interactions on Yelp, the model achieved a 34% improvement over metapath-based methods.
  • Robustness: Unlike baselines that showed inconsistent performance across different domains, motif2vec remained the top performer across all tested datasets.

4. Discussion and Conclusion

The success of motif2vec highlights the importance of motifs as semantic anchors. By capturing complex collaborations and functional patterns that linear paths miss, motifs provide a richer context for node embeddings. While the current implementation requires manual motif selection and faces computational challenges in motif extraction for web-scale graphs, its ability to scale to millions of nodes (processing AMiner-CS in under 9 hours) proves its practical utility. Future work will focus on automated motif selection and extending the framework to dynamic, evolving networks.

Summary updated

BibTeX
@inproceedings{dareddy2019motif,
  author = {Manoj Reddy Dareddy and Mahashweta Das and Hao Yang},
  title = {{motif2vec: Motif Aware Node Representation Learning for Heterogeneous Networks}},
  booktitle = {IEEE BigData},
  year = {2019},
  doi = {10.1109/bigdata47090.2019.9005670},
}
Figure