Computing Graph Descriptors on Edge Streams

Zohair Raza Hassan, Sarwan Ali, Imdadullah Khan, Mudassir Shabbir, Waseem AbbasarXiv 2021

TL;DR

This paper introduces streaming algorithms to approximate three powerful graph descriptors—GABE, MAEVE, and SANTA—by processing edges one at a time rather than loading entire graphs into memory. By utilizing reservoir sampling and Taylor expansions, the authors demonstrate that they can achieve classification accuracy comparable to state-of-the-art methods while using as little as 25% of the memory, enabling the analysis of massive networks with hundreds of millions of edges in minutes.

What Problem Does This Paper Address?

Graph analysis is fundamental to fields ranging from bioinformatics to social network modeling. To use standard machine learning tools, researchers often convert complex graphs into fixed-dimensional vectors called graph descriptors.

However, existing high-performance descriptors (like those based on graph spectra or complex subgraph counts) face a major scalability wall: they typically require the entire graph to be stored in memory. For modern "massive" graphs—think of web-scale hyperlink networks or massive social interactions—this is computationally prohibitive. Furthermore, users often have no way to trade off accuracy for faster runtimes. The authors aim to bridge this gap by moving graph feature extraction into the streaming model, where algorithms process a continuous flow of edges under strict memory constraints.

Methods

The authors propose three new streaming descriptors, each inspired by a well-known non-streaming counterpart:

  1. GABE (Graphlet Amounts via Budgeted Estimates): Based on the Graphlet Kernel, it estimates the frequency of small subgraphs (up to 4 vertices). It uses reservoir sampling to maintain a representative "budget" of edges and employs combinatorial formulas to account for disconnected subgraphs.
  2. MAEVE (Moments of Attributes Estimated on Vertices Efficiently): Inspired by NetSimile, this method extracts local vertex features (like clustering coefficients and ego-network edge counts). It uses a single pass to compute statistical moments (mean, variance, etc.) across the graph.
  3. SANTA (Spectral Attributes for Networks via Taylor Approximation): This is a streaming approximation of NetLSD. Since computing the full eigenspectrum of a Laplacian matrix is impossible in a stream, SANTA uses a Taylor expansion to approximate the trace of the Laplacian matrix, which can be calculated by counting specific closed walks (cycles) in the sampled graph.

The core of these approaches is a sampling scheme that ensures the resulting estimates are unbiased, meaning that on average, the approximate counts equal the true counts.

Fig. 1. This figure depicts the contrast between the typical approach for computing descriptors and our proposed approach. The descriptor in this example represents a graph by the counts of select subgraphs. Note how we tradeoff accuracy for memory consumption by keeping only a fraction of the graph in memory.

Datasets

The authors evaluated their methods on two fronts:

  • Graph Classification: Eight datasets from the TUDataset repository (including DD for proteins, RDT for Reddit interactions, and GHUB for GitHub developers) and the large-scale Malnet-TB dataset for malware detection.
  • Scalability Testing: Seven massive networks from the KONECT collection, including road networks (USA with 28M edges), citation networks (Patent), and the UK 2002 hyperlink network, which contains over 261 million edges.

Key Insights and Ideas

  • The Power of Taylor Expansion: The most elegant leap in the paper is showing that spectral features (which usually require global matrix diagonalization) can be approximated locally. By using the Taylor expansion of the heat and wave kernels, the problem of finding eigenvalues is transformed into a problem of counting subgraphs (walks of length $n$), which is much easier to do in a stream.
  • Linear Scalability: By fixing a memory "budget" ($b$), the time and space complexity of these algorithms scale linearly with the number of edges. This makes the runtime predictable and manageable for end-users.
  • Unbiased Estimation: The authors provide theoretical proofs (Theorems 1 and 5) showing that their streaming estimates for subgraph counts and Laplacian traces are unbiased, providing a solid mathematical foundation for their approximations.

Key Results

  • Memory Efficiency: The descriptors achieve predictive accuracy competitive with state-of-the-art (SOTA) methods like NetLSD and FEATHER while using only 25% to 50% of the memory.
  • Extreme Scalability: The algorithms processed the UK 2002 graph (261 million edges) in under 30 minutes. Most existing SOTA methods cannot process a graph of this size on standard hardware because they cannot fit the adjacency matrix in RAM.
  • Classification Performance: On the Malnet-TB dataset (260k graphs), the proposed models achieved ~79% accuracy. In many cases, the SANTA-HC variant outperformed SLaQ (a recent SOTA approximation) even though SLaQ requires the full graph in memory.

Limitations and Future Work

  • Small Dataset Noise: The authors noted that on very small graphs (like OHSU), the noise introduced by sampling can hinder the classifier's ability to generalize unless a larger budget is used.
  • Graph Density: While the algorithms are linear in the number of edges, the density of the graph matters. Highly dense graphs (like the Stanford or Flickr datasets) take longer to process for a fixed budget because the neighborhood intersections used for subgraph counting become more expensive.
  • Future Directions: The authors suggest extending these streaming descriptors to attributed graphs (graphs where nodes/edges have labels or features) and exploring how these streaming techniques could be integrated with Graph Convolutional Networks (GCNs).

Summary updated

BibTeX
@misc{hassan2021computing,
  author = {Zohair Raza Hassan and Sarwan Ali and Imdadullah Khan and Mudassir Shabbir and Waseem Abbas},
  title = {{Computing Graph Descriptors on Edge Streams}},
  year = {2021},
  eprint = {2109.01494},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.01494},
}
Figure