Skip to main content
QUICK REVIEW

[Paper Review] On Sampling from Massive Graph Streams

Nesreen K. Ahmed, Nick Duffield|arXiv (Cornell University)|Mar 7, 2017
Data Stream Mining TechniquesComputer Science34 references9 citations
TL;DR

This paper introduces Graph Priority Sampling (gps), a novel order-based reservoir sampling framework for massive graph streams that separates edge sampling from subgraph estimation. By adaptively weighting edges using auxiliary variables, gps minimizes variance in subgraph count estimation—achieving <1% error for triangle and wedge counts while storing only a tiny fraction of edges, such as 40K edges for a 260M-edge Twitter graph.

ABSTRACT

We propose Graph Priority Sampling (GPS), a new paradigm for order-based reservoir sampling from massive streams of graph edges. GPS provides a general way to weight edge sampling according to auxiliary and/or size variables so as to accomplish various estimation goals of graph properties. In the context of subgraph counting, we show how edge sampling weights can be chosen so as to minimize the estimation variance of counts of specified sets of subgraphs. In distinction with many prior graph sampling schemes, GPS separates the functions of edge sampling and subgraph estimation. We propose two estimation frameworks: (1) Post-Stream estimation, to allow GPS to construct a reference sample of edges to support retrospective graph queries, and (2) In-Stream estimation, to allow GPS to obtain lower variance estimates by incrementally updating the subgraph count estimates during stream processing. Unbiasedness of subgraph estimators is established through a new Martingale formulation of graph stream order sampling, which shows that subgraph estimators, written as a product of constituent edge estimators are unbiased, even when computed at different points in the stream. The separation of estimation and sampling enables significant resource savings relative to previous work. We illustrate our framework with applications to triangle and wedge counting. We perform a large-scale experimental study on real-world graphs from various domains and types. GPS achieves high accuracy with less than 1% error for triangle and wedge counting, while storing a small fraction of the graph with average update times of a few microseconds per edge. Notably, for a large Twitter graph with more than 260M edges, GPS accurately estimates triangle counts with less than 1% error, while storing only 40K edges.

Motivation & Objective

  • Address the challenge of efficiently estimating graph properties from massive, high-velocity graph streams where exact computation is infeasible.
  • Overcome limitations of prior sampling methods that are either fixed in design, lack adaptability to auxiliary information, or cannot minimize estimation variance for specific subgraph types.
  • Decouple the sampling process from subgraph estimation to enable flexible, incremental, and unbiased estimation with minimal memory footprint.
  • Provide a general-purpose framework that supports both post-stream and in-stream estimation for arbitrary subgraph queries on graph streams.

Proposed method

  • Propose Graph Priority Sampling (gps), a priority-based reservoir sampling scheme that assigns edge sampling probabilities based on auxiliary or size variables to minimize variance in subgraph estimators.
  • Introduce two estimation frameworks: Post-Stream estimation for retrospective queries on a reference sample, and In-Stream estimation for real-time, low-variance updates during processing.
  • Establish unbiasedness of subgraph estimators using a novel martingale formulation, proving that products of edge estimators remain unbiased even when computed at different stream times.
  • Leverage the separation of sampling and estimation to reduce resource usage, avoiding redundant computation and enabling efficient incremental updates.
  • Design edge sampling weights such that edges contributing more to target subgraphs (e.g., triangles, wedges) are prioritized, minimizing overall variance in the final estimates.
  • Formulate the estimation of subgraph counts as a product of edge-level estimators, with variance and covariance terms explicitly modeled for accurate uncertainty quantification.

Experimental results

Research questions

  • RQ1How can we design a sampling framework that minimizes estimation variance for subgraph counts in massive graph streams while maintaining unbiasedness?
  • RQ2Can we decouple the sampling process from subgraph estimation to improve efficiency and enable both retrospective and real-time analysis?
  • RQ3What is the theoretical foundation that guarantees unbiasedness of subgraph estimators when computed at different points in the stream?
  • RQ4How do edge sampling weights based on auxiliary or size variables affect the accuracy and variance of subgraph count estimation?
  • RQ5To what extent can the framework scale to real-world graphs with billions of edges while maintaining high accuracy and low memory usage?

Key findings

  • gps achieves <1% error in triangle and wedge counting on real-world graphs, including a large Twitter graph with over 260 million edges.
  • For the same Twitter graph, gps estimates triangle counts with <1% error while storing only 40,000 edges, demonstrating exceptional memory efficiency.
  • The average update time per edge is just a few microseconds, enabling real-time processing at scale.
  • The framework supports both Post-Stream and In-Stream estimation, with the latter achieving lower variance through incremental updates.
  • Theoretical analysis confirms that subgraph estimators remain unbiased even when computed at different stream times, due to a novel martingale-based formulation.
  • Covariance terms in variance estimation are non-zero only when subgraphs share edges, and the framework explicitly models these to ensure accurate uncertainty quantification.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.