Skip to main content

SparkKG-ML: A Library to Facilitate End–to–End Large–Scale Machine Learning Over Knowledge Graphs in Python

  • Conference paper
  • First Online:
The Semantic Web – ISWC 2024 (ISWC 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 15233))

Included in the following conference series:

  • 287 Accesses

Abstract

This paper presents SparkKG–ML, the first open–source library for Machine Learning at scale over semantic data stored in Knowledge Graphs directly in Python. SparkKG–ML serves as a bridge between (i) the Semantic Web data model, (ii) the distributed computing capabilities of Apache Spark, and (iii) the Python ecosystem. By harnessing the flexibility of Python and the scalability of Spark, SparkKG–ML reduces the barriers for Data Scientists and Machine Learning researchers to work with semantic data, and for Semantic Web experts to develop Machine Learning models.

Resource Type: Software

Repository: https://github.com/IDIASLab/SparkKG-ML

License: Apache License 2.0

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Similar content being viewed by others

Notes

  1. 1.

    https://spark.apache.org/docs/latest/sql-programming-guide.html.

  2. 2.

    https://www.tiobe.com/tiobe-index/.

  3. 3.

    https://spark.apache.org/docs/latest/api/python/.

  4. 4.

    https://github.com/RDFLib/rdflib.

  5. 5.

    https://github.com/RDFLib/sparqlwrapper.

  6. 6.

    https://flink.apache.org.

  7. 7.

    https://scikit-learn.org/stable/.

  8. 8.

    https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html.

  9. 9.

    https://www.databricks.com.

  10. 10.

    https://github.com/SANSA-Stack/SANSA-Databricks.

  11. 11.

    https://www.oracle.com/cloud/.

  12. 12.

    https://github.com/IDIASLab/SparkKG-ML.

  13. 13.

    https://developer.imdb.com/non-commercial-datasets/.

  14. 14.

    https://github.com/SANSA-Stack/SANSA-Stack/releases/tag/v0.8.1_DistRDF2ML.

  15. 15.

    https://github.com/IDIASLab/SparkKG-ML/tree/main/experiments.

  16. 16.

    https://github.com/IDIASLab/SparkKG-ML.

  17. 17.

    https://pypi.org/project/sparkkgml/.

  18. 18.

    https://sparkkgml.readthedocs.io/en/latest/index.html.

  19. 19.

    The number of downloads has been computed using a Google BigQuery as described in https://packaging.python.org/en/latest/guides/analyzing-pypi-package-downloads/.

  20. 20.

    https://github.com/IDIASLab/SparkKG-ML.

  21. 21.

    https://pypi.org/project/sparkkgml/.

  22. 22.

    https://sparkkgml.readthedocs.io/en/latest/index.html.

References

  1. 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 

  2. Belcao, M., Falzone, E., Bionda, E., Valle, E.D.: Chimera: a bridge between big data analytics and semantic technologies. In: Hotho, A., et al. (eds.) ISWC 2021. LNCS, vol. 12922, pp. 463–479. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-88361-4_27

    Chapter  Google Scholar 

  3. Bucher, T.-C., Jiang, X., Meyer, O., Waitz, S., Hertling, S., Paulheim, H.: scikit-learn pipelines meet knowledge graphs. In: Verborgh, R., et al. (eds.) ESWC 2021. LNCS, vol. 12739, pp. 9–14. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-80418-3_2

    Chapter  Google Scholar 

  4. Chelmis, C., Gergin, B.: A knowledge graph for semantic-driven healthiness evaluation of recipes. Semant. Web J. (2021). https://www.semantic-web-journal.net/content/knowledge-graph-semantic-driven-healthiness-evaluation-online-recipes

  5. Chelmis, C., Gergin, B.: A Knowledge graph for semantic-driven healthiness evaluation of online recipes. (2022). https://doi.org/10.7910/DVN/99PNJ5

  6. Dai, J.J., et al.: BigDL: a distributed deep learning framework for big data. In: Proceedings of the ACM Symposium on Cloud Computing, pp. 50–60. SoCC ’19, Association for Computing Machinery, New York, NY, USA (2019). https://doi.org/10.1145/3357223.3362707

  7. Draschner, C.F., Stadler, C., Bakhshandegan Moghaddam, F., Lehmann, J., Jabeen, H.: DistRDF2ML - scalable distributed in-memory machine learning pipelines for RDF knowledge graphs. In: Proceedings of the 30th ACM International Conference on Information and Knowledge Management, pp. 4465–4474. CIKM ’21, Association for Computing Machinery, New York, NY, USA (2021). https://doi.org/10.1145/3459637.3481999

  8. Fafalios, P., Iosifidis, V., Ntoutsi, E., Dietze, S.: TweetsKB: a public and large-scale RDF corpus of annotated tweets. In: Gangemi, A., et al. (eds.) ESWC 2018. LNCS, vol. 10843, pp. 177–190. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93417-4_12

    Chapter  Google Scholar 

  9. Hassanzadeh, O., Consens, M.P.: Linked movie data base. In: LDOW (2009). https://api.semanticscholar.org/CorpusID:16810971

  10. Lehmann, J., et al.: Distributed semantic analytics using the SANSA stack. In: International Workshop on the Semantic Web (2017)

    Google Scholar 

  11. Meng, X., et al.: MLlib: machine learning in apache spark. J. Mach. Learn. Res. 17(1), 1235–1241 (2016)

    Google Scholar 

  12. N, T.R., Gupta, R.: Feature selection techniques and its importance in machine learning: a survey. In: 2020 IEEE International Students’ Conference on Electrical,Electronics and Computer Science (SCEECS), pp. 1–6 (2020). https://doi.org/10.1109/SCEECS48394.2020.189

  13. Paulheim, H.: Machine learning with and for semantic web knowledge graphs. In: Reasoning Web (2018)

    Google Scholar 

  14. Steenwinckel, B., Vandewiele, G., Agozzino, T., Ongenae, F.: pyRDF2Vec: a python implementation and extension of RDF2Vec. In: Pesquita, C., et al. (eds.) The Semantic Web. LNCS, pp. 471–483. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-33455-9_28

    Chapter  MATH  Google Scholar 

  15. Svetashova, Y.: Ontology-enhanced machine learning: a Bosch use case of welding quality monitoring. In: Pan, J.Z., et al. (eds.) ISWC 2020. LNCS, vol. 12507, pp. 531–550. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-62466-8_33

    Chapter  MATH  Google Scholar 

  16. Tian, L., Zhou, X., Wu, Y.P., Zhou, W.T., Zhang, J.H., Zhang, T.S.: Knowledge graph and knowledge reasoning: a systematic review. J. Electron. Sci. Technol. 20(2), 100159 (2022). https://doi.org/10.1016/j.jnlest.2022.100159

    Article  MATH  Google Scholar 

  17. Tiddi, I., Schlobach, S.: Knowledge graphs as tools for explainable machine learning: a survey. Artif. Intell. 302, 103627 (2022). https://doi.org/10.1016/j.artint.2021.103627

    Article  MathSciNet  MATH  Google Scholar 

  18. Vrandečić, D., Krötzsch, M.: Wikidata: a free collaborative knowledgebase. Commun. ACM 57(10), 78–85 (2014). https://doi.org/10.1145/2629489

  19. Zaharia, M., et al.: Apache spark: a unified engine for big data processing. Commun. ACM 59(11), 56–65 (2016). https://doi.org/10.1145/2934664

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Charalampos Chelmis .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 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

Gergin, B., Chelmis, C. (2025). SparkKG-ML: A Library to Facilitate End–to–End Large–Scale Machine Learning Over Knowledge Graphs in Python. In: Demartini, G., et al. The Semantic Web – ISWC 2024. ISWC 2024. Lecture Notes in Computer Science, vol 15233. Springer, Cham. https://doi.org/10.1007/978-3-031-77847-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-77847-6_1

  • Published:

  • Publisher Name: Springer, Cham

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics