Skip to main content

A Neighborhood Encoding for Subgraph Queries in Graph Databases

  • Conference paper
  • First Online:
Database and Expert Systems Applications (DEXA 2023)

Abstract

Subgraph isomorphism search is a fundamental problem in querying graph-like structured data. It consists to enumerate the subgraphs of a data graph that match a query graph. It is an NP-complete problem that knows several investigations. Most of them extend Ullmann’s backtracking algorithm and rely on filtering and pruning mechanisms to reduce the search space. Most of these solutions focus on how to alleviate the searching step of the algorithm, identified as the most costly part, with various techniques and data structures. However, little effort is devoted to reduce the cost of the filtering step. In this paper, we take a completely different approach that relies on a constant time pruning mechanism while keeping Ullman’s backtracking subgraph search subroutine. The main idea is to aggregate the semantic and topological information that surround a vertex into a simple integer. This simple neighbourhood encoding reduces the time complexity of vertex filtering from cubic to quadratic. We evaluate our approach on several real-word datasets and compare it with the state of the art algorithms.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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

Institutional subscriptions

Notes

  1. 1.

    The source code of the two algorithms is available on Git and will be provided.

  2. 2.

    Stanford Network Analysis Platform. http://snap.stanford.edu/.

  3. 3.

    https://gmplib.org/.

References

  1. Bhattarai, B., Liu, H., Huang, H.H.: CECI: compact embedding cluster index for scalable subgraph matching. In: Proceedings of the 2019 International Conference on Management of Data, SIGMOD 2019, pp. 1447–1462. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3299869.3300086

  2. Bi, F., Chang, L., Lin, X., Qin, L., Zhang, W.: Efficient subgraph matching by postponing cartesian products. In: Proceedings of the 2016 International Conference on Management of Data, SIGMOD 2016, pp. 1199–1214 (2016)

    Google Scholar 

  3. Bonnici, V., Giugno, R., Pulvirenti, A., Shasha, D., Ferro, A.: A subgraph isomorphism algorithm and its application to biochemical data. BMC Bioinform. 14(Suppl 7), S13 (2013)

    Article  Google Scholar 

  4. Carletti, V., Foggia, P., Saggese, A., Vento, M.: Challenging the time complexity of exact subgraph isomorphism for huge and dense graphs with VF3. IEEE Trans. Pattern Anal. Mach. Intell. 40(4), 804–818 (2018). https://doi.org/10.1109/TPAMI.2017.2696940

    Article  Google Scholar 

  5. Cordella, L.P., Foggia, P., Sansone, C., Vento, M.: A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans. Pattern Anal. Mach. Intell. 26, 1367–1372 (2004)

    Article  Google Scholar 

  6. Han, M., Kim, H., Gu, G., Park, K., Han, W.S.: Efficient subgraph matching: harmonizing dynamic programming, adaptive matching order, and failing set together. In: Proceedings of the 2019 International Conference on Management of Data, SIGMOD 2019, pp. 1429–1446. Association for Computing Machinery, New York (2019). https://doi.org/10.1145/3299869.3319880

  7. Han, W.S., Lee, J., Lee, J.H.: Turboiso: towards ultrafast and robust subgraph isomorphism search in large graph databases. In: ACM SIGMOD International Conference on Management of Data, pp. 337–348. SIGMOD 2013 (2013)

    Google Scholar 

  8. He, H., Singh, A.K.: Graphs-at-a-time: query language and access methods for graph databases. In: ACM SIGMOD International Conference on Management of Data, SIGMOD 2008, pp. 405–418 (2008)

    Google Scholar 

  9. Katsarou, F., Ntarmoset, N., Triantafillou, P.: Subgraph querying with parallel use of query rewritings and alternative algorithms. In: EDBT (2017)

    Google Scholar 

  10. Kim, H., Choi, Y., Park, K., Lin, X., Hong, S.H., Han, W.S.: Versatile equivalences: speeding up subgraph query processing and subgraph matching. In: Proceedings of the 2021 International Conference on Management of Data, SIGMOD 2021, pp. 925–937 (2021). https://doi.org/10.1145/3448016.3457265

  11. Lee, J., Han, W.S., Kasperovics, R., Lee, J.H.: An in-depth comparison of subgraph isomorphism algorithms in graph databases. In: 39th International Conference on Very Large Data Bases, pp. 133–144 (2013)

    Google Scholar 

  12. Ren, X., Wang, J.: Exploiting vertex relationships in speeding up subgraph isomorphism over large graphs. Proc. VLDB Endow. 8(5), 617–628 (2015)

    Article  Google Scholar 

  13. Shang, H., Zhang, Y., Lin, X., Yu, J.X.: Taming verification hardness: an efficient algorithm for testing subgraph isomorphism. Proc. VLDB Endow. 1(1), 364–375 (2008)

    Article  Google Scholar 

  14. Stein, S.K.: Mathematics: The Man-Made Universe. McGraw-Hill, New York (1999). Dover Publications; 3rd Revised edn. (21 March 2013)

    Google Scholar 

  15. Ullmann, J.R.: An algorithm for subgraph isomorphism. J. ACM 23(1), 31–42 (1976)

    Article  MathSciNet  Google Scholar 

  16. Zeng, L., Jiang, Y., Lu, W., Zou, L.: Deep analysis on subgraph isomorphism (2021)

    Google Scholar 

  17. Zhang, S., Li, S., Yang, J.: GADDI: distance index based subgraph matching in biological networks. In: EDBT 2009, pp. 192–203 (2009)

    Google Scholar 

  18. Zhao, P., Han, J.: On graph query optimization in large networks. PVLDB 3(1), 340–351 (2010)

    Google Scholar 

  19. Zhu, G., Lin, X., Zhu, K., Zhang, W., Yu, J.X.: TreeSpan efficiently computing similarity all-matching. In: Proceedings of the 2012 ACM SIGMOD International Conference on Management of Data, SIGMOD 2012, pp. 529–540 (2012)

    Google Scholar 

Download references

Acknowledgements

This work is funded by the French National Research Agency under grant ANR-20-CE23-0002 and INFO-Bourg department, IUT Lyon 1.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hamida Seba .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Nabti, C.E., Mecharnia, T., Boukhetta, S.E., Amrouche, K., Seba, H. (2023). A Neighborhood Encoding for Subgraph Queries in Graph Databases. In: Strauss, C., Amagasa, T., Kotsis, G., Tjoa, A.M., Khalil, I. (eds) Database and Expert Systems Applications. DEXA 2023. Lecture Notes in Computer Science, vol 14146. Springer, Cham. https://doi.org/10.1007/978-3-031-39847-6_30

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-39847-6_30

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-39846-9

  • Online ISBN: 978-3-031-39847-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics