An Algorithm for Maximum Common Subgraph of Planar Triangulation Graphs

Yao Lu, Cheng-lin Liu, Horst BunkeOpenReview 2023

TL;DR

This paper introduces a novel, efficient algorithm for finding the Maximum Common Subgraph (MCS) specifically for Planar Triangulation Graphs. By leveraging the unique properties of these graphs and focusing on connected subgraphs, their method achieves a practical time complexity of O(nmk), significantly outperforming general MCS algorithms for this specialized domain.

What Problem Does This Paper Address?

The Maximum Common Subgraph (MCS) problem is a fundamental challenge in pattern recognition and computer vision. It aims to find the largest subgraph that is common to two given graphs. While MCS is crucial for tasks like image retrieval and document classification, it's notoriously difficult, classified as NP-complete. This means that for general graphs, finding an exact solution becomes computationally infeasible as the graph size increases. To make progress, researchers often focus on specific classes of graphs or develop approximate solutions. This paper tackles the MCS problem by specializing in "Planar Triangulation Graphs," a type of graph commonly generated from 2D point sets (e.g., via Delaunay triangulation) and widely used in computer vision, pattern recognition, and graphics. The challenge is to develop an algorithm that is both efficient and practical for this specific graph type, moving beyond the exponential time complexity of general MCS algorithms.

Methods

The authors propose a heuristic algorithm that exploits the specific structural properties of Planar Triangulation Graphs. The core idea is to perform a simultaneous breadth-first traversal of triangles in both input graphs.

Here's a breakdown of their approach:

  • Specialization on Planar Triangulation Graphs: The algorithm hinges on two key properties of these graphs:
  • Each triangle has at most three adjacent triangles.
  • A graph with n nodes has O(n) triangles and O(n) edges.
  • Breadth-First Traversal of Triangles: Instead of traversing nodes, the algorithm traverses the triangles of the graphs. Starting from an arbitrarily chosen pair of ordered triangles (one from each graph) as roots, it performs a breadth-first search.
  • Matching Triangles: Triangles from both graphs are matched and added to the common subgraph if their corresponding nodes share the same "node visiting order" during the traversal. This order is determined by the breadth-first traversal.
  • Connected MCS Focus: The algorithm is designed to find connected common subgraphs. This restriction simplifies the problem and aligns with many real-world applications where connectivity is important.
  • Approximate Solution: While the algorithm aims to find the maximum common subgraph, it's presented as an approximate solution. The authors acknowledge that it's not guaranteed to find the absolute maximum but has shown good performance in practice.
  • Time Complexity: By exploiting the graph properties and the traversal strategy, the algorithm achieves a time complexity of O(nmk), where n and m are the sizes of the two graphs, and k is the size of the maximum common subgraph. This is a significant improvement over the exponential complexity of general MCS algorithms.

Datasets

The paper does not describe specific named datasets. Instead, it details how their experimental data was generated:

  • Synthetic Data Generation: Random points were generated in a 2D plane to create point sets. These point sets were then triangulated using Delaunay triangulation to form the Planar Triangulation Graphs used in the experiments.
  • Graph Generation Process:
    • For graph G1, n random points were generated and triangulated.
  • For graph G2, m points were selected around the center of G1's point set and then triangulated. This method ensures that G2 is not necessarily a subgraph of G1 due to boundary effects in Delaunay triangulation.
  • Graph Sizes: Experiments were conducted on graphs ranging from small sizes (5-20 nodes) to larger sizes (50-2000 nodes).

Key Insights and Ideas

  • Specialization is Key: The most significant insight is that by focusing on the specific geometric and topological properties of Planar Triangulation Graphs, a much more efficient algorithm for MCS can be developed. This highlights the power of domain-specific algorithms.
  • Triangle Traversal for Structure: Shifting the traversal from nodes to triangles is a clever way to exploit the inherent structure of triangulations and their adjacency relationships. This allows for a more systematic exploration of potential common subgraphs.
  • Practical Approximation: While MCS is NP-complete, the proposed heuristic provides a practical and reasonably accurate solution for a relevant class of graphs. The experimental results suggest that the "approximate" nature often yields the true maximum common subgraph.
  • Bridging Theory and Practice: The algorithm's O(nmk) complexity offers a tangible speedup for real-world applications in computer vision and pattern recognition that rely on graph matching of geometric data.

Key Results

  • Efficiency: The algorithm achieves a time complexity of O(nmk), which is significantly faster than general MCS algorithms for Planar Triangulation Graphs.
  • Comparison with Exact Algorithms (Small Graphs): When compared to an exact MCS algorithm (based on maximum clique detection) on small graphs (5-20 nodes), the proposed algorithm produced common subgraphs with a very similar number of edges (e.g., 7.5 vs. 7.4 edges for 20 vs. 5 nodes).
  • Runtime Advantage (Small Graphs): The runtime difference is dramatic. For instance, on 20 vs. 15 node graphs, the exact algorithm took 2202.123 seconds, while the proposed algorithm took only 0.087 seconds.
  • Scalability (Large Graphs): Experiments on larger graphs (up to 2000 nodes) demonstrated that the runtime scales linearly with the size of the larger graph (Fig. 4a) and super-linearly with the size of the smaller graph (Fig. 4b), confirming the theoretical complexity and showing good performance for practical applications.
  • Approximation Quality: Experimental verification showed that the common subgraphs returned by the algorithm are "in fact maximum common subgraphs" in most cases, and when not, they are "missing only a small fraction of nodes and edges."

Limitations and Future Work

  • Approximation Guarantee: The algorithm is heuristic and does not provide a theoretical guarantee on the quality of the approximation. While experiments show good results, there's no formal bound on how far from the true MCS the output might be.
  • Unweighted Graphs Only: The current version of the algorithm is designed for unweighted graphs without node attributes.
  • No Direct Competitors for Specialized Domain: The authors note that there are no other specialized algorithms for computing connected MCS of Planar Triangulation Graphs, making direct comparison difficult beyond general MCS algorithms or exact methods on small graphs.

Future Work:

  • Extending to Weighted Graphs and Attributes: The authors suggest that it would be straightforward to extend the algorithm to handle weighted edges and node attributes.
  • Theoretical Analysis of Approximation Quality: Further theoretical analysis is needed to formally quantify the quality of the approximation.
  • Comparison with Approximate MCS Methods: A more systematic experimental comparison with other approximate MCS algorithms (e.g., those using approximate maximum clique detection) is planned.
  • Application to Real Images: Applying the algorithm to Planar Triangulation Graphs obtained from real images is proposed as an interesting future research direction.

Summary updated

BibTeX
@misc{lu2023algorithm,
  author = {Yao Lu and Cheng-lin Liu and Horst Bunke},
  title = {{An Algorithm for Maximum Common Subgraph of Planar Triangulation Graphs}},
  year = {2023},
  url = {https://openreview.net/forum?id=9_Vk_vu2-yb},
  howpublished = {OpenReview},
}
Figure