# Efficient Approximate Temporal Triangle Counting in Streaming with Predictions

arXiv: https://arxiv.org/abs/2506.13173 · HTML: https://mlsanity.com/paper/2506.13173/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 34 of its 60 references that are in the map.
- First posted on arXiv 16 Jun 2025.

## Builds on (most cited first, 30 of 34)

- [Graph Neural Networks: A Review of Methods and Applications](https://mlsanity.com/paper/1812.08434/) (2018)
- [Algorithms with Predictions](https://mlsanity.com/paper/2006.09123/) (2020)
- [A Survey of Graph Neural Networks for Recommender Systems: Challenges, Methods, and Directions](https://mlsanity.com/paper/2109.12843/) (2021)
- [Motifs in Temporal Networks](https://mlsanity.com/paper/1612.09259/) (2016)
- [Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation](https://mlsanity.com/paper/2101.06448/) (2021)
- [A Model for Learned Bloom Filters, and Optimizing by Sandwiching](https://mlsanity.com/paper/1901.00902/) (2019)
- [Faster Fundamental Graph Algorithms via Learned Predictions](https://mlsanity.com/paper/2204.12055/) (2022)
- [Online Graph Algorithms with Predictions](https://mlsanity.com/paper/2112.11831/) (2021)
- [Detecting Mixing Services via Mining Bitcoin Transaction Network with Hybrid Motifs](https://mlsanity.com/paper/2001.05233/) (2020)
- [Triangle and Four Cycle Counting with Predictions in Graph Streams](https://mlsanity.com/paper/2203.09572/) (2022)
- [Online Facility Location with Predictions](https://mlsanity.com/paper/2110.08840/) (2021)
- [A Universal Error Measure for Input Predictions Applied to Online Graph Problems](https://mlsanity.com/paper/2205.12850/) (2022)
- [Mining Persistent Activity in Continually Evolving Networks](https://mlsanity.com/paper/2006.15410/) (2020)
- [Exploring the structure and function of temporal networks with dynamic graphlets](https://mlsanity.com/paper/1412.3885/) (2014)
- [Temporal Network Motifs: Models, Limitations, Evaluation](https://mlsanity.com/paper/2005.11817/) (2020)
- [On Dynamic Graph Algorithms with Predictions](https://mlsanity.com/paper/2307.09961/) (2023)
- [On the Complexity of Algorithms with Predictions for Dynamic Graph Problems](https://mlsanity.com/paper/2307.16771/) (2023)
- [Science, AskScience, and BadScience: On the Coexistence of Highly Related Communities](https://mlsanity.com/paper/1612.07487/) (2016)
- [A Chronological Edge-Driven Approach to Temporal Subgraph Isomorphism](https://mlsanity.com/paper/1801.08098/) (2018)
- [Online Graph Coloring with Predictions](https://mlsanity.com/paper/2312.00601/) (2023)
- [Graph Searching with Predictions](https://mlsanity.com/paper/2212.14220/) (2022)
- [Learning-Based Algorithms for Graph Searching Problems](https://mlsanity.com/paper/2402.17736/) (2024)
- [PRESTO: Simple and Scalable Sampling Techniques for the Rigorous Approximation of Temporal Motif Counts](https://mlsanity.com/paper/2101.07152/) (2021)
- [odeN: Simultaneous Approximation of Multiple Motif Counts in Large Temporal Networks](https://mlsanity.com/paper/2108.08734/) (2021)
- [Scalable Motif Counting for Large-scale Temporal Graphs](https://mlsanity.com/paper/2204.09236/) (2022)
- [Scalable Temporal Motif Densest Subnetwork Discovery](https://mlsanity.com/paper/2406.10608/) (2024)
- [Faster and Generalized Temporal Triangle Counting, via Degeneracy Ordering](https://mlsanity.com/paper/2106.02762/) (2021)
- [Efficient Sampling Algorithms for Approximate Motif Counting in Temporal Graph Streams](https://mlsanity.com/paper/2211.12101/) (2022)
- [AeonG: An Efficient Built-in Temporal Support in Graph Databases](https://mlsanity.com/paper/2304.12212/) (2023)
- [Accurate and Fast Estimation of Temporal Motifs using Path Sampling](https://mlsanity.com/paper/2409.08975/) (2024)

## Abstract (arXiv)

Triangle counting is a fundamental and widely studied problem on static graphs, and recently on temporal graphs, where edges carry information on the timings of the associated events. Streaming processing and resource efficiency are crucial requirements for counting triangles in modern massive temporal graphs, with millions of nodes and up to billions of temporal edges. However, current exact and approximate algorithms are unable to handle large-scale temporal graphs. To fill such a gap, we introduce STEP, a scalable and efficient algorithm to approximate temporal triangle counts from a stream of temporal edges. STEP combines predictions to the number of triangles a temporal edge is involved in, with a simple sampling strategy, leading to scalability, efficiency, and accurate approximation of all eight temporal triangle types simultaneously. We analytically prove that, by using a sublinear amount of memory, STEP obtains unbiased and very accurate estimates. In fact, even noisy predictions can significantly reduce the variance of STEP's estimates. Our extensive experiments on massive temporal graphs with up to billions of edges demonstrate that STEP outputs high-quality estimates and is more efficient than state-of-the-art methods.
