Skip to main content

Flexible Graph Matching and Graph Edit Distance Using Answer Set Programming

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12007))

Abstract

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    https://potassco.org/clingo/run/.

References

  1. Abu-Aisheh, Z., et al.: Graph edit distance contest: results and future challenges. Pattern Recogn. Lett. 100, 96–103 (2017)

    Article  Google Scholar 

  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 

  3. Abu-Aisheh, Z., Raveaux, R., Ramel, J.-Y., Martineau, P.: A parallel graph edit distance algorithm. Expert Syst. Appl. 94, 41–57 (2018)

    Article  Google Scholar 

  4. Arvind, V., Torán, J.: Isomorphism testing: perspectives and open problems. Bull. EATCS 86, 66–84 (2005)

    MathSciNet  MATH  Google Scholar 

  5. Auer, S., Bizer, C., Kobilarov, G., Lehmann, J., Cyganiak, R., Ives, Z.: DBpedia: a nucleus for a web of open data. In: Aberer, K., et al. (eds.) ASWC/ISWC -2007. LNCS, vol. 4825, pp. 722–735. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-76298-0_52

    Chapter  Google Scholar 

  6. Bunke, H.: On a relation between graph edit distance and maximum common subgraph. Pattern Recogn. Lett. 18(8), 689–694 (1997)

    Article  MathSciNet  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 

  9. Chen, X., Huo, H., Huan, J., Vitter, J.S.: An efficient algorithm for graph edit distance computation. Knowl.-Based Syst. 163, 762–775 (2019)

    Article  Google Scholar 

  10. Frank, M., Codish, M.: Logic programming with graph automorphism: integrating nauty with prolog (tool description). TPLP 16(5–6), 688–702 (2016)

    MathSciNet  MATH  Google Scholar 

  11. Gao, X., Xiao, B., Tao, D., Li, X.: A survey of graph edit distance. Pattern Anal. Appl. 13(1), 113–129 (2010)

    Article  MathSciNet  Google Scholar 

  12. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, New York (1979)

    MATH  Google Scholar 

  13. Gebser, M., et al.: The potsdam answer set solving collection 5.0. KI-Künstliche Intelligenz 32(2–3), 181–182 (2018)

    Article  Google Scholar 

  14. Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T., Schneider, M.T.: Potassco: the Potsdam answer set solving collection. AI Commun. 24(2), 107–124 (2011)

    Article  MathSciNet  Google Scholar 

  15. Kazius, J., McGuire, R., Bursi, R.: Derivation and validation of toxicophores for mutagenicity prediction. J. Med. Chem. 48(1), 312–320 (2005)

    Article  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 

  17. Lerouge, J., Abu-Aisheh, Z., Raveaux, R., Héroux, P., Adam, S.: New binary linear programming formulation to compute the graph edit distance. Pattern Recogn. 72, 254–265 (2017)

    Article  Google Scholar 

  18. McKay, B.D.: Practical graph isomorphism. Congressus Numerantium 30, 45–87 (1981)

    MathSciNet  MATH  Google Scholar 

  19. McKay, B.D., Piperno, A.: Practical graph isomorphism, II. J. Symb. Comput. 60, 94–112 (2014)

    Article  MathSciNet  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 

  21. Riesen, K.: Structural Pattern Recognition with Graph Edit Distance - Approximation Algorithms and Applications. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-27252-8

    Book  MATH  Google Scholar 

  22. Zampelli, S., Deville, Y., Dupont, P.: Approximate constrained subgraph matching. In: Proceedings of the 11th International Conference on Principles and Practice of Constraint Programming (CP 2005), pp. 832–836 (2005)

    Chapter  Google Scholar 

Download references

Acknowledgments

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to James Cheney .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chan, S.C., Cheney, J. (2020). Flexible Graph Matching and Graph Edit Distance Using Answer Set Programming. In: Komendantskaya, E., Liu, Y. (eds) Practical Aspects of Declarative Languages. PADL 2020. Lecture Notes in Computer Science(), vol 12007. Springer, Cham. https://doi.org/10.1007/978-3-030-39197-3_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-39197-3_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-39196-6

  • Online ISBN: 978-3-030-39197-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics