Abstract
We propose a method for computing supported models of normal logic programs in vector spaces using gradient information. First, the program is translated into a definite program and embedded into a matrix representing the program. We introduce a loss function based on the implementation of the immediate consequence operator \(T_P\) by matrix-vector multiplication with a suitable thresholding function, and we incorporate regularization terms into the loss function to avoid undesirable results. The proposed thresholding operation is an almost everywhere differentiable alternative to the non-linear thresholding operation. We report the results of several experiments where our method shows promising performance when used with adaptive gradient update.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
\(\gamma ^{\bot }\) is an upper bound on false values that variables can take, and \(\gamma ^{\top }\) is a lower bound on true values. \(\gamma =\frac{n}{n+1}\) where n is the length of the longest positive part in the rules, and \(\tau \) was estimated as described [2].
References
Apt, K.R., Blair, H.A., Walker, A.: Towards a theory of declarative knowledge. In: Foundations of Deductive Databases and Logic Programming, pp. 89–148. Elsevier (1988)
Aspis, Y., Broda, K., Russo, A., Lobo, J.: Stable and supported semantics in continuous vector spaces. In: KR, pp. 59–68 (2020). https://doi.org/10.24963/kr.2020/7
Collobert, R., Weston, J., Bottou, L., Karlen, M., Kavukcuoglu, K., Kuksa, P.: Natural language processing (almost) from scratch. J. Mach. Learn. Res. 12(76), 2493–2537 (2011)
Dimopoulos, Y., Sideris, A.: Towards local search for answer sets. In: Stuckey, P.J. (ed.) ICLP 2002. LNCS, vol. 2401, pp. 363–377. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45619-8_25
Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. In: ICLR (2015)
Manhaeve, R., Dumancic, S., Kimmig, A., Demeester, T., De Raedt, L.: DeepProbLog: neural probabilistic logic programming. In: NeurIPS, pp. 3749–3759. Curran Associates, Inc. (2018)
Marek, W., Subrahmanian, V.: The relationship between stable, supported, default and autoepistemic semantics for general logic programs. Theor. Comput. Sci. 103(2), 365–386 (1992). https://doi.org/10.1016/0304-3975(92)90019-C
Nguyen, H.D., Sakama, C., Sato, T., Inoue, K.: An efficient reasoning method on logic programming using partial evaluation in vector spaces. J. Log. Comput. 31, 1298–1316 (2021). https://doi.org/10.1093/logcom/exab010
Sakama, C., Inoue, K., Sato, T.: Linear algebraic characterization of logic programs. In: Li, G., Ge, Y., Zhang, Z., Jin, Z., Blumenstein, M. (eds.) KSEM 2017. LNCS (LNAI), vol. 10412, pp. 520–533. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63558-3_44
Sato, T., Kojima, R.: Logical inference as cost minimization in vector spaces. In: El Fallah Seghrouchni, A., Sarne, D. (eds.) IJCAI 2019. LNCS (LNAI), vol. 12158, pp. 239–255. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-56150-5_12
Sato, T., Sakama, C., Inoue, K.: From 3-valued semantics to supported model computation for logic programs in vector spaces. In: ICAART, pp. 758–765 (2020)
Yang, Z., Ishay, A., Lee, J.: NeurASP: embracing neural networks into answer set programming. In: IJCAI-PRICAI 2020, pp. 1755–1762 (2020). https://doi.org/10.24963/ijcai.2020/243
Zhao, Y., Lin, F.: Answer set programming phase transition: a study on randomly generated programs. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 239–253. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-24599-5_17
Acknowledgements
This work has been supported by JSPS KAKENHI Grant No. JP21H04905.
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
Takemura, A., Inoue, K. (2022). Gradient-Based Supported Model Computation in Vector Spaces. In: Gottlob, G., Inclezan, D., Maratea, M. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2022. Lecture Notes in Computer Science(), vol 13416. Springer, Cham. https://doi.org/10.1007/978-3-031-15707-3_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-15707-3_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-15706-6
Online ISBN: 978-3-031-15707-3
eBook Packages: Computer ScienceComputer Science (R0)