Estimating Descriptors for Large Graphs

Zohair Raza Hassan, Mudassir Shabbir, Imdadullah Khan, Waseem AbbasarXiv 2020

TL;DR

This paper introduces GABE and MAEVE, the first streaming algorithms designed to generate feature vectors (descriptors) for massive graphs without ever storing the full network in memory. By using reservoir sampling and unbiased estimators, these algorithms achieve classification accuracy competitive with state-of-the-art methods while scaling to networks with hundreds of millions of edges in under 20 minutes.

What Problem Does This Paper Address?

In graph analytics, comparing two networks—to see how similar they are for tasks like classification or anomaly detection—is a fundamental but computationally expensive challenge. Traditional methods like Graph Edit Distance are NP-Hard, while modern Graph Kernels and Graph Neural Networks (GNNs) typically require the entire adjacency matrix to be stored in memory.

As real-world networks (social media, web crawls, biological systems) grow to billions of edges, these "in-memory" approaches hit a wall. The authors identify a critical gap: there is a lack of graph comparison frameworks that can operate in a streaming setting, where edges are processed one by one in a single pass with a strictly limited memory budget.

Methods

The authors propose two streaming extensions of established graph comparison paradigms:

  1. GABE (Graphlet Amounts via Budgeted Estimates): Based on the Graphlet Kernel, this method estimates the counts of 17 different sub-graphs (graphlets) of order $k \le 4$.
  2. MAEVE (Moments of Attributes Estimated on Vertices Efficiently): Based on NetSimile, this method extracts local vertex features (like degree and clustering coefficient) and aggregates them into statistical moments (mean, variance, skewness, kurtosis).

The Streaming Recipe

Both algorithms rely on a shared architectural framework:

  • Single Pass: The algorithm sees each edge only once.
  • Reservoir Sampling: A fixed "budget" of $b$ edges is maintained in memory. As new edges arrive, they randomly replace old ones, ensuring the sample remains representative of the graph seen so far.
  • Unbiased Estimation: The authors prove that by weighting detected sub-graphs by the inverse of their detection probability, they can produce an unbiased estimate of the true counts.

A particularly clever part of GABE is how it handles induced sub-graphs. In a stream, it's easy to count sub-graphs, but hard to know if an edge is missing (required for an induced count). The authors use an "overlap matrix" $O$ to mathematically transform raw sub-graph counts into induced graphlet counts.

Fig. 1: The graphs counted by gabe, and their corresponding overlap matrix O (best viewed when zoomed in). Zeros have been omitted for readability.

Datasets

The researchers evaluated their algorithms on two distinct types of data:

  • Classification Benchmarks: Five standard datasets including D&D (protein structures), COLLAB (scientific collaborations), and three REDDIT variants (social interactions). These range from ~1,200 to ~12,000 individual graphs.
  • Massive Networks: Four massive graphs from the KONECT repository to test scalability: Patent (16.5M edges), Flickr (22.8M edges), Full USA road network (28.8M edges), and the UK Domain 2002 web graph (261.7M edges).

Key Insights and Ideas

  • The Memory-Accuracy Trade-off: The algorithms allow users to explicitly trade memory for accuracy. By increasing the edge budget $b$, the variance of the estimate drops, leading to more precise descriptors.
  • Linear Complexity: For a fixed memory budget, the runtime and space costs are linear relative to the number of edges. This makes the approach "future-proof" for even larger datasets.
  • Vertex Feature Decomposition: The authors prove (Theorem 3) that complex vertex features like the "average degree of neighbors" or "edges leaving an induced neighborhood" can be calculated using only three basic estimated properties: degree, triangle counts, and three-path counts.
Table 2: Features extracted for each vertex, v ∈VG for maeve, their formulae, and a figure highlighting the relevant edges. The filled in vertex depicts v.

Key Results

  • Competitive Accuracy: Even when sampling only 25% to 50% of edges, GABE and MAEVE achieved classification accuracies within 1-5% of NetLSD, a state-of-the-art in-memory descriptor. On the REDDIT-BINARY dataset, MAEVE actually outperformed NetLSD (86.15% vs 82.85%).
  • Extreme Scalability: The algorithms processed the UK Domain graph—containing over 260 million edges—in less than 20 minutes on a standard server.
  • Efficiency: The approximation error drops sharply as the budget increases, showing that you don't need to store a large fraction of the graph to get a very high-quality descriptor.

Limitations and Future Work

  • Graph Density: The authors noted that GABE took significantly longer (102 minutes) on the Flickr dataset when the budget was high. This is because Flickr is very dense, leading to a combinatorial explosion of sub-graphs incident on each edge.
  • Fixed Sub-graph Order: The current implementation is limited to $k \le 4$. While this captures significant structural information, some applications might require higher-order patterns ($k=5$ or $6$), which would drastically increase computational overhead.
  • Parallelization: While the paper mentions that multiple workers can reduce variance, the core focus was on the single-pass streaming logic. Further optimization for distributed streaming environments (like Apache Flink or Spark Streaming) remains an open area.

Summary updated

BibTeX
@misc{hassan2020estimating,
  author = {Zohair Raza Hassan and Mudassir Shabbir and Imdadullah Khan and Waseem Abbas},
  title = {{Estimating Descriptors for Large Graphs}},
  year = {2020},
  eprint = {2001.10301},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.10301},
}
Figure