Abstract
kProbLog is a simple algebraic extension of Prolog with facts and rules annotated with semiring labels. We propose kProbLog as a language for learning with kernels. kProbLog allows to elegantly specify systems of algebraic expressions on databases. We propose some code examples of gradually increasing complexity, we give a declarative specification of some matrix operations and an algorithm to solve linear systems. Finally we show the encodings of state-of-the-art graph kernels such as Weisfeiler-Lehman graph kernels, propagation kernels and an instance of Graph Invariant Kernels (GIKs), a recent framework for graph kernels with continuous attributes. The number of feature extraction schemas, that we can compactly specify in kProbLog, shows its potential for machine learning applications.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
A semiring is an algebraic structure \((\mathcal {S}, \oplus , \otimes , 0_S, 1_S)\) where \(\mathcal {S}\) is a set equipped with sum \(\oplus \) and product \(\otimes \) operations. Sum \(\oplus \) and product \(\otimes \) are associative and have as neutral element \(0_S\) and \(1_S\) respectively. The sum \(\oplus \) is commutative, multiplication distributes w.r.t addition and \(0_S\) is the annihilating element of multiplication.
- 2.
A \(\omega \)-continuous semiring is a naturally ordered semiring extended with an infinite summation-operator \(\sum \). The natural order relation \(\sqsubseteq \) on a semiring S is defined by \(a \sqsubseteq b \Leftrightarrow \exists d \in S : a + d = b\). The semiring S is naturally ordered if \(\sqsubseteq \) is a partial order on S; see [3, 4] for details.
- 3.
The directive declare/3 must be used instead of declare/2 whenever the groundings of the declared predicate appear in the cycles of the ground program. In case the directive declare/3 is not specified this can be detected by the system at evaluation time.
- 4.
The compilation of ProbLog programs [18] can be expressed in kProbLog, provided that the SDD semiring is used. The update of the algebraic weights must be additive, each update adds new proves for the ground atoms until convergence.
- 5.
We say that an atom a directly depends on an atom b if a is the head of a rule or a meta-clause and b is a body literal or an argument of a meta-function in the meta clause. We say that an atom a depends on an atom b either if a directly depends on b or there is an atom c such that a directly depends on c and c depends on b.
- 6.
Atoms of distinct semirings cannot be mutually dependent without using meta-clauses.
- 7.
The squared distance in the rbf kernel can be expressed by using the dot product, i.e. \(\Vert \mathcal {P} - \mathcal {Q}\Vert ^2 = \langle \mathcal {P}, \mathcal {P}\rangle + \langle \mathcal {Q}, \mathcal {Q}\rangle - 2\langle \mathcal {P}, \mathcal {Q}\rangle \).
References
De Raedt, L., Kimmig, A., Toivonen, H.: Problog: A probabilistic prolog and its application in link discovery. In: IJCAI (2007)
Eisner, J., Filardo, N.W.: Dyna: extending datalog for modern AI. In: de Moor, O., Gottlob, G., Furche, T., Sellers, A. (eds.) Datalog 2010. LNCS, vol. 6702, pp. 181–220. Springer, Heidelberg (2011)
Esparza, J., Luttenberger, M.: Solving fixed-point equations by derivation tree analysis. In: Corradini, A., Klin, B., Cîrstea, C. (eds.) CALCO 2011. LNCS, vol. 6859, pp. 19–35. Springer, Heidelberg (2011)
Esparza, J., Kiefer, S., Luttenberger, M.: An extension of newton’s method to \(\omega \)-continuous semirings. In: Harju, T., Karhumäki, J., Lepistö, A. (eds.) DLT 2007. LNCS, vol. 4588, pp. 157–168. Springer, Heidelberg (2007)
Esparza, J., Luttenberger, M., Schlund, M.: FPsolve: a generic solver for fixpoint equations over semirings. In: Holzer, M., Kutrib, M. (eds.) CIAA 2014. LNCS, vol. 8587, pp. 1–15. Springer, Heidelberg (2014)
Frasconi, P., Costa, F., De Raedt, L., De Grave, K.: kLog: A language for logical and relational learning with kernels. In: Artificial Intelligence (2014)
Green, T.J., Karvounarakis, G., Tannen, V.: Provenance semirings. In: Proceedings of the 26th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of database systems. ACM (2007)
Kim, M., Candan, K.S.: Approximate tensor decomposition within a tensor-relational algebraic framework. In: Proceedings of the 20th ACM International Conference on Information and Knowledge Management. ACM (2011)
Kimmig, A., Van den Broeck, G., De Raedt, L.: An algebraic prolog for reasoning about possible worlds. In: 25th AAAI Conference on Artificial Intelligence (2011)
Landwehr, N., Passerini, A., De Raedt, L., Frasconi, P.: kFOIL: Learning simple relational kernels. In: AAAI (2006)
Lehmann, D.J.: Algebraic structures for transitive closure. In: Theoretical Computer Science (1977)
Neumann, M., Patricia, N., Garnett, R., Kersting, K.: Efficient graph kernels by randomization. In: Flach, P.A., Bie, T., Cristianini, N. (eds.) ECML PKDD 2012, Part I. LNCS, vol. 7523, pp. 378–393. Springer, Heidelberg (2012)
Orsini, F., Frasconi, P., De Raedt, L.: Graph invariant kernels. In: Proceedings of the 24th IJCAI (2015)
Ross Quinlan, J.: Learning logical definitions from relations. Mach. Learn. 5(3), 239–266 (1990)
Richardson, M., Domingos, P.: Markov logic networks. Machine Learning (2006)
Sato, T., Kameya, Y.: PRISM: a language for symbolic-statistical modeling. In: IJCAI (1997)
Shervashidze, N., Schweitzer, P., Van Leeuwen, E.J., Mehlhorn, K., Borgwardt, K.M.: Weisfeiler-lehman graph kernels. J. Mach. Learn. Res. 12, 2539–2561 (2011)
Vlasselaer, J., Van den Broeck, G., Kimmig, A., Meert, W., De Raedt, L.: Anytime inference in probabilistic logic programs with tp-compilation. In: Proceedings of the 24th IJCAI (2015)
Whaley, J., Avots, D., Carbin, M., Lam, M.S.: Using datalog with binary decision diagrams for program analysis. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 97–118. Springer, Heidelberg (2005)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Orsini, F., Frasconi, P., De Raedt, L. (2016). kProbLog: An Algebraic Prolog for Kernel Programming. In: Inoue, K., Ohwada, H., Yamamoto, A. (eds) Inductive Logic Programming. ILP 2015. Lecture Notes in Computer Science(), vol 9575. Springer, Cham. https://doi.org/10.1007/978-3-319-40566-7_11
Download citation
DOI: https://doi.org/10.1007/978-3-319-40566-7_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-40565-0
Online ISBN: 978-3-319-40566-7
eBook Packages: Computer ScienceComputer Science (R0)