Abstract
A long-standing ambition in artificial intelligence is to integrate predictors’ inductive features (i.e., learning from examples) with deductive capabilities (i.e., drawing inferences from symbolic knowledge). Many methods in the literature support injection of symbolic knowledge into predictors, generally following the purpose of attaining better (i.e., more effective or efficient w.r.t. predictive performance) predictors. However, to the best of our knowledge, running implementations of these algorithms are currently either proof of concepts or unavailable in most cases. Moreover, a unified, coherent software framework supporting them as well as their interchange, comparison, and exploitation in arbitrary ML workflows is currently missing. Accordingly, in this paper we present the design of PSyKI, a platform providing general-purpose support to symbolic knowledge injection into predictors via different algorithms. In particular, we discuss the overall architecture, and the many components/functionalities of PSyKI, invidually—providing examples as well. We finally demonstrate the versatility of our approach by exemplifying two custom injection algorithms in a toy scenario: Poker Hands classification.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We stick to the authors’ dataset split – which is unusual, as the test set is far greater than the training set – since we are interested in testing whether SKI actually deals with the shortage of training data.
References
Abadi, M., et al.: TensorFlow: large-scale machine learning on heterogeneous systems (2015). https://www.tensorflow.org/
Ajtai, M., Gurevich, Y.: Datalog vs first-order logic. J. Comput. Syst. Sci. 49(3), 562–588 (1994). https://doi.org/10.1016/S0022-0000(05)80071-6
Bader, S., d’Avila Garcez, A.S., Hitzler, P.: Computing first-order logic programs by fibring artificial neural networks. In: Russell, I., Markov, Z. (eds.) Proceedings of the Eighteenth International Florida Artificial Intelligence Research Society Conference, Clearwater Beach, Florida, USA, pp. 314–319. AAAI Press (2005). http://www.aaai.org/Library/FLAIRS/2005/flairs05-052.php
Badreddine, S., d’Avila Garcez, A., Serafini, L., Spranger, M.: Logic tensor networks. Artif. Intell. 303, 103649 (2022). https://doi.org/10.1016/j.artint.2021.103649
Ballard, D.H.: Parallel logical inference and energy minimization. In: Kehler, T. (ed.) Proceedings of the 5th National Conference on Artificial Intelligence. Philadelphia, PA, USA, 11–15 August 1986. Volume 1: Science. pp. 203–209. Morgan Kaufmann (1986). http://www.aaai.org/Library/AAAI/1986/aaai86-033.php
Besold, T.R., et al.: Neural-symbolic learning and reasoning: a survey and interpretation. CoRR abs/1711.03902 (2017). http://arxiv.org/abs/1711.03902
Calegari, R., Ciatto, G., Omicini, A.: On the integration of symbolic and sub-symbolic techniques for XAI: a survey. Intell. Artif. 14(1), 7–32 (2020). https://doi.org/10.3233/IA-190036
Cattral, R., Oppacher, F.: Poker hand data set, UCI machine learning repository (2007). https://archive.ics.uci.edu/ml/datasets/Poker+Hand
Chang, M., Ratinov, L., Roth, D.: Guiding semi-supervision with constraint-driven learning. In: Carroll, J.A., van den Bosch, A., Zaenen, A. (eds.) ACL 2007, Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics, 23–30 June 2007, Prague, Czech Republic. The Association for Computational Linguistics (2007). https://aclanthology.org/P07-1036/
Demeester, T., Rocktäschel, T., Riedel, S.: Lifted rule injection for relation embeddings. In: Su, J., Carreras, X., Duh, K. (eds.) Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), Austin, Texas, USA, 1–4 November 2016, pp. 1389–1399. The Association for Computational Linguistics (2016). https://doi.org/10.18653/v1/d16-1146
Diligenti, M., Gori, M., Saccà, C.: Semantic-based regularization for learning and inference. Artif. Intell. 244, 143–165 (2017). https://doi.org/10.1016/j.artint.2015.08.011
Diligenti, M., Roychowdhury, S., Gori, M.: Integrating prior knowledge into deep learning. In: Chen, X., Luo, B., Luo, F., Palade, V., Wani, M.A. (eds.) 16th IEEE International Conference on Machine Learning and Applications, ICMLA 2017, Cancun, Mexico, 18–21 December 2017, pp. 920–923. IEEE (2017). https://doi.org/10.1109/ICMLA.2017.00-37
Evans, R., Grefenstette, E.: Learning explanatory rules from noisy data. J. Artif. Intell. Res. 61, 1–64 (2018). https://doi.org/10.1613/jair.5714
d’Avila Garcez, A.S., Gabbay, D.M.: Fibring neural networks. In: McGuinness, D.L., Ferguson, G. (eds.) Proceedings of the Nineteenth National Conference on Artificial Intelligence, Sixteenth Conference on Innovative Applications of Artificial Intelligence, 25–29 July 2004, San Jose, California, USA, pp. 342–347. AAAI Press/The MIT Press (2004). http://www.aaai.org/Library/AAAI/2004/aaai04-055.php
d’Avila Garcez, A.S., Zaverucha, G.: The connectionist inductive learning and logic programming system. Appl. Intell. 11(1), 59–77 (1999). https://doi.org/10.1023/A:1008328630915
Guidotti, R., Monreale, A., Ruggieri, S., Turini, F., Giannotti, F., Pedreschi, D.: A survey of methods for explaining black box models. ACM Comput. Surv. 51(5), 93:1–93:42 (2019). https://doi.org/10.1145/3236009
Guo, S., Wang, Q., Wang, L., Wang, B., Guo, L.: Jointly embedding knowledge graphs and logical rules. In: Su, J., Carreras, X., Duh, K. (eds.) Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), Austin, Texas, USA, 1–4 November 2016, pp. 192–202. The Association for Computational Linguistics (2016). https://doi.org/10.18653/v1/d16-1019
Harris, C.R., et al.: Array programming with NumPy. Nature 585(7825), 357–362 (2020). https://doi.org/10.1038/s41586-020-2649-2
Hay, L.S.: Axiomatization of the infinite-valued predicate calculus. J. Symb. Log. 28(1), 77–86 (1963). http://www.jstor.org/stable/2271339
Hu, Z., Ma, X., Liu, Z., Hovy, E.H., Xing, E.P.: Harnessing deep neural networks with logic rules. In: Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, 7–12 August 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics (2016). https://doi.org/10.18653/v1/p16-1228
Hu, Z., Yang, Z., Salakhutdinov, R., Xing, E.P.: Deep neural networks with massive learned knowledge. In: Su, J., Carreras, X., Duh, K. (eds.) Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, 1–4 November 2016, pp. 1670–1679. The Association for Computational Linguistics (2016). https://doi.org/10.18653/v1/d16-1173
Lipton, Z.C.: The mythos of model interpretability. Commun. ACM 61(10), 36–43 (2018). https://doi.org/10.1145/3233231
Marra, G., Giannini, F., Diligenti, M., Gori, M.: LYRICS: a general interface layer to integrate logic inference and deep learning. In: Brefeld, U., Fromont, E., Hotho, A., Knobbe, A., Maathuis, M., Robardet, C. (eds.) ECML PKDD 2019, Part II. LNCS (LNAI), vol. 11907, pp. 283–298. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-46147-8_17
McKinney, W.: Data structures for statistical computing in python. In: van der Walt, S., Millman, J. (eds.) Proceedings of the 9th Python in Science Conference, pp. 56–61 (2010). https://doi.org/10.25080/Majora-92bf1922-00a
Parr, T.: The Definitive ANTLR 4 Reference. Pragmatic Bookshelf (2013)
Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)
Sabbatini, F., Ciatto, G., Calegari, R., Omicini, A.: On the design of PSyKE: a platform for symbolic knowledge extraction. In: Calegari, R., Ciatto, G., Denti, E., Omicini, A., Sartor, G. (eds.) Proceedings of the 22nd Workshop “From Objects to Agents”, Bologna, Italy, 1–3 September 2021. CEUR Workshop Proceedings, vol. 2963, pp. 29–48. CEUR-WS.org (2021). http://ceur-ws.org/Vol-2963/./paper14.pdf
Sourek, G., Aschenbrenner, V., Zelezný, F., Schockaert, S., Kuzelka, O.: Lifted relational neural networks: efficient learning of latent relational structures. J. Artif. Intell. Res. 62, 69–100 (2018). https://doi.org/10.1613/jair.1.11203
Towell, G.G., Shavlik, J.W., Noordewier, M.O.: Refinement of approximate domain theories by knowledge-based neural networks. In: Shrobe, H.E., Dietterich, T.G., Swartout, W.R. (eds.) Proceedings of the 8th National Conference on Artificial Intelligence. Boston, Massachusetts, USA, 29 July–3 August 1990, 2 Volumes, pp. 861–866. AAAI Press/The MIT Press (1990). http://www.aaai.org/Library/AAAI/1990/aaai90-129.php
Tresp, V., Hollatz, J., Ahmad, S.: Network structuring and training using rule-based knowledge. In: Hanson, S.J., Cowan, J.D., Giles, C.L. (eds.) Advances in Neural Information Processing Systems 5, [NIPS Conference, Denver, Colorado, USA, 30 November–3 December 1992], pp. 871–878. Morgan Kaufmann (1992). http://papers.nips.cc/paper/638-network-structuring-and-training-using-rule-based-knowledge
Xie, Y., Xu, Z., Meel, K.S., Kankanhalli, M.S., Soh, H.: Embedding symbolic knowledge into deep networks. In: Wallach, H.M., Larochelle, H., Beygelzimer, A., d’Alché-Buc, F., Fox, E.B., Garnett, R. (eds.) Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8–14 December 2019, Vancouver, BC, Canada, pp. 4235–4245 (2019). https://proceedings.neurips.cc/paper/2019/hash/7b66b4fd401a271a1c7224027ce111bc-Abstract.html
Xu, J., Zhang, Z., Friedman, T., Liang, Y., Van den Broeck, G.: A semantic loss function for deep learning with symbolic knowledge. In: Dy, J.G., Krause, A. (eds.) Proceedings of the 35th International Conference on Machine Learning (ICML), Stockholmsmässan, Stockholm, Sweden, 10–15 July 2018. Proceedings of Machine Learning Research, vol. 80, pp. 5498–5507. PMLR (2018). http://proceedings.mlr.press/v80/xu18h.html
Acknowledgments
This paper is partially supported by the CHIST-ERA IV project CHIST-ERA-19-XAI-005, co-funded by EU and the Italian MUR (Ministry for University and Research).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Magnini, M., Ciatto, G., Omicini, A. (2022). On the Design of PSyKI: A Platform for Symbolic Knowledge Injection into Sub-symbolic Predictors. In: Calvaresi, D., Najjar, A., Winikoff, M., Främling, K. (eds) Explainable and Transparent AI and Multi-Agent Systems. EXTRAAMAS 2022. Lecture Notes in Computer Science(), vol 13283. Springer, Cham. https://doi.org/10.1007/978-3-031-15565-9_6
Download citation
DOI: https://doi.org/10.1007/978-3-031-15565-9_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-15564-2
Online ISBN: 978-3-031-15565-9
eBook Packages: Computer ScienceComputer Science (R0)