Formalizing Consistency and Coherence of Representation Learning
Abstract
In the study of reasoning in neural networks, recent efforts have sought to improve consistency and coherence of sequence models, leading to important developments in the area of neuro-symbolic AI.
In symbolic AI, the concepts of consistency and coherence can be defined and verified formally, but for neural networks these definitions are lacking.
The provision of such formal definitions is crucial to offer a common basis for the quantitative evaluation and systematic comparison of connectionist, neuro-symbolic and transfer learning approaches.
In this paper, we introduce formal definitions of consistency and coherence for neural systems.
To illustrate the usefulness of our definitions, we propose a new dynamic relationdecoder model built around the principles of consistency and coherence.
We compare our results with several existing relation-decoders using a partial transfer learning task based on a novel data set introduced in this paper.
Our experiments show that relation-decoders that maintain consistency over unobserved regions of representation space retain coherence across domains, whilst achieving better transfer learning performance.
Introduction
Humans are capable of learning concepts that can be applied to many different scenarios [18, 34, 23].
An important principle is that human-like concepts remain coherent across contexts [31].
As an example, consider the concept of ordinality , e.g .
“A is larger than B”, which allows comparisons to be made between ordered sets.
Ordinality should apply equally whether A and B are digits or a tower of blocks.
It is said that a concept may pertain to a multitude of properties: position, volume, reach, etc .
As long as one of these properties can be attributed to an object, a set of objects can be compared on that basis.
All in all, if the concept of ordinality was to be learned in its most general form, its use should be consistent across objects and coherent across object properties.
In [31], empirical results on story generation and instruction-following have shown that an intuitive use of consistency and coherence can increase the accuracy of neural networks.
Following a neurosymbolic perspective [12], it is argued in [31] that System 1 approaches, fast and capable of learning patterns efficiently from data, “are often inconsistent and incoherent”, and that “adding System 2 -inspired logical reasoning” as a logical consistency, training-free module allows for an improved selection of candidate stories generated by System 1 .
While [31] makes an important contribution by exploring several variations on the theme, in this paper we offer a formal definition for consistency and coherence in the context of neural networks, in particular neuro-symbolic autoencoders.
We also apply and evaluate consistency and coherence in transfer learning tasks, where we believe that the theme will have its most practical impact.
We argue that for a concept to be useful during transfer learning, the system of relations that define the concept in the source domain must be coherent with the target domain, whereby logical consistency achieved in the source is retained in the target domain.
This is to say that the concept-specific relations learned in the source ought to be consistent with a logical theory that defines their semantics, and that such consistency must extend beyond the representations learned in the source domain and, in particular, hold for the embeddings learned in the target domain.
In this paper, we offer a formal definition for consistency and coherence of sub-symbolic representation learners, inspired by analogous definitions from symbolic AI.
This is expected to define the conditions that make a learned concept transfer well across properties and objects.
To evaluate the practical value of these definitions in a real setting, we derive a simple neuro-symbolic autoencoder architecture consisting of a neural encoder for objects coupled with consistent modular object relationdecoders.
Relations such as isGreater , isEqual ,... are evaluated on a proposed Partial Relation
Transfer (PRT) learning task, between a new CLEVR-style BlockStacks data set and the MNIST handwritten digits data set, such that the learning of ordinality among the MNIST digits is evaluated against the learning of the relative position of a red block in a stack of multi-colored blocks.
Our evaluation includes a comparison with several existing relation-decoder models and results show that relation-decoders which maintain consistency over unobserved regions of representation space retain coherence across domains whilst achieving better transfer learning performance.
In summary, the contributions of this paper are:
• A formal definition of consistency and coherence for sub-symbolic learners offering a practical evaluation score for concept coherence; • A derived model implementation and PRT data set and experimental setup used to evaluate the interplay between concept coherence and concept transfer; • A comprehensive critical evaluation of results and comparison of multiple relation-decoder models, showing that improvements in concept coherence, as defined in this paper, correspond with improved concept transfer.
In Section 2 we provide the notation and required logic background.
Section 3 formally defines coherence and consistency.
Section 4 defines a practical consistency loss and Section 5 outlines our neuro-symbolic autoencoder.
After detailing the PRT task and introducing the data set in Section 6, comparative experimental results are discussed in Section 7.
We provide an overview of the related work in Section 8 and Section 9 concludes the paper with a discussion, including limitations and future work.
We expand on the experimental results and setup, together with data set characteristics, model details and parameterization in the Appendices.
Preliminaries
Notation: We reserve uppercase calligraphic letters to denote sets, and lowercase versions of the same letter to denote their elements, e.g. S =
{ s 1 , . . .
, s n } is a set S of n elements s i .
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 p S , over the elements of the set, such that (cid:80) |S| i =1 p S ( s i )
= 1 for a discrete S .
For brevity, we may write p S ( s i ) as p ( s i ) , where the random variable is implied by the argument.
We use bold font lowercase letters to denote vector elements, e.g. s i ∈ R d is an d-dimensional vector element from the set S
= R d .
Logic and model-theoretic background: our proposed theory is based upon logic and model theoretic primitives.
To avoid making this paper overly dense, we defer the details of the logic background to Appendix E and include here only the most important definitions supported by an illustrative example.
Definition 2.1 (Signature, Arity, Domain, Interpretation, Structure) .
The signature of a language L is a set of relations σ = { r ∈L} whose elements have arity given by ar : σ → N , where N is the set of natural numbers.
Given a signature σ and a non-empty domain S = { s 1 , s 2 , . . . } , an interpretation
I S σ of σ over elements of S assigns to each relation r ∈ σ a set I S σ ( r ) ⊆
S ar ( r ) .
A structure is a tuple S σ = ( S , I S σ ) .
We construct universally quantified first-order logic formulae (called sentences) using the signature of L .
A set of sentences form a theory T and when a sentence τ is true in a structure S σ , we say that the structure satisfies τ , denoted as S σ |
= τ .
This allows us to define a model of a theory:
Definition 2.2 (Model of a theory) .
Let T be a theory written in a language L and let S σ = ( S , I S σ ) 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 .
Let 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 , I S σ ) with interpretations I S σ of σ that captures a total order over the elements of S is a model of T .
A Formalization of Consistency and Coherence
In this section, we turn our attention to the challenge of learning a model of a theory (Def. 2.2) over a real-world domain S given a signature σ .
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 example, the handwritten digits in the MNIST data set contain stylistic details such as line thickness and digit skew that are irrelevant to the notion of ordinality, which makes learning the structure from Example 1 non-trivial.
Following the convention from the autoencoder disentanglement literature [4, 21, 17, 16], we make the assumption that real-world observations S are drawn from some conditional distribution p S | Z , where Z is a latent random variable, itself drawn from prior p Z .
It is therefore useful to define a domain encoding of the form:
[Equation]
tasked with approximating the conditional expectation of the posterior, i.e . ψ S ( s ) =
E p Z | 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 [33, 32] over the space Z , and refer to these as relation-decoders :
[Equation]
with ϕ = { ϕ r : r ∈ σ } .
Concretely, for a binary relation r and ordered pair ( s i , s j ) ∈ S 2 , ϕ r ( ψ S ( s i ) , ψ S ( s j )) describes the belief that ( s i ,
s j ) ∈ I S
σ ( r ) .
A belief ϕ r ( ψ S ( s i ) , ψ S ( s j )) ≈signifies a strong belief that ( s i , s
j ) ∈ I S σ ( r ) and ϕ r ( ψ S ( s i ) , ψ S ( s j ))
≈ 0 signifies a strong belief that ( s i , s j ) / ∈
I S σ ( r ) .
Together, ψ S and ϕ allow us to define a belief-based analogue to a structure.
Definition 3.1 (Soft-Structure/Soft-Substructure) .
Given a signature σ , a (possibly infinite) set Z and relation-decoders ϕ , a soft-structure is a tuple ˜
Z σ = ( Z , ϕ ) .
For a finite domain S and encoding ψ S : S → Z , ˜ S σ = ( ψ S ( S ) , ϕ ) is called 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 logic structure over a real-world domain through learning ψ S and ϕ .
Clearly, a finite soft-substructure is a soft-structure.
In a real-world domain, there may be only partial information about the values of an interpretation, and there may be errors in that partial interpretation.
To determine the degree to which a soft-structure supports any given structure, we introduce the following measure:
[Equation]
with
[Equation]
where γ rO, S σ = 1 if O ∈ I S σ ( r ) , and 0 otherwise; we use ϕ r ( ψ S ( O )) as shorthand for ϕ r ( ψ S ( s 1 ) , . .
. , ψ S ( s n )) for n = ar ( r ) .
Eqn. 3 expresses the assumption that, given a finite soft-structure, the beliefs in what constitutes the interpretations of different relations are independent of one another.
It is straightforward to show that (cid:80) S σ p ( S σ | ˜ S σ ) = 1 (summed over all possible structures with domain S and signature σ ) and so Eqn.
3 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 I S σ .
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 :
[Equation]
where M TS 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 3.2 ( ϵ -Consistency of soft-structures) .
Given a finite soft-structure ˜ S σ and an arbitrarily small number ϵ , if 1 − Γ ˜ S σ T ≤ ϵ then we say that ˜ S σ is ϵ - consistent with theory T .
We propose ϵ -consistency as an appropriate measure of the notion of consistency presented in [31].
A consistent soft-structure ˜ S σ ensures that ϕ gives high belief only to interpretations that satisfy, and therefore are logically consistent with, theory T .
As expected, consistency pertains to the domain encodings of ˜ S σ , i.e . ψ S ( S ) .
For a concept to be learned in a manner comparable to how a human might learn, we would expect consistency to carry over to new domains with their corresponding softstructures, which motivates our definition of coherence between soft-structures, as follows.
Consider a situation where a deep network has already learned from the MNIST data set a soft-structure that has high model weight, given the relations { G, E, L, S, P } from Example 1.
Now, consider a new domain of images, Y , showing single block stacks of different heights, and we wish to re-use the signature of ordinal relations and T from Example 1.
Let I Y σ be an interpretation in the new domain that orders images according to block stack height and that is a model of T .
We can summarise this with the following two structures:
[Equation]
where X σ is the structure from Example 1 with a domain of handwritten digits and Y σ is our new structure, with a domain of block stack images.
These can be learned by soft-structures:
[Equation]
which use domain-specific encoders, ψ X and ψ Y , but share the same relation-decoders
As we know that ˜ X σ has a high model weight and since ϕ is shared with ˜ Y σ , a natural question to ask is: under what conditions will a ϕ that is consistent over domain-encodings ψ X ( X ) also be consistent over ψ Y ( Y ) ?
Concretely, we are interested in specifying when the following coherence condition holds.
Definition 3.3 ( ϵ -Coherence across soft-structures) .
Two soft-structures, ˜ X σ and ˜ Y σ that share relation-decoders ϕ , are said to be ϵ - coherent with respect to a theory T , if ˜ X σ is ϵ 1 -consistent with
T , ˜ Y σ is ϵ 2 -consistent with T , ϵ 1 ≤ ϵ , and ϵ 2 ≤ ϵ .
Coherence between ˜ X σ and ˜ Y σ as defined above means that the concept of ordinality that applies to digit ordering can also be applied to block stack height ordering.
It is desirable that learning ordinality on the domain of digits produces a coherent concept of ordinality with respect to other ordinal properties, such as height.
Since it is possible that ψ S ( X ) and ψ S ( Y ) produce unique encodings, coherence relies on ϕ ’s ability to generalise over possibly disjoint subsets of Z .
Measuring Consistency and Coherence
Calculating Eqn. 5 can be computationally too expensive for larger domains.
An efficient approach to measuring the consistency of soft-structures is therefore required.
In this section, we introduce a proxy measure for a soft-structure’s ϵ -consistency and ϵ -coherence with a given theory when access to every logical model is not available or is computationally intractable.
Suppose that there is a fixed domain S and theory T whose sentences use relations from a signature σ .
Let k ∈ { 1 , ..., K 0 } denote the index associated with each unique ground instance of the sentences in T .
Take B T to be a Boolean random variable.
For the k -th grounding in T , the probability of the theory being satisfied under soft-structure ˜ S σ is expressed as p ( b T = 1 | ˜ S σ , k ) .
Conversely, the probability of non-satisfaction is given by p ( b T = 0 | ˜
S σ , k ) .
For a model of (universallyquantified) theory T , S σ ∈ M TS , any grounding k of the T is always satisfied (by definition), and thus p ( b T = 1 |S σ , k ) = 1 .
When ˜ S σ is consistent with T then we should also find that p ( b T = 1 | ˜ S σ , k ) ≈ 1 for all k .
Hence, we define a consistency loss function as the expectation over a randomly-chosen grounding k of the binary cross-entropy between p ( B T |S σ , k ) and p ( B T | ˜ S σ , k ) for any S σ ∈ M TS .
This in turn simplifies to produce the expected negative log-likelihood of satisfying a random grounding of T , as follows:
[Equation]
(8) where p ( k ) =
1 K 0 is the uniform distribution over the set of unique groundings.
A measure based on this loss is required to enable a practical evaluation of consistency, acting as an approximation for consistency.
More precisely, we define ¯Γ ˜ S
σ T = exp( − L ( T , ˜ S σ ))
as a proxy measure of Γ ˜ S σ T , and say that
soft-structure ˜ S
σ is ¯ ϵ -proxy consistent with T if
[Equation]
where ¯ ϵ ≥ 1 − ¯Γ ˜ S σ T .
Since ¯ ϵ ∝ L ( T , ˜ S σ ) , we take the proxy measure of coherence to be the smallest satisfiable value of L ( T , ˜ S σ ) between domains.
Although our treatment of consistency has thus far focused on a particular theory T , notice that a subset of the sentences of T form a partial theory, which is itself a theory.
This means that consistency can be evaluated given a partial (even single sentence) theory, allowing us to examine consistency losses for any partial specifications of a given domain of interest.
In this paper, we evaluate the proposed consistency loss against two partial specifications within the theory of ordinality.
These are named Consistency-Across (Con-A) and Consistency-Individual (Con-I) in the experiments that will follow.
5 Con-A includes the sentences that determine inter-relation behavior, for instance the sentence ∀ i, j. ( isGreater ( i, j ) → ¬ isEqual ( i, j ) ∧ ¬ isLess ( i, j )) , stating that if i is greater than j then i must not be equal to or less than j .
Con-I includes the sentences that are about a single relation, describing any property of an individual relation over objects (or images in the case of our experiments).
Each relation may satisfy a number of properties, for example ∀ i, j, k. ( isGreater ( i, j ) ∧ isGreater ( j, k )
→ isGreater ( i, k )) represents transitivity of the isGreater relation.
Transitivity is true for isGreater , but is false for other relations investigated in this paper, e.g. isSuccessor .
We will evaluate consistency loss of transitivity (Con-I-T), asymmetry (Con-I-A) and reflexivity (Con-I-R) for the relations in Example 1.
The evaluation of consistency loss for any available partial theory will be shown to provide a more nuanced perspective on model performance than accuracy results and disentanglement pressure alone during transfer learning.
A Consistent and Coherent Neuro-symbolic Autoencoder
In order to ground our definitions of consistency (Def. 3.2) and coherence (Def. 3.3) into a real system and evaluate their practical value, in this section we derive a simple neuro-symbolic autoencoder architecture which offers one of many possible implementations of the theory defined in Section 3.
Figure 1 outlines the main components of our autoencoder: a domain-encoder ψ S and modular relation-decoders ϕ form an autoencoding architecture that, given a domain of images S ⊂ R C × W × H ( C color channels, width W and height H ) and a d -dimensional latent space Z
= R d , converts sub-symbolic encodings from ψ S into a modular relational representation via decoding for each ϕ r , r ∈ σ .
Additionally, to retain information in Z pertaining to S which is beyond the requirements of ϕ , a domain-decoder produces domain reconstructions ˆ S .
In Figure 1, we use ψ enc S to refer to the domain-encoder and ψ dec S to the domain-decoder.
Although in this paper we opt for an autoencoding architecture, our definitions of consistency and coherence are applicable to a wider range of neural architectures.
For instance, a multi-layer perception network can be viewed as a set of encoding and decoding layers [40].
As long as the architecture offers explicit soft relation decodings, provided we can define a partial theory over them, we can define a consistency loss over the outputs.
To train the model, ground-truth interpretations I S σ are provided, allowing us to maximize directly
Eqn. 3 via the negative log-likelihood loss:
[Equation]
To obtain informative latent representations for S , we use a Variational Autoencoder (VAE), specifically the β -VAE [6, 17, 21] due to its simplicity and demonstrated ability to separate distinct factors in the latent representation (known as disentanglement , although disentanglement is not a requirement for consistency and coherence).
We therefore take the Evidence Lower Bound (ELBO) objective with an additional β scalar hyperparameter from [17], that seeks to achieve disentanglement ( L ELBO β -VAE ), and combine it with L ˜ S σ to obtain the following aggregate objective:
[Equation]
(11) where λ is a scalar weighting parameter.
Together with the L ELBO β -VAE , the choice of relation-decoder can shape the domain encodings [15].
In our evaluation, the following choices are made.
We propose a Dynamic Comparator (DC) composed of two modes, a distance-based measure, ϕ † r , to measure the distance between two inputs relative to a reference point, and a step-function, ϕ ‡ r , that determines the sign of the difference between two points, optionally with an offset.
Although any function could be used that has the required characteristics for ϕ † and ϕ ‡ , in this paper we use the following implementation:
[Equation]
[Equation]
where,
[Equation] [Equation]
Here, a r = Softmax ( A r ) ∈ (0 , 1) 2 is an attention weighting between the two modes, ϕ † r and ϕ ‡ r ; fand f 1 are an exponential and sigmoid function, respectively; u r = Softmax ( U r ) ∈ (0 , 1) m is an attention mask which is applied to m -dimensional embeddings; b † r , b ‡ r ∈ R m are learnable bias terms that enable an offset to each mode; η r, 0 ∈ R + are non-negative and η r, 1 ∈ R are any-valued scalar terms, respectively.
Lastly, ⊙ denotes the Hadamard product and ∥ · ∥ 2 is the Euclidean norm.
The key innovation behind DC is its ability to model each of the ordinality relations whilst encouraging generalized consistency across the full latent subspace, as defined by each u r .
This is achieved without explicit weight sharing, wherein relation-decoders discover parametric relationships from the data.
Further details are provided in Appendix D.1.
Experiment Design: Partial Relation Transfer
We now describe an experimental design to compare coherence of different relation-decoders.
Partial Relation Transfer (PRT): We evaluate a novel PRT task across two soft-structures ˜ X
σ and ˜ Y σ .
The soft-structures share a common signature σ and relation-decoders ϕ , but have disjoint domains X and Y , respectively.
The experimental design involves first learning ϕ on source domain
X , together with its domain-specific autoencoder.
Then, a new domain-specific autoencoder is trained on the target domain Y , alongside a selection of the now learned ϕ relation-decoders with fixed-parameters.
The selection of relation-decoders is expected to help guide training of ψ enc Y (see
Fig.1).
Held-out relation-decoders are then evaluated in Y , i.e. a zero-shot transfer learning task.
For domain X we use the MNIST handwritten digits data set [24], and for domain Y we use the proposed
BlockStacks data set, consisting of a single stack of multi-colored cubes of differing heights, each containing one randomly-positioned red cube (see Appendix B for details and examples).
The shared signature includes the ordinal relations σ = { G , E , L , S , P }, and it is applied to digit ordering in MNIST and to red cube position ordering in BlockStacks.
We provide results with respect to a theory of ordinality, as explored in Example 1.
A formal specification of the theory is provided in Appendix
F. When transferring relations from ψ enc X to ψ enc Y , one could use the full set ϕ of relation-decoders.
However, this is not necessary from a logical standpoint because the entire system of relations can be expressed in terms of the isSuccessor relation S (e.g. the successor of a number is larger than that number).
We therefore only employ the isSuccessor relation-decoder as the fixed-parameter selection to guide the learning of ψ enc Y .
If coherence, as defined in this paper, is carried across domains, we would expect the transferring of isSuccessor to produce an improved performance on the remaining relations in the target domain.
Neural model components and hyperparameters: Together with DC, existing relation-decoder models evaluated here are: TransR [25], HolE [30], NTN [41].
We additionally include a basic feedforward neural network (NN).
To produce domain-encodings, all experiments use a β -VAE [17].
We provide further details for all models, including training regimen, parameterization and implementation in Appendix D.
In the source domain, we explore β values in {1, 4, 8, 12} and set λ = 10 3 .
In the target domain, we first normalise losses and set β = 10 − 4 and λ = 10 − 2 , as these produced good image reconstructions while optimising L ˜ Y
σ .
In all experiments we fix Z = R 10 .
Experimental Results and Discussion
In this section, experimental results show that transfer learning performance is positively correlated with our measures for consistency and coherence.
This holds particularly true for embeddings that are different but near in space to source domain embeddings.
As we have argued, for a neural model to perform well on concept transfer, its representations must maintain high probability of consistency with a theory that provides a semantics for the concept.
The most robust way of doing this is to maintain consistency across regions of embedding space, rather than relying exclusively on the specific data-points observed at training time in the source domain.
In our analysis, consistency losses are evaluated when sampling from different regions of latent space Z .
We evaluate: dataembeddings , where all inputs are encodings of a domain’s test data; interpolation , when we derive an empirical mean and variance for the domain’s data-embeddings and sample from a corresponding
Gaussian distribution; and extrapolation , when we sample from regions strictly outside the smallest, axis-aligned, hyper-rectangle that encloses all data-points.
Figure 2-top provides relation-decoder prediction accuracies in both the source (MNIST, left) and target (BlockStacks, right) domains.
The relations are S, P, E, G, L and relation S is transferred to the target domain.
Key observations are that DC produces excellent PRT performance, whilst NN, NTN and HolE all see some degradation from their source-domain accuracies for relations other than isSuccessor ( S ).
TransR maintains target-domain accuracies similar to its performance in the source domain, but this is significantly below the performance of other models in the source domain.
We include the impact of adjusting β (disentanglement pressure) in Figure 2-bottom.
Barring DC which has little discernible change in either source or target domains, PRT performance is significantly impacted by β for all models in the target domain, but has little effect in the source domain.
TransR shows a strong positive correlation between target domain accuracy and β values, whereas the remaining models produce their best PRT performance with medium disentanglement pressure.
To investigate the broad trends that run across all β values and relation-decoder models, we ran a Spearman rank correlation analysis between consistency losses and PRT performance. Separate coefficients are produced for each combination of consistency loss: Con-A and Con-I further divided into Con-I-T (transitivity), Con-I-A (asymmetry) and Con-I-R (reflexivity), and regions of latent space: data-embedding, interpolation and extrapolation (see Appendix H for the full table). Lower consistency losses are expected to produce higher PRT performance as indicated by a negative
Spearman rank coefficient.
The coefficients show that the consistency losses of data-embeddings in the source domain are weakly rank correlated with PRT.
The consistency losses in the case of interpolation are, in most cases, strongly rank correlated with PRT.
The consistency losses in the case of extrapolation lie in between and are generally moderately rank correlated with PRT.
This supports our thesis that consistency can facilitate reliable transfer.
Furthermore, consistency of certain partial theories may matter more.
Here, Con-A, Con-I-T and Con-I-A on interpolation are the most relevant partial theories for transfer learning performance.
As we shall see, DC outperforms all other models on these losses and this result is mirrored by its PRT performance.
To gain a deeper insight as to which underlying characteristics can explain the observed PRT accuracy profiles, Figure 3 and Figure 4 present Con-A and Con-I loss profiles, respectively, for varied β and regions of latent space (for data-embeddings in blue, interpolation in green and extrapolation in red).
Results refer to both source (left) and target domain embeddings (right).
Firstly, we note that DC retains excellent Con-A for all regions of latent space. TransR retains consistency from dataembeddings to the interpolated regions, but not to the extrapolated regions.
The remaining models show degradation of consistency between data-embeddings and interpolation and extrapolation regions, with extrapolation often being worse than interpolation.
Looking at β trends, aside from DC, increasing β appears to have a positive but limited effect on interpolation and extrapolation performance. Considering the Con-A performance of data-embeddings in the target domain, DC shows the best performance. The Con-A performance in the target domain is in agreement with the
PRT accuracies.
For all the models, Con-A performance in the target domain appears to match the interpolation or extrapolation Con-A performance in the source domain. This points to the possibility of anticipating transfer learning performance by evaluating the consistency of partial theories.
Many of the same trends can be seen in the results for Con-I (Con-I-T, Con-I-A and Con-I-R) in
Figure 4.
Results are averaged over individual relations. As in Figure 3, results are presented with respect to source domain (left) and target domain (right).We firstly observe that DC and NN share the best overall Con-I performance profiles, with TransR following closely.
DC and TransR again show comparable data-embedding versus interpolation/extrapolation performance, whereas NN, NTN and HolE suffer from degradation.
With regards to β ’s impact, DC is not affected by β , while NN and NTN show a negative correlation between β and Con-I losses with comparable results for each underlying partial theory.
Finally, Table 1 provides a comparison between optimal coherences achieved for each relationdecoder model, as defined in Section 4.
Results are partitioned according to each consistency type and aggregate value.
DC clearly outperforms all other models on coherence.
NN achieves strong aggregate coherence, followed by TransR and NTN, with HolE performing generally worse.
Looking at β ∗ profiles, we see that most models achieve optimum aggregate coherence at β = 8 , apart from DC and HolE which perform better at β = 1 .
Overall, this is in broad agreement with the β profiles given by Figure 2-bottom (right).
However, we can see that β ∗ profiles for Con-A coherence are in more direct agreement as TransR achieves its best at β = 12 and HolE at β = 8 . This suggests that
[Table]
Con-A is more indicative of PRT performance, which is to be expected since PRT relies on inductive transfer across relations.
All in all
[Table]
these results paint a picture where source domain accuracy alone is not a strong enough indicator of concept transfer.
Instead, it may be possible to anticipate transfer performance by evaluating consistency in regions beyond the source domain’s data-embeddings.
Depending on the task at hand, certain partial theories may be more relevant than others in this analysis.
Related Work
Relational representations play a prominent role in Knowledge Graph Embedding (KGE), wherein sets of relation-decoders are jointly learned to obtain a semantic latent representation from data [41, 45, 44, 5, 29, 47, 11, 20, 1, 38, 13, 3].
Although KGE approaches typically do not use a shared autoencoder as done in this paper, in [37] an autoencoding framework is adopted, where a graph neural network is used as the encoder.
However, [37] did not work with visual data and the model was only applied to single data sets rather than transfer learning.
Similarly, disentanglement is concerned with semantic representation learning [4], and it has been explored using a variety of methods including both Generative Adversarial Networks [10] and VAEs [6, 17, 9, 36, 14, 22, 26].
Disentangled representations have been evaluated on their transferability [46, 42, 27].
A bridge between these two fields, with relation-decoders employed in the semi-supervision of VAEs, can be found in [19, 8, 7].
In [19], multiple relation-decoders are used, but to compute a triplet comparison-based query.
In [8, 7], only a single binary relation is studied using functional forms that are not sufficient to model the full set of relations considered in this paper.
Lastly, we note that our experimental setup is most remnant of domain adaptation, e.g. [35].
To the best of our knowledge, this paper is the first to present a comprehensive analysis of the resulting concept coherence.
No previous work has compared relation-decoders on their ability to learn consistently and coherently, as measured in this paper.
Conclusion and Future Work
This paper introduced formal definitions of consistency and coherence for representation learning.
As a result, a sub-symbolic model can have its consistency and coherence measured with respect to a logical theory.
The paper specified a neuro-symbolic model based on domain-encoders coupled with modular relation-decoders, and an experimental procedure that, together, allowed for the investigation of how concept coherence differs for various implementations of relation-decoders applied to transfer learning.
Finally, consistency and coherence results showed that the models that can retain consistency ( i.e . be coherent) across regions of latent space beyond the source data-embeddings are more likely to perform better at PRT learning tasks.
The empirical evaluations in this paper only considered binary relations and a fixed signature which is learned “all at once” in a source domain.
In practical applications, however, it should be possible to discover concepts gradually, e.g. as part of a curriculum and through gradual refinement of pre-learned relations after exposure to different contexts.
This necessitates an adaptation of the approach presented here and further evaluations, as part of future work.
Further evaluations of the formalization introduced here should consider the use of different models, theories (such as specifying periodic, e.g . rotation, and unordered categorical, e.g . shape, properties) and scenarios/data sets in the evaluation of consistency and coherence of neural models.
A Societal Impact Statement
This work does not have a negative societal impact, specifically it does not include any of the following: involvement of human subjects, sensitive data, harmful insights, methodologies and applications.
The results, data sets and methodologies are objectively non-discriminatory, unbiased and fair.
This work does not breach any privacy or security guidelines or laws, nor any other legal restrictions.
The proposed definition of coherent concepts and corresponding analysis provides more depth in the assessment of deep learning methods, which are typically otherwise opaque, and this can have a positive societal impact.
Currently, we cannot provide interpretable descriptions regarding how a standard deep learning method produces its inferences, making it difficult to fully trust a model in critical applications.
An important failure case is that biases are not easy to uncover from a trained deep learning model.
The benefit of learning a coherent concept is that inferences uphold logical consistency, which can be formally expressed and tested.
This can provide more trust in the model as practitioners can have confidence that the model should not obtain inputs that lead to incoherent inferences, wherein errors are certain.
Further, if the logic does not include biases, the inferences of a coherent set of relation-decoders should not be biased.
A caveat to these points is that unless the relation-decoder functional form allows us to analytically make comments/assertions about the model’s performances for arbitrary regions of latent space, as with DC (see D.1), it is intractable to fully examine model coherence, as it requires a full extrapolation/interpolation evaluation.
Nonetheless, a practical evaluation of coherence is an important step forward.
B BlockStacks dataset description
The BlockStacks data set consists of 12,000 RGB images (3 × 200 × 200 pixels but resized in code to 3 × 128 × 128 ) of individual block stacks, of varying height (between 1-10 blocks), block colors (uniformly sampled from options: { gray, blue, green, brown, purple, cyan, yellow } ) and position (uniformly sampled from x, y range (-3,-3) to (3,3)), but with the requirement that each instance consists of a single red block at a random height (see Figure 5 for example images).
These were rendered using the CLEVR rendering agent with the help of code from [2].
The dataset is divided into 9000:1500:1500 train, validation and test splits.
C Explanation of the β -VAE
The VAE is derived by introducing an approximate posterior q α ( Z | X ) , from which a lower bound (commonly referred to as the Evidence LOwer Bound (ELBO)) on the true marginal log p θ ( X ) can be obtained by using Jensen’s inequality [21].
The VAE maximises the log-probability by maximising this lower bound, given by:
[Equation]
where q α ( Z | X ) is typically modelled as a neural-network encoder with parameters α .
Similarly p θ ( X | Z ) is often modelled as a neural-network decoder with parameters θ and is calculated as a
Monte Carlo estimation.
A reparameterization trick is used to enable differentiation through an otherwise undifferentiable sampling from q α
( Z | X ) (see [21]).
In the β -VAE [17, 6], an additional β scalar hyperparameter was added as it was found to influence disentanglement through stronger distribution matching pressure with respect to the prior p θ ( Z ) , where this prior is typically set to an isotropic zero-mean Gaussian N ( 0 , I )) .
When β = 1 we obtain the standard VAE objective [21].
D Model Descriptions
In this section we firstly present an in-depth analysis of the key innovations presented by DC which provides insight into how it can learn a coherent notion of ordinality.
We then provide model details for each of the compared relation-decoders in the main results and the backbone β -VAE architecture that we employ for each data set.
D.1 Dynamic Comparator Analysis
Figure 6 depicts how DC is able to learn the isGreater , isLess , isEqual , isSuccessor and isPredecessor family of binary ordinal relations, assuming each corresponding relation-decoder has learned a common one-hot mask on the zeroth dimension i.e . u G = u E = . . .
=
u P = [1 , 0 , . . .
, 0] , such that activations only depend on the z i, 0 − z i, 1 difference.
An important capability of DC is its ability to dynamically select via a r an appropriate functional mode, either ϕ † r or ϕ ‡ r , depending on the type of relation it needs to model.
As shown by Figure 6, this allows isEqual to exhibit its reflexive, symmetric and transitive characteristics, whilst isGreater and isLess both carry transitivity but are asymmetric and irreflexive.
Furthermore, the use of a subtraction between z i and z j (which, via mask u , ends up only being a subtraction between their zeroth dimensions) leads to a relative comparison, not an absolute comparison, which generalises to arbitrary z
i and z j sampled from anywhere in Z .
Note that there is no built in parameter sharing, meaning each relation-decoder (for each individual relation r ) is trained independently and has its own set of a r , u r , η r, 0 , η r, 1 , b † r and b ‡ r parameters.
However, our experiments show that DC reliably obtains settings such that e.g . u G = u E , or a G = a L = [0 , 1] , or b ‡ G = − b ‡ L and so on.
DC is thus able to discover the interdependencies between families of relations.
By learning to loosely ‘tie’ together parameters in this way, whilst still being expressive enough to model each type of relation, DC can facilitate a data-driven binding between relation-decoder outputs.
This helps ensure consistent generalisation across a latent subspace, as defined by the common/overlapped u r masks.
D.2 Relation-Decoder implementations
TransR [25]: ϕ
TransR r
[Equation]
with, h r =
M r z i and t r =
M r z j .
where for z
i , z j ∈ R d z vectors, M r ∈ R d z × d z and r ∈ R d z .
As we want to obtain a (0 , 1) output, we modify TransR through ϕ TransR + r
=
σ ( c − ϕ
TransR r ) , where σ is a sigmoid function and c is a scalar that ensures that at ϕ TransR r ( z i , z j )
= 0 , then ϕ
TransR + r
( z i , z j )
≈ 1 .
In all experiments we set c = 10 .
NTN (modified version of [41] from [13, 38]):
[Equation]
(16) where u r ∈ R k , M r ∈ R n · d z × n · d z × k , V r ∈ R k × n · d z ) and b r ∈ R k .
The only hyperparameter to consider is k , which controls the NTN’s capacity - in all experiments, we set this to 1.
If k > 1 , z c ⊤ M r z c produces a k -dimension vector by applying the bilinear operation to each of the k M r slices.
Here z c ∈ R n · d z is a concatenation of the inputs z 1 , . . .
, z n , which was introduced in [13, 38].
In contrast, the original NTN (see [41]) is only applicable to binary relations and does not include the outer sigmoid.
HolE
[Equation]
where r ∈ R d z and ⋆ : R d z × R d z → R d z denotes the circular correlation operator and is given by,
[Equation]
NN : a simple four-layer neural-network with layer sizes l in = 2 d z , l 1 = 2 d z and l 2 = d z , with ReLU activations [28].
The final output layer, l out , is a single value passed through a sigmoid function, to bound the output within (0 , 1) .
D.3 β -VAE configuration
The model configurations used for both MNIST and BlockStacks data sets are given in Table 2.
D.4 L joint configuration
In the source domain, we vary β values between { 1 , 4 , 8 , 12 } and fix λ = 10 3 .
In the target domain, we fix β to 10 − 4 and λ = 10 − 2 and normalise the L ELBO β -VAE reconstruction term by dividing by a factor 1 √ H · W · C , for height H , width W and color channels C , and normalize the distribution matching term by a factor 1 d z , for latent representation size d z (set to 10 across all experiments).
To train relation-decoders over a given domain S , it is necessary to supervise estimates of ϕ r ( ψ enc S ( O )) , O ∈ S 2 , against corresponding ground-truth labels, γ rO, S σ .
However, doing so for
[Table]
Input: 28 × 28 × N C =
Layer_ID ; I ; O ; K ; S ; P ;
A
Conv2d_1 ; N C ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
Conv2d_2 ; 32 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
Conv2d_3 ; 32 ; 64 ; 3 × 3 ; 2 ; 1 ; ReLU
Conv2d_4 ; 64 ; 64 ; 2 × 2 ; 2 ; 1 ; ReLU
Layer_ID ; Num Nodes :
In - Out ; A
FC_z ; 576 - 144 ; ReLU
FC_z_mu ; 144 - 10 ; None FC_z_logvar ; 144 - 10 ; None
Decoder
Input: R
Layer_ID ; Num Nodes :
In - Out ; A
FC_z ; 10 - 144 ; ReLU
FC_z_mu ; 144 - 576 ; ReLU
Layer_ID ; I ; O ; K ; S ; P ;
A
UpConv2d_1 ; 64 ; 64 ; 2 × 2 ; 2 ; 1 ; ReLU
UpConv2d_2 ; 64 ; 32 ; 3 × 3 ; 2 ; 1 ; ReLU
UpConv2d_3 ; 32 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
UpConv2d_4 ; 32 ; N C ; 4 × 4 ; 2 ; 1 ; Sigmoid
Encoder
Input: 128 × 128 × N C =
Layer_ID ; I ; O ; K ; S ; P ;
A
Conv2d_1 ; N C ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
Conv2d_2 ; 32 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
Conv2d_3 ; 32 ; 64 ; 4 × 4 ; 2 ; 1 ; ReLU Conv2d_4 ; 32 ; 64 ; 4 × 4 ; 2 ; 1 ; ReLU
Conv2d_5 ; 64 ; 64 ; 4 × 4 ; 2 ; 1 ; ReLU
Layer_ID ; Num Nodes :
In - Out ; A
FC_z ; 1024 - 256 ; ReLU
FC_z_mu ; 256 - 10 ; None FC_z_logvar ; 256 - 10 ; None
Decoder
Input: R
Layer_ID ; Num Nodes :
In - Out ; A
FC_z ; 10 - 256 ; ReLU
FC_z_mu ; 256 - 1024 ; ReLU
Layer_ID ; I ; O ; K ; S ; P ;
A
UpConv2d_1 ; 64 ; 64 ; 4 × 4 ; 2 ; 1 ; ReLU
UpConv2d_2 ; 64 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
UpConv2d_3 ; 32 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU UpConv2d_4 ; 32 ; 32 ; 4 × 4 ; 2 ; 1 ; ReLU
UpConv2d_5 ; 32 ; N C ; 4 × 4 ; 2 ; 1 ; Sigmoid every O ∈ S 2 can easily become intractable and we instead only sample a subset of possible Stuples.
Our sampling strategy involves first selecting a ratio R = |B||S| where B ⊂ S 2 is a set of O tuples.
We then sample relation-decoder specific subsets B r where |B r | = |B|| σ | , to ensure a balanced distribution of tuples between relation-decoders.
Furthermore, we ensure that each B r contains a balanced ratio of γ rO, S σ = 1 versus γ rO, S σ = 0 instances.
We found that each |B r | set can be small without jeopardising the final relation-decoder performance level, allowing us to use R = 1 for
MNIST experiments and R = 3 for BlockStacks experiments.
Finally, in all experiments we use a β -VAE trained for up to 300,000 steps, following accepted practice from [26, 42], together with any included relation-decoders.
However, to ensure computation efficiency across experiments, we employ an early stopping procedure, where if the validation score does not increase over 30 and 120 training epochs for MNIST and Blockstacks experiments, respectively, we end the training early.
E Preliminaries in further detail
Logic and model-theoretic background: to support Section 2 we provide additional logic and model theoretic background.
In this paper, we assume a formal language L composed of variables, predicates (i.e. relations), logical connectives ¬ (negation), ∨ (disjunction), ∧ (conjunction), → (implication), and universal quantification ∀ (for all) with their conventional meaning (see [39]).
The set of relations in L form the signature , σ , of the language.
Relations have an associated arity, denoted as ar ( · ) , that defines the number of arguments they take.
For example, a binary relation r has arity ar ( r )
= 2 .
Relations are used to express knowledge over the elements of a domain S , where S is a non-empty set.
For instance, r ( s 1 , s 2 ) states that elements s 1 and s 2 are related through the binary relation r .
The meaning of a relation is defined by an interpretation I S σ which captures the { T, F } (true or false) values of the relation over elements of S .
Together, a domain S and an interpretation I S σ of a given signature σ form a structure S σ = ( S , I S σ ) .
Note that for a fixed domain S and signature σ , different interpretations yield different structures.
As stated in the main text, 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 example, r ( s 1 , s 2 ) , where s 1 and s 2 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 , I S σ ) , a relation r , and a tuple ( s 1 , . . .
, s ar ( r ) )
∈ S ar ( r ) , a ground instance r ( s 1 , . . .
, s ar ( r ) ) is true in the structure S
σ if and only if ( s 1 , . . .
, s ar ( r ) )
∈
I S σ ( 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 σ .
For example, ∀ i. r ( i, i ) is true in S σ if and only if all of its ground instances r
( s h , s h ) are true in S σ , for every s h ∈ 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 and any subset of the sentences in T form a partial theory with respect to T .
A theory can be seen as a way of constraining the type of interpretations that we want to “accept" for our signature.
Finally, a model of T is a structure that satisfies every sentence in T .
F Specification for theory of ordinality
To support our claim that we can use only the isSuccessor relation as the target encoder guide due to its logical relationship with the remaining relations, we include here the logical clauses: [Equation]
isGreater [Equation] k
[Equation] , k [Equation] j
[Equation] isPredecessor [Equation] j, i
[Equation]
isPredecessor ( i, j ) → isLess ( i, j ) [Equation]
i, j, k [Equation] ( isPredecessor ( i, j ) ∧ isLess ( j, k ) → isLess ( i, k )) [Equation]
Therefore, by knowing all of the successor relations between data instances, it should be possible to infer the remaining relationships that they share.
For completeness, we provide the truth tables for each of the sub-theories that our consistency losses evaluate against.
We only include configurations that are valid under the constraints, indicated by ⊂ T
= T , where this notation highlights the fact each incomplete set of constraints form a subset of the overall theory T .
Firstly, the truth-table that describes constraints shared between relation truth-values is given by the following, ∀ i, j :
[Equation]
where we use the same relation abbreviations as in the main text results.
Next, we provide each of the three consistency individual (Con-I) truth-tables.
These are referred to as being “individual” due to the fact that they describe constraints applied to the truth-state of a single
Relation asymmetric transitive reflexive
G
Y Y
N
E
N
Y Y
L
Y Y
N
S
Y
N N
P
Y
N
N relation.
For transitivity, given by the rule e.g . G ( i, j ) ∧ G ( j, k ) → G ( i, k ) , we have that ∀ i, j :
G ( i, j ) G ( j, k ) G ( i, k ) ⊂
T
F
F F
T
F F
T T
T
F F
T T
F
T T
F
T
F
T
F
T T
T T
T T
T (17)
For asymmetry, where S ( i, j ) → ¬ S ( j, i ) , we have ∀ i, j :
[Equation]
F F
T T
F
T
F
T
T (18) .
Finally, for reflexivity, given by E ( i, i ) → ⊤ (in this case describing that an object is always equal to itself) we have ∀ i :
E (
[Equation]
T
T (19)
Truth-table matrices for each of the above truth-tables can be obtained by replacing T with 1 and F with 0 .
The full set of individual constraints that are applicable to each relation covered in this paper are given by Table 3.
G Expanded consistency loss derivation
In this section, we present the expanded justification for reporting − ln 1 − ¯ ϵ consistency and coherence as a proxy for ϵ -consistency/coherence as defined in Section 3.
For notational clarity, in the following we omit ψ S , such that ϕ r ( ψ S ( O )) is abbreviated to ϕ
r
( O ) .
In the following, we make no assumptions about the sizes of domain S , signature σ and arities of each r ∈ σ .
Further, we take T to be an arbitrary theory over σ consisting of universally quantified formula, and the validity of each ground instances of atomic formula with respect to T , can be expressed by a single ground truth-table matrix, T ∈ { 0 , 1 } K
× K 1 × K 2 , wherein each slice, T k, : , : gives a unique grounding of domain objects to the variables, v , required by T .
For each grounding of the K 0 = |S| | v | possible groundings, there are K 1 = 2 l unique truth-assignments to the l atomic formulae that constitute T , giving K 2 = l + 1 assignments per T k,t, : row - one per atomic formulae and an additional value that denote whether the particular row satisfies T .
T can be obtained by taking any truth-table from the previous section and switching true (T) for 1 and false (F) for 0, and producing K 0 copies for each assignment of domain elements to the variables.
Given this truth-table matrix, notice that a structure S σ can be composed by selecting a single row of T for each grounding ( k th slice), giving a vector c kt =
T k,t, 1: l .
If the structure is a model of T , i.e . S σ ∈ M TS , then only rows with T k,t,K 2 = 1 are allowed.
Taking t + to be the set of rows such that T k,t,K 2 = 1 (which is identical for each k ) i.e . t + = { t | T k,t,K 2 = 1 ∧ t ∈ { 1 , . .
, K 1 }} , we can then rewrite Γ ˜ S σ T in terms of samples from T :
[Equation]
with
[Equation]
In the above, 1 t S σk ( t ) is an indicator function which equals 1 if t = t S σ k and 0 otherwise, for active row t S σ k under structure S σ and grounding k . 1 t S σk ( t ) has the role of only including the single summand where t corresponds with t S σ k .
N ( ϕ r m , O km , c ktm , S σ ) is a function that counts the number of repeat products of term f
( ϕ r m , O km , c ktm ) , such that the appropriate root can be applied.
We use r m to denote the relation for atomic formula at column m and O km its corresponding arguments under grounding k ; and we use c ktm to denote the truth-assignment of the atomic formula for column m , as designated by row t .
At this point, we are left with an expression for Γ ˜ S σ T in terms of truth-table matrix T entries, which is more reminiscent of L ( T , ˜ S σ ) as defined in Section 4.
However, we must go further to expose the relationship between Γ ˜ S σ T and L ( T , ˜ S σ ) for arbitrary T expressed by T .
We will now show that the consistency loss L ( T , ˜ S σ ) gives the negative log-likelihood of satisfying T given a grounding k ∈ { 1 , . . .
, K 0 } , which can be further seen as a relaxation of Γ ˜ S σ T to sum over all rows t ∈ t
+ and without normalising via the N ( ϕ r m , O km , c ktm , S σ ) − 1 exponent.
With Boolean random variable B T denoting whether T is ( b T = 1 ) or is not ( b T = 0 ) satisfied, the consistency loss for a soft-structure ˜
S σ against theory T is given by,
[Equation]
Eqn. 8 base which can be expanded to,
[Equation]
where S σ ∈ M TS .
Given S σ ∈ M TS , then p ( b T = 1 |S σ , k ) = 1 always holds.
This means the negative case in Eqn.
22 can be ignored, yielding the following simplified form:
[Equation]
and so L ( T , ˜ S σ ) is simply the negative log-likelihood of sampling a satisfied theory ( b T = 1 ) from soft-structure ˜ S
σ , for randomly sampled grounding k .
Next, we show the similarities between
L ( T , ˜ S σ ) and Γ ˜ S σ T by looking at the likelihood p ( b T = 1 | ˜ S σ , k ) .
First [Equation] we define ¯Γ ˜ S
σ T by isolating the likelihood:
[Equation]
We then expand p ( b T = 1 | ˜ S σ , k ) to:
[Equation]
where t + is defined as before.
For all other t ̸ = t + , p ( b T = 1 | c kt )
=
and so this acts as a filter, yielding:
[Equation]
p ( c kt | ˜ S σ , k ) is calculated by evaluating the belief of each relation-decoder against the expected truth-assignment as defined by truth-table row c kt :
[Equation]
where r m is the relation for atomic formula associated with column m (which is the same for each k slice and t row) and O km is the grounding of this entry for slice k (which is the same across rows).
Putting it all back together, we finally have that:
[Equation]
which makes the similarities between Γ ˜ S σ T and ¯Γ ˜ S
σ T clear and exposes their relationship.
In particular, for the special case where |M TS | = 1 , the outer sum for Γ ˜ S
σ T can be removed, and the remaining differences between Γ ˜ S σ T and ¯Γ ˜ S
σ T are the sum over t + rows and difference in exponent over f ( ϕ r m , O km , c ktm ) .
For Γ ˜ S σ T to be maximised, through p ( S σ | ˜ S σ ) ≈ 1 , we would find that ˜ S
σ maximally supports only the rows associated with S σ for each k grounding.
Notice that ¯Γ ˜ S σ T is again bound to (0 , 1) and achieves ¯Γ ˜ S σ T
≈ 1 when Γ ˜ S σ T
≈ 1 .
We use the correspondence between Γ ˜ S σ T and ¯Γ ˜ S σ T to define a practical ϵ -proxy consistency measure as follows.
We firstly re-express ϵ -consistency/coherence but for ¯Γ ˜ S σ T and a different ¯ ϵ .
We then trace this back to L ( T , ˜ S σ ) so a bound in terms of the consistency loss can be reported as the overall ϵ -proxy.
Together this yields the following:
[Equation]
and, via the proportionality relationship ¯ ϵ ∝ L ( T , ˜ S σ ) , we can use the consistency loss L ( T , ˜ S σ ) as a proxy measure for ϵ -consistency/coherence.
H Spearman’s Rank Correlation Analysis
A Spearman rank correlation analysis was performed between each consistency loss (Con-A, Con-I-T, Con-I-A, Con-I-R) and PRT performance, across all models, β settings and regions of latent space (data-embedding, interpolation and extrapolation).
The key findings are reported in the main text and we tabulate the values in Table 4.
Unlike the popular Pearson correlation, the Spearman rank correlation can describe monotonic curvilinear relationships between variables.
A Spearman rank coefficient varies between − 1 and +1 , where a coefficient ± 1 indicate a perfect rank correlation - if negative (positive) this means a reduction (increase) in one variable leads to an increase in the other.
Checklist
For all authors... [Table] (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] See Section(c)
Did you discuss any potential negative societal impacts of your work?
[Yes] These have been included in the Supplementary - the main societal impact of coherent concept learning is that inferences will uphold logical consistency.
If the logic does not include biases, the inferences themselves should not be biased, providing that the feature extraction has been properly disentangled.
All in all, coherent concepts will be easier to trust.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] See Sectionand Section(b)
Did you include complete proofs of all theoretical results?
[Yes] In particular, a rigorous proof for the consistency loss (Eqn. 9) is provided in the Supplementary. 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] A current zip of the code used for this paper will be included in the paper’s supplementary.
A URL to public facing (refined and minimised) code will be provided in the camera ready version of the paper.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Section 6 and we provide further model details in the Supplementary.
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] We provide error bars in bar plots.
However we did not provide errors in the tabular results.
These are obtained from the bar plots, so can be evaluated, but to improve clarity we will include the numeric errors in the tabular results for the camera ready version.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[No] This is a difficult number to extract as experiments were run on different GPU models and with early stopping.
We will endeavour to provide an estimate for the camera ready.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] The MNIST data set is cited properly.
(b) Did you mention the license of the assets?
[No] (c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] The necessary code to generate the BlockStacks data set is included in the Supplementary.
We will include the actual data set providing there is space.
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[No] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[No] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]