RLMiner: Finding the Most Frequent k-sized Subgraph via Reinforcement Learning
Wei Huang, Hanchen Wang, Dong Wen, Xin Cao, Ying Zhang, Wenjie Zhang
TL;DR
RLMiner addresses the NP-hard problem of finding the most frequent induced subgraph of size $k$ in a single labeled graph by formulating it as a multi-task reinforcement learning problem and solving it with a task-state-aware Graph Neural Network integrated with Soft Actor-Critic. The approach avoids exhaustive subgraph enumeration during inference and achieves time complexity linear in $k$, while delivering subgraphs with frequencies close to the ground truth on real-world graphs. Key contributions include the task-state-aware GNN, a carefully designed reward scheme that stabilizes training, and evidence that RLMiner outperforms exact enumeration in runtime by orders of magnitude while maintaining high approximation quality. This framework broadens the practicality of frequent subgraph mining in domains like web data and social networks by mitigating combinatorial explosion without relying on Downward Closure-based pruning.
Abstract
Identifying the most frequent induced subgraph of size $k$ in a target graph is a fundamental graph mining problem with direct implications for Web-related data mining and social network analysis. Despite its importance, finding the most frequent induced subgraph remains computationally expensive due to the NP-hard nature of the subgraph counting task. Traditional exact enumeration algorithms often suffer from high time complexity, especially for a large graph size $k$. To mitigate this, existing approaches often utilize frequency measurement with the Downward Closure Property to reduce the search space, imposing additional constraints on the task. In this paper, we first formulate this task as a Markov Decision Process and approach it using a multi-task reinforcement learning framework. Specifically, we introduce RLMiner, a novel framework that integrates reinforcement learning with our proposed task-state-aware Graph Neural Network to find the most frequent induced subgraph of size $k$ with a time complexity linear to $k$. Extensive experiments on real-world datasets demonstrate that our proposed RLMiner effectively identifies subgraphs with frequencies closely matching the ground-truth most frequent induced subgraphs, while achieving significantly shorter and more stable running times compared to traditional methods.
