Coherent and Consistent Relational Transfer Learning with Autoencoders

1 INTRODUCTION . Humans are capable of learning concepts such that they can be applied to many different scenarios ( Inhelder & Piaget , 1964 ; Piaget , 2005 ; Lake et al. , 2017 ) . An important characteristic is that human-like concepts remain coherent across contexts , whereby their logical consistency in one context is retained in another ( Nye et al. , 2021 ) . As an example , consider the concept of ordinality which permits comparison over ordered sets , e.g . “ A is larger than B ” , and pertains to a multitude of properties : position , size , volume , reach , etc . So long as one of these properties can be attributed to an object , a set of objects can be compared on that basis ; in this sense ordinality generalises between objects . All in all , if the concept of ordinality were to be learned in its most general form , it should be coherent across properties and objects . In this paper , we seek to define the conditions that allow a learned concept to transfer well across properties and objects in the case of sub-symbolic learners ( d ’ Avila Garcez & Lamb , 2020 ; Santoro et al. , 2021 ; Greff et al. , 2020 ) . We define consistency and coherence of sub-symbolic learners borrowing from analogous definitions from symbolic AI . We propose a neural-symbolic autoencoder architecture consisting of a neural encoder for objects coupled with modular relation-decoders ( Serafini & Garcez , 2016 ; Donadello et al. , 2017 ; Badreddine et al. , 2020 ; Wang et al. , 2017 ; Nickel et al. , 2016a ; Dai et al. , 2020 ) , and we show that this architecture is capable of achieving an improved transfer learning performance by being coherent across properties and objects . We therefore claim that retaining consistency across domains dictates concept coherence , offering a more fine-grained measure of transfer learning than accuracy alone . The proposed architecture is a practical instantiation of this formalisation and is evaluated in this paper on a new Partial Relation Transfer ( PRT ) task and data set . We begin by expressing the symbolic application of a set of relations to some domain of interest as a model-theoretic structure , such as A is larger than B , and defining an analogous soft-structure for non-symbolic learners where relations are modelled by relation-decoders that compute beliefs . We then propose formal definitions for consistency and coherence of soft-structures which provide a practical consistency score calculation to the evaluation of autoencoders . Finally , we present a benchmark PRT learning task with the use of a new BlockStacks data set derived from the CLEVR data set rendering agent . We then compare our proposed archi- tecture with several existing relation-decoder models on transfer learning tasks from the MNIST data set to BlockStacks . Our experiments show that relation-decoders which maintain consistency over unobserved regions of representational space retain coherence across domains whilst achieving better transfer learning performance . The contributions of this paper are : • A formal definition of coherence and consistency for sub-symbolic learners with a practical evaluation score . • A neural model and learning task for partial relation transfer including a new data set to evaluate concept coherence . • A comprehensive critical evaluation of results in comparison with multiple state-of-the-art relation-decoder models . In Section 2 we provide the required background , Section 3 introduces soft-structures and formally defines coherence and consistency , Section 4 provides a practical consistency loss and Section 5 then outlines our neural-symbolic architecture . After detailing the PRT task in Section 6 , we present results in Section 7 and complete the paper in Section 8 with a discussion and concluding remarks , including limitations and future work . We provide related work in Appendix A . 2 PRELIMINARIES . Notations : We reserve uppercase calligraphic letters to denote sets and lowercase versions of the same letter to denote their elements , e.g. , S = { s1 , . . . , sn } is a set S of n elements si . We indicate with |S| = n the cardinality of S. We use uppercase roman letters to denote a random variable e.g. , S , and use the uppercase calligraphic version of the same letter ( S ) to denote the set from which the random variable takes values according to some corresponding probability distribution , pS , over the elements of the set , such that ∑|S| i=1 pS ( si ) = 1 for a discrete S. For brevity , we may write pS ( si ) as p ( si ) , where the random variable is implied by the argument . We use bold font lowercase letters to denote vector elements , e.g. , si ∈ Rd is an d-dimensional vector element from the set S = Rd . Logic and model-theoretic background : We assume a formal language L composed of variables , predicates ( i.e . relations ) , logical connectives ¬ ( negation ) , ∨ ( disjunction ) and ∧ ( conjunction ) , → ( implication ) and universal quantification ∀ ( for all ) with their conventional meaning ( see Shapiro & Kouri Kissel ( 2021 ) ) . Relations express relational knowledge over elements of a domain . For instance , r ( s1 , s2 ) states that elements s1 and s2 are related through the binary relation r. The meaning of relations is defined by an interpretation , ISσ over elements of an non-empty domain S. Together a S and ISσ form a structure Sσ . Definition 1 ( Signature , Interpretation , Structure ) The signature of a language L is σ = { r ∈ L : r is a relation } , whose elements have arity given by ar : σ → N , where N is the set of natural numbers . For each r ∈ σ , ar ( r ) denotes the arity of r. Given a signature σ and a non-empty domain S , an interpretation ISσ of σ over elements of S assigns to each relation r ∈ σ a set ISσ ( r ) ⊆ Sar ( r ) . A structure is a tuple Sσ = ( S , ISσ ) . Note that for a fixed domain S and signature σ , different interpretations yield different structures . We construct universally quantified first-order formulae ( called sentences ) using the signature σ of L , whose truth-value is defined with respect to a given structure Sσ . To do so , we first consider ground instances of a formula . These are given by replacing all the variables in the formula with elements from the domain S. For instance , r ( s1 , s2 ) , where s1 and s2 are elements of S , is a ground instance of an atomic formula r ( i , j ) where i and j are variables in L. Given a structure Sσ = ( S , ISσ ) a relation r and a tuple ( s1 , . . . , sar ( r ) ) ∈ Sar ( r ) , a ground instance r ( s1 , . . . , sar ( r ) ) is true in the structure Sσ if and only if ( s1 , . . . , sar ( r ) ) ∈ ISσ ( r ) . The truth value of a sentence in a given structure Sσ depends on the truth value of its respective ground instances . Specifically , a sentence is true in a structure Sσ if and only if all of its ground instances are true in Sσ . When a sentence , τ , is true in a structure , Sσ , we say that the structure satisfies τ , denoted as Sσ |= τ . A set of sentences form a theory , T . A model of T is a structure that satisfies every sentence in T . Definition 2 ( Model of a theory ) Let T be a theory written in a language L and let Sσ = ( S , ISσ ) be a structure , where σ is the signature of L. Sσ is a model of T if and only if Sσ |= τ for every sentence τ ∈ T . Example 1 Suppose we have the structure Sσ = ( S , ISσ ) , where S is a domain of images of handwritten digits and σ the signature of binary relations σ = { isGreater , isEqual , isLess , isSuccessor , isPredecessor } , or for short σ = { G , E , L , S , P } . Let T be the theory that defines ordinality including , for instance , the sentence ∀i , j.G ( i , j ) → ¬E ( i , j ) ( if a digit is greater than another then they are not equal ) . Any structure Sσ = ( S , ISσ ) with interpretations ISσ of σ that captures a total order over the elements of S is a model of T . 3 APPROXIMATING STRUCTURES THAT HAVE REAL-WORLD DOMAINS . In this section we turn our attention to the challenge of learning a model over a real-world domain , given a signature and theory . Here a learner must determine an appropriate interpretation over real-world data , such as images or other perceptions . This can be challenging because , firstly , we may only have a partial description of the interpretation , and secondly data may be noisy and contain information that is not relevant to the theory . For instance MNIST , a relatively simple data set by current standards , consists of stylistic details such as line thickness and digit skew ( Chen & Batmanghelich , 2020 ) , which are irrelevant to the notion of ordinality , which makes obtaining the structure from Example 1 more complicated . Nevertheless , statistical machine learning models are able to discover commonalities in data which help to infer the underlying semantics ( i.e . interpretation ) and disregard the noise . Following the convention in disentanglement literature ( Bengio et al. , 2013 ; Kingma & Welling , 2014 ; Higgins et al. , 2017 ; 2018 ) , we take the assumption that realworld observations S are drawn from some conditional distribution pS|Z , where Z is a latent random variable , itself drawn from prior pZ . It is therefore useful to define a domain encoding of the form , ψS : S → Z , ( 1 ) tasked with approximating the conditioned expectation of the posterior , i.e . ψS ( s ) = E [ pZ|S ( Z|s ) ] . Since obtaining an interpretation from domain encodings , for a given signature , may require dealing with noise , we express the interpretation of relations over real-world data by belief functions over the space Z ( Paris & Vencovská , 2015 ; Paris , 1994 ) , and refer to these as relation-decoders : φr : Zar ( r ) → ( 0 , 1 ) ( 2 ) with φ = { φr : r ∈ σ } . Concretely , for a binary relation r and ordered pair ( si , sj ) ∈ S2 , φr ( ψS ( si ) , ψS ( sj ) ) describes the belief that ( si , sj ) ∈ ISσ ( r ) . A belief φr ( ψS ( si ) , ψS ( sj ) ) ≈ 1 signifies a strong belief that ( si , sj ) ∈ ISσ ( r ) and φr ( ψS ( si ) , ψS ( sj ) ) ≈ 0 signifies a strong belief that ( si , sj ) /∈ ISσ ( r ) . Together , ψS and φ allow us to define a belief-based analogue to a structure . Definition 3 ( Soft-Structure/Soft-Substructure ) Given signature σ , a possibly infinite set Z and relation-decoders φ , a soft-structure is a tuple Z̃σ = ( Z , φ ) . For ( finite ) domain S and encoding ψS : S → Z , S̃σ = ( ψS ( S ) , φ ) is a ( finite ) soft-substructure of Z̃σ , with sub-domain ψS ( S ) = { ψS ( s ) |s ∈ S } ⊆ Z . A soft-structure can be used to learn a structure over a real-world domain through learning ψS and φ . Clearly , a finite soft-substructure is a soft-structure . To determine the degree to which a softstructure supports any given structure we introduce the following measure : p ( Sσ|S̃σ ) = ∏ r∈σ ∏ O∈Sar ( r ) ( φr ( ψS ( O ) ) ) γrO , Sσ ( 1− φr ( ψS ( O ) ) ) 1−γ r O , Sσ ( 3 ) where γrO , Sσ = 1 if O ∈ ISσ ( r ) , and 0 otherwise ; we use φr ( ψS ( O ) ) as shorthand for φr ( ψS ( s1 ) , . . . , ψS ( sn ) ) for n = ar ( r ) . Eqn . 3 expresses the assumption that , given a finite softstructure , the beliefs in what constitutes the ( different ) interpretations of ( different ) relations are independent of one another . It is straightforward to show that ∑ Sσ p ( Sσ|S̃σ ) = 1 ( summed over all possible structures with domain S and signature σ ) and so it can be treated as a probability measure , where p ( Sσ|S̃σ ) ≈ 1 means that there is a high probability that the interpretation sampled from S̃σ will be ISσ . If we have a theory T over σ then it is natural to ask with what weight S̃σ supports any given structure that is a model of T . In the following , we use model weight , ΓS̃σT , to describe the support given by S̃σ to models of T : ΓS̃σT = ∑ Sσ∈MTS p ( Sσ|S̃σ ) ( 4 ) where MTS is the set of all structures with domain S that are models of T . This lets us compare soft-structures , wherein a good soft-structure will be one that has a high model weight : Definition 4 ( -Consistency of Soft-Structure ) Given a finite soft-structure S̃σ , if 1 − ΓS̃σT ≤ then we say that the soft-structure is -consistent with theory T . We propose -consistency as an appropriate quantified measure of the notion of consistency presented in ( Nye et al. , 2021 ) . A consistent soft-structure S̃σ ensures that φ gives high belief only to interpretations that satisfy , i.e. , are consistent with , T . However , this expression is limited to the domain encodings of S̃σ , i.e . ψS ( S ) . Going a step further , for a concept to be learned in a manner comparable to what a human might learn , we would expect that this consistency carries over to new domains and their corresponding soft-structures , as defined in what follows .

Summary: This work introduces a more general definition of structures namely soft structures that can be used to learn structure over richer domains in a data-driven manner. Further, they introduce suitable definitions of coherence and consistency for the proposed soft structures. Next, the paper proposes a neural architecture that is essentially, jointly learning relation encodings jointly with representations for set elements. The key argument of the paper is that transfer is to be expected across shared relations despite their overloaded usage across domains — for example, greater than (GE) can have completely different interpretations in the source / target domains.