Diversified Top-k Graph Pattern Matching

Yinghui Wu, Wenfei Fan, Xin Wang, Yinghui Wu 0001PVLDB 2013

In the era of massive social networks, traditional graph pattern matching often falls short. When a user searches for a specific organizational structure—such as a Project Manager (PM) supervising both a Programmer (PRG) and a Database Developer (DB)—standard algorithms attempt to return every possible instance within the graph. On billion-scale networks, this leads to information overload and prohibitive computational costs. This paper introduces a framework for top-k graph pattern matching that prioritizes the most relevant and diverse matches for a specific "query focus" node, significantly improving search efficiency and result quality.

Problem Definition: Beyond Subgraph Isomorphism

Traditional graph matching typically relies on subgraph isomorphism, which is NP-complete and often too restrictive for fluid social data. Furthermore, users usually only care about matches for a specific node (the "output node") rather than the entire subgraph.

Graph pattern matching example showing a query pattern Q and its matches in a larger graph G.

As shown in the figure above, the goal is to identify nodes in a data graph $G$ that fulfill the role of a designated node $u_o$ in pattern $Q$. By shifting the focus to graph simulation, the authors capture the functional roles nodes play within a structure, which is more meaningful in social contexts than exact edge-for-edge mappings.

Methodology: Ranking and Early Termination

To identify the "best" matches, the framework employs dual ranking criteria: relevance and diversity. Relevance is defined by "social impact"—how many other matching nodes in the pattern a candidate can reach. Diversity ensures that the top-k results are not redundant (e.g., avoiding multiple managers from the same small team).

Ranking Functions

The authors utilize several established formulations to quantify these metrics, as detailed in the following table:

Formulations for relevance and distance-based ranking functions used to evaluate matches.

Early Termination Algorithms

The core innovation lies in the TopKDAG and TopK algorithms. These methods propagate matching constraints through the graph while maintaining upper and lower bounds on the relevance of candidates. The key insight is that one does not need to confirm every match to determine the top-k results; the search can be pruned as soon as the top-k matches are mathematically guaranteed.

Because maximizing both relevance and diversity is NP-complete, the authors developed TopKDiv (a 2-approximation algorithm) and TopKDH (a heuristic with early termination) to efficiently find high-quality, non-redundant results.

Experimental Evaluation

The researchers evaluated their methods on large-scale real-world datasets, including Amazon (548k nodes), Citation (1.4M nodes), and YouTube (1.6M nodes), alongside synthetic graphs to test scalability.

  • Efficiency: The top-k matching methods only need to examine 40% to 45% of the total matches on average before terminating.
  • Speedup: Compared to traditional "find-all" matching, the proposed algorithms improved efficiency by 64% for acyclic patterns and 48% for cyclic patterns.
  • Scalability: The algorithms scale linearly with the size of the data graph and the pattern, demonstrating robustness across different network topologies.
  • Quality: Case studies on YouTube data confirmed that the diversification heuristic successfully replaced redundant, high-relevance matches with more distinct ones that still satisfied the query requirements.

Conclusion and Future Work

By focusing on a designated output node and employing early termination, this framework effectively addresses the computational bottlenecks of graph pattern matching. While the current implementation is centralized, the authors identify distributed graph processing as the next frontier. Extending these algorithms to partitioned graphs across multiple servers will be essential for handling the "billion-node" scale of modern platforms like Facebook or LinkedIn.

Summary updated

BibTeX
@article{wu2013diversified,
  author = {Yinghui Wu and Wenfei Fan and Xin Wang and Yinghui Wu},
  title = {{Diversified Top-k Graph Pattern Matching}},
  journal = {PVLDB},
  year = {2013},
  doi = {10.14778/2536258.2536263},
}
Figure