Year: 2020

Abstract:
Is intelligence realized by connectionist or classicist? While connectionist approaches have achieved superhuman performance, there has been growing evidence that such task-specific superiority is particularly fragile in systematic generalization. This observation lies in the central debate (Fodor et al., 1988; Fodor & McLaughlin, 1990) between connectionist and classicist, wherein the latter continually advocates an algebraic treatment in cognitive architectures. In this work, we follow the classicist’s call and propose a hybrid approach to improve systematic generalization in reasoning. Specifically, we showcase a prototype with algebraic representations for the abstract spatial-temporal reasoning task of Raven’s Progressive Matrices (RPM) and present the ALgebra-Aware Neuro-Semi-Symbolic (ALANS) learner. The ALANS learner is motivated by abstract algebra and the representation theory. It consists of a neural visual perception frontend and an algebraic abstract reasoning backend: the frontend summarizes the visual information from object-based representations, while the backend transforms it into an algebraic structure and induces the hidden operator on-the-fly. The induced operator is later executed to predict the answer’s representation, and the choice most similar to the prediction is selected as the solution. Extensive experiments show that by incorporating an algebraic treatment, the ALANS learner outperforms various pure connectionist models in domains requiring systematic generalization. We further show that the algebraic representation learned can be decoded by isomorphism and used to generate an answer.

heading: 1 INTRODUCTION
text: “Thought is in fact a kind of Algebra.” —William James (James, 1891)
Imagine you are given two alphabetical sequences of “c, b, a” and “d, c, b”, and asked to fill in the missing element in “e, d, ?”. In nearly no time will one realize the answer to be c. However, more surprising for human learning is that, effortlessly and instantaneously, we can “freely generalize” (Marcus, 2001) the solution to any partial consecutive ordered sequences. While believed to be innate in early development for human infants (Marcus et al., 1999), such systematic generalizability has constantly been missing and proven to be particularly challenging in existing connectionist models (Lake & Baroni, 2018; Bahdanau et al., 2019). In fact, such an ability to entertain a given thought and semantically related contents strongly implies an abstract algebra-like treatment (Fodor et al., 1988); in literature, it is referred to as the “language of thought” (Fodor, 1975), “physical symbol system” (Newell, 1980), and “algebraic mind” (Marcus, 2001). However, in stark contrast, existing connectionist models tend only to capture statistical correlation (Lake & Baroni, 2018; Kansky et al., 2017; Chollet, 2019), rather than providing any account for a structural inductive bias where systematic algebra can be carried out to facilitate generalization.
This contrast instinctively raises a question—what constitutes such an algebraic inductive bias? We argue that the foundation of the modeling counterpart to the algebraic treatment in early human development (Marcus, 2001; Marcus et al., 1999) lies in algebraic computations set up on mathematical axioms, a form of formalized human intuition and the starting point of modern mathematical reasoning (Heath et al., 1956; Maddy, 1988). Of particular importance to the basic building blocks of algebra is the Peano Axiom (Peano, 1889). In the Peano Axiom, the essential components of algebra, the algebraic set and corresponding operators over it, are governed by three statements: (1) the existence of at least one element in the field to study (“zero” element), (2) a successor function that is recursively applied to all elements and can, therefore, span the entire field, and (3) the principle of
mathematical induction. Building on such a fundamental axiom, we begin to form the notion of an algebraic set and induce the operator along with it to construct an algebraic structure. We hypothesize that such a treatment of algebraic computations set up on fundamental axioms is essential for a model’s systematic generalizability, the lack of which will only make it sub-optimal.
To demonstrate the benefits of such an algebraic treatment in systematic generalization, we showcase a prototype for Raven’s Progressive Matrices (RPM) (Raven, 1936; Raven & Court, 1998), an exemplar task for abstract spatial-temporal reasoning (Santoro et al., 2018; Zhang et al., 2019a). In this task, an agent is given an incomplete 3ˆ3 matrix consisting of eight context panels with the last one missing, and asked to pick one answer from a set of eight choices that best completes the matrix. Human’s reasoning capability of solving this abstract reasoning task has been commonly regarded as an indicator of “general intelligence” (Carpenter et al., 1990) and “fluid intelligence” (Spearman, 1923; 1927; Hofstadter, 1995; Jaeggi et al., 2008). In spite of the task being one that ideally requires abstraction, algebraization, induction, and generalization (Raven, 1936; Raven & Court, 1998; Carpenter et al., 1990), recent endeavors unanimously propose pure connectionist models that attempt to circumvent such intrinsic cognitive requirements (Santoro et al., 2018; Zhang et al., 2019a;b; Wang et al., 2020; Zheng et al., 2019; Hu et al., 2020; Wu et al., 2020). However, these methods’ inefficiency is also evident in systematic generalization; they struggle to extrapolate to domains beyond training, as pointed out in (Santoro et al., 2018; Zhang et al., 2019b) and shown later in this paper.
To address the issue, we introduce the ALgebra-Aware Neuro-Semi-Symbolic (ALANS2) learner. At a high-level, the ALANS2 learner is embedded in a general neuro-symbolic architecture (Yi et al., 2018; Mao et al., 2019; Han et al., 2019; Yi et al., 2020) but has on-the-fly operator learnability and hence semi-symbolic. Specifically, it consists of a neural visual perception frontend and an algebraic abstract reasoning backend. For each RPM instance, the neural visual perception frontend first slides a window over each panel to obtain the object-based representations (Kansky et al., 2017; Wu et al., 2017) for every object. A belief inference engine latter aggregates all object-based representations in each panel to produce the probabilistic belief state. The algebraic abstract reasoning backend then takes the belief states of the eight context panels, treats them as snapshots on an algebraic structure, lifts them into a matrix-based algebraic representation built on the Peano Axiom and the representation theory (Humphreys, 2012), and induces the hidden operator in the algebraic structure by solving an inner optimization (Colson et al., 2007; Bard, 2013). The algebraic representation for the answer is predicted by executing the induced operator: its corresponding set element is decoded by isomorphism established in the representation theory, and the final answer is selected as the one most similar to the prediction.
The ALANS2 learner enjoys several benefits in abstract reasoning with an algebraic treatment:
1. Unlike previous monolithic models, the ALANS2 learner offers a more interpretable account of the entire abstract reasoning process: the neural visual perception frontend extracts object-based representations and produces belief states of panels by explicit probability inference, whereas the algebraic abstract reasoning backend induces the hidden operator in the algebraic structure. The corresponding representation for the final answer is obtained by executing the induced operator, and the choice panel with minimum distance is selected. This process much resembles the topdown bottom-up strategy in human reasoning: humans reason by inducing the hidden relation, executing it to generate a feasible solution in mind, and choosing the most similar answer available (Carpenter et al., 1990). Such a strategy is missing in recent literature (Santoro et al., 2018; Zhang et al., 2019a;b; Wang et al., 2020; Zheng et al., 2019; Hu et al., 2020; Wu et al., 2020). 2. While keeping the semantic interpretability and end-to-end trainability in existing neurosymbolic frameworks (Yi et al., 2018; Mao et al., 2019; Han et al., 2019; Yi et al., 2020), ALANS2 is what we call semi-symbolic in the sense that the symbolic operator can be learned and concluded on-the-fly without manual definition for every one of them. Such an inductive ability also enables a greater extent of the desired generalizability. 3. By decoding the predicted representation in the algebraic structure, we can also generate an answer that satisfies the hidden relation in the context.
This work makes three major contributions: (1) We propose the ALANS2 learner. Compared to existing monolithic models, the ALANS2 learner adopts a neuro-semi-symbolic design, where the problem-solving process is decomposed into neural visual perception and algebraic abstract reasoning. (2) To demonstrate the efficacy of incorporating an algebraic treatment in abstract spatialtemporal reasoning, we show the superior systematic generalization ability of the proposed ALANS2 learner in various extrapolatory RPM domains. (3) We present analyses into both neural visual perception and algebraic abstract reasoning. We also show the generative potential of ALANS2.

heading: 2 RELATED WORK
text: Quest for Symbolized Manipulation The idea to treat thinking as a mental language can be dated back to Augustine (Augustine, 1876; Wittgenstein, 1953). Since the 1970s, this school of thought has undergone a dramatic revival as the quest for a symbolized manipulation in cognitive modeling, such as “language of thought” (Fodor, 1975), “physical symbol system” (Newell, 1980), and “algebraic mind” (Marcus, 2001). In their study, connectionist’s task-specific superiority and inability to generalize beyond training (Kansky et al., 2017; Chollet, 2019; Santoro et al., 2018; Zhang et al., 2019a) have been hypothetically linked to a lack of such symbolized algebraic manipulation (Lake & Baroni, 2018; Chollet, 2019; Marcus, 2020). With evidence that an algebraic treatment adopted in early human development (Marcus et al., 1999) can potentially address the issue (Bahdanau et al., 2019; Mao et al., 2019; Marcus, 2020), classicist (Fodor et al., 1988) approaches for generalizable reasoning used in programs (McCarthy, 1960) and blocks world (Winograd, 1971) have resurrected. As a hybrid approach to bridge connectionist and classicist, recent developments lead to neuro-symbolic architectures. In particular, Yi et al. (2018) demonstrate a neuro-symbolic prototype for visual question answering, where a perception module and a language parsing module are separately trained, and the predefined logic operators associated with language tokens are chained to process the visual information. Mao et al. (2019) soften the predefined operators to afford end-to-end training with only question answers. Han et al. (2019) and Yi et al. (2020) use the hybrid architecture for metaconcept learning and temporal causal learning, respectively. ALANS2 follows the classicist’s call but adopts a neuro-semi-symbolic architecture: it is end-to-end trainable as opposed to Yi et al. (2018; 2020) and the operator can be learned and concluded on-the-fly without manual specification (Yi et al., 2018; Mao et al., 2019; Han et al., 2019; Yi et al., 2020).
Abstract Visual Reasoning Recent works by Santoro et al. (2018) and Zhang et al. (2019a) arouse the community’s interest in abstract visual reasoning, where the task of Raven’s Progressive Matrices (RPM) is introduced as such a measure for intelligent agents. Initially proposed as an intelligence quotient test for humans (Raven, 1936; Raven & Court, 1998), RPM is believed to be strongly correlated with human’s general intelligence (Carpenter et al., 1990) and fluid intelligence (Spearman, 1923; 1927; Hofstadter, 1995; Jaeggi et al., 2008). Early RPM-solving systems employ symbolic representations based on hand-designed features and assume access to the underlying logics (Carpenter et al., 1990; Lovett et al., 2009; 2010; Lovett & Forbus, 2017). Another stream of research on RPM recruits similarity-based metrics to select the most similar answer from the choices (Little et al., 2012; McGreggor & Goel, 2014; McGreggor et al., 2014; Mekik et al., 2018; Shegheva & Goel, 2018). However, their hand-defined visual features are unable to handle uncertainty from imperfect perception, and directly assuming access to the logic operations simplifies the problem. Recently proposed data-driven approaches arise from the availability of large datasets: Santoro et al. (2018) extend a pedagogical RPM generation method (Wang & Su, 2015), whereas Zhang et al. (2019a) use a stochastic image grammar (Zhu et al., 2007) and introduce structural annotations in it, which Hu et al. (2020) further refine to avoid shortcut solutions by statistics in candidate panels. Despite the fact that RPM intrinsically requires one to perform abstraction, algebraization, induction, and generalization, existing methods bypass such cognitive requirements using a single feedforward pass in connectionist models: Santoro et al. (2018) use a relational module (Santoro et al., 2017), Steenbrugge et al. (2018) augment it with a VAE (Kingma & Welling, 2013), Zhang et al. (2019a) assemble a dynamic tree, Hill et al. (2019) arrange the data in a contrasting manner, Zhang et al. (2019b) propose a contrast module, Zheng et al. (2019) formulate it in a student-teacher setting, Wang et al. (2020) build a multiplex graph network, Hu et al. (2020) aggregate features from a hierarchical decomposition, and Wu et al. (2020) apply a scattering transformation to learn objects, attributes, and relations. In contrast, ALANS2 attempts to fulfill the cognitive requirements in a neuro-semi-symbolic framework: the perception frontend abstracts out visual information, and the reasoning backend induces the hidden operator in an algebraic structure.
3 THE ALANS2 LEARNER
In this section, we introduce the ALANS2 learner for the RPM problem. In each RPM instance, an agent is given an incomplete 3ˆ 3 panel matrix with the last entry missing and asked to induce the operator hidden in the matrix and choose from eight choice panels one that follows it. Formally, let the answer variable be denoted as y, the context panels as tIo,iu8i“1, and choice panels as tIc,iu8i“1. Then the problem can be formulated as estimating P py | tIo,iu8i“1, tIc,iu8i“1q. According to the common design (Santoro et al., 2018; Zhang et al., 2019a; Carpenter et al., 1990), there is one operator that governs each panel attribute. Hence, by assuming independence among attributes, we
propose to factorize the probability as P py “ n | tIo,iu8i“1, tIc,iu8i“1q9 ź
a
ÿ T a P pya “ n | T a, tIo,iu8i“1, tIc,iu8i“1qP pT a | tIo,iu8i“1q, (1)
where ya denotes the answer selection based only on attribute a and T a the operator on a. Overview As shown in Fig. 1, the ALANS2 learner decomposes the process into perception and reasoning: the neural visual perception frontend extracts the belief states from each of the sixteen panels, whereas the algebraic abstract reasoning backend views an instance as an example in an abstract algebra structure, transforms belief states into algebraic representations by representation theory, induces the hidden operators, and executes the operators to predict the representation of the answer. Therefore, in Eq. (1), the operator distribution is modeled by the fitness of an operator and the answer distribution by the distance between the predicted representation and that of a candidate.

heading: 3.1 NEURAL VISUAL PERCEPTION
text: The neural visual perception frontend consists of an object CNN and a belief inference engine. It is responsible for extracting the belief states for each of the sixteen (context and choice) panels.
Object CNN For each panel, we use a sliding window to traverse the spatial domain of the image and feed each image region into an object CNN. The CNN has four branches, producing for each region its object attribute distributions, including objectiveness (if the region contains an object), type, size, and color. Distributions of type, size, and color are conditioned on an object’s existence.
Belief Inference Engine The belief inference engine summarizes the panel attribute distributions (over position, number, type, size, and color) by marginalizing out all object attribute distributions (over objectiveness, type, size, and color). As an example, the distribution of the panel attribute of Number can be computed as such: for N image regions and their predicted objectiveness
P pNumber “ kq “ ÿ
Ro
N ź j“1 P proj “ Roj q, (2)
where P proj q denotes the jth region’s estimated objectiveness distribution, and Ro is a binary sequence of length N that sums to k. All panel attribute distributions compose the belief state of a panel. In the following, we denote the belief state as b and the distribution of an attribute a as P pbaq.

heading: 3.2 ALGEBRAIC ABSTRACT REASONING
text: Given the belief states of both context and choice panels, the algebraic abstract reasoning backend concerns the induction of hidden operators and the prediction of answer representations for each
attribute. The fitness of induced operators is used for estimating the operator distribution and the difference between the prediction and the choice panel for estimating the answer distribution.
Algebraic Underpinning Without loss of generality, here we assume row-wise operators. For each attribute, under perfect perception, the first two rows in an RPM instance provide snapshots into an example of magma (Hausmann & Ore, 1937) constrained to an integer-indexed set, the simplest group-like algebra structure that is closed under a binary operator. To see this, note that an accurate perception module would see each panel attribute as a deterministic set element. Therefore, RPM instances with unary operators, such as progression, are magma examples with special binary operators where one operand is constant. Instances with binary operators, such as arithmetics, directly follow the magma properties. Those with ternary operators are ones with unary operators on a three-tuple set defined on rows.
Algebraic Representation A systematic algebraic view allows us to felicitously recruit ideas in representation theory (Humphreys, 2012) to glean the hidden properties in the abstract structures: it makes abstract algebra amenable by reducing it onto linear algebra. Following the same spirit, we propose to lift both the set elements and the hidden operators to a learnable matrix space. To encode the set element, we employ the Peano Axiom (Peano, 1889). According to the Peano Axiom, an integer-indexed set can be constructed by (1) a zero element (0), (2) a successor function (Sp¨q), and (3) the principle of mathematical induction, such that the kth element is
encoded as Skp0q. Specifically, we instantiate the zero element as a learnable matrix M0 and the successor function as the matrix-matrix product parameterized by M . In an attribute-specific manner, the representation of an attribute taking the kth value is pMaqkMa0 . For operators, we consider them to live in a learnable matrix group of a corresponding dimension, such that the action of an operator on a set can be represented as matrix multiplication. Such algebraic representations establish an isomorphism between the matrix space and the abstract algebraic structure: abstract elements on the algebraic structure have a bijective mapping to/from the matrix space, and inducing the abstract relation can be reduced to solving for a matrix operator. See Fig. 2 for a graphical illustration of the isomorphism.
Operator Induction Operator induction concerns about finding a concrete operator in the abstract algebraic structure. By the property of closure, we formulate it as an inner-level regularized linear regression problem: a binary operator T ab in a magma example for attribute a minimizes
argmin T
`ab pT q “ ÿ
i
E “ }Mpbao,iqTMpbao,i`1q ´Mpbao,i`2q}2F ‰ ` λab }T }2F , (3)
where under visual uncertainty, we take the expectation with respect to the distributions in the belief states of context panels P pbao,iq in the first two rows, and denote its algebraic representation as Mpbao,iq. For unary operators, one operand can be treated as constant and absorbed into T . Note that Eq. (3) admits a closed-form solution (see Appendix for details). Therefore, the operator can be learned and adapted for different instances of binary relations and concluded on-the-fly. Such a design also simplifies the recent neuro-symbolic approaches, where every single symbol operator needs to be hand-defined (Yi et al., 2018; Mao et al., 2019; Han et al., 2019; Yi et al., 2020). Instead, we only specify an inner-level optimization framework and allow symbolic operators to be quickly induced based on the neural observations, while keeping the semantic interpretability in the neurosymbolic methods. Therefore, we term such a design semi-symbolic.
The operator probability in Eq. (1) is then modeled by each operator type’s fitness, e.g., for binary, P pT a “ T ab | tIo,iu8i“1q9 expp´`ab pT ab qq. (4)
Operator Execution To predict the algebraic representation of the answer, we solve another innerlevel optimization similar to Eq. (3), but now treating the representation of the answer as a variable:
yMab “ argmin M `ab pMq “ Er}Mpbao,7qT ab Mpbao,8q ´M}2F s, (5) where the expectation is taken with respect to context panels in the last row. The optimization also admits a closed-form solution (see Appendix for details), which corresponds to the execution of the induced operator in Eq. (3).
The predicted representation is decoded probabilistically as the predicted belief state of the solution, P p pba “ k | T aq9 expp´}yMa ´ pMaqkMa0 }2F q. (6)
Answer Selection Based on Eqs. (1) and (4), estimating the answer distribution is now boiled down to estimating the conditional answer distributions for each attribute. Here, we propose to model it based on the Jensen–Shannon Divergence (JSD) of the predicted belief state and that of a choice,
P pya “ n | T a, tIo,iu8i“1, tIc,iu8i“1q9 expp´DJSDpP p pba | T aq}P pbac,nqqq. (7) Discussion The algebraic abstract reasoning module offers a computational and interpretable counterpart to human-like reasoning in RPM (Carpenter et al., 1990). Specifically, the induction component resembles the fluid intelligence, where one quickly induces the hidden operator by observing the context panels. The execution component synthesizes an image by executing the induced operator, and the choice most similar to the image is selected as the answer. We also note that by decoding the predicted representation in Eq. (6), a solution can be generated: by sequentially selecting the most probable operator and the most probable attribute value, a rendering engine can directly render the solution. The reasoning backend also enables end-to-end training: by integrating the belief states from neural perception, the module conducts both induction and execution in a soft manner, such that the gradients can be back-propagated and the learner jointly trained.

heading: 3.3 LEARNING OBJECTIVE
text: We train the entire ALANS2 learner by minimizing the cross-entropy loss between the estimated answer distribution and the ground-truth selection, i.e.,
min θ,tMa0 u,tMau
`pP py | tIo,iu8i“1, tIc,iu8i“1q, y‹q, (8)
where `p¨q denotes the cross-entropy loss, y‹ the ground-truth selection, θ the parameters in the object CNN, and tMa0 u and tMau the zero elements and the successor functions for element encodings, respectively. Note notations are simplified by making the dependency on parameters implicit.
However, we notice in practice that with only the cross-entropy loss on the ground-truth selection, the ALANS2 learner experiences difficulty in convergence. Without a proper guidance, the object CNN does not produce meaningful object-based representations. Therefore, following the discussion in (Santoro et al., 2018; Zhang et al., 2019a; Wang et al., 2020), we augment training with an auxiliary loss on the distribution of the operator, i.e.,
min θ,tMa0 u,tMau
`pP py | tIo,iu8i“1, tIc,iu8i“1q, y‹q ` ÿ
a
λa`pP pT a | tIo,iu8i“1q, ya‹ q, (9)
where ya‹ denotes the ground-truth operator selection for attribute a, and λ a balances the trade-off.

heading: 4 EXPERIMENTS
text: A cognitive architecture with systematic generalization is believed to demonstrate the following three principles (Fodor et al., 1988; Marcus, 2001; 2020): (1) systematicity, (2) productivity, and (3) localism. Systematicity requires an architecture to be able to entertain “semantically related” contents after understanding a given thought. Productivity states that the awareness of a constituent implies that of a recursive application of the constituent, and vice versa for localism.
To verify the effectiveness of an algebraic treatment in systematic generalization, we showcase the superiority of the proposed ALANS2 learner on the three principles in the abstract spatial-temporal reasoning task of RPM. Specifically, we use the generation methods proposed in Zhang et al. (2019a) and Hu et al. (2020) to generate RPM problems and carefully split training and testing to construct the three regimes. The former generates candidates by perturbing only one attribute of the correct answer while the later modifies attribute values in a hierarchical manner to avoid shortcut solutions by pure statistics. Both methods categorize relations in RPM into three types, according to Carpenter et al. (1990): unary (Constant and Progression), binary (Arithmetic), and ternary (Distribution of Three), each of which comes with several instances. Grounding the principles into learning abstract relations in RPM, we fix the configuration to be 3ˆ 3Grid and generate the following data splits for evaluation (see Appendix for details):
• Systematicity: the training set contains only a subset of instances for each type of relation, while the test set all other relation instances.
• Productivity: as the binary relation results from a recursive application of the unary relation, the training set contains only unary relations, whereas the test set only binary relations. • Localism: the training and testing sets in the productivity split are swapped to study localism.
We follow Zhang et al. (2019a) to generate 10, 000 instances for each split and assign 6 folds for training, 2 folds for validation, and 2 folds for testing.
Experimental Setup We evaluate the systematic generalizability of the proposed ALANS2 learner on the above three splits, and compare the ALANS2 learner with other baselines, including ResNet, ResNet+DRT (Zhang et al., 2019a), WReN (Santoro et al., 2018), CoPINet (Zhang et al., 2019b), MXGNet (Wang et al., 2020), LEN (Zheng et al., 2019), HriNet (Hu et al., 2020), and SCL (Wu et al., 2020). We use either official or public implementations that reproduce the original results.
Systematic Generalization Table 1 shows the performance of various models on systematic generalization, i.e., systematicity, productivity, and localism. Compared to results reported in Santoro et al. (2018); Zhang et al. (2019a;b); Wang et al. (2020); Zheng et al. (2019); Hu et al. (2020); Wu et al. (2020), all pure connectionist models experience a devastating performance drop when it comes to the critical cognitive requirements on systematic generalization, indicating that pure connectionist models fail to perform abstraction, algebraization, induction, or generalization needed in solving the abstract reasoning task; instead, they seem to only take a shortcut to bypass them. In particular, MXGNet (Wang et al., 2020)’s superiority is diminishing in systematic generalization. Despite of learning with structural annotations, ResNet+DRT (Zhang et al., 2019a) does not fare better than its base model. The recently proposed HriNet (Hu et al., 2020) slightly improves on ResNet in this aspect, with LEN (Zheng et al., 2019) being only marginally better. WReN (Santoro et al., 2018), on the other hand, shows oscillating performance across the three regimes. Evaluated under systematic generation, SCL (Wu et al., 2020) and CoPINet (Zhang et al., 2019b) also far deviate from their “superior performance”. These observations suggest that pure connectionist models highly likely learn from variation in visual appearance rather than the algebra underlying the problem.
Embedded in a neural-semi-symbolic framework, the proposed ALANS2 learner improves on systematic generalization by a large margin. With an algebra-aware design, the model is considerably stable across different principles of systematic generalization. The algebraic representations learned in relations of either a constituent or a recursive composition naturally support productivity and localism, while semi-symbolic inner optimization further allows various instances of an operator type to be induced from the algebraic representations and boosts systematicity. The importance of the algebraic representations is made more significant in the ablation study: ALANS2-Ind, with algebraic representation replaced by independent encodings and the algebraic isomorphism broken, shows inferior performance. The ALANS2 learner also enables diagnostic tests into its jointly learned perception module and reasoning module, in contrast to the black-box-like connectionist counterparts.
Analysis into Perception and Reasoning The neural-semi-symbolic design allows analyses into both perception and reasoning. To evaluate the neural perception module and the algebraic reasoning module, we extract region-based object attribute annotations from the dataset generation methods (Zhang et al., 2019a; Hu et al., 2020) and categorize all relations into three types, i.e., unary, binary, and ternary, respectively.
Table 2 shows the perception module’s performance on the test sets in the three regimes of systematic generalization. We note that in order for the ALANS2 learner to achieve the desired results shown in Table 1, ALANS2 learns to construct the concept of objectiveness perfectly. The model also shows a fairly accurate prediction accuracy on the attributes of type and size. However, on the texture-related concept of color, ALANS2 fails to develop a reliable notion on it. Despite that, the general prediction accuracy of the perception module is still surprising, considering that the perception module is only
jointly learned with ground-truth annotations on answer selections. The relatively lower accuracy on color could be attributed to its larger space compared to other attributes.
Table 3 lists the reasoning module’s performance during testing for the three aspects. Note that on position, the unary operator (shifting) and binary operator (set arithemtics) do not systematically imply each other. Hence, we do not count them as probes into productivity and localism. In general, we notice that the better the perception accuracy on one attribute, the better the performance on reasoning. However, we also note that despite the relatively accurate perception of objectiveness, type, and size, near perfect reasoning is never guaranteed. This deficiency is due to the perception uncertainty handled by expectation in Eq. (3): in spite of correctness when we take argmax, marginalizing by expectation will unavoidably introduce noise into the reasoning process. Therefore, an ideal reasoning module requires the perception frontend to be not only correct but also certain. Computationally, one can sample from the perception module and optimize Eq. (9) using REINFORCE (Williams, 1992). However, the credit assignment problem and variance in gradient estimation will further complicate training.
Generative Potential Compared to existing discriminative-only RPM-solving methods, the proposed ALANS2 learner is unique in its generative potential. As mentioned above, the final panel attribute can be decoded by sequentially selecting the most probable hidden operator and the attribute value. When equipped with a rendering engine, a solution can be generated. Here, we use the rendering program released by Zhang et al. (2019a) to demonstrate such a generative potential in the proposed ALANS2 learner. Fig. 3 shows examples where the solutions are generated by ALANS2. Such a generative ability is a computational counterpart to human reasoning: ALANS2 selects the one most similar to a synthesized image from the pool of candidates, which resembles human’s top-down bottom-up reasoning.

heading: 5 CONCLUSION
text: In this work, we propose the ALgebra-Aware Neuro-Semi-Symbolic (ALANS2) learner, echoing a normative theory in the connectionist-classicist debate that an algebraic treatment in a cognitive architecture should improve a model’s systematic generalization ability. In experiments, we show that with such an algebraic treatment, the neuro-semi-symbolic learner achieves superior performance in three RPM domains reflective of systematic generalization.

heading: D MARGINALIZATION FOR OTHER ATTRIBUTES
text: For the attribute of position, we denote its value as Ro, a binary vector of length N , with each entry corresponding to one of the N windows. Then
P pPosition “ Roq “ N ź
j“1 P proj “ Roj q, (S21)
where P proj q denotes the jth region’s estimated objectiveness distribution returned by a CNN as in the main text.
For the attribute of type, the panel attribute of type being k is evaluated as
P pType “ kq “ ÿ
Ro
¨
˝
ź
j,Roj“1 P prtj “ kq
˛
‚P pPosition “ Roq, (S22)
where P prtjq denotes the jth region’s estimated type distribution returned by a CNN. The computation for size and color is exactly the same as type, except that we use the region’s estimated size and color distribution returned by a CNN.

heading: E RELATED WORK ON NEURAL THEOREM PROVING
text: Combining neural architectures with symbolic reasoning has a long history in the field of theorem proving (Garcez et al., 2012), with early works dated back to propositional rules (Shavlik & Towell, 1991; Towell & Shavlik, 1994; Garcez & Zaverucha, 1999). Later works extend the propositional rules to first-order inference (Shastri, 1992; Ding, 1995; França et al., 2014; Sourek et al., 2015; Cohen, 2016). More recent works include the Logic Tensor Networks (Serafini & Garcez, 2016) and the NTP model (Rocktäschel & Riedel, 2017). The former grounds first-order logics and supports function terms, while the latter is constructed from Prolog’s backward chaining and is related to Komendantskaya (2011); Hiolldobler (1990) but supports function-free terms. DeepProbLog (Manhaeve et al., 2018) further improves on NTP by focusing on tight interactions between a neural component and subsymbolic representation and parameter learning for both the neural and the logic components. Evans & Grefenstette (2018) introduces a differentiable rule induction process, though not integrating the neural and symbolic components. Our work is related to the stream of work on neural theorem proving. However, we formulate the relation induction process as continuous optimization rather than logical induction.

heading: F MORE ON NEURAL VISUAL PERCEPTION
text: • Why not train a CNN to predict the position and number of objects? The CNN is trained to predict the type, size, color, and object existence in a window. The object existence in windows is marginalized to be a Number distribution and Position distribution. This is a light-weight method for object detection. Nevertheless, it is also possible to use a Fast-RCNN like method to predict object positions (this implies number) directly. However, in this way, the framework loses the probabilistic interpretation (the object proposal branch is currently still deterministic), and we cannot perform end-to-end learning.
• How does the CNN predict the presence of an object, its type, size, and color given that it is not trained to do that? For each window, the CNN outputs 4 softmaxed vectors, corresponding to the probability distributions of object existence, object type, object size, and object color. The spaces for these attributes are pre-defined. CNN’s weights are then jointly trained in the framework. Such a design follows recent neuro-symbolic methods (Mao et al., 2019; Han et al., 2019) that also rely on the implicitly trained representation. In short, we assign semantics to the implicitly trained representation (probability distributions for attributes), performs marginalization and reasoning as if they are groundtruth attribute distributions, and jointly train using only the problem’s target label.

Review summaries:
This work proposes a new learner bridging the gap between connectionists and classicists in the task of Raven’s Progressive Matrices (RPM). It relies on a CNN to extract visual features and then uses an algebraic abstract reasoning module to infer the operators of an RPM instance, which allows applying the inferred operator on the RPM instance to predict potential solutions according to various attributes. The most likely solution according to the ensemble of the attributes is then selected as an answer.