Flexible Graph Matching and Graph Edit Distance Using Answer Set Programming
The graph isomorphism, subgraph isomorphism, and graph edit distance problems are combinatorial problems with many applications. Heuristic exact and approximate algorithms for each of these problems have been developed for different kinds of graphs: directed, undirected, labeled, etc. However, additional work is often needed to adapt such algorithms to different classes of graphs, for example to accommodate both labels and property annotations on nodes and edges. In this paper, we propose an approach based on answer set programming. We show how each of these problems can be defined for a general class of property graphs with directed edges, and labels and key-value properties annotating both nodes and edges. We evaluate this approach on a variety of synthetic and realistic graphs, demonstrating that it is feasible as a rapid prototyping approach.
Effort sponsored by the Air Force Office of Scientific Research, Air Force Material Command, USAF, under grant number FA8655-13-1-3006. The U.S. Government and University of Edinburgh are authorised to reproduce and distribute reprints for their purposes notwithstanding any copyright notation thereon. Cheney was also supported by ERC Consolidator Grant Skye (grant number 682315). This material is based upon work supported by the Defense Advanced Research Projects Agency (DARPA) under contract FA8650-15-C-7557.
- 2.Abu-Aisheh, Z., Raveaux, R., Ramel, J.-Y., Martineau, P.: An exact graph edit distance algorithm for solving pattern recognition problems. In: Proceedings of the International Conference on Pattern Recognition Applications and Methods (ICPRAM 2015), pp. 271–278 (2015)Google Scholar
- 7.Chan, S.C., Cheney, J.: Flexible graph matching and graph edit distance using answer set programming (extended version). CoRR, abs/1911.11584 (2019)Google Scholar
- 8.Chan, S.C., et al.: ProvMark: a provenance expressiveness benchmarking system. In: Proceedings of the 20th International Middleware Conference (Middlware 2019), pp. 268–279. ACM (2019)Google Scholar
- 16.Lee, J., Han, W.-S., Kasperovics, R., Lee, J.-H.: An in-depth comparison of subgraph isomorphism algorithms in graph databases. PVLDB 6(2), 133–144 (2012)Google Scholar
- 20.Pasquier, T., et al.: Practical whole-system provenance capture. In: Proceedings of the 2017 Symposium on Cloud Computing (SoCC 2017), pp. 405–418 (2017)Google Scholar