=Paper= {{Paper |id=Vol-3432/paper39 |storemode=property |title=Deep Symbolic Learning: Discovering Symbols and Rules from Perceptions |pdfUrl=https://ceur-ws.org/Vol-3432/paper39.pdf |volume=Vol-3432 |authors=Alessandro Daniele,Tommaso Campari,Sagar Malhotra,Luciano Serafini |dblpUrl=https://dblp.org/rec/conf/nesy/DanieleCMS23 }} ==Deep Symbolic Learning: Discovering Symbols and Rules from Perceptions== https://ceur-ws.org/Vol-3432/paper39.pdf
Deep Symbolic Learning: Discovering Symbols and
Rules from Perceptions⋆
Alessandro Daniele1 , Tommaso Campari1 , Sagar Malhotra1,2 and Luciano Serafini1
1
    Fondazione Bruno Kessler (FBK), Trento, Italy.
2
    Research Unit of Machine Learning, TU Wien, Vienna, Austria.



   Neuro-Symbolic (NeSy) integration combines symbolic reasoning with Neural Networks
(NNs) for tasks requiring both perception and reasoning. Most NeSy systems rely on continuous
relaxation of logical knowledge, and they assume the symbolic rules to be given. We propose
Deep Symbolic Learning (DSL) [1], a NeSy system that simultaneously learns the perception
and symbolic functions while being trained only on their composition. The key idea is βˆ‘οΈ€to adapt
reinforcement learning policies to the NeSy context: given the NN predictions t with 𝑖 𝑑𝑖 = 1,
we use the greedy policy πœ‹(t) = π‘Žπ‘Ÿπ‘”π‘šπ‘Žπ‘₯𝑖 𝑑𝑖 to select a single discrete symbol, and the function
πœ‡(t) = π‘šπ‘Žπ‘₯𝑖 𝑑𝑖 to select the corresponding value in t, interpreted as a truth value under a fuzzy
logic semantics. When performing multiple discrete choices within the model, each truth value
is sent to an aggregation operator, which returns the truth value of the final output.




Figure 1: DSL architecture



NeSy2023, 17th international workshop on neural-symbolic learning and reasoning, Certosa di Pontignano, Siena, Italy
" daniele@fbk.eu (A. Daniele)
                                       Β© 2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
    CEUR
    Workshop
    Proceedings
                  http://ceur-ws.org
                  ISSN 1613-0073
                                       CEUR Workshop Proceedings (CEUR-WS.org)
    In Fig. 1, DSL architecture for the MNIST-Addition task [2] is provided. Two NNs, 𝑁1 and 𝑁2 ,
are used to classify the images, and the softmax function 𝜎 converts their predictions into fuzzy
truth values t1 and t2 . The greedy policy function πœ‹, takes in t1 and t2 , and returns discrete
symbolic predictions (𝑠8 and 𝑠0 , resp.). Their corresponding fuzzy truth values (𝑑*1 = 0.5 and
𝑑*2 = 0.6 resp.) are given by the π‘šπ‘Žπ‘₯ operator πœ‡. These symbols (𝑠8 and 𝑠0 ) are then passed
to the symbolic function, which is represented as a lookup table G, returning the final output.
The confidence in the final output is given by the confidence in the predicted symbols being
simultaneously correct, using the GΓΆdel semantics of conjunction, i.e., t* = π‘šπ‘–π‘›(t*1 , t*2 ). In
Fig. 1, the NNs predict symbols 𝑠8 and 𝑠0 , while the function defined by G corresponds to the
sum. As a consequence, the final output of DSL is 𝑠8 (8 + 0 = 8). The framework considers the
correctness of the final output, producing a label 𝑙 = 1 if the prediction is correct and 𝑙 = 0
otherwise. Such a label is given as supervision for t* . In the example, the prediction is wrong
since the first digit has been classified as 𝑠8 instead of 𝑠3 . Since the π‘šπ‘–π‘› function admits only
one non-zero partial derivative (corresponding to the minimum value), the back-propagation
changes the weights of a single network (𝑁1 in Fig. 1). If the prediction is wrong, the effect of
this change is to reduce the truth value of the currently selected symbol (𝑠8 ), increasing the
chances of choosing a different symbol in the next iteration. Finally, DSL can also learn the
table G from the data by applying πœ‹ and πœ‡ to a learnable tensor W.
In Tab. 1 we report the accuracy on the MNIST MultiDigitSum (MDS). For further experi-
ments/analysis, see [1].

                                          2            4           15
                          NAP [3]    93.9 Β± 0.7      T/O          T/O
                          DPL [2]    95.2 Β± 1.7      T/O          T/O
                          DStL[4]    96.4 Β± 0.1   92.7 Β± 0.6      T/O
                          DSL        95.0 Β± 0.7   88.9 Β± 0.5   64.1 Β± 1.5
Table 1: Accuracy obtained on the MNIST MDS task. T/O stands for timeout. NB: DSL is the only
method which learns the knowledge, the other methods assume it to be given.



Acknowledgements TC and LS acknowledge the support of the PNRR project FAIR - Future
AI Research (PE00000013), under the NRRP MUR program funded by the NextGenerationEU.


References
[1] A. Daniele, T. Campari, S. Malhotra, L. Serafini, Deep symbolic learning: Discovering
    symbols and rules from perceptions, arXiv preprint arXiv:2208.11561 (Accepted at IJCAI2023)
    (2023).
[2] R. Manhaeve, S. Dumancic, A. Kimmig, T. Demeester, L. De Raedt, Deepproblog: Neural
    probabilistic logic programming, NIPS (2018).
[3] Z. Yang, A. Ishay, J. Lee, Neurasp: Embracing neural networks into answer set programming,
    in: IJCAI, 2020.
[4] T. Winters, G. Marra, R. Manhaeve, L. De Raedt, Deepstochlog: Neural stochastic logic
    programming, in: AAAI, 2022.