Introduction
Graph matching—the process of determining if two graphs are structurally identical (isomorphism)—is a cornerstone of structural pattern recognition, with applications ranging from character recognition to 3D object analysis. However, the field faces a significant "scaling wall." Matching two graphs is computationally expensive, typically requiring time and space exponential to the number of nodes. In a large database of $n$ model graphs, a naive search requires $n$ of these expensive tests, making systems unusable as databases grow. This paper proposes a solution to this bottleneck: a "filter-then-verify" approach that uses machine learning to prune the search space before expensive math is applied.
Methodology
The authors introduce a three-stage pipeline for Fast Candidate Elimination:
- Feature Extraction: The system extracts three computationally "cheap" features ($O(m^2)$ complexity, where $m$ is the number of vertices): the frequency of specific vertex labels, and the number of incoming and outgoing edges per vertex.
- Decision Tree Construction (C4.5): The C4.5 algorithm builds a decision tree where each graph in the database is treated as a class. The algorithm uses "information gain" to determine which features best split the database into smaller, more homogeneous groups.
- Candidate Retrieval: For a new query graph, features are extracted and used to traverse the decision tree ($O(k)$ complexity, where $k$ is tree depth). This leads to a "leaf node" or cluster containing a tiny subset of the database. Only these few candidates undergo the formal, expensive isomorphism test using Ullman’s algorithm.
Experimental Results
The approach was evaluated using a database of 1,000 randomly generated graphs, with vertex counts ranging from 5 to 50 and label variety from 5 to 100.
Search Space Reduction
The primary metric for success was the "average cluster size"—the number of candidates remaining after the decision tree filtering. The results were striking: while individual features provided some pruning, combining all three feature types reduced the search space to a constant average of just 2 candidates, regardless of the graph's size or complexity.
Complexity Inversion and Efficiency
A key insight from the study is "complexity inversion." Counter-intuitively, as graphs become larger or possess more unique labels, they become easier for the decision tree to classify. Larger graphs generate more unique "fingerprints" in their feature sets, allowing the C4.5 algorithm to build more precise paths. This is reflected in the tree depth; for databases with high label diversity, the depth of the decision tree actually decreases or stabilizes as the number of vertices increases.
Quantitatively, matching a 20-vertex graph against the 1,000-graph database took 20 seconds using a full search, but only 0.4 seconds using the C4.5 elimination method—a 50x speedup.
Conclusion and Future Work
By using information gain as an automated indexing mechanism, the C4.5 algorithm effectively discovers which graph characteristics are most discriminatory. While this study focuses on exact isomorphism, the efficiency of the "filter-then-verify" pipeline suggests it could be adapted for subgraph isomorphism or approximate matching. Future work may explore more complex features, such as vertex-edge chains, to maintain performance in even denser or more structurally similar databases.
Summary updated