Fast and Accurate Triangle Counting in Graph Streams Using Predictions

Cristian Boldrin, Fabio Vandin
9/23/2024
4 citations
cs.DScs.LG

Official code: VandinLab/Tonic (1 star, C++, MIT, last commit 2025-08-18).

Abstract

In this work, we present the first efficient and practical algorithm for estimating the number of triangles in a graph stream using predictions. Our algorithm combines waiting room sampling and reservoir sampling with a predictor for the heaviness of edges, that is, the number of triangles in which an edge is involved.

Show full abstract

As a result, our algorithm is fast, provides guarantees on the amount of memory used, and exploits the additional information provided by the predictor to produce highly accurate estimates. We also propose a simple and domain-independent predictor, based on the degree of nodes, that can be easily computed with one pass on a stream of edges when the stream is available beforehand. Our analytical results show that, when the predictor provides useful information on the heaviness of edges, it leads to estimates with reduced variance compared to the state-of-the-art, even when the predictions are far from perfect. Our experimental results show that, when analyzing a single graph stream, our algorithm is faster than the state-of-the-art for a given memory budget, while providing significantly more accurate estimates. Even more interestingly, when sequences of hundreds of graph streams are analyzed, our algorithm significantly outperforms the state-of-the-art using our simple degree-based predictor built by analyzing only the first graph of the sequence.

View on arXivView PDF

Code Implementations(1)

VandinLab/TonicOfficial100%
MIT

Fast and Accurate Triangle Counting in Graph Streams Using Predictions (ICDM 2024)

12C++, PythonSep 23, 20241 years agoMIT

Similar Papers

Cite this paper

@article{boldrin2024fast,
  title  = {Fast and Accurate Triangle Counting in Graph Streams Using Predictions},
  author = {Cristian Boldrin and Fabio Vandin},
  year   = {2024},
  eprint = {2409.15205},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15205v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.15205.svg)](https://codeofpaper.com/paper/2409.15205)

Discussion