Neuro-Symbolic Forward Reasoning
Authors: Hikaru Shindo
Devendra Singh Dhami
Kristian Kersting
Venue: ICLR 2022 Submitted (2022)
Keywords: neuro-symbolic AI
differentiable logic
object-centric reasoning

Abstract: Reasoning is an essential part of human intelligence and thus has been a long-standing goal in artificial intelligence research. With the recent success of deep learning, incorporating reasoning with deep learning systems i.e. neuro-symbolic AI has become a major field of interest. We propose Neuro-Symbolic Forward Reasoner (NS-FR), a new approach for reasoning tasks taking advantage of differentiable forward-chaining using first-order logic. The key idea is to combine differentiable forward-chaining reasoning with object-centric learning. Differentiable forward-chaining reasoning computes logical entailments smoothly, i.e., it deduces new facts from given facts and rules in a differentiable manner. The object-centric learning approach factorizes raw inputs into representations in terms of objects. This allows us to provide a consistent framework to perform the forward-chaining inference from raw  inputs. NS-FR factorizes the raw inputs into the object-centric representations, then converts them into probabilistic ground atoms and finally performs differentiable forward-chaining inference using weighted rules for inference. Our comprehensive experimental evaluations on object-centric reasoning data sets, 2D Kandinsky patterns and 3D CLEVR-Hans, and variety of tasks show the effectiveness and advantage of our approach.

Under review as a conference paper at ICLR 2022
NEURO-SYMBOLLS FORWARD REASONING
Anonymous authors Paper under double-blind review
ABSTRACT
Reasoning is an essential part of human intelligence and thus has been long- standing goal in artificial intelligence research. With the recent success of deep learning, incorporating reasoning with deep learning systems, i.e., neuro-yymbolic AI has become a major field of interest. We propose the Neuro-Symbolic Forward Reasoner (NSFR), new approach for reasoning tasks taking advantage of differ- entiable forward-chaining using first-order logic. The key idea is to combine dif- ferentiable forward-chaining reasoning with object-centric (deep) learning. Dif- ferentiable forward-chaining reasoning computes logical entailments smoothly, i.e., it deduces new facts from given facts and rules in differentiable manner. The object-centric learning approach factorizes raw inputs into representations in terms of objects. Thus, allows us to provide consistent framework perform the forward-chainine raw inputs into the object-centric representations, converts them into probabilistic ground atoms, and finally performs differentiable forward forward-chaining inference us- ing weighted rules for inference. Our comprehensive experimental evaluations on object-centric reasoning data sets, 2D Kandinsky patterns and 3D CLEVR-Hans, and a variety of tasks show the effectiveness and advantage of our approach.
inference from raw inputs. NSFR factorizes the
INTRODUCTION
Right from the time of Aristotle, reasoning has been in the center of the study of human behavior (Miller 1984). Reasoning can be defined as the process of deriving conclusions and predictions from available data. The long-lasting goal of artificial intelligence has been to develop rational agents akin to humans, and reasoning is considered to be a major part of achieving rationality (Johnson-Laing 2010). Logic, both propositional and first-order, is established framework perform reasoning on machines (Boole 1847). Such logical reasoning has been an essential part of the growth of machine learning over the years (Poole al.) 1987 Bottou|
2014 DDi et al.. (019) and has also
given rise to statistical relational learning (Koller et al.) 2007 Raedt et al. (2166) and probabilistic logic programming (Lukasiewicz) 1998
De Raedt & Kersting
2003 De Raedt & Kimmig 2015).
Object-centric reasoning has been widely addressed (Johnson et al., 2017] Mao et al.) 2019 Chen jet al. 2021; Han et al., 2019), where the task is to perform reasoning to answer the questions that are about the objects and its altributes. However, the task is challenging because the models should per- form low-level visual perception and reasoning on high-level concepts. To mitigate this challenge, with the recent success of deep learning, incorporating logical reasoning with deep learning systems, i.., neuro-symbolic AI has become a major field of interest (De Raedt et al., 2019) Gareez et al, 2019). It has the advantage of combining the expressivity of neural networks with the reasoning of symbolic methods.
Various benchmarks and methods have been developed for object-centric reasoning (Locatello et al. 2020b Nanbo et al.) 2020). Recently, data sets such as Kandinsky patterns (Mueller & Holzinger, 2019 202T) and CLEVR (Johnson et al.) 2017) have been proposed assess the performance of the machine learning systems in object-centric reasoning tasks. For example, Figure shows an example of the Kandinsky pattern: "the figure has two pairs of objects with the same shape" where Fig. (a) is following the pattern and Fig. (b) is not. Kandinsky patterns are inspired by human IQ-tests (Bruner et 1956 Dowe & Hernández- Orallo 2012 Liu al., 2019). which require humans to think on abstract patterns. The key feature of Kandinsky Patterns is its complexity, e.g., the arrangement objects, closure or symmetry, and group of objects.
2019 Holzinger

---

Under review as a conference paper at ICLR 2022
Many approaches have been investigated for object-centric reason- ing under the umbrella of neuro- symbolly learning (Rocktäschel &
Yang et al., 2017 Sourck et al. 2018: Manhacve et a 2018 Si et al.) 2019; Mao et al., 2019 Cohen et al., [020]
Ricdel, 2017
Riegel et al. 2020). However, using these approaches it is diffi- cult, if not impossible, to solve object-centric reasoning tasks such as Kandinsky patterns due to several underlying challenges: (i) the perception of the objects from the raw inputs and (ii) the reasoning on the attributes and the relations to capture the complex patterns (of varying size).
(a)
(b)
Figure 1: Examples of
Kandinsky patterns. (a) fol- lows the patter:: "the figure has 2 pairs of objects with the same shape" but (b) isn't
In this work, we propose the (NSFR), novel neuro-symbolic learning framework for complex
Forward Reasoner
object-centric reasoning tasks. The key idea is to combine neural-based object-centric learning models with the differentiable implementation of first-order logic. It has three main components: (i) object-centric perception module, (ii) facts converter, and (iii) differentiable reasoning module. The object-centric perception module extracts information for each object and has been widely addressed in the computer vision community (Locatello et al. 2020a] Redmon et al. (016). Facts converter converts the output of the visual perception module into the form of probabilistic logical atoms, which can be fed into the reasoning module. Finally, differentiable reasoning module performs the differentiable forward-chaining inference from a given input. It computes the set of ground atoms that can be deduced from the given set of ground atoms and weighted logical rules (Evans & Grefenstette] 2018 Shindo et al., 2021). The final prediction can be made based on the result of the forward-chaining inference.
Overall, we make the following contributions: (1) We propose Neuro-Symbole Forward Reasoner (NSFR), a new neuro-symbolic learning framework that performs differentiable forward-chaining inference from visual data using object-centric models. NSFR can solve problems involving com- plex patterns on objects and attributes, such as the arrangement of objects, closure, symmetry. (2) To establish NSFR, we show an extended implementation of the differentiable forward-chainigg inference to overcome the scalability problem. Moreover, NSFR can take advantage of some es- sential features of the underlying neural network, such as batch computation, for logical reasoning. (3) To establish NSFR, we provide a conversion algorithm from object-centric representations to probabilistic facts. We propose neural predicates, which are associated with function to produce a probability a fact and yield a seamless combination of sub-symbolic and symbolic represen- tations. (4) We empirically show that NSFR solves object-centric reasoning tasks more effectively than the SOTA logical and deep learning models. Furthermore, NSFR classifies complex patterns with high accuracy for 2D and 3D data sets, outperforming pure neural-based approaches for image recognition.
BACKGROUND AND RELATED WORK
We use bold lowercase letters v, w... for vectors and the functions that return vectors. We use bold capital letters X,.. . for tensors. We use calibrate letters A, for (ordered) sets and typewriter font p(X, Y) for terms and predicates in logical expressions (Appendix A. for details).
Notation.
We consider function-free first-order logic. Language L is tuple (P, T, V), where P is a of predicates, T is set of constants, and V is set of variables. A term is a constant or a variable. We assume that each term has a datatype. A datatype dt specifies a set of constants (dt( Tax S T. We denote n-ary predicate p by p/(n, [át]..... dt,,)). where dt, is the datatype of i-th argument. An atom is a formula .(....... tn), where is an n-ary predicate symbol and ti....; t, are terms. A ground atom or simply a fact is an atom with no variables. literal is an atom or its negation. A positive literal is just an atom. A negative literal is the negation of an atom. A clause is a finite disjunction (V) of literals, A definite clause is a clause with exactly Bn are atoms, then AV -B, V ... V -B, is a definite clause. We write definite clauses in the form of A -0----.- BI...., Bn. Atom A is called the head, and set of negative atoms {B1,. [ B,) } is called the body. We denote special constant true T and false as L. Substitution 0 = {x1 = t,...., X, = t, } is an assignment of term t, to variable X,. An application of substitution 0 to atom A is written as A0.
Preliminaries.
one positive literal. If A, BI...
2

---

Under review as a conference paper at ICLR 2022
Related Work. Reasoning with neuro-symbolic systems has been studied extensively for various
applications such as ocean study (Corchado) 1995), business internal control (Corchado et al. 2004)
and forecasting [Fdez-Riverola et al. 20022). More recently, several neuro-symbolic techniques
for commonsense reasoning (Arabshahi et al. 202T), visual question answering (Mao et al., 2019)
Amizadeh et al.] (020)) and multimedia tasks (Khan & Curry 2020) have been developed. They
either do not employ a differentiable forward reasoner or miss objet-centric learning in the end-to-
end reasoning architecture.
Object-centric learning is an approach to decompose an input image into representations in terms of objects (Dittadi al., 202I). This problem has been widely addressed in the computer vision community. The typical approach is the object detection (or supervised) approach such as Faster- RCNN (Ren et al. 2015) and YOLO (Redmon et al.) 2016). Another approach the unsupervised approach (Burgess et al. 2019 Engelcke et al.) 2020; Locatello et al., 2020a), where the models acquire the ability of have different advantages. NSFR encapsulates different sejject-prrcettion models, thus allows to choose a proper model depending on the situation and the problem to be solved.
without or fewer annotations. These two different paradigms
Also, the integration of symbolic logic and neural networks has been addressed, see e.g. Deep- Problog (Manhaeve et al. (2188) and NeurASP (Yang et al., (020). The key difference from the past approaches is that NSFR supports essential features of neural networks such as batch computation and that is fully differentiable. Thus it scales well to large data sets, leading to several avenues for future work learning neural networks with logical constraints (Hu et al.) 2016 Xu et al. 2018).
THE YMMOLIC FORWARD REASONER (NSFR)
Let us now introduce the Neuro-Symbollc Forward Reasoner (NSFR) four steps. First, we give an overview of the problem setting and the framework. Second, we specify language of first-order logic focusing on the object-centric reasoning tasks. Third, we explain the facts converter. Finally, show the differentiable forward-chaining inference algorithm, extended implementation from the previous approaches.
3.1 OVERVIEW
Problem Scenario. We address the image classification problem, where each image contains ob- jects, and the classification rules are defined on the relations of objects and their attributes. We define the object-centric reasoning problem as follows:
Definition An Object-Cenne Centric Reasoning Problem Q is a tpple (I+,I-, where I+ is a set of images that follow pattern P. I is a set of images that do not follow pattern P. Each image X E I+ UI- contains several objcets, and each object has ils altributes. Pattern P is a pattern that is described and relations of objects. The solution of problem Q is set of binary labels y = (y:he=...... for each image X; I UI", where N- I UI
logical rules or natural language sentence, which defined the attributes
Architecture Overview. NSFR performs object-centric perception from raw input and reasoning on the extracted high-level concepts. Figure Figure2presents an overview of NSFR. First, NSFR perceives objects from raw input whose output each vector represents each object in the input. Then, the fact converter takes these object-centric representations as input and returns a set of probabilistic facts. The probabilistic facts are then fed into the reasoning module, which performs differentiable forward-chaining inference using weighted rules. Finally, the final prediction is made on the result of the inference. We briefly summarize the steps of the process as follows:
vectors, called object-centric representations, where
Step 1: Let X E IR BxN be batch of input images. Perception function fpereept : R BxN IR BxXE factorizes input into a set of object-centric representations Z E IR Bx where
E E N is the number of objects, D E N is the dimension of object-centric vector, Step 2: Let G be a set of ground atoms. Convert function fconvert Bx x g + r BxG generates probabilistic vector representation of facts, where G (9).
Step 3: Infer function finfer R BxG + F BxG computes forward -haunnnn inference using weighted clauses C.
3

---

Under review as a conference paper at ICLR 2022
legend
xp(K) -1,001 Anf02, X), same www.sbaappp.... gale 02),
12,33, In to,e _awppppppp..oooooo pate(() D1)
differentiable
clauses
pain(E V): stapels, 2), shape(Y.
terior encoder
non-di fifeeeibabblee
coloonobp3t red)) cokorfoty1 bluel, colerjoby3 yallow)
W:
paraneters
X E R BxN
E IR BxExD
Voe E
index
I NO Nxxx8xL
coler (ob11, blus)
nbape (obg) cirsle)
Vr E R BxC
eja
0890cojer(bb]2 (ob)2.blun) 0.98:abagw (arrc,
2316
Taces converter
for ining inference
0. 0.01 (ing)
(oagt,
W
0.05:
sbgpaeaal circle)
predict
colo [08]2,
chape circle)
input
object- Dect-centric
representation
Figure 2: An overview NSFR. The object-centric model produces outputs terms objects. The facts converter obtains probabilistic facts from the object-centric representation. The differentiable forward-chaining inference computes the logical entailment softly from the probabilistic facts and weighted rules. The final prediction is computed based the entailed facts.
Step 4: Predict function fpredict BBG R computes the probability of target facts. The probability of the labels y of the batch of input X is computed as:
p(y[X) fprea(fineet (fcovverf (fpercept (X; ().9:));CC W)),
where 4, O and W are learnable parameters.
We now present each component of architecture in detail.
3.2 ORJECT-CENTREE REASONING LANGUAGE
We have to define first-order logic language to build a consistent neuro-symben syuro-symbolic framework for object-centric reasoning. Intuitively, we assume that all constants are divided into inputs, objects, and attributes, and the attribute constants have different data types such colors and shapes.
Definition 2 An Object-Centric Reasoning Language is a function-free language L = (P; T, V), a of constants, and V is set of variables. The set constants
where P is set of predicates, T is divided to set of inputs X, a set of objects O, and set of attribbutes A, i.e., T XUOUA. The attribute constants
devided into a set of constants for each datatype, i.e.. Aat. U. UAt.. where Aut, is set of constants of the i-th datatype dt,.
Example 1: The language for Figure 2 can be represented as L1 = (P,T.M V), where p shape/ /object, shapel). same shape pair(2, |object, object])}. and l T XUOUUActoor Ashape where X' (img), O 1, obj3, obj4]. Acoler (red, yellow, blue) where Ashape (square, ciecle, triangle), and V = (x, Y, Z, 01, 02, 03, 04).
(kp/(1, [image]), in/(2, /object, image]), color / (object, color)).
3.3 OBJECT-CENTRIC PERCEPTION
We make the minimum assumption that the perception function takes an image and returns a set of object-centric vectors, where each of the vectors represents each object. For simplicity, we assume that each dimension of the vector represents the probability of the attributes for each object. For example, suppose each object has color, shape, position attributes. The color varies red, blue, yellow, the shape varies square, circle, triangle, and position is represented as (I,, y) coorddaaasss In this case, each object can be represented as 8-dim vector, illustrated in Figure
Let N be the input size, be the maximum number of objects that can appear in one image, and D) be the number of attributes for each object. For a batch of input images X E BBx, the object- centric perception function fpercept BBNN + IR BxxED parameterized & produces a batch of
object-centric representations Z E Bx Z = Spercepe (X; .). We note that each value Zi represents the probability of the k-th attribute on the j-th object the i-th image in the batch. We denote the tensor for j-th object Z Zyj.: BBBDD
4

---

Under review as a conference paper at ICLR 2022
object-centric representation
ground atons
probabilistic facts (valuation tensor)
input
Z
IR B BxExD
color(ob]3. red), sbape(obj1, circle)....
DOA
v R B
facts converter
color(obj3, red)
0.98 color(ob,3.rer
21 Azed)
0.98 chape tob 1
0
0b rod)
0b33
shapa(abj1, (ircccl
shape 0611
dbja
DOA
(1 Actrrs)
attribute
Fabayo
rami
one- hot
DOa
encading
Ared
Actrci
DOA
3c
Figure 3: An overview of the facts-converting process. NSFR decomposes the raw-input images into the object-centric representations (left). The valuation functions are called to compute the probability of ground atoms (middle). The result is converted into the form of vector representations of the probabilistic ground atoms (right).
3.4 FACTS CONVERTER
After the object-centric perception, NSFR obtains the logical representation, i.e., of probabilis- tic ground atoms. We propose a new type of predicate that can refer to differentiable functions to compute the probability and seamless converting algorithm from the perception result to proba- bilistic ground atoms.
3.4.1 TENSOR REPRESENTATIONS OF CONSTANTS
Specifically, in NSFR, constants are mapped to tensors as described below.
Objects. We map the object constants to the object-centric representation from the risual-perception module. The output of the visual- pprcceptonn module is already factorized in terms of objects. There- fore the tensor for each object is extracted easily by slicing the output.
Attributes. We map the attribute constants to their corresponding one-hot encoding and assume that it is expanded to the batch size. Let & be the of one-hot encoding of attribute constants in language L. For e.g., for language L1 in Example 1, color red has tensor representation as Ared = [[I, 0, 0]. [1, 0, 0]] g2x3, where the batch size is 2. We assume that have the encoding for each attribute, i.e., Ec, {Ared: Ayellow: Ablue Auquare Acircle; Atriangle)
In summary, we define the tensor representations for each object and attribute constant t as:
(z())
if obji E
(t:
if t = attr, E Aat
dt
where (2) Eg is the one-hot encoding of the i-th attribute of datatype dt. For example, fto_tensor (obj1; (,E,, Ec,) (1) and fto.tensor Z, Ec,) Ared [[1, 0, 0J, [1,
3.4.2 NEURAL PREDICATE
To solve the object-centric reasoning tasks, the model should capture the relation that is character- ized by continuous features, for e.g., the close by relation between two objects. To encode such concepts into the form of logical facts, we introduce neural predicate that composes ground atom associated with a differentiable function. Neural predicates computes the probability of the ground atoms using the object-centric representations from the visual perception module.
Definition 3 A neural predicate p/(n, [dt,...., dta)) is n-ary predicate associated with func- tion lip dR x..xx, + R where dt; is the datatype of the i-th argument, and d, E N is the dimension of the tensor representation of the constant whose datatype is dt;
Example 2: Figure illustrates how the neural predicates and the valuation functions computed. (1) For neural predicate color/ jojject, color)), the probability of ground atom color(obj3, red) is computed by valuation function Vcoler 1R2x5 R2x3 IR2 as
5

---

Under review as a conference paper at ICLR 2022
Area) sunt (Z. 00:3 3 Area), where Arad E {0, 13223 is one-hot encoding of the color of red that is expanded to the batch size, sum, is the sum operation for the dimension 1, and @ the element-wise multiplication. (2) Likewise, for neural predicate shape/(2, [object, shapel), the probability of ground atom shape(obji. circle) is computed by valuation function Ushape R2x5 x R223 - R22 as Ushapa (Z(1, Actrcia) sum (Z @ Actreio). (3) For neural pred-
Vealor (Z)
icate closeby(2/[objj) [objttcctttttt/eo (eeojjectoojecct]] object]), the probability of ground atom closeby(obj1. obj2) is computed by valuation functioin Uclosaby R2x5 x R223 + as: Velosaby (Z ( =
norro (z.2 - .,4.6) w). where noriig the norm function along dimension 0, a is
sigmoid function for each element of the input, and is the trainable parameter. By adapting the parameters in neural predicates, NSFR can learn the concepts determined by numerical attributes and their relations. We note that valuation functions of neural predicates be replaced by other differentiable functions, e.g., multilayer perceptrons.
3.4.3 CONVERSION ALGORITHM TO VALUATION TENSORS
The facts converter produces of probabilistic ground atoms that are fed into the reasoning module. In NSER, the probabilistic facts are represented in the form of tensors called valuation tensors.
Valuation. Valuation tensor V(O) E BBB maps each ground atom into a continuous value at each time step Each value vi represents the probability of ground atom F, 9 for the i-th example in the batch. The output of the perception module Z E BxXEE is compiled into initial valuation tensor V(0), The differentiable inference function is performed based on valuation tensors. To compute the T-step forward-chaining inference, we compute the sequence of valuation tensors (()) v(")....,.(! V(T)
Conversion into Valuation Tensors. Neural predicates yield seamless conversion algorithm from the object-centric vectors into the probabilistic facts. Algorithm (see Appendix B) describes the converting procedure. For each ground atom, if it consists of a neural predicate, then the valua- tion function is called to compute the probability of the atom. We note that the valuation function computes probability in batch. NSFR allows background knowledge as a set of ground atoms. The probability of background knowledge is set to 1.0.
3.5 DIFFERENTIABLS FORWARD-CHAINING INFERENCE
NSFR performs reasoning based on the differentiable forward-chaining inference approach (Evans & Grefenstette 2018 Shindo et al./ (2221) The key idea is to implement the forward reasoning of first-order logic using tensors and operations between them using the following steps: (Step 1) Ten- sor I, which is called index tensor, is built from given set of clauses C and fixed set of ground atoms g. It holds the relationships between clauses and ground atoms G. Its dimension proportional to |C] and GG). (Step 2) A computational graph is constructed from I and clause weights W. The weights define probability distributions over clauses C, approximating a logic program softly. The probabilistic forward-chaine chaining inference is performed by the forwarding algorithm on the computa- tional graph with input (0), which is the output of the fact converter. We now step-wise describe the process.
3.5.1 TENSOR ENCODING
We build tensor that holds the relationships between clauses C and ground atoms G. We assume that C and G are an ordered set, i.e., where every element has its own index. Let T. be the maximum body length in C, S be the maximum number of substitutions for existentially quantified variables in clauses C, = (C), and G = (G). Index tensor E NCXGxSXL contains the indices of the ground atoms to compute forward inferences. Intuitively, I.j.k.I is the index of the I-th ground atom (subgoal) in the body of the i-th clause to derive the j-th ground atom with the k-th substitution for existentially quantified variables.
Example 3: Let Rg = kp(x) : - in(01, x), (01, square) E C and F2 = kp(ing) E G, and assume that object constants are (obj1, 1, obj2). To deduce fact F2 using clause Ro-

---

Under review as a conference paper at ICLR 2022
F2 and the head atom be unified by substitution = - img). By applying 0 to body atoms, we get clause kp(img) - -in(O1, img), shape(O1, square). which has an existentially quantified variable 01. By considering the possible substituions for 01, have grounded clauses as <ppimg) - in anjo 1, img), shape( square), kp(ing) iijobj2 img), shapel shape(obj22 square). Then the following table shows tensor Io and I...1.;
3
0
3
4
5
g
1
T
kp(img)
in(obji, img)
in(obj2, img)
shape square)
10,500,
0,,0 [0.0]
3.5
0,0 0
0.0
0, [0, 0]
Io,s.
[1
4.6
[0
[0.0]
Ground atoms 9 and the indices are represented on the upper rows in the table. For ex- ample, Io,2.0. = [3, because Rg entails kp(img) with substitution 0 {01 obj1}. Then the subgoal atoms are {in(obj1, img1), shape square)]. which have indices (3,5), respectively. With another substitution 0 {01 = obj2), the subgoal atoms are (in(obj2, img1), (ahape(obj1, square)}, ). which have indices [4, 6]. respectively. The atoms which have a different predicate, e.g., shape(ob) square), will never be entailed by clause Rg- There- fore, the corresponding values are filled with 0, which represents the index of the false atom.
3.5.2 DIFFERENTIABLE INFERENCE
Using the encoded index tensor, NSFR performs differentiable forward-chaining reasoning. We briefly summarize the steps as follows. (Step 1): Each clause is compiled into function that per- forms forward reasoning. (Step 2): The weighted sum of the results from each clause is computed. (Step 3): T-time step inference is computed by amalgamating the inference results recursively. We extend previous approaches (Evans& & Grefenstette 2018 S.118SSho Shindo al.
202T) for batch computation.
Clause Function. Each clause R₃ E C is compiled in to a clause function. The clause function takes valuation tensor V(O,, and returns valuation tensor CxDBBG which is the result of 1-step forward reasoning using R, and v(t), The clause function is computed as follows. First, tensor I, E RGXXXL is extended for batches, i.c., I, NBxGxXXL and V BxG is extended to the same shape, i.e., V E gxxxxXx1 Using these tensors, the clause function is computed as:
c (prod (V, i))
where gather, (X, Y)..A. = X.Y,,,,, and prod, returns the product along dimension 2. softor? is a function for taking logical or softly along dimension d:
softor = 5 log (suma exp exp (X x/7)),
where y > 0 is smooth parameter, suma is the sum function for tensors along dimension d, and
1.0
if mar (7 log suma exp (X/7)) 1.0
(5)
max (y log suma exp (X/7))
otherwise
Normalization term ensures that the function returns the normalized probabilistic values. We refer appendix f more details about the softor] function. In Eq. 3 applying the softor] function
corresponds to considering all possible substitutions for existentially quantified variables in the body atoms of the clause and taking logical or softly over the results of possible substitutions. The results
from each clause is stacked into tensor (tt) CxCxxx i.c., (tt) stacko (C(().
where stacko is stack function for tensors along dimension 0.
Soft (Logic) Program Composition. In NSFR, a logic program is represented smoothly as weighted sum of the clause functions following (Shindo et al. 2021). Intuitively, NSFR has M By taking softmax of W along dimension 1, M clauses are softly chosen from C clauses. The weighted sum of clause functions are computed as follows. First, we take the softmax of the clause weights W E M W softmar, (W) where softmar, is softmax function over the dimension 1. The clause weights W E RRxx and the output of the clause function (t) E RCCBxG expanded the same shape W 200
distinct weights for each clauses, i.e W TR. xC 1

---

Under review as a conference paper at ICLR 2022
Training Data
Test Data
NSFR
ResNer50
YOLO+MLP
NSFR
ResNet50
YOLO+MLP
Twopairs
1.0
1.0
1.0
1.0
0.50
0.98
Threepairs
1.0
1.0
1.0
1.0
0.515
0,912
Closeby
1.0
1.0
1.0
1.0
0.54
0.91
Triingie
0.958
1.0
0.956
0.57
0.79
Online/Pair
0.997
1.0
1.0
1.0
0,52
0.66
9-Circles 0.964
1.0
1.0
0.952
0,50
0.50
Table 1: The classification accuracy in each data set. NSFR outperforms the considered baselines. Neural networks over-fit while training and perform poorly with testing data. Best results are bold.
MxCxXXB Then we compute tensor H E MxBx, H = sum1 (W- C C), where O
element-wise multiplication, and sum, summation along dimension 1. Each value Hij. represents the probability of k-th ground atom using i-th clause weights for the j-th example in the batch. Finally, we compute tensor (!()) E BxG corresponding to the fact that logic program is set of clauses: R softor ()).
Multi-step Corward-Chaining Reasoning. We define the 1-step forward-chaining reason- ing function as: r(V(*;; W) = -R( and compute the T-step reasoning by: V(++1) = softor] (stack1(Vie) rVV("; W))), where E NCxGxSxI is a precomputed index tensor, and W RM clause weights.
4 EXPERIMENTAL EVALUATION
We empirically demonstrate the following desired properties of NSFR on 2 data sets (see App.
(i) NSFR solves object-centric reasoning tasks with complex abstract patterns, (ii) NSFR can handle complex 3d scenes, and (iii) NSFR can perform fast reasoning with the batch computation.
4.1 SOLVING KANDINSKY PATTERNS
Data. We adopted Kandinsky pattern data sets (Mueller & Holzinger 2019 Holzinger et al. 2019 2021), a relatively new benchmark for object-centric reasoning tasks and use Kandinsky patterns.
Model. We used YOLO (Redmon et al. 2016) perception module and trained it on the pattern- free figures, which are randomly generated. The correct rules are given to classify the figures, and clause weights are initialized choose each of them. For e.g., the classification rule of the twopairs data set : "the Kandinsky Figure has two pairs of objects with the same shape, in one pair the objects have the same colors in the other pair different colors, two pairs always disjunct, i.e. they don't share objects.". This can be represented as logic program containing four clauses:
kp :ini (01, same same_color pac.sppppiii_e pair (2) same sawe_shapeeeeeeeepaaeeaaeaaaaa phirpaaaaappaaaaaaeaaaeeeeaaaaee (03, 04), ditf color pair (03, 04). (011
in (02, X) in (03, in same shape shape_pair (C1, 02),
same same__shape hat___shappppirrr_a_ (X, (X, (x) -shae - (X, sX,
same__clor_ppirrte
diff_color_pair (x, Y): :-color (x, cclor (Y, diff_color (Z, w)
Pre-training. We generated 15k pattern-free figures for pre-training of the visual perception mod- ule. Each object has the class label and the bounding box as an annotation. We generated 5k concept examples for neural predicate closeby and online.
Baselines. We adopted ResNet (He et al. 2016) as benchmark and also compare against YOLO+MI.P, where the input figure fed to the pre-trained YOLO model, and a simple ML.P module predicts the class label from the YOLO outputs.
Results. shows the results for each Kandinsky data set. The Resnet50 model overfits while training and thus performs poorly in every test data. The YOLO+MLP model performs compara- tively better and achieves greater than 90% accuracy in twopairs, threepairs, and closeby data set. However, in relatively complex patterns of red-traignle, online/pair, and 9-cicle data sets the per- formance degrades. On the contrary, NSFR outperforms the considered baselines significantly and achieves perfect classification in 4 out of the 6 data sets.
8

---

Under review as a conference paper at ICLR 2022
inference time (sec)
Model
Validation
Test
Validation
Test
CLEVR- 3ans3
CLEVR-
CNN
99.55
70.34
96.09
84.50
400
382.8
NeSy (Default)
98.55
81.71
96.88
90.97
200
51.9
17.0
NeSy-XIL
100.00
91.31
98.76
94.96
NS-FR
98.18
98.40
93.60
92.19
10 15 20 15 30
25 40 45 20
batch size
Table Classification accuracy for CLEVR-Hans data sets com- pared to baselines.
Figure 4: The inference time with different batch sizes.
4.2 REASONING ON THE 3D- ID-WORLD: SOLVING LLEVR-HANT PROBLEMS
Data. The CLEVR-Hans data set (Stammer et al., 2021) contains confounded CLEVR (Johnson al.) 2017)) images, and each image associated with a class label. The CLEVR-Hans3 data set has three classes, and the CLEVR-Hans7 data set has seven classes,
Model. We adopted Slot Attention (Locatello al. 2020a as a visual perception module and used a set prediction architecture, where each slot representation is fed to MLPs to predict attributes.
Pre-training. The slot attention model was pre-trained following (Locatello et al., 2020a) using the set prediction setting on the CLEVR (Johnson et al. 2017) data set. In the concept learning process, we trained rightside, leftside, and front using the scene data in the CLEVR data set. We generated 10k positive and negative examples for each concept, respectively.
Baselines.
The considered baselines are the ResNet34-bar based CNN model (Hu et al. 2016), and the Peuro-Symbolic model (NeSy) (Stammer et al. 2021). The NeSy model was trained in two different settings: (1) training using classification rules (NeSy-default) and (2) training using classification rules and example-hased explanation labels (NeSy-XII.).
Results. Table 2 shows the classification accuracy the CLEVR- -ans data sets. The results of baselines have been presented in (Stammer et al.) [202T). In the CLEVR-Hans3 data set, NSFR achieved more than 98% in each split. In the CLEVR-Hans7 data set, NSFR achieved more than 92%, that is > NeSy-Default. Note that, NeSy-XIL model exploits example-based labels about the explanation, whereas NeSy-Default and NSER do not. Thus NeSy-XIL outperforms NSFR marginally. The empirical result shows that NSFR (i) handles different types of the perception models (YOLO and Slot Attention), (ii) can effectively handle 3D) images, and more importantly, (iii) is robust confounded data if the classification rules available in the form of logic programs.
4.3 FAST INFERENCE BY BATCH COMPUTATION
We show that NSFR perform fast inference by batch computation. Figure shows the inference time with different batch sizes in Kandinsky data sets. We change the batch size from to 50 by increments of 5 and run the experiment in each Kandinsky data set. The magenta line represents mean running time, and the shade represents the standard deviation over the data sets. The empirical result shows that NSFR can perform fast reasoning using batch computation, which is the essential nature of deep neural networks.
5 CONCLUSION AND FUTURE WORK
We proposed Neuro-Symbolic Forward Reasoner (NSFR), a novel framework for object-centric rea- soning tasks. NSFR perceives raw input images using an object-centric model, converts the output into the probabilistic ground atoms, and performs the differentiable horward-chaningg inference. Furthermore, NSFR supports batch computation. Thus it combines the perception module and the reasoning module seamlessly. In our experiments, NSFR outperformed conventional CNN-based models in 2D Kandinsky patterns and 3D CLEVR-Hans data sets, where the classification rules are defined the high-level concepts. There are several avenues for future work. If we set the clause weights as trainable parameters, NSFR can perform structure learning of logic programs from visual inputs, which is promising way of extending Inductive Logic Programming and differentiable ap- proaches. Likewise, if we set the parameters of the perception model as trainable parameters, NSFR can train perception models with logical constraints.

---

Under review as a conference paper at ICLR 2022
ETHICS STATEMENT
With our work, we have shown that we can seamlessly combine symbolic and sub-symbolic systems. Combining neural models with symbolic models can lead better generalization and handle wider variety of problems. The major impact that our work aims is enabling coherent quantitative inquiries that encompass multiple data dimension types across object-centric reasoning tasks. This can have several implications on studying how scientific fields evolve and can produce validated signatures predictive of the emergence and success of new fields or discoveries. The results can also be leveraged to create metrics and methods to estimate the innovation potential of scientific enterprises. To the best of our knowledge, our study does not raise any ethical, privacy or conflict of interest concerns.
REPRODUCIBILITY STATEMENT
Upon acceptance, official GitHub repository will be made public, containing the code of NSFR, and scripts to reproduce the experiments and generate data sets. In addition to this, architectural details and spper-parameters submission. Lastly, details on the evaluation metrics and relevant data sets, including the relevant symbolic rules, are given in the main text well the appendix.
included in the appendix. Preliminary code will be uploaded upon
REFERENCES
Saced Amizadeh, Hamid Palangi, Oleksandr Polozov, Yichen Huang, and Kazuhito Koishida. Neuro-symbolic visual reasoning: Disentangling "visual" from "reasoning". In ICMI..
Forough Arabshahi, Jennifer Lee, Mikayla Gawarecki, Kathryn Mazaitis, Amos Azaria, and Tom Mitchell. Conversational neuro- ceuro-symbolic commonsense reasoning. AAAI, 2021.
George Boole. The Mathematical Analysis of Logic: Being an Essay Towards Calculus of De- ductive Reasoning. Cambridge Library Collection Mathematics. Cambridge University Press, 1847.
Léon Bottou. From machine learning to machine reasoning. Machine learning, 2014.
Bruner, J. J. Goodnow, and G. A. Austin. Study of Thinking. Wiley, 1956.
Christopher Burgess, Loic Matthey Nicholas Watters, Rishabh Kabra, Irina Higgins, Matt Botvinick, and Alexander Lerchner. Monet: Unsupervised scene decomposition and represen- tation. arXiv preprint 19X1v:1901.11: 2019.
Zhenfang Chen, Jiayuan Mao, Jiajun Wu, Kwan- Yee Kenneth Wong, Joshua B. Tenenbaum, and Chuang Gan. Grounding physical concepts objects and events through dynamic visual reason- ing. In ICLR, 2021.
William W. Cohen, Fan Yang, and Kathryn Mazaitis. Tensorlog: A probabilistic database imple- mented using deep-lcarning infrastructure. JAIR, 2020.
JM Corchado. Neuro-symbolic reasoning-a solution for complex problemas. In International Con- ference on Intelligent Systems, 1995.
Juan M Corchado, Lourdes Borrajo, María A Pellicer, and Carlos Yáñez. Neuro-symbolic system for business internal control. In ICDM, 2004.
Wang-Zhou Dai, Qiuling Xu, Yang Yu, and Zhi-Hua Zhou. Bridging machine learning and logical reasoning by abductive learning. 2019.
Luc De Raedt and Kristian Kersting. Probabilistic logic learning.. ACM SIGKDD Explorations Newsletter, 2003.
Luc De Raedt and Angelika Kimmig. Probabilistic (logic) programming concepts. Machine Leam- ing, 2015.
10

---

Under review as a conference paper at ICLR 2022
Luc De Raedt, Robin Manhaeve, Sebastijan Dumancic, Thomas Demeester, and Angelika Kimmig. Neuro-symbolic= neural+ logical+ probabilistic. In NeSy 19@ IJCAI, the 14th International Workshop on Neural-Symbolic Learning and Reasoning, 2019.
Andrea Dittadi, Samuele Papa, Michele De Vita, Bernhard Schölkopf, Ole Winther, and Francesco Locatello. Generalization and robustness implications in object-centric learning. arXiv preprint arXiv:2107.00637, 2021.
David L Dowe and José Hermández-Orallo. Iq tests are not for machines, yet. Intelligence, 2012.
Martin Engelcke, Adam R. Kosiorek, Oiwi Parker Jones, and Ingmar Posner. Genesis: Generative scene inference and sampling with object-centric latent representations. In ICLR, 2020.
Richard Evans and Edward Grefenstette. Learning explanatory rules from noisy data. JAIR, 2018.
Florentino Edez-Riverola, Juan M Corchado, and Jesús M Torres. Neuro-symbolic system for fore- casting red tides. In Irish Conference on Artificial Intelligence and Cognitive Science, 2002.
Artur d' Avill Garcez, Marco Gori, Luis C Lamb, Luciano Serafini, Michael Spranger, and Son N Tran. Neural-symbolic computing: An effective methodology for principled integration of ma- chine learning and reasoning. arXiv preprint arXiv:/905. 06088, 2019.
Chi Han, Jiayuan Mao, Chuang Gan, Joshua B. Tenenbaum, and Jiajun Wu. Visual concept-
metaconcept learning. NeurIPS, 2019.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. CVPR, 2016.
Andreas Holzinger, Michael Kickmeier- Rust, and Heimo Müller. Kandinsky patterns as iq-test for machine learning. In Andreas Holzinger, Peter Kieseberg, A Min Tjoa, and Edgar Weippl (eds.), Machine Learning and Knowledge Extraction, 2019.
Andreas Holzinger, Anna Saranti, and Heimo Mueller. Kandinskypatterns-an an experimen- tal exploration environment for pattern analysis and machine intelligence. arXiv preprint arXiv:2103.00519, 2021.
Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard Hovy, and Eric Xing. Harnessing deep neural networks with logic rules. In ACI., 2016.
Zhengyao Jiang and Shan Luo. Neural logic reinforcement learning. In ICML 2019, 2019.
Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. CVPR, 2017.
Philip N Johnson-Laie Laird. Mental models and human reasoning. Proceedings of the National Academy of Sciences, 2010.
Muhammad Jaleed Khan and Edward Curry. Neuro- visual reasoning for multimedia event processing: Overview, prospects and challenges. CIKM (Workshops). 2020.
Daphne Koller, Nir Friedman, Sašo Džeroski, Charles Sutton, Andrew McCallum, Avi Pfeffer, Pieter Abbeel, Ming-Fai Wong, Chris Meek, Jennifer Neville, et al. Introduction to statistical relational learning. MIT press, 2007.
Yusen Liu, Fangyuan He, Haodi Zhang, Guozheng Rao, Zhiyong Feng, and Yi Zhou. How well do machines perform iq tests: comparison study on large-scale dataset. In IJCAI, 2019.
Francesco Locatello, Dirk Weissenborn. Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-centric learning with slot atten- tion. In NeurIPS, 2020a.
Francesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-centric learning with slot atten- tion. 2020b.
11

---

Under review as a conference paper at ICLR 2022
Thomas Lukasiewicz. Probabilistic logic programming. In ECAI, 1998.
Robin Manhaeve, Sebastijan Dumancie, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. Deepproblog: Neural probabilistic logic programming. In NeurIPS 2018, 2018.
Jiayuan Mao, Chuang Gan, Pushmeet Kohli, Joshua B. Tenenbaum, and Jiajun Wu. The Neuro- Symbolic Concept Learner: Interpreting Scenes, Words, and Sentences From Natural Supervi- sion. In ICLR 2019, 2019.
Fred D Miller. Aristotle rationality in action. The Review of Metaphysics, 1984.
Heimo Mueller and Andreas Holzinger. Kandinsky patterns, 2019.
Li Nanbo, Cian Eastwood, and Robert B Fisher. Learning object-centric representations of multi- object scenes from multiple views. In NeurIPS, 2020.
David Poole, Randy Goebel, and Romas Aleliunas. Theorist: A logical reasoning system for defaults and diagnosis. The Knowledge Frontier. 1987.
Luc De Raedt, Kristian Kersting, Sriraam Natarajan, and David Poole. Statistical relational artificial
intelligence: Logic, probability, and computation. Synthesis Lectures on Artificial Intelligence and Machine Learning, 2016.
Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, June 2016.
Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015.
Ryan Riegel, Alexander Gray, Francois Luus, Naweed Khan, Ndivhuwo Makondo, Ismail Yunus Akhalwaya, Haifeng Qian, Ronald Fagin, Francisco Barahona, Udit Sharma, et al. Logical neural networks. arXiv preprint arXiv:2006. 100.20000..115,, 2020.
Tim Rocktäschel and Sebastian Riedel. End-to-end Differentiable Proving. In NeurIPS 2017, 2017.
Hikaru Shindo, Masaaki Nishino, and Akihiro Yamamoto. Differentiable inductive logic program- ming for structured examples. In AAAI 2021.
Xujie Si, Mukund Raghothaman, Kihong Heo, and Mayur Naik. Synthesizing datalog programs using numerical relaxation. In IJCAI 2019, 2019.
Wolfgang Stammer, Patrick Schramowski, and Kristian Kersting. Right for the right concept: Re- vising neuro-symbolic concepts by interacting with their explanations. In CVPR 2021, 2021.
Gustav Šourek, Vojtëch Aschenbrenner, Filip Železný, Steven Schockaert, and Ondřej Kuželka. Lifted relational neural networks: Efficient learning of latent relational structures. JAIR, 2018.
Jingyi Xu, Zilu Zhang, Tal Friedman, Yitao Liang, and Guy Van den Broeck. semantic loss function for deep learning with symbolic knowledge. In ICML, 2018
Fan Yang, Zhilin Yang, and William W. Cohen. Differentiable learning of logical rules for knowl- edge base reasoning. In NeurIPS, 2017.
Zhun Yang, Adam Ishay, and Joohyung Lee. Neurasp: Embracing neural networks into answer set programming. In IJCAI, 2020.
12

---

Under review as a conference paper at ICLR 2022
A NOTATION
A.1 NOTATION
Term
Explanation
special atom that is always false special atom that is always true neural predicate
p/(n, [dt...... dtal)
p(X, Y)
an atom clause PXX, -q(x, Y).
dt
datatype, e.g., color, shape
valuation function
set of constants
Ta:
set of constants of datatype dt, i.e., ddm
O
set of object constants
set of attribute constants
X
set of input constants
set of variables
C
set of clauses set of ground atoms
P
set of predicates P
language TP.T.V)
&
set of attribute encoding language C substitution vector
X
a tensor
ZE B
an object-centric representation an object-centric representation of the i-th object, i.e., Z
7 RBDD
Aattr
one-hot encoding of attr an initial valuation vector in batch a valuation vector in batch at time-step / an index tensor
V E BXG
ViO E BBG
IE RCXXSXX
the parameter in object-centric models the parameter neural predicates clause weights
W E R MxC
G
the number of ground atoms, i.e., |G| the number clauses, i.e., |C]
B
batch size of the input the maximum number substitutions for existentially quantified variables the maximum number of body atoms the maximum number objects in an image
E
D
the dimension object-centrie representation
M
the size of logic program, i.e., the number of distinct clause weights input dimension
N
the smooth parameter for softor function the softor fucntion for dimension d with a smooth parameter Y the stack method to concatenate tensors along new dimension d element-vue wise multiplication between two tensors
softor?
stacki
Table 3: Notations in this paper.
13

---

Under review as a conference paper at ICLR 2022
B FACTS CONVERTING ALGORITHM
Algorithm Convert the object-centric representation into probabilistic facts
Input: object-centric representation Z RB of ground atoms G. background knowl- edge B, set of one-hot encoding of attributes &c.
1: initialize V E Bx(s] as a zero tensor
2: for F; = tn) do
3: i is a neural predicate then for 1 in [t.,..., tn] do
4:
5:
Tj Stattensor (tj; Ec)
V-(0) 21p "p((T...... T,) call the valuation function for neural predicate
6:
7:
else if F; E B then
8:
((0)
1,1 1.0 set background knowlege
9:
return
(
C DATA SETS IN EXPERIMENTS
We make the data sets used in the paper available at:
C.I KANDINSKY DATASET SUMMARY
TwoPairs
ThreePairs
Closehy
Red-Triangle
Online-Pair
9-Circles
Combination
Yes (Hard)
Yes (Hard)
No
Yes (Easy)
Yes (Easy)
Yes (Hard)
Spatial
No
No
(Easy)
(Easy)
(Hard)
No
objects
6
training data
5000
5000
5000
5000
5000
1000
test/val data
2000
2000
2000
2000
2000
500
Table 4: Kandinsky patterns data set summary. Each data set is different in terms of combinatorial or spatial patterns.
C.2 CLASSIRICATION RULES
TwoPairs The pattern for positive figures is: "the Kandinsky Figure has two pairs of objects with the same shupe. In one pair, the objects have the same colors in the other pair different colors. Two pairs are always disjunci, i.e, they do not shure objects.". This can be represented as logic program containing four clauses:
kp (X) :0:::nnn00 (01, in (02, in (03, (04, same
(C1,
came_ccloos_pairr(0011 02) same same_shape_paiiz (03, 04), diff_color_paii (03, 04)
same_shapc__pairr22..33 () (x, Z) shape 2) same_color_pairre Y) -color 2x, cY,or
diff_color_patte (X, Y): -color ccll, (Y, diff_color- (2, W)
ThreePairs The pattern for positive figures is: "the Kandinsly Figure has three pairs of objects
with the same shape. one pair, the objects have the same colors other pairs different colors. Three pairs are always disjunct, i.e., they do not share objects.". This can be represented as logic program containing four clauses:
(01, (02, X) (03, X) (0, (05, (06,
same_shapee_piir 02) o 02) same__me__aaeee Saame_shpee_paiee (03, 04), same_shaaee
diff org.:pa..ee.a.ooooo.oo..aaaaaaaa
same
diff_ (2,
14

---

Under review as a conference paper at ICLR 2022
The pattern for positive figures is: close by each other.". This can be represented as logic program containing one clause:
Closeby
"the Kandinsky Figure has pair of objects that
kp (X) :- in101, , X) in (02, X) closeby
The pattern for positive figures is: "the Kandinsky figure has a pair of objects that are close by each other, and the one object of the pair is red triangle, and the other object has different color and different shape.". This can be represented as logic program containing three clauses:
Red-Tria
(oseeby color (01, red), shape (01, triangle (01, oiif (01, 02) diff hi___saae__pai__ (x, Y) :- shape (X, 2) shape M) diff_shappe shape (2, diff cFF__color__aa__ (x, Y) coloor (x,, collo difff difffcollor_rroocoo color (2, (2
kp (X) in (0n in
}
The pattern for positive figures is: "the Kandinsky figure has five objects that aligning on a line, and it contains at least one pair of objects that have the same shape and the same color." This be represented
Online/Pair
logic program containing three clauses:
kp (X) :- in (01,
(02, in (03, x) in (04, X) (05, online (C1, 02,, 03, 05), same shape pair (01, 02), same color pair (01, 02)
same shape pacaapppppriappee (X, Y) :- shape (X, 2) shape (Y, 2) same_color_pall (x, Y) color (x, color (Y,
The pattern for positive figures is: "the Kandinsky figure has three red objects, three blue objects, and three yellow objects." This can be represented as logic program containing four
9-Cireles
clauses:
-
has has_red__riie
color red), color (02, red)
c033
has
(03, color (01, yell color (
has blu_bbuee___
(02, (03, x), coler (01, blue), color (02,
blue), col,
CLEVR-Hans3
The data set has three classification rules. We refer to Stammer et al. 2021 for more details. We used the following logic program in NSFR:
kpl (X) :0 (02, size (01, large), shape (01, (01, cube), size (02, large), shape (02, cylindderr))
size (01, small) material (01, metal), shape (01, cube :0), (mm
1, (02, (Q
(X) - (0 1i (01, Large) color (01,blue) shape (01, sphere), size (02, small) color (02, shaap shape (02, sphere).
The data set has seven classification rules. We refer to Stammeer et al. 202 for more details. We used the following logic program in NSFR:
CLEVR-Hans7
, kp1 (X) :-in (01, in (02, x) si ze (01, lrrge), shape (01, cube), size (02, 1a large),
shape (02,ndeiderr))
kp2 1=
small) smail material (01, metal), shape (01, cube
(01, cyan) front (01, 02) front (01,
(04, x) size (01, small) color (01, green ,,size (02, sma.lsm (02, brown) size (03, small) color (03, purple) size (04, small)
kp5 (X) : has 1ts_haa____phre_____________
'The 9-circles data set has been public as a challenge data set http://gihhub.oom/ummann balydat-kandinsky-pateee The original data set contains counterfactual examples that falsify simple hy- pothesis. We excluded the counterfactual examples simplify the problem.
15

---

Under review as a conference paper at ICLR 2022
kp5 (X) :-has www.sppeeesss_ee
(X) ott.a
:
sphere),
sizc "44102a..hhhlgoooo00///a//aaeaer
has "_geeeaeeee.aaa...00000220aaaaar sphere) shape
leftside (03)
10 has
[bg___asshehhaaaaaaoooooodddd11d shape (01,
cyLindde),,baape(022202
|tgp://eeeeatttanoaaaaaaaaaaaaar rtghteettiiiiiiiiiitioio rightside (02), (02),
rigatside (C3).
TwoPairs
ThreePairs
Closeby
Red- -riinTri
Online/Pair
D-Circles
Figure 5: Training examples each Kandinsky data set. The left three images are positive examples, exaiiils.xxmmles. and the right three images negative examples.
16

---

Under review as a conference paper at ICLR 2022
CLEVR-Hans3
CLEVR-Hans7
Figure 6: Examples the CLEVR-HaR Hans data set. CLEVR-Hans? has three classes and CLEVR- Hans7 has seven classes, respectively. Each example represents each class in the data set.
D OBJECT-CENTRIC PERCEPTION MODELS IN EXPERIMENTS
We used different object-centric perception models for Kandinsky and CLEVR-Hans data sets. In this section, describe model details and the pre-training setting. All experiments were performed on one NVIDIA A100-SXM4-40GB GPU with 40 GB of RAM.
D.1 YOLO FOR KANDINSKY DATA SET
We used YOLOv 2 model, whose implementation is publicly available. We adopted the YOLOv5s model, which has 7.3M parameters.
Pre-training We generated 15, 000 pattern-fre frreernn-reeeee figures for training. 5000 figures for validation. Fiows the statistics the pre-training data set. The class labels and positions are generated randomly. The original image size is 620 x 620, and resized into 128 128. The label consists of the class labels and the bounding box for each object. The class label is generated by the combination of the shape and the color of the object, e.g., red circle and blue square. The number of classes is 9. shows the confusion matrix for the pre-traine treitra model. The confusion matrix of the pre-training data set of the YOLOv5 model. The pre-trained YOLOv5 model classifies the objects correctly Kandinsky patterns.
Each image contains at least objects, and at most 10 objects. Figure ssows
D.2 SLOT ATTENTION FOR CLEVR- HANS DATA SET
We used the same setup as Stammer et al. 2021). ). In the preprocessing, we downscaled the CLEVR-
Hans images to visual dimensions 128 128 and normalized the images to lie between -1 and 1. For training the slot-attention module, an object is represented as a vector of binary values for the shape, size, color, and material attributes and continuous values between and for the æ, y, and positions. We refer to (Locatello et al. 2020a) for more details.
17

---

Under review as a conference paper at ICLR 2022
1.0
8000
0.8
instances
6000
0.6
4000
0.4
2000
0.2
red square
red triangle
yellow circle
yellow square
yellow triangle
blue circle
blue square
triangle
0.0
0.0
0.2
0.4
0.6
0.8
1.0
x
Figure 7: The statistics of the pre-training data set Kandinsky Patterns tasks. The distribution of the class label (left) and the distribution of the position of the objects (right). The class labels and the positions are generated randomly.
red circle
red squara
triengle
yelow
0.6
Predicted
yellow square
yellow triangle
0.7
0.50
blue circle
square
blue triangle
background FN
421
48L
223
8.0
6.00
600
001
000
rod arde
red Square
wellow Squarre
velloo trangle
blue Square
blue trangle
baceground FP
polow
True
Figure 8: The confusion matrix of the YOLOv5 model in the test split after the pre-training The trained YOLOv5 model classifies the objects in Kandinsky figures correctly.
E LANGUAGES IN EXPERIMENTS
In this section, show the language settings used in each data
18

---

Under review as a conference paper at ICLR 2022
E.1
DATA TYPES AND CONSTANTS
Tab. respectively.
and Tab. sshows the constants and their data types for each Kandinsky and CLEVR data set,
Datatype
Terms
image
img
object
obj1, .b, red, blue, yellow
color
shape
square, circle, triangle
Table 5: Datatype and constants in Kandinsky data set.
Datatype
Terms
object
obj1, obj2. obj9
color
cyan, blue, yellow, purple, red, green, gray, brown sphere, cube, cylinder
shape
size
large, small rubber, metal
material
side
right, left
Table 6: Datatype and constants in CLEVR data set.
E.2 PREDICATES
Predicate
Explanation
kp/ [image]
The image belongs to pattern.
same_shape.pair//ofe object]
The two objects have same shape. The two objects have same color. The two objects have different shapes. The two objects have different colors.
same color pair object, object
diff shape pair object, object
diff_color.paiie object, object]
Table 7: Predicates in Kandinsky data set.
Neural Predicate
Explanation
in/ /bjject, image thape/lobject, shape/ [object, shape color closeby/ object, object]
The object is in the image.
The object has the shape of shape.
volor//object, (object, color
The object has the color of color.
The objects located close by each other.
online callin//object...... objjcct.... object]
The objects are aligned on line.
Table 8: Neural predicates in Kandinsky data set.
Predicate
Explanation
kpi/ immgee]
The image belongs to the i-th pattern.
same same_shape chhapepparr//bjjiee.. object]
The two objects have same shape. The two objects have same color. The image has three spheres on the left side.
same_color.pair
color.pair/oobject, (object, object]
has3 spheres seft//iamgel
has metall.yylineeeee crciidrrrrrgght right/ /aaggt//aamgee [iamge]
The image has three metal cylinders on the right side.
Table 9: Predicates in CLEVR- data set.
19

---

Under review as a conference paper at ICLR 2022
Neural Predicate
Explanation
in/ objject, image] chape//object, shape] color/ coloo color]
The object is in the image.
The object has the shape shape. The object has the color of color. The object has the color of material.
material//object.naaa materiaaa material]
lize//obbectt,izzz leftside//object] rightside//object
The object has the color of size.
The object is on leftside.
The object is rightside.
front/lobject, objectt
The first object is front of the second object.
Table 10: Neural predicates in CLEVR-Hans data set.
E.3 BACKGROUND KNOWLEDGE
In TwoPairs, ThreePairs, and Red-Triangle data sets, we prepared back- ground knowledge for NSFR about predicate diff-color and diff-shape as = [diff.color( color (red, blue), diff color(blue, red), diff color color(red, yellow), yell.o))) diff.color(yellov, red), col...cooorbbuuee..oooooo yellow), diff diff_shape(ci)) (happeciircee.quaaa
blue), diff shape circle), diff shape(circle, triangle) diff shapettriangle,, circle), diff diff.shape (qquare triangle), diff www.ssapppppranattt. square)
F VALUATION FUNCTIONS
F.1 VALUATION FUNCTIONS FOR KANDINSKY PATTERNS WITH YOLO
In our experiments, the output format of the YOLO model is as in the following table.
index
2
4
S
7
8
10
attribute
31
22
22
red
yellow
blue square
circle
triangle
objectness
Here, (11, y1) and (æ1, (2) is the coordinates of the top-left and bottom-right points of the bounding box. Each attribute dimension contains each probability.
The valuation function for each neural predicate is shown in Tab. 11 Tensor (e for predicate closeby represents the center coordinate of the bounding box for the i-th object. Function fineer for predicate onl online computes the closed-form solutions of linear regression in batch and returns the error values.
Atom
Valuation Function
in(obj 1, img) shape (obje(obj1,coo circle)
Vin (1) X) Z E B/ return the objectness
Uchape Z Acircie) sum, (Z1,8:11 O A R
color closeby(obj1. obj2) t..ji,,obb.........
Veolor Z Ared)
(um,(Z..4 ,17 7 Ared) E RR
Uelonaby (1)), ((2))= = o (normo (Z (1) Z center w) E R
center Vonline (1)1 ...., (6) (finnar (1(1)
w) E B
Table 11: Valuation functions for each neural predicate in Kandinsky data Each neural predicate is associated with a valuation function. In the forward-chaining reasoning step, the probability for each ground atom is computed using the valuation function. The parameterized neural predicates are trained using the concept examples.
F.2 VALUATION FUNCTIONS CLEVR-HANS WITH SLOT ATTENTION
In experiments, the output format of the slot attention model is in the following table.
20

---

Under review as a conference paper at ICLR 2022
index attribute
0
2
5
6
7
8
10
objectness
y
sphere
cube
cylinder
large
small
rubber
metal
11
12
13
14
15
16
17
18
cyan
blue
yellow
purple
red
green
gray
brown
The valuation function for each neural predicate shown Tab
Atom
Valuation Function
in(obj 1, img)
Uin (Z (1) X) ZZ00 RRBB// return objectness
Ushape Z (Z(1) Aspbore) sum (Z)
::7 Acircte) E R
size(obj1,large)
Usize (2(2, Aiagg)) = sum (Z (1) O Aiarg) E RB
1,7:9
materiallobjj1.mettt metal)
Unaterial (Z AAntal) = summ (Z
19:11 ① Acircia) R (Z,01
color(obj1,red)
Ccolor (Z (Z(") Area) sum (0,
Area) E F
(,11::
leftside(obj1)
Ulafcaida (Z =o [Z 11- .w (
E RB // the objectness multiplied
5,0
rightside(obj1)
Brightside (Z(1)) o (Z :w) @ Z RR 8 // the objectness is multiplied
front(obj1. obj2) Ufront Z 11) 2(2)) = 7
Z Z E R
a
Table 12: Valuation functions for each neural predicate in CLEVR-Hans data set. Each neural pred- icate is associated with valuation function. In the forward-chaining reasoning step, the probability for each ground atom computed using the valuation function. The parameterized neural predicates are trained using the concept examples.
G DETAILS OF TENSOR ENCODING
Preliminaries. A unifier for the set of expressions {AI...., An) } is substitution 0 such that A,)). where a is a unification function. A
A = A20 = =... A, written as = unification function returns the (most general) unifier for the expressions if they unifiable. Deci- sion function ((AA,..., An}) returns a Boolean value whether or not AI,..., A,....,,, An are unifiable.
Dealing with Existentially Quantified Variables. We extend the differentiable forward-chaining inference deal with flexible number of existentially quantified variables. For example, let clause C = xx) - (01, X).. The clause has the existentially quantified variable 01. First we consider the possible substitutions for 01, e.g., [01/obj1 01 01/objj /obj2]. For ground atom kp(ing), by applying these substitutions to the body atoms, we get the grounded clauses as:
kp (p(img) in innionnon..... img).
(6)
kp(img) (objobj,, img).
(7)
In this case, the maximum number of substitutions $ = 2. Using these grounded clauses, we can build the index tensor for the differentiable inference function.
Formally, for each pair of F, E and C; = A -B. B, E C, let 0head = funsfy (fF (Fj.A)). For body atoms .B..... B, ). V(Bī (BB)U,,. "U,)),,,,((E.,, where V is a function that returns set of variables the input atom. The set of possible substitutions S is computed as:
compute {Bi ....... B where B B,0 Let V..j
S. (x/t X Vi, Aty dom(dt)).
where dt a datatype for constant t. which can be determined from the definition of the predicate. The maximum number of substitutions for body atoms (subgoals) equals to the maximum size of the set S = max,, [- If there is a lot of possible substitutions for body atoms, NSFR can consume lot of memories because the size of the index tensor is proportional to S. In the computation of possible substitutions, we assume that different constants are substituted for different variables, respectively.
21

---

Under review as a conference paper at ICLR 2022
Tensor Encoding (Formal). We build tensor that holds the relationships between clauses C and ground atoms G. We assume that C and G are an ordered set, i.c., where every element has its index. Let L be the maximum body length in C. C' = C and G [ Index tensor Ie NCXGx3xL contains the indices the ground atoms to compute forward inferences. Intuitively, J.j.k. is the index of the 1-th ground atom in the i-th clause derive the j-th ground atom with the k-th substitution for existentially quantified variables.
For clause C, A: -BI, Bn and ground atom F3 G. let the body substitutions Stj- We compute tensor I R RxxxSXLL
(c(B)O) ([A, F3)) Alán
I.j.a
if (() Ak>n n To(L) ((A,
and (F) returns the index of F in G. If clause head and ground atom F, are unifiable, then we put the index of subgoal B& into the tensor (line in Eq. 19). If the clause has fewer body atoms than the longest clause in C, we fill the gap with the index of T (line 2 in Eq. 9h. If clause head A and ground atom G, are not unifiable, then we place the index of 1. (line 3 in Eq.
where 0/ E -
H LEARNING AND REASONING ON NSFR
NSFR, we adopt the curriculum learning approach illus- trated in Figure
pattern-free figures
trainiing object-percepte rrodll
Step1: Training visual-perception model The visual- perception module is trained pattem--free figures. Each fig- ure is generated randomly without any patterns. Depending on the specific type of the disual-perception model, each object has its annotation.
Tigures for concepts
Gloeeby(obj1,ooj22
training neural predi cattes
Step2: Concept Learning Neural predicates trained us- ing the pre-trained perception module. Then the parameter- ized neural predicates trained figures prepared for each concept.
figures with patterns
reasoning on visuel input
posilive
negative
Step3: Reasoning on figures patterns On the reason- ing step, NSFR performs reasoning using the trained visual- perception model and neural predicates. The logical rules are given as weighted clauses.
Figure 9: Curriculum learning and reasoning in NSFR.
I DETAILS ON THE softor FUNCTION
1.0.1 THE softor? FUNCTION
In the differentiable inference process, NSFR often computes logical for probabilistic values. Taking max repeatedly can violate the gradients flow. The softor] function approximates the or computation softly. The key idea is the log-sum-exp technique. We define the softor? func- tion as follows:
softor = 5 log (suma exp (X/7)),
(10)
where suma is the sum function for tensors along dimension and
{
1.0
if mar (7 log sum, exp (X/1)) S 1.0 otherwise
S
(II)
max (7 log sum, exp (X/r)
The normalization term ensures that the softor? function returns a normalized probabilistic values. The dimension d specifies the dimension to be removed.
22

---

Under review as a conference paper at ICLR 2022
A popular choice is the probabilistic function: frrob_aum X. Y was adopted in (Evans & Grefenstette 2018) and (Jiang & Luo 2019 We compare these functions with the proposed approach. Fi visualizes each function, and Fig visualizes the difference of each function from the original logical or function, i.e., the max function. With sufficiently small smooth parameter, the softor" function approximates the original max function. In our experiments in Kandinsky and CLEVR-Hamy data sets, we consistently set = 0.01.
=X+Y - Y, which
logical (max(x.yl) (max=1.0, min=0.0)
probabilistic sum + y xy) (max=1.0, min=0.0)
>. 0.5.
0.5.
0.0
0.5
1.0
0.0
0.5
1.0
softor (y=1.0) 1.0, min=0.6931)
softor (y=0.1)
softor (y=0.05)
(max- 1.0, min-0.0693)
(max=11 1.0, min=0.0347)
1.0
0.5
2x 0.5
0.5
0.0
0.0
0.0
X
X
x
softor (y-0.01) (max=1.0, min=0.0069)
softor (y= 0000)
softor (y=0.0001)
(max=16 1,0, min=0.0035)
(max=1.0 0, min=0.0001)
1.0
1.0
1.0
0.0
0.0
0.0
0.5
0.5
0.5
X
X
X
Figure 10: The visualization of various functions. The maximum and minimum values for each image is shown on top. The softor? function with a sufficiently small smooth parameter approxi- mates the logical function for probabilistic values.
23

---

Under review as a conference paper at ICLR 2022
probabilistic sum
(max=0.25, min=0.0)
1.0
0.0
X
softor (y-1.0)
softor (y=0.1)
softor (y=0.05)
(max=0.6931. min=0.0)
(max=0.0693, min=0.0)
(max=0.0344 min=0.0)
1.0
1.0
1.0
0.5
0.5
> 0.5
0.0
0.5
1.0
0.0
0.5
1.0
0.0
0.5
1.0
softor (y=0.01) (max= 0.00x9, min=0.0)
softor (y=0.005)
softor 0.0001)
(max=0.000 min=0.0)
(max=0.000) 0.000, min=0.0)
0.5-
0.5
0.5
0.0
0.0
0.0
0.0
0.5
1.0
0.0
0.5
1.0
0.0
0.5
1.0
Figure 1I: The visualization of the difference between the original or function and other or func- tions, i.c. probabilistic sum and softor z. The maximum and minimum values in each image is shown on top. The softor3 function with a sufficiently small smooth parameter approximates the logical function for probabilistic values.
24


Reviews:
[{"review_id": "eQbbR7uO_wn", "reviewer": "Reviewer_ZLoi", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Pros:\n1. A whole system pipeline is developed for neural-symbolic reasoning. If the authors can open source their code, this will be a good contribution to the community.\n2. The system's advantage (mainly in term of accuracy) is demonstrated in 2 selected datasets.\n\nCons:\n1. I can see how this work is different from a few other works on neural-symbolic visual reasoning, but I cannot see how this work innovate on previous ideas. The authors say that previous work (e.g. Amizadeh et al., 2020) either does not have a differentiable forward reasoner, or an object-centric module. But I think works such as Amizadeh et al., 2020 and neural-symbolic concept learner have both of these modules? I would appreciate if the authors can state more clearly the difference between their work and the previous works.\n2. I feel the evaluation is not enough to gain more insights into the strength of the work. First of all, only two synthetic datasets are used for evaluation. And for the CLEVR-dataset, the authors only reported on CLEVR-Hans dataset, which has very few baselines to compare against. Results on the standard CLEVR datasets will allow us to gain more insights into the model's capability. Experiments on real-world datasets (such as GQA) will also boost confidence in the work. The evaluation should also go beyond simple classification accuracies. One strength of neuro-symbolic model is its capability to generalize beyond the training distributions. I would encourage the authors to at least performs some experiments on compositional generalization. ", "summary_of_the_paper": "The paper proposes a differential neuro-symbolic visual reasoning framework that combines an object representation extractor and a forward reasoner.", "summary_of_the_review": "A technically solid paper that lacks a bit of novelty and falls shorts in evalaution.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "1: The contributions are neither significant nor novel."}, "extra_text": {}}, {"review_id": "VEBGd1Ivmp", "reviewer": "Reviewer_hJBE", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The caption on Figure 1 is not clear.\n\nFrom Page 1 it is not clear what a Kandinsky pattern is.\n\n“it is difficult, if not impossible, to solve object-centric reasoning tasks such as Kandinsky patterns due to several underlying challenges: (i) the perception of the objects from the raw inputs and (ii) the reasoning on the attributes and the relations to capture the complex patterns”. It’s not clear what the object-centric reasoning task in question is here? I would also argue that a Neural-Symbolic VQA (Kexin Yi et al.) type model could solve this type of problem? Since it has been applied very successfully to Clevr. What makes Kandisky patterns more challenging? This is not made clear in the paper.\n\nPage 2: “It computes the set of ground atoms” <— It is not clear what **it** refers to here.\n\nIt would be helpful in the introduction to talk about the level of supervision in the model, just at a high level.\n\nRelated work:\n“They either do not employ a differentiable forward reasoner or miss objet-centric learning in the end-to-end reasoning architecture.” It would be helpful to be clear about which methods fall in to which category. It is also unclear how this work build on previous work.\n\nFurther,  “Deep Compositional Question Answering with Neural Module Networks”,  and “NeuroSymbolic Concept Learner” use differentiable components. It would be good to include some comparison here between differentiable components and a differentiable end-to-end reasoning architecture.\n\n“NSFR encapsulates different object-perception models, thus allows us to choose a proper model depending on the situation and the problem to be solved.” Does this mean that NSFR can learn both with and without supervision? However, later in the paper is appears that you do need supervision? Please clarify.\n\nFrom the introduction it is not clear exactly what the contributions of the paper are and what the related work is? The related work section is very hard to follow.\n\nObject-centric Perception: It is not clear what kinds of supervision are needed for this process? In the facts converter the authors assume that “The output of the visual-perception module is already factorized in terms of objects.” How is this assumption enforced?\n\nIn figure 3 and Example 2 it is not clear what a “valuation function” is. What is $v_{color}$ defined only for $A_{red}$ and $v_{shape}$ only for $A_{circle}$. \n\nFacts Converter: The Facts Converter is not clearly described, however, Figure 3 was helpful for understanding the process.\n\nWhere do the ground atoms in Figure 3 come from? It appears that you can have significantly more ground atoms than are necessary to describe the two scene? Do you need to define new ground atom for each task? It would be helpful to discuss this.\n\nExperiments:\n\nIt would be helpful to be very explicit about the supervision provided for each of the baselines compared to the NSFR model?\n\nTable 1: Why not compare to other Neuro-Symbolic methods such as NeuroSymbolic concept learner or Neural-Symbolic VQA? Or even using a relation net (A simple neural network module for relational reasoning, Santoro et al)? \n\nTable 1: The ResNet is trained on how many samples? 5k or 15k or 20k? Perhaps a smaller model would perform better? From the appendix it looks like the ResNet is trained on 5k examples, while the NSFR model gets an **extra** 15k examples to train the visual perception module on, so this does not look like a fair comparison. Further, NeuroSymbolic VQA is able to learn complex visual reasoning from only 7k examples. A relation net can learn from 10k sort-of-clevr images.\n\nTable 1 and 2: How many runs were done? What is the variance? It would be helpful to see the training curves to better understand the overfitting in table 1. \n\nExisting Neuro-Symbolic papers look at more than classification accuracy. “Neural-Symbolic VQA”, “NeuroSymbolic Concept learner,” “Deep Compositional Question Answering with Neural Module Networks”, “Learning by Abstraction: The Neural State Machine” and “An Explicitly Relational Neural Network Architecture” all show interesting transfer capabilities like generalising to unseen colour combinations or to problems with more objects than those seen during training.\n\nWhat are the losses used for training? These are not described anywhere?\n\nTypos:\n\nPage 1: Fig. (a) and Fig. (b) missing figure number.\n\nPage 2: “Facts converter converts” —> **The* facts converter\n\nPage 2: “Finally, differentiable reasoning” —> Finally, **the** differentiable\n\nPage 3: “The typical approach is the object detection (or supervised) approach such as FasterRCNN”. It is not clear what its meant here.\n\nPage 3: “where the models acquire the ability of object-perception without or fewer annotations”. This is not clear.", "summary_of_the_paper": "The authors propose a model for doing forwards reasoning. There are three parts: The model decomposes a scene into object, converts that to a grounded symbolic representation and then performs differentiable reasoning. The authors show classification performance on two datasets.\n\nWhile the authors propose a Neuro-Symbolic  model, they do not compare to any of the state of the art neuro-symbolic models such as NeuralSymbolic VQA or NeuroSymbolic concept learner for one of the datasets and only consider one neuro-symbolic model for the other task.\n\nA number of implementation details are also not clear. It’s unclear how much supervision is needed and what form that supervision takes?\n\nIt is also not clear what the advantages of the proposed model are over existing models? This is not discussed clearly in the paper and there are no significant experimental results.\n\nThe high level direction of this work is very interesting and indeed Neuro-Symbolic models do offer some advantages over deep learning models. However, the authors have failed to discuss or demonstrate any of these advantages (more details below). ", "summary_of_the_review": "My main concerns with this paper are (1) there are not sufficient details to understand how the model works in terms of the supervision needed and the losses computed, (2) it is not clear what the motivations and contributions are (the authors only claim to show improvement in overall accuracy on very simple tasks), (3) the experimental results are not sufficient. The tasks appear to be quite simple (even though ResNets perform badly this appears to be due to lack of data, but the paper does not discuss specifically learning in low data regimes); the authors could have compared to stronger baselines; some of the comparisons may be unfair (see above) and the authors only show classification accuracy.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "Not applicable"}, "extra_text": {}}, {"review_id": "LecY-yd2FVm", "reviewer": "Reviewer_iyKK", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strengths\n\nUsing differentiable reasoning methods towards this task makes much more sense than deep learning models. Such a method should be ideally more interpretable, verifiable, robust, and generalizable. Neuro-symbolic reasoning has received notable attention recently and I think this paper is another step towards general AI with good reasoning capability.\n\nThe formality in this work should be encouraged. Compared to earlier works in this topic, the paper clearly defines the notions and related concepts.\n\nThe work is well presented with important notions explained with timely and concise examples. I like the flow the work in general: it's easy to understand with exemplified motivation and illustrative graphics.\n\nWeaknesses\n\nMy major concern with this work is the novelty. Specifically, I'm not sure what the contribution of this work is with respective to earlier papers. Differentiable reasoning with / without object-centric representation has been investigated in works that could be dated back to DeepProbLog [1], NS-VQA [2], NS-CL [3], NLM [4]. [1] and [4] discuss how logic reasoning can be combined with differentiable learning (batched or not) and [2] and [3] use object-based representation to solve visual reasoning problems with clearly defined programs. Therefore, I'm confused on the specific novelty of this work. It reads like another work using differentiable reasoning without much new contribution to the problem.\n\nA common issue with logic-based reasoning is the prior knowledge required. Before learning, the designer needs to supply the algorithm with space of atoms, the background knowledge (rules), etc. How does it compare with other deep learning models that can be trained without them?\n\nWhile I do not doubt the effectiveness of the method, the improvement over previous methods looks limited. The object-based YOLO+MLP model looks bad in complex scenes but could it be because of the amount of data you use? I assume the space for complex scenes is much larger for simpler scenes and with the fixed amount of training data, complex scenes will be less well-covered than simpler ones. And on simpler scenes, YOLO+MLP is not really bad. On the CLEVR-Hans experiments, NSFR is not always the best either. \n\n[1] DeepProbLog: Neural Probabilistic Logic Programming\n[2] Neural-Symbolic VQA: Disentangling Reasoning from Vision and Language Understanding\n[3] The Neuro-Symbolic Concept Learner: Interpreting Scenes, Words, and Sentences From Natural Supervision\n[4] Neural Logic Machines\n", "summary_of_the_paper": "The paper proposes a method for differentiable reasoning using soft first-order logic. The key idea is to combine forward reasoning with object-based deep learning. In particular, after the perception process from a pre-trained object detector, the proposed Neuro-Symbolic Forward Reasoner (NSFR) converts the object-based representation into probabilistic atoms and performs forward reasoning using differentiable logic. In Kandinsky and CLEVR-Hands datasets, the method shows slightly improved performance over neural methods and other symbolic approaches.", "summary_of_the_review": "I appreciate the merits in this work as mentioned above. However, I will give a temporary weak reject due to its limited novelty.\n\nI have read the reviews and the authors' response. The authors acknowledge some general issues and point out  differences with earlier works, though I do not think is significant enough. Syncing with other reviewers, I decide to keep my initial rating.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "1: The contributions are neither significant nor novel.", "empirical_novelty_and_significance": "1: The contributions are neither significant nor novel."}, "extra_text": {}}, {"review_id": "C-sXoTmi_lN", "reviewer": "Reviewer_Jwkf", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "The paper tackles an important problem, using an approach with great promise (neurosymbolic approach). However, I do have serious misgivings about the paper.\n\nIf the authors had achieved the same performance without so many hand-designed features and hand-coded rules - in short, with fewer built-in priors - it would be much more impressive. But the proposed system appears to carry out very little learning (apart from the pre-training of the encoder), and incorporates a large number of hand-designed elements tailored for the benchmarks. Most glaringly, as far as I can tell, the forward-chaining reasoning module imports a hand-written set of clauses that essentially encode the solution to the problem at hand. For example, in Section C.2, the authors give the clauses used by their system for the CLEVR-Hans3 dataset (Stammer, et al (2021)), which include:\n\nkp1(X):-in(O1,X),in(O2,X),size(O1,large),shape(O1,cube),size(O2,large),shape(O2,cylinder).\n\nNot only does this directly encode class 1 of the dataset, it also, by construction (ie: by “cheating”), solves the confounding issue that the CLEVR-Hans dataset was designed to bring out. In this class, the confounding factor in the training set is the colour of the large cube. In the training set, it happens to be always grey. But in the test set, it is sometimes another colour. There is no in-principle way to work out the “correct” rule from the training set alone, which is why Stammer et al incorporate user feedback to revise their model after training. By contrast, the present authors’ rule omits the confounding factor (colour) from the outset. So it’s little wonder they do well on the evaluation. Regrettably, this seems to me like a fundamental flaw to the paper - although, of course, I might be missing something, and I’m keen to hear the authors’ response here.\n\nRelatedly, on p.4, the authors write “We make the minimum assumption that the perception function takes an image and returns a set of object-centric vectors, where each of the vectors represents each object. For simplicity, we assume that each dimension of the vector represents the probability of the attributes for each object.” And in Section F.2, the authors give a table showing the “output format of the slot attention model”. This format perfectly represents the features needed for the CLEVR-Hans benchmark. I believe the output from the slot attention module is obtained in this format, following Locatello et al, thanks to a supervised learning stage that depends on the availability of ground truth labels corresponding to shape, size, colour, etc. (Is this correct?) It seems to me that this builds in half the solution to the problem from the outset. (I grant that Stammer et al make the same move, but their paper solves a harder problem; see above.) In effect, it means that the low-level object attributes (eg: “sphere”), which correspond to atoms in the clauses (eg: shape(obj1,sphere)), are hand-designed rather than learned.\n\nIt might be helpful to see a (qualitative, at least) comparison with other architectures that tackle similar problems (relational reasoning about images), using architectures that are also to some degree neurosymbolic. Many of these have far fewer built-in priors than the present architecture, such as Santoro et al (2017) (not so neurosymbolic), Asai (2019), or Shanahan et al (2020). The latter two architectures have a number of similarities with the present one, but learn objects, features, and relations end-to-end from scratch. The architecture of Stammer et al (2021) also learns the reasoning part from scratch (using a set transformer), without domain-specific knowledge of the relevant rules.\n\nAsai, M. Unsupervised grounding of plannable first-order logic representation from images. In International Conference on Automated Planning and Scheduling, 2019.\n\nShanahan, M., Nikiforou, K., Creswell, A., Kaplanis, C., Barrett, D. and Garnelo, M. An explicitly relational neural network architecture. In International Conference on Machine Learning, pp. 8593-8603, 2020.\n\nSantoro, A., Raposo, D., Barrett, D. G., Malinowski, M.,Pascanu, R., Battaglia, P., and Lillicrap, T.   A simple neural network module for relational reasoning.  In Advances in Neural Information Processing Systems, pp. 4974–4983, 2017.\n\nI was initially a bit puzzled why the authors repeatedly refer to the batch dimension, both in their formal presentation and in characterising their contribution, since it’s customary to omit the batch dimension for simplicity. However, a sentence at the end of section 3.4.3 states that the “value function computes probablility in batch”. In other words, the batch matters, and can’t be simply omitted for clarity. Is this correct? As I was also wondering what the justification was for interpreting value functions probabilistically, maybe the authors should make this point a bit more prominently, and give a bit more explanation. Indeed, I’m still confused by the role of probability in the architecture.\n\nIt seems that the architecture is not end-to-end differentiable, as the algorithm for converting object-centric representations to probabilistic facts appears not to be differentiable. This isn't necessarily a problem, although it precludes fine-tuning the pre-trained encoder for a given task. But maybe the authors could confirm my understanding here.", "summary_of_the_paper": "The paper tackles the problem of how to incorporate symbolic reasoning into a differentiable, deep learning architecture. The authors present an architecture comprising a pre-trained, slot-based encoder, and a differentiable clausal reasoner. They apply it to visual, relational reasoning problems, evaluating the architecture on two datasets: Kandinsky patterns and CLEVR-Hans, achieving promising performance figures.", "summary_of_the_review": "This is an important line of research, in my view, so the work is of potential value. However, I have major concerns about the extent to which the architecture relies on hand-designed features and rules. As well as limiting the value of the work, in its present state, I believe this issue also invalidates some of the evaluation (on CLEVR-Hans). But I am open to having my mind changed by the rebuttal.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}]

Author rebuttal:

Meta-review: Unfortunately, the reviewers have unanimously voted to reject this paper. 
There was some discussion of whether the paper was out-of-scope for ICLR; 
I don't think that it is, necessarily, but I think that we can kind of screen off that topic because the reviewers had plenty of non-scope-related concerns that seem disqualifying to me, including both issues of novelty and issues related to the experimental validation.
Therefore, I am also recommending rejection in this case.
Decision: Reject