<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Neurosymbolic Reasoning: Building Neural Networks using Datalog±</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mattia Scaccia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ilaria Stocchi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luigi Bellomarini</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Engineering, Roma Tre University</institution>
          ,
          <addr-line>Via Vito Volterra 62, 00146 Roma</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>IT department, Banca d'Italia, Centro Donato Menichella</institution>
          ,
          <addr-line>Largo Guido Carli 1, 00044 Frascati</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Neurosymbolic reasoning has become an active research area for both academic and industrial context to handle today's complex knowledge-based problems, such as reasoning on Knowledge Graphs (KGs). Reasoning on KGs can efectively leverage the symbolic reasoning techniques, such as Datalog± -based techniques, but the discrete nature of these representations makes them insuficient to capture all the intrinsic relationships among data. On the other hand, neural networks have been widely used to enrich KGs, thanks to their subsymbolic capabilities, but the need for better explainability, interpretability and trust of machine learning systems demands the addition of a symbolic representation. We present the Chase Graph Neural Network (CGNN), a neural network that mirrors the symbolic reasoning process and is able to compute a vector representation of facts produced by the reasoning process. We show, in the context of a real-world economic domain, that the CGNN enriches KGs with new knowledge beyond what it is achievable using only symbolic reasoning.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Neurosymbolic Reasoning</kwd>
        <kwd>Datalog</kwd>
        <kwd>Vadalog</kwd>
        <kwd>Knowledge Graph</kwd>
        <kwd>Neural Network</kwd>
        <kwd>Machine Learning</kwd>
        <kwd>Artificial Intelligence</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <sec id="sec-1-1">
        <title>Reasoning [4] model, in which the rules that state the</title>
        <p>reasoning task are mapped into a subsymbolic
represenReasoning on KGs is a suitable setting for the query an- tation in order to benefit both from logic and from the
swering problem [1]. In real-world applications, how- ability of machine learning to derive information from
ever, query answering is particularly challenging: the patterns hidden in data. According to the classification
language to express the reasoning rules must be chosen provided by Vardi et al. [5] this neurosymbolic
computain such a way that it is able to represent complex domains tion model would fall in the type 5, in which logic acts
(high expressive power) and, at the same time, guaran- as a regularizer of the neural network’s loss function.
tees tractability and decidability of the query answering We present the Chase Graph Neural Network (CGNN), a
task, in order to support high performance and scalability neural network able to compute a vector representations
with large volumes of data. (embeddings) of every fact produced by the reasoning
We adopt the Vadalog engine [2] as the basis of our work, process. The CGNN has an innovative structure based on
a highly optimized Knowledge Graph Management Sys- the chase graph, the dependency graph representing the
tem, which performs reasoning over KGs and is able to Vadalog reasoning process produced by a chase based
meet the above query answering requirements by us- procedure [6]. Each fact (symbol) represents a neuron
ing a fragment of Datalog± [3], a family of logic query and the logical dependencies between facts produced
languages. Our goal is to enrich the domain knowledge by specific rules represent the neural connections. The
that can be discovered by Vadalog during the reason- CGNN computes an embedding for each fact generated
ing process. We intend to demonstrate that introducing by Vadalog during the reasoning process and we exploit
the subsymbolic reasoning paradigm, typical of machine these embeddings to perform link prediction tasks.
learning, as a support of the Vadalog logic reasoning pro- Overview. In Section 2 we describe the background
cess, we can derive additional information w.r.t. what about Vadalog and its reasoning process, while we
Vadalog is able to obtain, given a specific query answer- present the main contributions of this paper in the
reing problem. In fact the knowledge obtained by Vada- maining sections as follows:
log is solid and explainable but, at the same time, also
lacking of what can be derived from observing the raw
data itself. We aim to develop a Symbolic-Driven Neural
• The structure of the CGNN. We describe the internal
structure of a single neuron and show how to derive
the structure of the CGNN from Vadalog chase graph.
• The handling of labelled nulls. We describe a novel
technique to compute embeddings of facts that contain
labelled nulls, fresh symbols standing for existentially
quantified objects. This technique is needed to
compute the loss function during training whenever a fact
with labelled nulls is produced as output.
• The use of isomorphism to handle unseen data.</p>
        <p>We describe a novel use of the state-of-the-art VF2
algorithm [7] to address the problem of handling new
unseen data with a fully instantiated trained neural
network such as the CGNN. In addition we describe
improvements of the algorithm, specific to our use
case, concerning performance in the average case.</p>
        <p>the chase graph. The chase graph for a database D and a
set of rules Σ is the directed graph(D, Σ ) having as nodes
the facts obtained from chase(D, Σ ) and having an edge
2. Vadalog Reasoning from a node a to b if b is obtained from a and possibly
from other facts by the application of one chase step,
The Vadalog engine is built around Warded Datalog± i.e., of one rule of Σ [2]. Therefore the chase graph is a
language, a fragment of Datalog± family of languages. structure that represents the entire reasoning process, as
Datalog± languages consist of existential rules, or tuple- illustrated in Example 1 and Figure 1.
generating dependencies (TGDs). A Datalog± rule is a D = { s e c t o r ( Ferrari, Automotive ) ,
ifrst-order sentence of the form ∀x∀y( (x,y) → ∃z (x,z)), s e c t o r ( Toyota,Automotive ) , t a r g e t ( Ferrari,
where  (the body) and  (the head) are conjunctions of LuxuryCars ) , t a r g e t ( Toyota, EconomyCars ) }
raetopmlascewditwhitchoncsotmanmtsaa,ntod dveanrioatbelecso[n2j]u.nFcotriobnreovfitayto∧miss, Σ1. =xc&lt;o{&gt;myp e t i t o r ( x , y ) : − s e c t o r ( x , z ) , s e c t o r ( y , z ) ,
while → is replaced with :- in the form of  (x,z) :-  (x,y). 2 . d i r e c t C o m p e t i t o r ( x , y ) : − c o m p e t i t o r ( x , y ) ,
In addition universal and existential quantifiers are omit- s o u r c e I n c o m e ( x , z ) , s o u r c e I n c o m e ( y , z )
ted since they can be deduced: the variables in the body 3 . i n d i r e c t C o m p e t i t o r ( x , y ) : − c o m p e t i t o r ( x , y ) ,
are all universally quantified, while only the variables t a r g e t ( x , z ) , t a r g e t ( y , w) , z &lt;&gt;w}
that appear in the head, but not in the body, are existen- Example 1: This reasoning task aims at determining if two
tially quantified. By some abuse of notations, we often companies x and y are competitors (if they operate in the same
use the terms atom, tuple and fact interchangeably. sector z, rule 1) and if x and y are direct competitors (if they have
Pattern-isomorphic facts. In Vadalog there is the con- the same source of income z, rule 2) or indirect competitors (if
cept of pattern-isomorphic facts. Two facts are pattern- they have diferent market segments z and w, rule 3).
isomorphic if they have the same predicate name, there
exists a bijection between the constant values and there
exists a bijection between the labelled nulls [2]. In our 3. Chase Graph Neural Network
representation of patterns we use progressive positive
integers for diferent constants and progressive negative In this section we describe the structure of our
neurosymintegers for diferent labelled nulls. bolic computation model. We present the internal
funcChase procedure. Vadalog uses the chase procedure to tion of a single neuron and an overview of the overall
perform logic reasoning tasks. In the context of database structure of the CGNN.
theory, the chase procedure is considered among the
fundamental algorithmic tools enabling a variety of
applications [10]. The chase procedure takes as input a 3.1. Neuron Structure
database D and a set T of constraints which are TGDs Each neuron of the CGNN produces the embedding for
and, if it terminates, its result is a finite instance D T that a specific fact f generated during the chase procedure.
is a universal model of D and T, i.e., a model that can be Each neuron is made up of diferent computation layers
homomorphically embedded into every other model of as summarized in Fig. 2.</p>
        <p>D and T [10]. According to this definition the chase adds Input layer. Unlike in Feed-Forward Neural
Netnew tuples to the database D, that could potentially have works [11], the CGNN does not have a specific input
labelled nulls, as dictated by the rules of T, and it keeps layer that transfers the input to the first hidden layer,
adding tuples until all the rules of T are satisfied. instead it has at most as many input layers as the number
Chase graph. The chase procedure produces as output of facts in the input database instance.
and therefore the CGNN can learn to distinguish these
diferent contributions.
trix of all the concat layers of its neuron and it performs
the following operation on each result:
where the pooling operator is defined as:
1,.⊕..,N</p>
        <p>r  r,f[J1K; ...; JnK]
⊕

 m =. − 1︂( ∑︁(m) .</p>
        <p>︂)

of a specific fact.
Pooling layer. The pooling layer receives the result ma- layer and each concat layer created with the previous</p>
      </sec>
      <sec id="sec-1-2">
        <title>For each row of the input matrix the pooling sums up</title>
        <p>the result of the function v applied to each component
xm of each column. The function v and its inverse v− 1
are defined as:</p>
        <p>() = ()||
− 1() = ()||1/</p>
      </sec>
      <sec id="sec-1-3">
        <title>Each element is raised to a  power, where  is a tunable</title>
        <p>parameter, and then it is performed the  -root of the
result. In the end all the results produced by the pooling
operator applied to all the concat layers of the neuron
are summed together elementwise.</p>
        <p>Activation Function. The resulting vector is passed to
the Rectified Linear Unit (ReLU) activation function. We
choose ReLU since it is easy to compute with respect to
other non linear activation functions and we work with
non-negative embeddings.
(2)
(4)
(5)</p>
        <sec id="sec-1-3-1">
          <title>3.2. CGNN Structure</title>
          <p>The CGNN is built upon the chase graph topology. For
the purpose of this work, we only consider the subset
of directed acyclic chase graphs that can be generated
during the chase procedure. For this reason data flow
(1) forward from input to output, in the CGNN, without any
feedback loop. The structure of the CGNN is made up of
neurons, each one represents a specific fact generated by
Vadalog. The procedure for creating each neuron n that
represents a fact f follows these steps: (i) we create as
many concat layers as the number of rules that contribute
to generate f in the reasoning process; (ii) we add a
pooling layer and establish the connections between this
step; (iii) we use the output embedding of f computed
by neuron n as input for all the neurons that takes f to
compute other embeddings.</p>
          <p>In this way neurons are linked together in the same way
nodes of the chase graph are, that is according to the
logical dependencies between facts originated from the
application of the rules. Figure 3 reports, as an example,
(3) the structure of the CGNN built upon the chase graph
shown in Figure 1.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>4. Embeddings for Facts with</title>
    </sec>
    <sec id="sec-3">
      <title>Labelled Nulls</title>
      <p>In the context of this work we use data describing input
facts in the form of text documents, since it is the most
simple and adaptive form to a lot of domains. We create
an embedding for each of these documents and use them
as input for the CGNN. There are many state-of-the-art
techniques for word or document embedding [12, 13,
14, 15], but a challenging and unanswered task, to our
knowledge, is to compute an embedding for a fact with
labelled nulls. In fact, whenever a fact f with labelled
nulls is generated during the reasoning process, we need
a technique to produce the expected embedding for f in
order to compute the loss function during training.</p>
      <sec id="sec-3-1">
        <title>Labelled nulls. A labelled null represents an identifier</title>
        <p>for an unknown value and is produced as a result of
existential quantification, as illustrated in Example 2.</p>
        <p>D = { employee ( Jack ) , c o n t r a c t ( Jack ) ,
employee ( Al ) , c o n t r a c t ( Al ) , employee ( John ) }
Σ = {
1 . manager ( y , x ) : − employee ( x )
2 . h i r e d ( y , x ) : − manager ( y , x ) , c o n t r a c t ( x )
3 . c o n t r a c t S i g n e d ( x ) : − h i r e d ( y , x ) , manager ( y , z ) }
Example 2: This set of rules states that every employee x has a
manager y (rule 1). If a manager y sees that there is a pending
contract for his employee x, then he hires x (rule 2). Once an
employee x has been hired by a manager y, then the respective
contract for x is signed, but if someone has been hired by an
employee who is not a manager, then the contract will not be
signed (rule 3).</p>
        <p>Using the cosine similarity between two embeddings,
we claim that an embedding with one or more labelled
nulls should be similar to all the embeddings which rep- the input database. For example if the fact to embed is
resent that same predicate name. Moreover this sim- manager(z1,z1) with pattern manager(-1,-1), then only
ilarity should grow with the number of variables, at the facts that represent managers of themselves with
pata given position, that are equal to each other and are tern manager(1,1) will be taken into account to create
not labelled nulls. For example the embedding for the the embedding space needed to find the centroid. In this
fact hired(z1,Al) should be most similar to the embed- case facts manager(Jack,Jack) or manager(John,John)
dings of hired(Kevin,Al) or hired(Helen,Al) since they are taken, while fact manager(Jack,John) is not.
have the same predicate name and the same instantiated
variables in the same position (in this case Al at posi- 5. Isomorphisms and Unseen Facts
tion 2). It should also be less similar to the embedding
of hired(Bill, John) since only the predicate name is The CGNN is fully instantiated during the training phase.
the same. Lastly it should be completely diferent from In fact it assumes a configuration that mirrors the chase
the embeddings of employee(Al) or manager(Tim,Jack) graph Gtrain built during a chase procedure that has, as
since the predicate name is not the same and they repre- input, the database instance Dtrain and the set of rules
sent entirely diferent entities. Σ train. As can be easily deduced, even though the domain
is the same and Σ train = Σ test, Dtrain is always diferent
from Dtest, therefore we have to address the problem of
which input layers of the CGNN to direct the new input
represented by Dtest.</p>
        <p>Solution. Our novel technique to create embeddings
for facts with labelled nulls is to take all the embeddings
of the facts in the input database with the same
predicate name of the one needed to embed and with the
same instantiated variables at a given position except Solution. To solve this problem we use subgraph
isofor the labelled nulls. All this embeddings delimit a por- morphism and the VF2 algorithm [7] on the two chase
tion in the embedding space and the centroid of this graphs Gtrain and Gtest in order to find a mapping between
space represents the embedding of the fact with the la- the input layers of the trained network and the facts in
belled nulls. In Figure 4 the respective embedding spaces Dtest that is an isomorphism. The process of finding the
and embeddings for the two facts manager(z1,Jack) and mapping function can be suitably described by means of
manager(z2,Al) of Example 2 are presented in a two di- a State Space Representation (SSR). Each state s of the
mensional overall embedding space. With this technique matching process can be associated to a partial mapping
we are able to compute embeddings for facts with la- solution M(s), which contains only a subset of M. M(s)
belled nulls without having a text document describing univocally identifies two subgraphs G train(s) and Gtest(s),
them and, at the same time, we keep these embeddings obtained by selecting from Gtrain and Gtest only the nodes
coherent with their semantic meaning. In order to in- included in M(s), and the edges between them. A
tranclude the relationship between nulls, in case of multiple sition from a generic state s to a successor s0 represents
labelled nulls, the pattern of the nulls is considered as the addition to the partial graphs associated to s in the
well to create the embedding space. This means that if SSR, of a pair (n, m) of matched nodes. In our context
a fact has two or more labelled nulls that are the same, the algorithm always produces a mapping between Gtrain
then only the facts that have a same constant value at and Gtest, representing the Vadalog program used during
the same position of the nulls will be considered from a test scenario. To avoid the possibility of not finding
an isomorphism, we work under the closed-world as- nique [18], a cluster for each input node  ∈ train,
sumption [16] that let us considers the knowledge base namely Cn, based on its embeddings. Then, whenever
as complete. This assumption guarantees to have a train- there is an input node  ∈ test to be matched either at
ing Vadalog program that is always enough descriptive the start of the algorithm or when we are trying to match
for every new test program provided. Since Gtest is al- a new connected component, the set of candidate pairs
ways smaller than Gtrain, by construction, then to find making up P(s) will be the set of all the pairs of nodes
the mapping M is always a case of graph-subgraph iso- p(n,m) where  ∈ n. In front of multiple choices, we
morphism problem. The idea of using the isomorphism choose the pair of input nodes in order of similarity
startis based on the intuition that, given a fixed domain, facts ing from the pair of input nodes that are the most similar
from diferent database instances are similar if they are in their embedding, considering it the most promising
pattern-isomorphic, they use the same rules to produce pair. The number of clusters is initialized at a high
numpattern-isomorphic facts and the same properties are ber based on the number of input nodes in Gtrain. If an
valid for the facts produced. These properties can be isomorphism is not found, then the number of clusters is
verified recursively when considering the chase graphs halved, the VF2 algorithm is used again and this process
representing the two diferent reasoning process. To find is repeated until a matching is found. A matching is
guarthis isomorphism, in addition to the syntactic feasibility anteed to exist under the closed-world assumption when
rules presented by Cordella et al. [7], we add semantic there is only one cluster. In Example 3 there is an high
feasibility rules to better represent the knowledge ex- level description of the isomorphism matching algorithm
pressed in the chase graphs, since the performance of the combined with the use of clustering.
CGNN is directly coupled to the quality of the
isomorphism found, and to significantly reduce the number of
possible states that are feasible in the algorithm.</p>
        <sec id="sec-3-1-1">
          <title>5.1. Improving Isomorphism using</title>
        </sec>
        <sec id="sec-3-1-2">
          <title>Clustering</title>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>The subgraph isomorphism problem is NP complete [17].</title>
        <p>In fact, the time complexity of this algorithm in the worst
case is (! ) [7], where  is the number of nodes of
Gtest. To minimize the time needed in the average case
we reduce the number of possible candidate pairs in P(s)
at each step of the algorithm.</p>
        <p>Computation Step of Candidate Pairs P(s). The main
step of the VF2 algorithm is computing the set P(s) of
all the possible candidate pairs to be added to the
current state. Let us denote with T1out(s) and T2out(s) the
sets of nodes, not yet in the partial mapping, that are
the destination of edges starting from G1(s) and G2(s),
respectively; similarly, with T1in(s) and T2in(s), we denote
the sets of nodes, not yet in the partial mapping, that
are the origin of edges ending into G1(s) and G2(s). The
set P(s) is obtained by considering first the sets of the
nodes directly connected to G1(s) and G2(s). In fact the
set P(s) will be made of all the node pairs p(n,m), with
 ∈  1out() and  ∈  2out(). If one of these two sets
is empty then the set P(s) is obtained by using all the
node pairs p(n,m) with  ∈  1in() and  ∈  2in().
All of the above sets may be empty in the presence of
not connected graphs for some state s or if it is the first
step of the algorithm. In this case, the set of candidate
pairs of P(s) will be the set of all the pairs of nodes not
contained neither in G1(s) nor in G2(s).</p>
        <p>Clustering for Computation Step of Candidate Pairs
P(s). We compute, using k-means clustering
techPROCEDURE I s o m o r p h i s m M a t c h i n g</p>
        <p>INPUT : two g r a p h s G1 and G2 .</p>
        <p>OUTPUT : t h e i s o m o r p h i s m m a t c h i n g between G1
and G2 .</p>
        <p>I n i t i a l i z e t h e number o f c l u s t e r s .</p>
        <p>Get a map w i t h an embedding f o r e v e r y i n p u t
node ∈ 1 .</p>
        <p>WHILE ( i s o m o r p h i s m i s n o t f o u n d )</p>
        <p>Compute c l u s t e r s u s i n g i n p u t node ∈ 1 .
C a l l VF2 m a t c h e r p r o c e d u r e w i t h c l u s t e r i n g
t o g e t an i s o m o r p h i s m .</p>
        <p>IF isomorphism is found THEN</p>
        <p>RETURN i s o m o r p h s i m
ELSE</p>
        <p>H a l v e t h e number o f c l u s t e r s .</p>
        <p>END IF</p>
        <p>END WHILE
END PROCEDURE I s o m o r p h i s m M a t c h i n g
Example 3: The VF2 algorithm is called multiple times with a
decreasing number of clusters for the input nodes until a match
between Gtrain and Gtest is found.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>6. Evaluation in an Economic</title>
    </sec>
    <sec id="sec-5">
      <title>Setting</title>
      <sec id="sec-5-1">
        <title>In this section we describe the experimental evaluation</title>
        <p>we carried out to test the efectiveness of our model.
We performed a link prediction task [19] in the domain
of company ownership, using a dataset extracted from
DBpedia [20]. The goal is to identify the unobserved true
links in the KG between companies. The evaluation is
presented in the form of an ablation study, in which we
compare the result achieved using only Vadalog and the
result of Vadalog supported by our CGNN.</p>
        <sec id="sec-5-1-1">
          <title>6.1. Experimental Setting</title>
          <p>We are interested in predicting related companies, based
on the concepts of ownership, intended in terms of stock
percentage holding, and key person, intended as
executive people, core to the business operations of a certain
company. In the former case we state that a company
c1 is related to another one c2 if c1 owns c2 (the stock
percentage holding is irrelevant and omitted) while in
the latter we state that c1 is related to c2 if they have the
same key person p. We used the DBpedia triples (c1, own,
c2) and (p, isKeyPersonOf, c) to build the facts of D in the
form of own(c1,c2) and keyperson(c,p). The golden set
was obtained by running the program in Example 4 with
Vadalog. The output of the program represents all true
related companies. The chase graph obtained with this
program is made up of a set of components that represent
distinct sub-groups of related companies, causing rules 5
and 6 to contribute minimally to the total of related links
produced. Moreover the dataset used is quite small with
215 own edges and 40 keyperson edges, for a total of 730
related edges. These numbers represent the 20% of the
total dataset, the remaining 80% is used for the training
set (65%) and the validation set (15%). The program used
for validation and testing is composed of a subset of the
rules used in Example 2, namely the rules from 1 to 4.
Σ = {
1 . r e l a t e d ( x , y ) : − k e y p e r s o n ( x , p ) , k e y p e r s o n ( y , p )
2 . r e l a t e d ( x , y ) : − k e y p e r s o n ( y , p ) , k e y p e r s o n ( x , p )
3 . r e l a t e d ( x , y ) : − own ( x , y )
4 . r e l a t e d ( x , y ) : − own ( y , x )
5 . r e l a t e d ( x , y ) : − own ( x , z ) , own ( z , y )
6 . r e l a t e d ( x , y ) : − own ( y , z ) , own ( z , x )
7 . r e l a t e d ( x , x ) : − r e l a t e d ( x , y )
8 . r e l a t e d ( y , y ) : − r e l a t e d ( x , y ) }
Example 4: Reasoning task to extract the golden set. The related
companies are determined by the following constraints: (i) two
companies are related if the have a key person in common (rule
1 and 2); (ii) two companies are related if the first one owns the
second one or vice versa (rule 3 and 4); (iii) transitive property
of ownership (rule 5 and 6); (iv) reflection property of related
companies (rule 7 and 8).</p>
        </sec>
        <sec id="sec-5-1-2">
          <title>6.2. Ablation Study and Results</title>
          <p>When we compare the result of Vadalog and the result
of Vadalog plus the CGNN with the golden set, we
intend to illustrate how much of the facts “related” only
inferable from the rules not used at validation and test
time are recovered with the support of the CGNN. To
produce new facts related we use the embeddings
produced by the CGNN as follows: for each pair (a,b) where
a=related(X1,Y1) and b=related(X2,Y2), if the cosine
similarity between the embeddings of a and b is greater than a
threshold, then we produce the new facts related(X1,Y2)
and related(X2,Y1). The threshold was tuned during
validation time. Figure 5 illustrates the precision-recall curve.</p>
          <p>Results. The results achieved in term of recall,
precision and F-score, illustrated in Figure 6, highlight that
our neurosymbolic approach was able to retrieve most of
the false-negative related companies discovered by
Vadalog, while maintaining a low number of false-positive,
thus proving its efectiveness in recovering links inferred
through logic rules. In fact, the recall goes from 51.10%
(Vadalog) to 95.75% (Vadalog with CGNN) while
maintaining 88.44% precision. Moreover we must consider
that the 91 false positives of the CGNN could still be true
predictions. In fact the CGNN has the potential to go
over the expressiveness of the rules used to obtain the
golden set and find more related connections. To prove
this assertion we took 26 samples from the false positives
and we manually checked if they were truly unrelated
pairs or not. We found out that 20 out of the 26 samples
were, instead, true predictions, where most of them were
about a company related to banks or investment firms
that were indeed its investors. Therefore, with this new
insights, we can re-evaluate the results achieved by the
CGNN and consider true positives the 77% (20/26) of the
false positives. In this way our approach reaches 97.33%
precision and 95.54 f-score.</p>
          <p>Considerations. This data hint that our neurosymbolic
approach has both the potential to go beyond the
expressiveness of the logic rules and to recover information
from domain rules that have not been made explicit, but (sub)graph isomorphism algorithm for matching
to have confirmation, the same experiments should be large graphs, IEEE PAMI 26 (2004) 1367–1372.
carried out in a much larger scale. In fact there were [8] L. Bellomarini, M. Benedetti, S. Ceri, A. Gentili,
plenty of company and person entities in DBpedia that R. Laurendi, D. Magnanimi, M. Nissl, E. Sallinger,
could contribute to generate the relationships own and Reasoning on company takeovers during the
covidkeyperson, but we were forced to not consider a rele- 19 crisis with knowledge graphs, in: RuleML+ RR,
vant number of them due to not being able to recover a 2020.
meaningful text description for their embeddings to use [9] L. Bellomarini, M. Benedetti, A. Gentili, R. Laurendi,
as input for the CGNN. D. Magnanimi, A. Muci, E. Sallinger, Covid-19 and
company knowledge graphs: assessing golden
powers and economic impact of selective lockdown via
7. Conclusion ai reasoning, arXiv (2020).
[10] T. Gogacz, J. Marcinkowski, A. Pieris, All-instances
We showed how to build the Chase Graph Neural Network restricted chase termination: The guarded case,
(CGNN), a neurosymbolic model, simply by keeping track CoRR abs/1901.03897 (2019).
of the chase graph produced during the chase procedure. [11] G. Bebis, M. Georgiopoulos, Feed-forward neural
The CGNN is able to provide embeddings for each fact networks, IEEE Potentials 13 (1994) 27–31.
inferred during reasoning. We proposed a novel tech- [12] T. Kenter, A. Borisov, M. De Rijke, Siamese cbow:
nique to handle facts with labelled nulls and a novel use Optimizing word embeddings for sentence
repreof subgraph isomorphism to handle unseen data when us- sentations, arXiv (2016).
ing the CGNN. We demonstrated the efectiveness of our [13] T. Mikolov, K. Chen, G. Corrado, J. Dean, Eficient
approach in a real-world financial domain by using the estimation of word representations in vector space,
embeddings to discover new links in a KG. Despite the in: ICLR, 2013.
very promising results achieved, the solution presented [14] Q. Le, T. Mikolov, Distributed representations of
is still a prototype. An obvious improvement would be sentences and documents, in: ICML, volume 32,
to make use of the full potential of Datalog± rules by 2014, pp. 1188–1196.
introducing recursion with the use of Long Short-Term [15] J. Pennington, R. Socher, C. D. Manning, Glove:
Memory cells [21] as base structure for the neurons. Global vectors for word representation, in: EMNLP,
2014, pp. 1532–1543.</p>
          <p>References [16] R. Reiter, On Closed World Data Bases, Springer US,
Boston, MA, 1978, pp. 55–76.
[1] L. Bellomarini, D. Fakhoury, G. Gottlob, E. Sallinger, [17] I. Wegener, Complexity theory: exploring the limits
Knowledge graphs and enterprise ai: The promise of eficient algorithms, Springer Science &amp; Business
of an enabling technology, in: IEEE ICDE, 2019, pp. Media, 2005.</p>
          <p>26–37. [18] J. A. Hartigan, M. A. Wong, Algorithm as 136: A
[2] L. Bellomarini, E. Sallinger, G. Gottlob, The vadalog k-means clustering algorithm, J R Stat Soc Ser C
system: Datalog-based reasoning for knowledge Appl Stat 28 (1979) 100–108.</p>
          <p>graphs, CoRR 11 (2018) 975–987. [19] A. Rossi, D. Barbosa, D. Firmani, A. Matinata,
[3] A. Calì, G. Gottlob, T. Lukasiewicz, B. Marnette, P. Merialdo, Knowledge graph embedding for link
A. Pieris, Datalog+/-: A family of logical knowl- prediction, ACM 15 (2021) 1–49.
edge representation and query languages for new [20] S. e. a. Auer, Dbpedia: A nucleus for a web of open
applications, in: 2010 25th Annual IEEE Symposium data, in: The Semantic Web, 2007, pp. 722–735.
on Logic in Computer Science, 2010, pp. 228–242. [21] S. Hochreiter, J. Schmidhuber, Long short-term
[4] J. Zhang, B. Chen, L. Zhang, X. Ke, H. Ding, Neural, memory, Neural Computation 9 (1997) 1735–1780.
symbolic and neural-symbolic reasoning on
knowledge graphs, AI Open (2021).
[5] L. C. Lamb, A. S. d’Avila Garcez, M. Gori, M. O. R.</p>
          <p>Prates, P. H. C. Avelar, M. Y. Vardi, Graph neural
networks meet neural-symbolic computing: A
survey and perspective, CoRR abs/2003.00330 (2020).
[6] D. Maier, A. O. Mendelzon, Y. Sagiv, Testing
implications of data dependencies, ACM Trans. Database</p>
          <p>Syst. 4 (1979) 455–469.
[7] L. Cordella, P. Foggia, C. Sansone, M. Vento, A</p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>