Reinforcement Learning Enhanced Weighted Sampling for Accurate Subgraph Counting on Fully Dynamic Graph Streams
Kaixin Wang, Cheng Long, Da Yan, Jie Zhang, H. V. Jagadish
Abstract
As the popularity of graph data increases, there is a growing need to count the occurrences of subgraph patterns of interest, for a variety of applications. Many graphs are massive in scale and also fully dynamic (with insertions and deletions of edges), rendering exact computation of these counts to be infeasible. Common practice is, instead, to use a small set of edges as a sample to estimate the counts. Existing sampling algorithms for fully dynamic graphs sample the edges with uniform probability. In this paper, we show that we can do much better if we sample edges based on their individual properties. Specifically, we propose a weighted sampling algorithm called WSD for estimating the subgraph count in a fully dynamic graph stream, which samples the edges based on their weights that indicate their importance and reflect their properties. We determine the weights of edges in a data-driven fashion, using a novel method based on reinforcement learning. We conduct extensive experiments to verify that our technique can produce estimates with smaller errors while often running faster compared with existing algorithms.
• No Knowledge. We have no knowledge about the stream (e.g., the size of stream, the number of vertices and edges, etc.) in advance.
• Limited Memory. We can store at most M edges in a reservoir, where M is a predefined parameter and independent to the size of the stream.
• Single Pass. Edge insertions and deletions are processed one by one in their arrival order. Edges cannot be accessed again once they are discarded.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3ffc9d29-2a82-4519-ba76-037f4f4f08ecCited by top-tier papers4
- ZeroEA: A Zero-Training Entity Alignment Framework via Pre-Trained Language ModelNan Huo, Reynold Cheng, Ben Kao, Wentao Ning et al.VLDB 2024 · 16 citations
- RELIEF: Reinforcement Learning Empowered Graph Feature Prompt TuningJiapeng Zhu, Zichen Ding, Jianxiang Yu, Jiaqi Tan et al.KDD 2025 · 3 citations
- Learning and Editing Universal Graph Prompt Tuning via Reinforcement LearningJinfeng Xu, Zheyu Chen, Shuo Yang, Jinze Li et al.KDD 2026 · 1 citation
- AGIS: Fast Approximate Graph Pattern Mining with Structure-Informed SamplingSeoyong Lee, Jinho LeeVLDB 2026 · 1 citation
Builds on6
- Can Graph Neural Networks Count Substructures?Zhengdao Chen, Lei Chen, Soledad Villar, Joan BrunaNeurIPS 2020 · 392 citations
- Neural Subgraph Isomorphism CountingXin Liu, Haojie Pan, Mutian He, Yangqiu Song et al.KDD 2020 · 70 citations
- Interpretable Neural Subgraph Matching for Graph RetrievalIndradyumna Roy, Venkata Sai Baba Reddy Velugoti, Soumen Chakrabarti, Abir DeAAAI 2022 · 51 citations
- A Learned Sketch for Subgraph CountingKangfei Zhao, Jeffrey Xu Yu, Hao Zhang, Qiyan Li et al.SIGMOD 2021 · 43 citations
- Neural Subgraph Counting with Wasserstein EstimatorHanchen Wang, Rong Hu, Ying Zhang, Lu Qin et al.SIGMOD 2022 · 37 citations
Related papers
- An Efficient Streaming Algorithm for Approximating Graphlet DistributionsMarco Bressan, T.-H. Hubert Chan, Qipeng Kuang, Mauro SozioSIGMOD 2026
- GREAT: Generalized Reservoir Sampling based Triangle Counting Estimation over Streaming GraphsSiyue Wu, Dingming Wu, Sinhong Cheuk, Tsz Nam Chan et al.VLDB 2025
- Cardinality Estimation of Subgraph Matching: A Filtering-Sampling ApproachWonseok Shin, Siwoo Song, Kunsoo Park, Wook-Shin HanVLDB 2024 · 12 citations
- gSWORD: GPU-accelerated Sampling for Subgraph CountingChang Ye, Yuchen Li, Shixuan Sun, Wentian GuoSIGMOD 2024 · 5 citations
- HOPS: Probabilistic Subtree Mining for Small and Large GraphsPascal Welke, Florian Seiffarth, Michael Kamp, Stefan WrobelKDD 2020 · 5 citations
