In graph theory and pattern matching, researchers traditionally face a binary choice: look for an exact copy of a pattern (Subgraph Isomorphism) or identify the largest possible shared structure between two graphs (Maximum Common Subgraph). While Subgraph Isomorphism (SI) is computationally efficient, it is brittle—failing if even a single vertex or edge differs. Conversely, the Maximum Common Subgraph (MCS) problem is flexible but computationally expensive, often failing on graphs with more than 40 vertices due to extreme memory and time requirements.
In their AAAI-17 paper, researchers from the University of Glasgow introduce a middle ground: the $k$-less subgraph isomorphism. By asking if a pattern can be found if up to $k$ vertices are deleted, they provide a scalable solution for "almost-exact" matches on graphs with thousands of vertices.
The $k$-less Subgraph Isomorphism Problem
The $k$-less subgraph isomorphism problem bridges the gap between rigid exact matching and expensive MCS searches. In many real-world applications, such as computer vision or bioinformatics, a pattern is expected to be present but might be slightly altered or obscured. Standard SI solvers would return no match, while MCS solvers would struggle with the graph's scale.
By defining the problem as finding a subgraph of $P$ with at least $|V(P)| - k$ vertices that is isomorphic to a subgraph of $T$, the authors create a framework that can handle "almost-matches" on graphs 100x larger than previous state-of-the-art MCS methods could manage.
Methods: Weakening Invariants for Efficiency
The core innovation of this work lies in adapting fast bit-parallel constraint programming algorithms by weakening standard pruning invariants. In standard SI, invariants are properties that must hold for a match to be possible, such as the requirement that a pattern vertex $p$ can only map to a target vertex $t$ if $deg(p) \leq deg(t)$.
To accommodate $k$ potential deletions, the authors redefined these invariants:
- Degree Filtering: A match is only possible if $deg(p) - k \leq deg(t)$.
- Neighbourhood Degree Sequences (NDS): This sophisticated technique analyzes the degrees of a vertex's neighbors, allowing for $k$ "missing" or weakened connections.
- Path-Based Filtering: For paths of length 2, the number of paths between two points in the pattern minus $k$ must be less than or equal to the paths in the target.
These weakened rules are implemented using bit-parallelism, allowing the solver to check multiple potential vertex mappings simultaneously using hardware-level bitwise operations.
Key Results and Scalability
The researchers evaluated their algorithm on a massive suite of 5,725 instances, including scale-free graphs, real-world domains, and 3D meshes with up to 6,671 vertices.
- Efficiency: The algorithm remained practical even at $k=5$, where the search space is significantly larger than in exact SI.
- Memory Management: By avoiding the $O(V^4)$ memory-intensive "clique encoding" used by many MCS solvers, the algorithm successfully processed instances where other solvers crashed.
- Top-Down MCS: The authors discovered that the MCS problem can be solved "top-down" by iteratively increasing $k$ from 0 until a match is found. This approach proved to be the strongest solver on standard benchmarks, outperforming specialized clique-based and constraint-based MCS solvers.
Conclusion
The $k$-less subgraph isomorphism provides a powerful new tool for graph matching. By relaxing the constraints of exact isomorphism just enough to allow for minor discrepancies, the researchers have unlocked the ability to find patterns in large-scale, real-world data that were previously too complex for flexible matching algorithms.
Summary updated