Moss: A Scalable Tool for Efficiently Sampling and Counting 4- and 5-Node Graphlets

Pinghui Wang, Jing Tao, Junzhou Zhao, Xiaohong GuanarXiv 2015

Introduction: The Challenge of Graphlet Counting

In network science, "graphlets" or "motifs" are small, connected subgraphs that act as the building blocks of complex systems. Counting these patterns—such as triangles, stars, or paths—is crucial for understanding the underlying structure of diverse systems, from social networks to biological protein-protein interactions.

The six possible types of 4-node graphlets, labeled $M_1^{(4)}$ through $M_6^{(4)}$.

However, as graphs scale to millions of nodes and billions of edges, counting these motifs becomes computationally prohibitive due to combinatorial explosion. For example, a medium-sized network can contain over $10^{10}$ possible 4-node subgraphs. Existing sampling methods often struggle with scalability (especially for 5-node motifs), compatibility with distributed programming models like Pregel, and providing reliable error bounds.

Methodology: The Moss Approach

The authors introduce Moss (Motif Sampling and Statistics), which adopts a "vertex-centric" approach. Unlike traditional edge-centric methods, Moss assigns weights to nodes based on their local neighborhood structure and samples them to initiate the discovery of 4- and 5-node subgraphs.

Key Algorithms

  • MOSS-4 & MOSS-4Min: MOSS-4 estimates all 4-node motifs. MOSS-4Min is a specialized variant designed to reduce errors for "rare" motifs by employing a different weighting distribution.
  • MOSS-5 (T-5 & Path-5): To handle the 21 distinct types of 5-node motifs, Moss splits the task. T-5 focuses on motifs containing specific 4-node structures, while Path-5 targets motifs built around 5-node paths. These are combined using a "Mix Estimator" for the final count.
  • Vertex-Centric Design: Designed to "think like a vertex," Moss is easily deployable on distributed systems where each node only possesses information about its immediate neighbors.

Experimental Setup and Datasets

Moss was evaluated using eight diverse datasets from the Stanford Network Analysis Platform (SNAP), including social networks (soc-Epinions1), co-authorship networks (com-DBLP), and web/product networks (com-Amazon). These datasets range from 5,000 to 334,000 nodes, providing a robust testbed for accuracy and speed.

Key Insights and Results

The Moss framework offers several advantages over existing state-of-the-art tools:

  • Unbiased Estimation: The authors mathematically prove that their estimators are unbiased, ensuring that sampled estimates converge to true counts.
  • Exact Variance Formulas: A significant contribution is the derivation of closed-form formulas for estimator variance. This allows researchers to calculate a "sampling budget" to guarantee specific confidence levels before execution.
  • Efficiency and Speed: For 5-node motifs, Moss is 2 to 3 orders of magnitude faster than tools like Guise and Graft for comparable accuracy. It also requires significantly less memory ($O(|V| + d_{max})$ vs $O(|E| + d_{max})$), making it ideal for massive graphs.
  • Sampling Accuracy: Experimental results show that the calculated standard error almost perfectly matches the observed Normalized Root Mean Square Error (NRMSE).

Limitations and Future Directions

While Moss represents a major advancement, challenges remain. Extremely rare motifs still require high sampling budgets for accurate estimation. Furthermore, the current implementation is tailored for undirected graphs; extending these vertex-centric techniques to directed and dynamic (streaming) graphs remains a promising area for future research.

Summary updated

BibTeX
@misc{wang2015moss,
  author = {Pinghui Wang and Jing Tao and Junzhou Zhao and Xiaohong Guan},
  title = {{Moss: A Scalable Tool for Efficiently Sampling and Counting 4- and 5-Node Graphlets}},
  year = {2015},
  eprint = {1509.08089},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1509.08089},
}
Figure