<!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>DeepLogic: Towards End-to-End Differentiable Logical Reasoning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nuri Cingillioglu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alessandra Russo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>nuric</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>a.russog@imperial.ac.uk Deparment of Computing</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Copyright held by the author(s). In A. Martin, K. Hinkelmann, A. Gerber</institution>
          ,
          <addr-line>D. Lenat, F. van Harmelen, P. Clark (Eds.)</addr-line>
          ,
          <institution>Proceedings of the AAAI 2019 Spring Symposium on Combining Machine Learning with Knowledge Engineering (AAAI-MAKE 2019). Stanford University</institution>
          ,
          <addr-line>Palo Alto, California</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Imperial College London</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <fpage>45</fpage>
      <lpage>49</lpage>
      <abstract>
        <p>Combining machine learning with logic-based expert systems in order to get the best of both worlds are becoming increasingly popular. However, to what extent machine learning can already learn to reason over rule-based knowledge is still an open problem. In this paper, we explore how symbolic logic, defined as logic programs at a character level, is learned to be represented in a high-dimensional vector space using RNNbased iterative neural networks to perform reasoning. We create a new dataset that defines 12 classes of logic programs exemplifying increased level of complexity of logical reasoning and train the networks in an end-to-end fashion to learn whether a logic program entails a given query. We analyse how learning the inference algorithm gives rise to representations of atoms, literals and rules within logic programs and evaluate against increasing lengths of predicate and constant symbols as well as increasing steps of multi-hop reasoning.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        There has been increasing interest and attempts at combining
machine learning with logic-based expert systems in order
to get the best of both worlds: have an end-to-end trainable
system that requires little data to learn how to reason, possibly
using existing background knowledge, and is interpretable
by humans
        <xref ref-type="bibr" rid="ref6">(Besold et al. 2017)</xref>
        . However, it is not clear to
what extent machine learning can learn logic-based reasoning
without requiring any prior engineering. Thus, in this work
we provide a first insight into how symbolic logic, represented
as logic programs at a character level can be learned using
RNN-based iterative neural networks to perform reasoning.
      </p>
      <p>
        A crucial component in existing logic-based expert
systems is the ability to iteratively use a given knowledge base.
Framed as multi-hop reasoning, these tasks require an agent
to process information over several steps to reach a
conclusion. This paradigm of reasoning has been performed by
neural networks in domains such as story comprehension
with Dynamic Memory Networks
        <xref ref-type="bibr" rid="ref33 ref35 ref43">(Xiong, Meity, and Socher
2016)</xref>
        , graph problems with Differentiable Neural
Computers
        <xref ref-type="bibr" rid="ref17">(Graves et al. 2016)</xref>
        and visual question answering with
Relation Networks
        <xref ref-type="bibr" rid="ref34">(Santoro et al. 2017)</xref>
        and Memory
Attention Control Networks
        <xref ref-type="bibr" rid="ref13 ref21">(Hudson and Manning 2018)</xref>
        .
Traditionally, inference systems over logic programs are manually
built on algorithms such as backward chaining
        <xref ref-type="bibr" rid="ref2">(Apt and
Van Emden 1982)</xref>
        or forward chaining
        <xref ref-type="bibr" rid="ref33 ref35">(Russell and Norvig
2016)</xref>
        . There have been attempts to partially replace
symbolic components of these systems with neural networks
such as Neural Prolog
        <xref ref-type="bibr" rid="ref11">(Ding 1995)</xref>
        which constructs
networks through symbolic applications of logic rules. Another
vital component, unification of variables have been tackled by
Unification Neural Networks
        <xref ref-type="bibr" rid="ref23">(Komendantskaya 2011)</xref>
        .
However, neither of these networks act as a complete inference
engine that can be trained end-to-end solely using examples
and learn corresponding representations of symbolic
knowledge.
      </p>
      <p>
        Another important aspect of machine learning that allows
scalability is learning dense distributional representations
such as word embeddings
        <xref ref-type="bibr" rid="ref22 ref30">(Pennington, Socher, and Manning
2014)</xref>
        . This approach is used to learn embeddings of
predicates to perform knowledge base completion
        <xref ref-type="bibr" rid="ref33 ref35">(Serafini and
Garcez 2016)</xref>
        ; however, an existing reasoning mechanism
such as backward chaining
        <xref ref-type="bibr" rid="ref32">(Rockta¨schel and Riedel 2017)</xref>
        guides the machine learning component to learn such
embeddings. We instead build on the prior work on iterative
neural networks that learn algorithmic tasks such as addition
of digits
        <xref ref-type="bibr" rid="ref19 ref22">(Graves, Wayne, and Danihelka 2014)</xref>
        and sequence
processing
        <xref ref-type="bibr" rid="ref44">(Zaremba et al. 2016)</xref>
        . Resultantly, we learn
reasoning tasks from scratch without prior engineering alongside
representations of knowledge bases expressed as logic
programs. The key motivation is that if we can learn symbolic
reasoning using machine learning then we might be able
to minimise the extent to which they have to be combined
manually. The focus is not to extract the prior symbolic
hypotheses but to learn how to utilise a given knowledge base;
thus, we do not compare within the domain of inductive logic
programming
        <xref ref-type="bibr" rid="ref1 ref28">(Muggleton and De Raedt 1994)</xref>
        .
      </p>
      <p>This paper provides the following contributions, (i) a
new synthetic dataset consisting of 12 various classes of
normal logic programs, (ii) an iterative neural inference
network to learn end-to-end different reasoning tasks and
(iii) analysis of how these networks represent logic
programs and handle multi-hop reasoning. Our implementation
is publicly available online at https://github.com/
nuric/deeplogic.
1: Facts
2: Unification</p>
      <p>3: 1 Step
e(l).
i(u).
n(d).
v(h,y).
p(n).
? e(l). 1
? i(d). 0
o(V,V).
i(x,z).
y(w,d).
p(a,b).
t(A,U).
? o(d,d). 1
? o(b,d). 0
g(L,S) :- x(S,L).
x(a,m).
y(X) :- r(X).
p(h).
s(t,v).
? g(m,a). 1
? g(a,m). 0
4: 2 Steps
x(G,B) :- k(G,B).
k(Z,V) :- g(Z,V).
g(k,k).
e(k,s).
p(L,G) :- v(G,L).
? x(k,k). 1
? x(k,s). 0
5: 3 Steps
p(P,R) :- b(R,P).
b(A,L) :- a(A,L).
a(W,F) :- v(F,W).
v(t,i).
l(D) :- t(D).
? p(t,i). 1
? p(i,t). 0
6: Logical AND
f(P,U) :- b(P) , p(U).
b(x).
p(x).
p(y).
e(y,v).
? f(x,x). 1
? f(y,x). 0
7: Logical OR
e(D,X) :- n(D,X).
e(D,X) :- w(D,X).
e(w,y).
n(n,j).
w(t).
? e(n,j). 1
? e(i,j). 0</p>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <p>
        A normal logic program
        <xref ref-type="bibr" rid="ref1 ref28">(Apt and Bol 1994)</xref>
        is a set of rules
of the form:
      </p>
      <p>
        A L1; : : : ; Ln (n 0) (1)
where A is an atom and each Li is a literal. A literal is either
an atom (a positive literal) or a negated atom of the form
not A where not is negation by failure
        <xref ref-type="bibr" rid="ref8">(Clark 1978)</xref>
        . Atom
A represents the head and L1; : : : ; Ln the body of a rule. An
atom is a predicate with some arity, e.g. p(X; Y ), q(a), where
variables are upper case characters and predicates and
constants are lower case. If a rule does not contain any variables
we refer to it as ground rule and ground rules with empty
bodies as facts. We follow a similar syntax to Prolog
        <xref ref-type="bibr" rid="ref9">(Clocksin
and Mellish 2003)</xref>
        and express normal logic programs as:
p(X) :- q(X);
      </p>
      <p>r(X):
q(a):
As in equation 2, the is replaced with :- and the negation
by failure not with while maintaining the same semantics.
When there are no body literals we omit the implication
entirely, equation 3.</p>
      <p>f (C; Q) =
1 if C ` Q
0 otherwise
f (C; not Q) = 1
f (C; Q)
We define the logical reasoning process as an inference
function f , equation 4, that given a normal logic program (without
function symbols) as context C 2 C and a ground atom as
query Q 2 Q returns f1; 0g = B depending on whether
the context entails the query C ` Q or not. We can now
define negation by failure not Q using the outcome of the
corresponding positive ground query Q, equation 5.</p>
      <p>f (C; Q) , p(QjC)
In order to learn the reasoning process, we define an auxiliary
objective for the neural network and consider the inference
function f to be the conditional probability of the query
given the context, equation 6. This approach renders the
problem, from a machine learning perspective, as a binary
classification problem and allows training using standard
cross-entropy loss.</p>
    </sec>
    <sec id="sec-3">
      <title>The Tasks</title>
      <p>
        Inspired by the bAbI dataset
        <xref ref-type="bibr" rid="ref39 ref41 ref42">(Weston et al. 2015)</xref>
        , we
layout 12 tasks that cover various aspects of normal logic
programs. The tasks are of increasing complexity building up
(2)
(3)
(4)
(5)
(6)
on concepts seen in prior tasks. Every task consists of triples
(context; query; target) following the signature of the
inference function in equation 4. For compactness a single
context can have multiple queries and are expressed in the
form ? query target after the context. The contexts
contain the simplest possible rules that cover the required
reasoning procedure and are not mixed together akin to unit
tests in software engineering.
      </p>
      <p>Each task is generated using a fixed procedure from which
samples are drawn. For constants and predicates we use the
lower case English alphabet and for variables upper case. The
length of the character sequences that make up predicates,
constants and variables can be of arbitrary length (only
examples of length 1 are shown) but we generate lengths up
to 2 for the training dataset and longer lengths for test data.
The arity of the atoms are selected randomly between 1 and
2. For every sample we also generate irrelevant rules as noise
that always have different predicates and random structure
while still preserving the semantics of the task.</p>
      <p>Facts The simplest task consists only of facts. There is
only one successful case in which the query appears in the
context and can fail in 3 different ways: (i) the constant might
not match (shown in Table 1), (ii) the predicate might not
match or (iii) the query might not be in the context at all.
These failures can cascade and a query can fail for multiple
reasons with equal probability.</p>
      <p>Unification These tasks contain rules with empty bodies
and an atom with variables in the head. The intended
objective is to emphasise the semantics of unification between
different p(X; Y ) and same variables p(X; X). The query
succeeds if the corresponding variables unify and fail
otherwise. The failure case in which same variables do not match
different constants is in Table 1.</p>
      <p>N Step Deduction One prominent feature of logical
reasoning is the application of rules that contain literals in the
body. These tasks cover the case when there is a single
positive atom in the body. All such rules contain only variables
and chains of arbitrary steps can be generated. For the
training dataset, we generate up to 3 steps, samples in Table 1. The
query succeeds when the body of the last rule in the chain is
grounded with the same constant as in the query. We
occasionally swap the variables p(X; Y ):-q(Y; X): to emphasise
the variable binding aspect of rules which can happen at any
rule in the chain or not at all. The failure cases are covered
when the swapped constants do not match or when the final
body literal in the chain fails due to reasons covered in the
first task.
8: Transitivity
9: 1 Step NBF
10: 2 Step NBF
11: AND NBF</p>
      <p>Logical AND Building upon the previous deduction tasks,
we create rules with 2 body literals to capture the logical ^
semantics in rules, sample in Table 1. The reasoning engine
now has to keep track of and prove both body literals to
succeed. A failure occurs when one randomly selected body
literal fails for reasons similar to the first task.</p>
      <p>Logical OR Having multiple matching heads captures the
semantics of _ in logic programming by creating several
possible paths to a successful proof, sample in Table 1. In
this task we branch the query predicate 3 ways, 2 implications
and 1 ground rule. The query succeeds when any of the rules
succeed and fail when all the matching rules fail.</p>
      <p>Transitivity Based on the previous 2 tasks, the transitive
case covers existential variable binding. It requires the model
to represent the conjunction of the body literals of a rule and
match multiple possible facts. The case succeeds when the
inner variable unifies with the ground instances or fails
otherwise. We expect an reasoning engine to solve the previous 2
tasks in order to solve this one, sample in Table 2.</p>
      <p>N-Step Deduction with Negation These tasks introduce
the concept of negation by failure. The body literal of the first
rule in the chain is negated and a chain of arbitrary length
is generated. For the training dataset we only generate proof
chains of length 2, samples in Table 2. The query succeeds
when the negated body atom fails; the swapped variables do
not match the constants, or the body literal of the final rule in
the chain fails for reasons similar to the first task. The query
fails whenever the negated body atom succeeds following the
semantics described by equation 5.</p>
      <p>Logical AND with Negation After introducing negation
by failure, we consider negation together with logical ^ and
randomly negate one of the body literals, sample in Table 2.
As such, the query succeeds when the negated body atom
fails and the other literal succeeds. The query can fail when
either body literal fails similar to the non-negated case.</p>
      <p>Logical OR with Negation Finally, we consider negation
together with the logical _ case and negate the body literal
of one rule. The query succeeds when any matching rule
except the negated one succeeds and fails if the negated rule
succeeds while other matching rules fail, sample in Table 2.</p>
    </sec>
    <sec id="sec-4">
      <title>Neural Reasoning Networks</title>
      <p>
        In this section we describe a RNN-based iterative neural
network for learning the inference function f , equation 4.
Broadly, we call networks that learn logical reasoning,
Neural Reasoning Networks and the objective is to learn how
C ` Q is computed solely from examples. The primary
challenge for these networks is to have a fixed network
architecture that must process all the tasks unlike tree based
recurrent networks
        <xref ref-type="bibr" rid="ref31 ref40">(Tai, Socher, and Manning 2015)</xref>
        or graph
networks
        <xref ref-type="bibr" rid="ref3">(Battaglia et al. 2018)</xref>
        which construct a different
network dependant on each input. We place this constraint
to avoid engineering any prior structural information into a
network. We gather inspiration from Memory Networks
        <xref ref-type="bibr" rid="ref31 ref39 ref41 ref42">(Weston, Chopra, and Bordes 2015)</xref>
        , in particular we wanted
to incorporate the end-to-end approach
        <xref ref-type="bibr" rid="ref39">(Sukhbaatar et al.
2015)</xref>
        and the iterative fashion of Dynamic Memory
Networks (DMN)
        <xref ref-type="bibr" rid="ref24">(Kumar et al. 2016)</xref>
        while following the steps
of a symbolic reasoning method such as backward
chaining
        <xref ref-type="bibr" rid="ref2">(Apt and Van Emden 1982)</xref>
        .
      </p>
      <p>
        Design We can consider the logic program context a
readonly memory and the proof state a writable memory
component. In a similar fashion to Prolog’s backward chaining
algorithm
        <xref ref-type="bibr" rid="ref9">(Clocksin and Mellish 2003)</xref>
        , we aim to have (i) a
state to store information about the proof such as the query,
(ii) a mechanism to select rules via attention and (iii) a
component to update the state with respect to the rules. To that end,
we introduce the Iterative Memory Attention (IMA) network
that given a normal logic program as context and a positive
ground atom as query, embeds the literals in a high
dimensional vector space, attends to rules using soft attention and
updates the state using a recurrent network. IMA should be
      </p>
      <p>Multi-task
DMN
rule</p>
      <p>IMA
considered a variant of Memory Networks, designed to suit
the logical reasoning process in which the recurrent
component is iterated over literals to perform reasoning, a graphical
overview is shown in Figure 1.</p>
      <sec id="sec-4-1">
        <title>Literal Embedding</title>
        <p>The inputs to the network are two sequences of characters
c0C ; : : : ; cCm and c0Q; : : : ; cnQ for context and query
respectively. The principle motivation behind having character level
inputs rather than symbol tokens is to constrain the network
to learn sub-symbolic representations that could potentially
extend to previously unseen literals. We pre-process the
context sequence to separate it into literals and obtain an input
tensor IC 2 NR L m0 of characters encoded as positive
integers where R is the number of rules, L number of
literals and m0 the length of the literals. The query is a single
ground positive atom encoded as a vector I Q 2 Nn. This
pre-processing allows the network to consider each literal
independently when iterating over rules giving it finer control
over the reasoning process.</p>
        <p>
          ht = GRU (O[I::t]; ht 1)
(7)
Each literal is embedded using a recurrent neural network that
processes only the characters of that literal I::t, equation 7
where O[I::t] is the one-hot encoding of the characters. We
use a gated recurrent unit (GRU)
          <xref ref-type="bibr" rid="ref7">(Cho et al. 2014)</xref>
          starting
with h0 = !0 to process the characters in reverse order to
emphasise the predicate and take the final hidden state ht
to be the embedding of the literal l 2 Rd where d is the
fixed dimension of the embedding. The context and query are
embedded using the same network yielding a context tensor
C 2 RR L d where R is the number of rules and L number
of literals in a rule; for the query we obtain vector q 2 Rd.
        </p>
        <p>In order for the network to propagate the state unchanged,
we append a null sentinel = !0 which allows the network
to ignore the current reasoning step by carrying over the
state. We also append a blank rule () that acts as a learnable
parameter and is often attended when no other rule is suitable.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Iteration</title>
        <p>The iterative step consists of attending to the rules, computing
a new state using each rule and updating the old state. The
network is iterated for T steps, fixed in advance, with the
initial state s0 2 Rd set to the query vector s0 = q.
cait = [st ; q ; ri ; (st
ri)2 ; st
ri]
it =</p>
        <p>(W 1 d2 (U d2 dcait + b d2 ) + b1)
At any time step t, we compute a feature vector cait 2 R5d
for every head of a rule ri = Ci0 using the current state
st 2 Rd, equation 8 where [; ] is the concatenation operator.
We also experiment with embedding rules using another GRU
over literals h0ij = GRU (Cij ; h0i;j 1) and take the final state
ri = h0iL as the representation of the rule. To compute the
final attention vector it, we use a two layer feed-forward
network, equation 9 where is the sigmoid function. We
also experiment with the softmax formulation of the attention
vector it after the two layer feed-forward network.
uij = GRU (Cij ; uit(j 1))
t</p>
        <p>R
st+1 = X
i
t t
iuiL
(8)
(9)
(10)
(11)
To apply a rule, we use another recurrent neural network
that processes every literal of every rule Cij . The initial
hidden state ui0 = st is set to the current state st, then for
t
every rule a GRU is used to compute the new hidden state
uitj , equation 10. Finally, the new state st+1 becomes the
weighted sum of the final hidden states uitL, equation 11. We
call the inner GRU unifier as it needs to learn unification
between variables and constants as well as how each rule
interacts with the current state.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Experiments</title>
      <p>
        We carry out experiments on individual tasks with variations
on our model. As a baseline, we use a LSTM
        <xref ref-type="bibr" rid="ref20">(Hochreiter and
Schmidhuber 1997)</xref>
        to process the query and then the context
to predict the answer. We also compare our model against the
Dynamic Memory Network (DMN)
        <xref ref-type="bibr" rid="ref24">(Kumar et al. 2016)</xref>
        and
the Memory Attention Control (MAC)
        <xref ref-type="bibr" rid="ref13 ref21">(Hudson and Manning
2018)</xref>
        network which both incorporate iterative components
achieving state-of-the-art results in visual question answering
datasets. With DMN and MAC, the context is separated into
rules and the entire rule is embedded using a GRU at the
character level. Unlike DMN which uses another GRU to
accumulate information over the rule embeddings and the
current state, our variant IMA processes literal embeddings
using a GRU to compute the new state as a weighted sum
over each rule.
      </p>
      <p>
        Training We use two training regimes: curriculum
learning
        <xref ref-type="bibr" rid="ref4">(Bengio et al. 2009)</xref>
        and multi-task. With curriculum
learning the model is trained in an incremental fashion
starting with tasks 1 and 2 with only 1 iteration. Then tasks
accumulate with increasing number of iterations with tasks
3, 7, 9, 12 with 2 iterations and tasks 4, 6, 8, 11 using 3
iterations. We determine the minimum number iterations
required for a task based on Prolog
        <xref ref-type="bibr" rid="ref9">(Clocksin and Mellish
2003)</xref>
        . Finally all tasks are introduced with a maximum of
4 iterations. The multi-task approach trains on the entire
dataset with 4 iterations fixed in advance. Models are trained
via back-propagation using Adam
        <xref ref-type="bibr" rid="ref22">(Kingma and Ba 2014)</xref>
        for 120 epochs (10 per task) with a mini-batch size of 32
and a training dataset size of 20k logic programs per task.
We ensure a mini-batch contains at least 1 sample from each
training task to avoid any bias towards any task in a given
mini-batch. Logic programs are shuffled after each epoch and
rules within a context are also shuffled with every mini-batch.
Since we have access to the data generating distribution, we
do not use any regularisation in any of the models and have
increased the training dataset size accordingly to avoid
overfitting
        <xref ref-type="bibr" rid="ref16 ref32">(Goodfellow, Bengio, and Courville 2017)</xref>
        .
      </p>
      <p>We generate 4 test sets of increasing difficulty: validation,
easy, medium and hard which have up to 2, 4, 8 and 12
characters for predicates and constants as well as added number
of irrelevant rules respectively. Each test set consists of 10k
generated logic programs per task and results for the best
single training run out of 3 for each model with state size
d = 64 on the easy set are shown in Table 3.</p>
      <p>We observe that all iterative models perform better than
the baseline except for task 8, transitivity which all models
fail at. We speculate the reason is that the models have not
seen existential variable binding for more than 2 character
constants and fail to generalise in this particular case. We
note that the curriculum training regime has no benefit for
any model most likely because we introduce new, unseen
tasks with each iteration such that models with prior
training have no advantage, ex. solving OR in 2 iterations does
not improve the solution for AND in 3 iterations.
Embedding literals seems to provide an advantage over embedding
rules since all IMA models outperform both DMN and MAC
when we consider the mean accuracy over every test set. We
postulate literal embeddings give a finer view and allow for
better generalisation over increasing lengths as embedding
rules with literals (lit+rule) also degrades the performance.
Although our variant IMA performs the best on all the test
sets, all models quickly degrade in mean accuracy as the
difficulty increases. We speculate that a finite sized state vector
stores limited information about unseen unique sequences of
increasing lengths and analyse this behaviour further in the
next section.</p>
      <p>
        Figure 2 portrays the attention maps produced by IMA
with softmax attention. Although by default models converge
to backward chaining, by (i) reversing the direction of the
unifier GRU, equation 10, and (ii) skipping task 2, we can
create a bias towards ground facts that have a matching
constant. This approach encourages our model IMA with rule
embeddings (lit+rule) to converge to forward chaining
        <xref ref-type="bibr" rid="ref33 ref35">(Russell and Norvig 2016)</xref>
        , albeit with more training time (thus
results for forward chaining are not included in Table 3). This
observation emphasises the fact that a fixed network
architecture can be flexible enough to learn two different solutions
for the same domain of problems given the right incentives.
      </p>
    </sec>
    <sec id="sec-6">
      <title>Analysis</title>
      <p>Since models are trained in an end-to-end fashion, the
representations for logical constructs that help perform reasoning
must also be learned. In this section, we scrutinise the learnt
representations of the embedding GRU, equation 7 for IMA
and the rule embeddings of DMN.</p>
      <p>
        An important assumption made in the dataset is that every
predicate and constant combination is unique. We expect this
setup to create a formation that would allow every literal to
be differentiated. As such, we observe a lattice like structure
when the embeddings of single and double character atoms
are visualised in 3 dimensions using principle component
analysis (PCA), Figure 3. The first two components select
the predicate and the final the constant to uniquely identify
the literal with a clear distinction between single and double
character predicates. This arrangement is in contrast with
distributional representations that exploit similarities between
entities such as in natural language embeddings
        <xref ref-type="bibr" rid="ref27">(Mikolov et
al. 2013)</xref>
        . In our case, p(a) might be more similar to p(b)
than to pp(a) although all are deemed unique.
      </p>
      <p>As the embedding sizes are finite, we also expect a
saturation in the embedding space as the length of the literals
increase. We capture this phenomenon by repeating the
character p 64 times and observe a converging pattern shown in
Figure 4. We take note how odd and even length predicates
converge to their own respective point suggesting that the
embeddings produced by the GRU, equation 7, learn parity.</p>
      <p>If we take structurally different literals we observe a
preference towards whether literals are negated or grounded then
the arity of the atoms, Figure 5a. We believe this clustering
captures the literal semantics available in the dataset within 4
major clusters (grey lines). Furthermore, if we look at the rule
embeddings learnt by DMN, we notice a similar clustering
based on rule structure with again groundedness, negation,
arity and number of body literals as learnt distinguishing
features, Figure 5b. The multiple points within a cluster
correspond to different predicates following a similar ordering,
for example predicate p is often the upper most point.</p>
      <p>To evaluate multi-hop reasoning, we generate logic
programs that require increasing number of steps of deduction.</p>
      <p>While the training data contains up to 3 steps, we generate
up to 32 steps and the networks are run for n + 1 iterations.</p>
      <p>
        We obtain similar results to other recurrent neural network
based systems
        <xref ref-type="bibr" rid="ref44">(Zaremba et al. 2016)</xref>
        and observe a steady
decrease in accuracy beyond the training line (grey dashed line),
shown in Figure 6 in which imasm and imarsm indicate
IMA with softmax attention and rule embedding respectively.
      </p>
      <p>We speculate that with each iteration step the state
representation degrades eventually losing information since models
tend to produce noisy attention maps or state transformations.</p>
      <p>Our IMA model with softmax attention maintains the
highest accuracy most likely due to the sparsity created by the
softmax operation.</p>
      <p>To evaluate generalisation to unseen symbols, we take
task 3 and generate increasing character lengths of random
predicate or constant symbols up to 64, well beyond the
training dataset length of 2. Although we observed that literal
embeddings can saturate, models can cope with longer
randomly generated predicate or constant symbols, Figure 7a,
since looking at only a few characters can determine
uniqueness. This reflects on our intuition that looking at portions of
sequences might be enough to determine equality rather than
memorising them entirely, ex. looking at last few digits of
phone numbers to check if they are same.</p>
      <p>In order to understand how the embedding and state
dimensions d affect the models, we experimented with sizes 32,
48, 64, 96 and 128 running each curriculum training session
3 times for our IMA model. Figure 7b shows that increasing
the dimension size does not contribute to a clear increase in
mean accuracy over all tasks and the drop in accuracy across
easy, medium and hard test sets follow a similar pattern for
every dimension. Despite the initial increase beyond d = 32,
we get the highest upper bound in accuracy with d = 64, for
which the individual results are in Table 3.</p>
      <p>We designed the tasks to be of increasing difficulty
building on previously seen problems such as unification before
deduction. We expected models trained using an iterative
scheme would generalise better as the network depth would
increase gradually. However, when we average the mean
(a) Structurally different literals first cluster by whether they are (b) Rule embeddings form clusters based on their structure with a
negated or grounded then by arity (grey lines added as visual aids); distinction between negated and non-negated rules (grey line added
from IMAsm. as visual aid), from DMN.
accuracy for all dimensions, for all 3 runs of IMA with
softmax attention across the test sets, we do not discern any
advantage for curriculum training over multi-task training
beyond the validation set. Figure 7c shows a similar decrease
in performance across the test sets for both training regimes.</p>
      <p>We believe this result stems from introducing new tasks with
each iteration and models not having any incentive to abstract
subtasks until the next set of unseen tasks are incorporated
into the training dataset.</p>
    </sec>
    <sec id="sec-7">
      <title>Discussion</title>
      <p>Given the simple, unit test like nature of the logic programs
generated, the lack of robust results for iterative neural
networks further encourages a combination of machine learning
and symbolic systems rather than encompassing one with the
other. In this section, we try to provide additional discussion
and insight into why one might or might not learn symbolic
reasoning from scratch using iterative neural networks.</p>
      <p>
        Whilst the basic logic programs presented in this paper
can all be solved using existing symbolic systems such as
Prolog
        <xref ref-type="bibr" rid="ref9">(Clocksin and Mellish 2003)</xref>
        , we struggle to see a
comparable performance from neural networks. Increasing
the number of steps in task 3, as shown in Figure 6,
demonstrates the fragile nature of using continuous representations
for rigid symbolic reasoning. The embedding space is
inherently limited in capacity as it has fixed number of dimensions.
      </p>
      <p>Although a 64 dimensional vector can in theory encode a
lot of information, in practice neural networks trained using
back-propagation do not seem to have any guarantees on how
efficiently they will learn representations in a vector space.</p>
      <p>We speculate that this creates an accumulative noise with
each iteration which eventually degrades the performance.</p>
      <p>On the other hand, the learnt continuous representations scale
to very long previously unseen symbols, Figure 7a, which is
a desirable property of neuro-symbolic systems.</p>
      <p>
        Attention mechanisms allow state-of-the-art memory
based networks to address and operate an external
memory
        <xref ref-type="bibr" rid="ref31 ref39 ref41 ref42">(Weston, Chopra, and Bordes 2015)</xref>
        . In the case of nueral
reasoning networks, the attention components provide the
means to select rules. An interesting outcome is that all
neural reasoning models try to attend to multiple rules when
applicable, for example when there are two matching rules
as shown in Figure 2. Unlike Prolog, this approach allows
the neural networks to simultaneously explore multiple
possible branches completing the reasoning task in fewer steps.
      </p>
      <p>
        However, we speculate such an attention mechanism will
become the bottleneck when there are large numbers,
possibly hundreds of matching rules such as in knowledge base
completion tasks since it will try to aggregate all matching
(a) The models can cope, in particular IMA (b) Mean accuracy over all tasks against in- (c) Mean accuracy of training regimes applied
with literal embeddings, when predicate and creasing embedding dimension d shows no to IMAsm against test sets across all
dimenconstant symbols of increasing length are ran- clear increase beyond d = 64. sions show no advantage of curriculum
traindomly generated. ing for generalisation.
rules in a single step. An explicit strong supervision of the
attention mechanism, similar to the original DMN
        <xref ref-type="bibr" rid="ref24">(Kumar et
al. 2016)</xref>
        work or a hierarchical architecture might be needed
to encourage a form of iterative backtracking.
      </p>
      <p>Lack of abstraction between seemingly related tasks limits
the performance on unseen logic programs. During
curriculum training, we noticed models which solve tasks 1, 2 and 3
have no advantage on solving task 4 because the final state
representation from task 3 specifically looks for a ground
instance such as p(a) to complete the task. However, in task
4 the model needs to match another rule p(X):- and iterate
once more. When presented with task 4, models most likely
have to adjust the intermediate state representation to check
for the second rule case; as a result Figure 7c can also be
interpreted as the lack of abstraction over increasingly
complex tasks in the dataset since curriculum learning provides
no clear advantage. In other words, the neural models do not
seem to learn a reasoning process that is general enough to
be compared to existing symbolic systems; consequently we
were unable to run them on existing logic program
benchmarks or against Prolog.</p>
    </sec>
    <sec id="sec-8">
      <title>Related Work</title>
      <p>
        There have been many attempts to combine symbolic
reasoning with machine learning techniques under the name
neuralsymbolic systems
        <xref ref-type="bibr" rid="ref15">(Garcez, Broda, and Gabbay 2012)</xref>
        . Lifted
Relational Neural Networks (Sourek et al. 2015) ground
clauses turning them into propositional programs when
constructing networks as a set of weighted definite clauses. We
do not pre-process programs to ground variables and Neural
Reasoning Networks must learn unification. TensorLog
        <xref ref-type="bibr" rid="ref10">(Cohen 2016)</xref>
        constructs “factor graphs” from logic rules which
in return create the network that run on one-hot encoded
constants. Our approach does not factor, compile or use any
implicit knowledge about first-order logical inference or rule
applications. We also only one-hot encode characters, not
entire predicates or constants, and only give labels 1 or 0
as targets to train end-to-end using the same neural network
with same architecture and weights for every normal logic
program. Logic Tensor Networks
        <xref ref-type="bibr" rid="ref33 ref35">(Serafini and Garcez 2016)</xref>
        tackle knowledge completion “on a simple but representative
example” also grounding every term in the program prior to
performing reasoning.
      </p>
      <p>
        Following the above mentioned works, Neural Theorem
Provers
        <xref ref-type="bibr" rid="ref32">(Rockta¨schel and Riedel 2017)</xref>
        learn distributional
representations of predicates and constants by symbolically
constructing the relationship between embeddings using an
existing symbolic inference engine. We design our tasks such
that the neural networks attempt to learn not only
representations at a character level but also the reasoning algorithm
with no help or knowledge of existing reasoning engines and
methods.
      </p>
      <p>
        Learning similarities between constants can be used to
perform link-prediction tasks
        <xref ref-type="bibr" rid="ref29">(Nickel et al. 2016)</xref>
        and
knowledge base completion
        <xref ref-type="bibr" rid="ref36">(Socher et al. 2013)</xref>
        but creates
unwanted inferences when similar constants should indeed be
unique (Rockta¨schel et al. 2014). Although we set every
constant to be unique, we expect embeddings of similar constants
to cluster during training if the data entails the same
conclusions. Creating differentiable logical inference networks can
also induce rules
        <xref ref-type="bibr" rid="ref13 ref14 ref21">(Evans and Grefenstette 2018)</xref>
        ; however, at
this stage we do not learn logical rules along side reasoning
tasks and assume they are given to the model. Possible World
Net
        <xref ref-type="bibr" rid="ref13 ref14">(Evans et al. 2018)</xref>
        follows a unique approach to
learning propositional logic entailment using semantic, worlds
interpretation; however, they exploit the syntax of logical
formulae by parsing them and constructing the neural network
in a tree like manner in which nodes correspond to logical
operators. The works mentioned so far are designed for either
deductive databases, relation learning, link prediction,
knowledge base completion or propositional programs; thus our
task of learning reasoning over and embeddings of normal
logic programs using a fixed RNN-based iterative network
is inherently different making a direct empirical comparison
unreasonable.
      </p>
      <p>
        Neural Reasoning Networks can be seen as interpreters
of logic programs as rules can act like instructions. This
perspective reflects on systems such as Neural Program
Interpreters
        <xref ref-type="bibr" rid="ref31">(Reed and De Freitas 2015)</xref>
        and Neural Symbolic
Machines (Liang et al. 2016). These systems contain discrete
operations that allow more complex actions to be performed
overcoming the problem of a degrading state representation;
however, they require a reinforcement learning setting to
train. We believe a reinforcement learning approach applied
on our dataset would learn a similar algorithm to that of
Prolog
        <xref ref-type="bibr" rid="ref9">(Clocksin and Mellish 2003)</xref>
        .
      </p>
    </sec>
    <sec id="sec-9">
      <title>Conclusion</title>
      <p>We presented a new synthetic dataset and provided insights
into how machine learning might encompass symbolic
reasoning, defined as logic programs using RNN-based iterative
neural networks. Fully differentiable models trained
end-toend have their inherent disadvantages: they seem to lose track
when the number of iterations is increased and the embedding
space is limited in capacity. However, such networks might
still hold the key to incorporate symbolic prior knowledge
into a continuous space by understanding how that
embedding space is organised to store symbolic information.</p>
      <p>Since such neural networks provide a differentiable but
approximate reasoning engine over logic programs, in the
future we hope to induce rules using continuous embeddings
of logical rules by propagating gradients back to the context.
However, initially if possible, a more robust neural reasoning
network must be learned, one that is comparable in
performance to existing logic-based expert systems.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Apt</surname>
            ,
            <given-names>K. R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Bol</surname>
            ,
            <given-names>R. N.</given-names>
          </string-name>
          <year>1994</year>
          .
          <article-title>Logic programming and negation: A survey</article-title>
          .
          <source>The Journal of Logic Programming</source>
          <volume>19</volume>
          :
          <fpage>9</fpage>
          -
          <lpage>71</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Apt</surname>
            ,
            <given-names>K. R.</given-names>
          </string-name>
          , and Van Emden,
          <string-name>
            <surname>M. H.</surname>
          </string-name>
          <year>1982</year>
          .
          <article-title>Contributions to the theory of logic programming</article-title>
          .
          <source>Journal of the ACM (JACM) 29</source>
          (
          <issue>3</issue>
          ):
          <fpage>841</fpage>
          -
          <lpage>862</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Battaglia</surname>
            ,
            <given-names>P. W.</given-names>
          </string-name>
          ; Hamrick,
          <string-name>
            <given-names>J. B.</given-names>
            ;
            <surname>Bapst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            ;
            <surname>Sanchez-Gonzalez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Zambaldi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            ;
            <surname>Malinowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Tacchetti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Raposo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ;
            <surname>Santoro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Faulkner</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; et al.
          <year>2018</year>
          .
          <article-title>Relational inductive biases, deep learning, and graph networks</article-title>
          .
          <source>arXiv preprint arXiv:1806</source>
          .01261.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Louradour</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Collobert, R.; and
          <string-name>
            <surname>Weston</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>Curriculum learning</article-title>
          .
          <source>In Proceedings of the 26th annual international conference on machine learning</source>
          ,
          <fpage>41</fpage>
          -
          <lpage>48</lpage>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Besold</surname>
            ,
            <given-names>T. R.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Garcez</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>d</year>
          .; Bader,
          <string-name>
            <surname>S.</surname>
          </string-name>
          ; Bowman,
          <string-name>
            <surname>H.</surname>
          </string-name>
          ; Domingos,
          <string-name>
            <surname>P.</surname>
          </string-name>
          ; Hitzler,
          <string-name>
            <given-names>P.</given-names>
            ; Ku¨hnberger, K.-U.;
            <surname>Lamb</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. C.</given-names>
            ;
            <surname>Lowd</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          ; Lima,
          <string-name>
            <surname>P. M. V.</surname>
          </string-name>
          ; et al.
          <year>2017</year>
          .
          <article-title>Neural-symbolic learning and reasoning: A survey and interpretation</article-title>
          .
          <source>arXiv:1711</source>
          .
          <fpage>03902</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ; Van Merrie¨nboer, B.;
          <string-name>
            <surname>Bahdanau</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ; and Bengio,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          <year>2014</year>
          .
          <article-title>On the properties of neural machine translation: Encoder-decoder approaches</article-title>
          .
          <source>arXiv:1409</source>
          .
          <fpage>1259</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Clark</surname>
            ,
            <given-names>K. L.</given-names>
          </string-name>
          <year>1978</year>
          .
          <article-title>Negation as failure</article-title>
          .
          <source>In Logic and data bases</source>
          . Springer.
          <fpage>293</fpage>
          -
          <lpage>322</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Clocksin</surname>
            ,
            <given-names>W. F.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Mellish</surname>
            ,
            <given-names>C. S.</given-names>
          </string-name>
          <year>2003</year>
          .
          <article-title>Programming in PROLOG</article-title>
          . Springer Science &amp; Business Media.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Cohen</surname>
            ,
            <given-names>W. W.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Tensorlog: A differentiable deductive database</article-title>
          .
          <source>arXiv:1605</source>
          .
          <fpage>06523</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <year>1995</year>
          .
          <article-title>Neural prolog-the concepts, construction and mechanism</article-title>
          .
          <source>In Systems, Man and Cybernetics</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <article-title>Intelligent Systems for the 21st Century.</article-title>
          , IEEE International Conference on, volume
          <volume>4</volume>
          ,
          <fpage>3603</fpage>
          -
          <lpage>3608</lpage>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Evans</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Grefenstette</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>Learning explanatory rules from noisy data</article-title>
          .
          <source>Journal of Artificial Intelligence Research</source>
          <volume>61</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Evans</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ; Saxton,
          <string-name>
            <given-names>D.</given-names>
            ;
            <surname>Amos</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          ; Kohli,
          <string-name>
            <given-names>P.</given-names>
            ; and
            <surname>Grefenstette</surname>
          </string-name>
          ,
          <string-name>
            <surname>E.</surname>
          </string-name>
          <year>2018</year>
          .
          <article-title>Can neural networks understand logical entailment</article-title>
          ? arXiv:
          <year>1802</year>
          .08535.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Garcez</surname>
            ,
            <given-names>A. S.</given-names>
          </string-name>
          <year>d</year>
          .; Broda, K. B.; and
          <string-name>
            <surname>Gabbay</surname>
            ,
            <given-names>D. M.</given-names>
          </string-name>
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>Goodfellow</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ; Bengio,
          <string-name>
            <given-names>Y.</given-names>
            ; and
            <surname>Courville</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          <year>2017</year>
          .
          <article-title>Deep Learning</article-title>
          . The MIT Press.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Graves</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Wayne</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Reynolds,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Harley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Danihelka</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          ;
          <article-title>Grabska-Barwin´ska,</article-title>
          <string-name>
            <given-names>A.</given-names>
            ;
            <surname>Colmenarejo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. G.</given-names>
            ;
            <surname>Grefenstette</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ;
            <surname>Ramalho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Agapiou</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          ; et al.
          <year>2016</year>
          .
          <article-title>Hybrid computing using a neural network with dynamic external memory</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <source>Nature</source>
          <volume>538</volume>
          (
          <issue>7626</issue>
          ):
          <fpage>471</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <surname>Graves</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Wayne</surname>
          </string-name>
          , G.; and
          <string-name>
            <surname>Danihelka</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>Neural turing machines</article-title>
          .
          <source>arXiv:1410</source>
          .
          <fpage>5401</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Hochreiter</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Schmidhuber</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>1997</year>
          .
          <article-title>Long short-term memory</article-title>
          .
          <source>Neural Computation</source>
          <volume>9</volume>
          (
          <issue>8</issue>
          ):
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <string-name>
            <surname>Hudson</surname>
            ,
            <given-names>D. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C. D.</given-names>
          </string-name>
          <year>2018</year>
          .
          <article-title>Compositional attention networks for machine reasoning</article-title>
          . arXiv:
          <year>1803</year>
          .03067.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Kingma</surname>
            ,
            <given-names>D. P.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ba</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>Adam: A method for stochastic optimization</article-title>
          .
          <source>arXiv:1412</source>
          .
          <fpage>6980</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Komendantskaya</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <year>2011</year>
          .
          <article-title>Unification neural networks: unification by error-correction learning</article-title>
          .
          <source>Logic Journal of the IGPL</source>
          <volume>19</volume>
          (
          <issue>6</issue>
          ):
          <fpage>821</fpage>
          -
          <lpage>847</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Irsoy</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ondruska</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Iyyer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bradbury</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Gulrajani</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Zhong</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Paulus</surname>
            ,
            <given-names>R.</given-names>
            ; and Socher, R.
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          <article-title>Ask me anything: Dynamic memory networks for natural language processing</article-title>
          . In ICML,
          <fpage>1378</fpage>
          -
          <lpage>1387</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          2016.
          <article-title>Neural symbolic machines: Learning semantic parsers on freebase with weak supervision</article-title>
          .
          <source>arXiv:1611</source>
          .
          <fpage>00020</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Sutskever</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ; Chen,
          <string-name>
            <given-names>K.</given-names>
            ;
            <surname>Corrado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. S.</given-names>
            ; and
            <surname>Dean</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          <year>2013</year>
          .
          <article-title>Distributed representations of words and phrases and their compositionality</article-title>
          .
          <source>In NIPS</source>
          ,
          <fpage>3111</fpage>
          -
          <lpage>3119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          <string-name>
            <surname>Muggleton</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>De Raedt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <year>1994</year>
          .
          <article-title>Inductive logic programming: Theory and methods</article-title>
          .
          <source>The Journal of Logic Programming</source>
          <volume>19</volume>
          :
          <fpage>629</fpage>
          -
          <lpage>679</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          <string-name>
            <surname>Nickel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Rosasco</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Poggio</surname>
            ,
            <given-names>T. A.</given-names>
          </string-name>
          ; et al.
          <year>2016</year>
          .
          <article-title>Holographic embeddings of knowledge graphs</article-title>
          .
          <source>In AAAI</source>
          ,
          <fpage>1955</fpage>
          -
          <lpage>1961</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          <string-name>
            <surname>Pennington</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Socher, R.; and
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <year>2014</year>
          .
          <article-title>Glove: Global vectors for word representation</article-title>
          .
          <source>In EMNLP</source>
          ,
          <fpage>1532</fpage>
          -
          <lpage>1543</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          <string-name>
            <surname>Reed</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and De Freitas,
          <string-name>
            <surname>N.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Neural programmerinterpreters</article-title>
          .
          <source>arXiv:1511</source>
          .
          <fpage>06279</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          <string-name>
            <surname>Rockta</surname>
          </string-name>
          ¨schel, T., and
          <string-name>
            <surname>Riedel</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <year>2017</year>
          .
          <article-title>End-to-end differentiable proving</article-title>
          .
          <source>In NIPS</source>
          ,
          <fpage>3791</fpage>
          -
          <lpage>3803</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          <string-name>
            <surname>Russell</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Norvig</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <year>2016</year>
          .
          <article-title>Artificial Intelligence: A Modern Approach (3rd Edition)</article-title>
          .
          <source>Pearson.</source>
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          <string-name>
            <surname>Santoro</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Raposo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Barrett</surname>
            ,
            <given-names>D. G.</given-names>
          </string-name>
          ; Malinowski,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Pascanu</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; Battaglia,
          <string-name>
            <surname>P.</surname>
          </string-name>
          ; and Lillicrap,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <year>2017</year>
          .
          <article-title>A simple neural network module for relational reasoning</article-title>
          .
          <source>In NIPS</source>
          ,
          <fpage>4974</fpage>
          -
          <lpage>4983</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Garcez</surname>
          </string-name>
          , A. d.
          <year>2016</year>
          .
          <article-title>Logic tensor networks: Deep learning and logical reasoning from data and knowledge</article-title>
          .
          <source>arXiv:1606</source>
          .
          <fpage>04422</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          <string-name>
            <surname>Socher</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Manning</surname>
          </string-name>
          , C. D.; and
          <string-name>
            <surname>Ng</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          <article-title>Reasoning with neural tensor networks for knowledge base completion</article-title>
          .
          <source>In NIPS</source>
          ,
          <fpage>926</fpage>
          -
          <lpage>934</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          2015.
          <article-title>Lifted relational neural networks</article-title>
          .
          <source>arXiv:1508</source>
          .
          <fpage>05128</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          <string-name>
            <surname>Sukhbaatar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Weston</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Fergus,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ; et al.
          <year>2015</year>
          .
          <article-title>End-to-end memory networks</article-title>
          .
          <source>In NIPS</source>
          ,
          <fpage>2440</fpage>
          -
          <lpage>2448</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>
          <string-name>
            <surname>Tai</surname>
            ,
            <given-names>K. S.</given-names>
          </string-name>
          ; Socher, R.; and
          <string-name>
            <surname>Manning</surname>
            ,
            <given-names>C. D.</given-names>
          </string-name>
          <year>2015</year>
          .
          <article-title>Improved semantic representations from tree-structured long short-term memory networks</article-title>
          .
          <source>arXiv preprint arXiv:1503</source>
          .
          <fpage>00075</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          <string-name>
            <surname>Weston</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Bordes</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Chopra</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Rush</surname>
          </string-name>
          , A. M.; van Merrie¨nboer, B.;
          <string-name>
            <surname>Joulin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ; and Mikolov,
          <string-name>
            <surname>T.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Towards ai-complete question answering: A set of prerequisite toy tasks</article-title>
          .
          <source>arXiv:1502</source>
          .
          <fpage>05698</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref42">
        <mixed-citation>
          <string-name>
            <surname>Weston</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Chopra,
          <string-name>
            <given-names>S.</given-names>
            ; and
            <surname>Bordes</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          <year>2015</year>
          .
          <article-title>Memory networks</article-title>
          .
          <source>ICLR.</source>
        </mixed-citation>
      </ref>
      <ref id="ref43">
        <mixed-citation>
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Meity</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ; and Socher,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2016</year>
          .
          <article-title>Dynamic memory networks for visual and textual question answering</article-title>
          .
          <source>In ICML</source>
          ,
          <fpage>2397</fpage>
          -
          <lpage>2406</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref44">
        <mixed-citation>
          <string-name>
            <surname>Zaremba</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ; Mikolov,
          <string-name>
            <given-names>T.</given-names>
            ;
            <surname>Joulin</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          ; and Fergus,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref45">
        <mixed-citation>
          <article-title>Learning simple algorithms from examples</article-title>
          .
          <source>In ICML</source>
          ,
          <fpage>421</fpage>
          -
          <lpage>429</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>