ComPAS: Community Preserving Sampling for Streaming Graphs

Sandipan Sikdar, Tanmoy Chakraborty, Soumya Sarkar, Niloy Ganguly, Animesh Mukherjee

Abstract

Analyzing massive, evolving graphs requires efficient sampling techniques that maintain structural integrity. Traditional streaming samplers often prioritize simple metrics like degree distribution, failing to preserve the underlying community structure—the tendency of nodes to form dense clusters. We present ComPAS (Community Preserving Sampling), the first sampling algorithm specifically designed to maintain these clustering properties in a streaming environment. By interweaving incremental community detection with a "wait-and-see" buffering strategy, ComPAS generates high-fidelity representative subgraphs with near-linear efficiency, significantly outperforming existing streaming methods in community preservation.

Introduction

Massive graphs, such as social networks and web crawls, are often too large to process in their entirety, necessitating sampling. However, real-world data typically arrives as a continuous stream of edges, making static sampling methods inapplicable. Furthermore, preserving community structure is critical for applications like targeted marketing and sub-population analysis. The primary challenge is identifying "important" nodes for community formation when only a limited window of the graph is visible at any time. ComPAS addresses this by treating sampling and community detection as interwoven processes.

The ComPAS Methodology

ComPAS dynamically updates the community map as new edges arrive, rather than treating detection as a post-processing step.

Overview of the ComPAS framework, illustrating the graph structure, the node buffer, and the logic for handling streaming edges.

The algorithm operates through several key components:

  • Warm-up Phase: An initial sample is populated to establish a "base" community structure using standard detection algorithms.
  • The Buffer ($H$): To avoid "first-come, first-served" bias, ComPAS uses a buffer to track node frequency and arrival context. This "wait-and-see" strategy allows the algorithm to evaluate a node's structural importance before committing it to the limited sample space.
  • Incremental Updates: When edges arrive between sampled nodes, ComPAS performs local searches to optimize modularity—a metric for cluster quality.
  • High-Fidelity Replacement: When the sample is full, less significant nodes (those with low degree and clustering coefficients) are replaced by "high-fidelity" nodes from the buffer.
  • Structural Maintenance: To handle node removals without fragmenting communities, ComPAS employs 3-clique percolation to re-evaluate and potentially split or merge communities locally.

Experimental Evaluation

The researchers evaluated ComPAS across five diverse datasets, including streaming social networks (Facebook), co-authorship graphs (Arxiv hep-th, DBLP), and synthetic LFR benchmarks with ground-truth communities.

Key Results

  • Superior Preservation: ComPAS significantly outperformed existing streaming samplers (e.g., PIES, Streaming BFS). On the LFR dataset, it achieved a Normalized Mutual Information (NMI) score of 0.69, nearly double that of competing streaming methods.
  • Closing the Gap: ComPAS achieved roughly 73.2% of the performance of the "Green Algorithm" (GA)—a state-of-the-art static sampler that has the advantage of seeing the entire graph at once.
  • Efficiency and Scalability: The algorithm's execution time scales linearly with the number of edges, making it suitable for high-velocity data streams.
  • Downstream Utility: In a practical test (predicting votes on Wikipedia), a machine learning model trained on a ComPAS sample achieved an AUC of 0.48, compared to 0.31 for standard node sampling.
Sensitivity analysis of ComPAS performance (mean D-statistics) relative to the initial node fraction (α) and buffer size.

Discussion and Future Work

ComPAS effectively "distills" community essence; intra-community edges in its samples account for ~80% of total edges, compared to ~67% in the original graphs. As shown in the sensitivity analysis, performance is robust across various buffer sizes and initial node fractions ($\alpha$), though optimal tuning depends on specific graph dynamics.

Current limitations include the assumption of disjoint communities, which does not account for overlapping structures common in social networks. Future research will focus on extending ComPAS to handle overlapping communities and fully dynamic graphs involving edge deletions.

Summary updated

BibTeX
@inproceedings{sikdar2018compas,
  author = {Sandipan Sikdar and Tanmoy Chakraborty and Soumya Sarkar and Niloy Ganguly and Animesh Mukherjee},
  title = {{ComPAS: Community Preserving Sampling for Streaming Graphs}},
  booktitle = {AAMAS},
  year = {2018},
}
Figure