Unsupervised Learning of Group Invariant and Equivariant Representations
Abstract
Equivariant neural networks, whose hidden features transform according to representations of a group G acting on the data, exhibit training efficiency and an improved generalisation performance.
In this work, we extend group invariant and equivariant representation learning to the field of unsupervised deep learning.
We propose a general learning strategy based on an encoder-decoder framework in which the latent representation is separated in an invariant term and an equivariant group action component.
The key idea is that the network learns to encode and decode data to and from a group-invariant representation by additionally learning to predict the appropriate group action to align input and output pose to solve the reconstruction task.
We derive the necessary conditions on the equivariant encoder, and we present a construction valid for any G , both discrete and continuous.
We describe explicitly our construction for rotations, translations and permutations.
We test the validity and the robustness of our approach in a variety of experiments with diverse data types employing different network architectures.
Introduction
An increasing body of work has shown that incorporating knowledge about underlying symmetries in neural networks as inductive bias can drastically improve the performance and reduce the amount of data needed for training Cohen & Welling (2016a); Bronstein et al. (2021).
For example, the equivariant design with respect to the translation symmetry of objects in images proper of convolutional neural networks (CNNs) has revolutionized the field of image analysis LeCun et al.
Message Passing neural networks, respecting permutation symmetries in graphs, have enabled powerful predictive models on graph-structured data Gilmer et al.
(2017); Defferrard et al.
Recently, much work has been done utilizing 3D rotation and translation equivariant neural networks for point clouds and volumetric data, showing great success in predicting molecular ground state energy levels with high fidelity Miller et al.
; Anderson et al.
; Klicpera et al.
Schütt et al.
Invariant models take advantage of the fact that often properties of interest, such as the class label of an object in an image or the ground state energy of a molecule, are invariant to certain group actions (e.g., translations or rotations), while the data itself is not (e.g., pixel values, atom coordinates).
There are several approaches to incorporate invariance into the learned representation of a neural network.
The most common approach consists of teaching invariance to the model by data augmenta-
[Figure]
𝜂 𝛿 [Figure] 𝑋 𝑍 : during training, the model must learn that a group transformation on its input does not affect its label.
While this approach can lead to improved generalization performance, it reduces training efficiency and quickly becomes impractical for higher dimensional data Thomas et al.
A second technique, known as feature averaging, consists of averaging model predictions over group transformations of the input Puny et al.
While feasible with finite groups, this method requires, for instance, sampling for infinite groups Lyle et al.
A third approach is to impose invariance as a model architectural design.
The simplest option is to restrict the function to be learned to be a composition of symmetric functions only Schütt et al.
Such choice, however, can significantly restrict the functional form of the network.
A more expressive variation of this approach consists of an equivariant neural network, followed by a symmetric function.
This allows the network to leverage the benefits of invariance while having a larger capacity due to the less restrictive nature of equivariance.
In fact, in many real-world application, equivariance is beneficial if not necessary
Smidt (2020); Miller et al.
For example, the interaction of a molecule (per se rotational invariant) with an external magnetic field is an intrinsically equivariant problem.
All aforementioned considerations require some sort of supervision to extract invariant representations from data.
Unsupervised learning of group invariant representations, despite its potential in the field of representation learning, has been impaired by the fact that the representation of the data in general does not manifestly exhibit the group as a symmetry.
For instance, in the case of an encoder-decoder framework in which the bottleneck layer is invariant, the reconstruction is only possible up to a group transformation.
Nevertheless, the input data is typically parametrized in terms of coordinates in some vector space X , and the reconstruction task can only succeed by employing knowledge about the group action on X .
Following this line of thought, this work is concerned with the question: Can we learn to extract both the invariant and the (complementary) equivariant representations of data in an unsupervised way?
To this end, we introduce a group-invariant representation learning method that encodes data in a group-invariant latent code and a group action.
By separating the embedding in a group-invariant and a group-equivariant part, we can learn expressive lower-dimensional group-invariant representations utilizing the power of autoencoders (AEs).
We can summarize the main contributions of this work as follows:
• We introduce a novel framework for learning group equivariant representations.
Our representations are by construction separated in an invariant and equivariant component.
• We characterize the mathematical conditions of the group action function component and we propose an explicit construction suitable for any group G .
To the best of our knowledge, this is the first method for unsupervised learning of separated invariant-equivariant representations valid for any group.
• We show in various experiments the validity and flexibility of our framework by learning representations of diverse data types with different network architectures.
We also show that the invariant representations are superiour to the non-invariant counterparts in downstream tasks, and that they can be successfully employed in transfer learning for molecular property predictions.
Method 2.1 Background
We begin this section by introducing the basic concepts which will be central in our work.
A group G is a set equipped with an operation (here denoted · ) which is associative as well as having an identity element e and inverse elements.
In the context of data, we are mainly interested in how groups represent geometric transformations by acting on spaces and, in particular, how they describe the symmetries of an object or of a set.
In either case, we are interested in how groups act on spaces.
This is represented by a group action : given a set X and a group G , a (left) action of G on X is a map ρ : G × X → X such that it respects the group property of associativity and identity element.
If
X is a vector space, which we will assume for the remainder of the text, we refer to group actions of the form
ρ X : G → GL ( X ) as representations of G , where the general linear group of degree n
GL ( X ) is represented by the set of n × n invertible matrices.
Given a group action, a concept which will play an important role in our discussion is given by the fixed points of such an action.
Formally, given a point x ∈ X and an action (representation) ρ X of G on X , the stabilizer of G with respect to x is the subgroup G x = { g ∈ G | ρ X ( g ) x
= x } ⊂ G .
In the context of representation learning, we assume our data to be defined as the space of representation-valued functions on some set V ,
i.e., X = { f | f : V → W } .
For instance, a point cloud in three dimensions can be represented as the set of functions f : R 3 → Z 2 , assigning to every point r ∈ R 3 the value f ( r ) =
(the point is not included in the cloud) or f ( r ) = (the point is included in the cloud).
Representations ρ V of a group G on V can be extended to representations on f , and therefore on X , ρ X : G → GL ( X ) , as follows
[Equation]
In what follows, we will then only refer to representations for the space X , implicitly referring to equation (1) for mapping back to how the various components transform.
A map φ : V → W is said to be G -equivariant with respect to the actions (representations) ρ V , ρ W if φ ( ρ V ( g ) v ) =
ρ W ( g ) φ ( v ) for every g ∈ G and v ∈ V .
Note that G -invariance is a particular case of the above, where we take ρ V , ρ W to be the trivial representations.
An element x ∈ X can be described in terms of a
G -invariant component and a group element g ∈ G , as follows: let φ inv : X → X/G , be an invariant map mapping each element x ∈ X to a corresponding canonical element ˆ x in the orbit in the quotient space X/G .
Then for each x ∈ X there exist a g ∈ G such that x =
ρ X ( g ) φ inv ( x ) .
2.2 Problem Definition
We consider a classical autoencoder framework with encoding function η : X → Z and decoding function δ : Z → X , mapping between the data domain X , and latent domain Z , minimizing the reconstruction objective d ( δ ( η ( x )) , x ) , with a difference measure d (e.g., L p norm).
As discussed above, we wish to learn the invariant map η ( φ inv in the previous paragraph), thus
Property 2.1.
The encoding function η : X → Z is G -invariant, i.e., η ( ρ X ( g ) x ) =
η ( x ) ∀ x ∈
X, ∀ g ∈ G .
The decoding function δ maps the G -invariant representation
z ∈ Z back to the data domain X .
However, as z is G -invariant, δ can at best map η ( x ) ∈
Z back to an element ˆ x ∈ X such that ˆ x ∈ { ρ X ( g ) x |∀ g ∈ G } , i.e., an element in the orbit of x through G .
This is depicted in Figure 1a.
Thus, the task of the decoding function δ : Z → X is to map encoded elements z
= η ( x ) ∈
Z to an element ˆ x ∈ X such that ∃ ˆ g x ∈ G such that
[Equation]
We call ˆ x the canonical element of the decoder δ .
We can rewrite the reconstruction objective with a G -invariant encoding function η as d ( ρ X (ˆ g − 1 ) δ ( η ( x )) , x ) .
One of the main results of this work consists in showing that ˆ x and ˆ g x can be simultaneously learned by a suitable neural network.
That is, we have the following property of our learning scheme:
Property 2.2.
There exists a learnable function ψ : X → G such that, given suitable η, δ as described above the relation ρ X ( ψ ( x ))
δ ( η ( x )) =
x , holds for all x ∈ X .
We call any function ψ satisfying (2.2) a suitable group function.
Figure 1b describes schematically our proposed framework.
In what follows, we will first characterize the defining properties of suitable group functions.
Subsequently, we will describe our construction, valid for any group G .
2.3 Predicting Group Actions
In the following we further characterize the properties of ψ .
We begin by stating two key results, while we refer to the Appendix A for the proofs.
Proposition 2.3.
Any suitable group function ψ : X → G is G -equivariant at a point x ∈ X up the stabilizer G x , i.e., ψ
( ρ X ( g ) x ) ⊆ g · ψ ( x ) G x .
Proposition 2.4.
The image of any suitable group function ψ : X → G is surjective into GG X , where
G X is the stabilizers of all the points of X .
Let us briefly discuss an example.
Suppose X = { x = ( x 0 , x 1 , x 2 , x 3 ) ∈ R 4 × 2 | x i =
ρ R 2 ( g θ = π/ 2 ) i x 0 , x 0 ∈ R 2 } and G = SO (2) .
X describes all collections of vertices of squares centered at the origin of R 2 , and it is easy to check that g X
=
Z 4 , generated by a π/ 2 rotation around the origin.
In this case, any such square can be brought to any other square (of the same radius) by a rotation of an angle θ < π/ 2 , thus Im ψ ⊇ { g θ ∈ SO (2) | 0 ≤ θ ≤ π/ 2 } =
SO (2) /
Z 4 .
Combining the two propositions above we have the following
Lemma 2.5.
Any suitable group function ψ is an isomorphism
O x ≃ G/G x for any x ∈ X , where
O x ⊂ X is the orbit of x with respect to G in X .
2.4 Proposed Construction
Next, we turn to our proposed construction of a class of suitable group functions that satisfy Property 2.2 for any data space X and group G .
As we described above, these functions must be learnable.
Property 2.6 ( Proposed construction ) .
Without loss of generality, we write our target function ψ = ξ ◦ µ , where µ : X → Y is a learnable map between the data space X and the embedding space Y , while ξ : Y → G is a deterministic map.
Our construction is further determined by the following properties:
• We impose µ : X → Y to be G -equivariant, that is, µ ( ρ X ( g ) x ) =
ρ Y ( g ) µ ( x ) for all x ∈ X and g ∈ G .
• We ask that Y is an homogeneous space, that is, given any element y 0 ∈ Y , every element y ∈ Y can be written as y =
ρ Y ( g ) y
for some g ∈ G .
• The map ξ : Y → G is defined as follows: ξ ( y ) =
g such that
y
=
ρ Y ( g ) y
for any chosen point y 0 ∈ Y .
In what follows we will show that our construction satisfies the properties of the previous section.
For proofs see Appendix.
We begin with the following
Proposition 2.7.
Let ψ = ξ ◦ µ be a suitable group function and let µ : X → Y be G -equivariant.
Then, G x = G µ ( x ) for all x ∈ X .
The result of the above proposition is crucial for our desired decomposition of the learned embedding, as it ensures that no information about the group action on X is lost through the map µ : if a group element acts non-trivially in X , it will also act non-trivially in Y .
Proposition 2.8.
Given y, y 0 , the element g such that y ≡ ρ Y ( g ) y 0 is unique up to the stabilizer
G y 0 .
This proposition establishes the equivariant properties of the map ξ .
Finally, we have
Proposition 2.9.
Let ψ = ξ ◦ µ where µ and ξ are as described above.
Then, ψ is a suitable group function.
2.5 Intuition Behind the Proposed Framework
We conclude this rather technical section with a comment on the intuition behind our construction.
Assuming for simplicity that the domain set V admits the structure of vector space, Y represents the space spanned by all basis vectors of V .
The point y 0 represent a canonical orientation of such basis, and the element ξ ( y )
=
g is the group element corresponding to a basis transformation.
As all elements can be expressed in terms of coordinates with respect to a given basis, it is natural to consider a canonical basis for all orbits, justifying the assumption of homonogeneity of the space Y .
Further, let us assume that the invariant autoencoder correctly solves its task, x ∼ δ ( η ( x )) .
Now let ˆ x ∈ O x such that ˆ x = δ ( η ( x )) , and by definition, ˆ x = ρ V ( g ) x for some g ∈ G .
Now, the correct orbit element is identified when ψ (ˆ x ) =
e , since ψ ( x ) = g − 1 · ψ (ˆ x ) =
g − 1 and thus ρ X ( g − 1 ) δ ( η ( x ))
=
ρ X ( g − 1 )ˆ x = x .
Hence, during training ψ needs to learn which orbit elements are decoded as “canonical”, i.e., without the need of an additional group transformation.
To clarify, here “canonical” does not reflect any specific property of the element, but it simply refers to the orientation learned from the decoder during training.
In fact, different decoder architectures or initializations will lead to different canonical elements.
Finally, note how the different parts of our proposed framework ( η , δ and ψ ), as visualized in Figure 1b, can be jointly trained by minimizing the objective
[Equation] which is by construction group invariant, i.e., not susceptible to potential group-related bias in the data (e.g., data that only occurs in certain orientations).
Application to Common Groups
In this section we describe how our framework applies to a variety of common groups which we will then implement in our experiments.
As discussed in Section 2.2 and visualized in Figure 1b, the main components of our proposed framework are the encoding function η , the decoding function δ and the group function ψ .
As stated in Property 2.1, the only constraint for the encoding function
η is that it has to be group invariant.
This is in general straightforward to achieve for different groups as we will demonstrate in Section 5.
Our proposed framework does not constrain the decoding function δ other than that it has to map elements from the latent space Z to the data domain X .
Hence, δ can be designed independently of the group of interest.
The main challenge is in defining the group function ψ = ξ ◦ µ such that it satisfies Property 2.2.
Following Property 2.6 we now turn to describing our construction of ξ , µ and Y for a variety of common groups.
Orthogonal group SO (2) .
The Lie group SO (2) is defined as the set of all rotations about the origin in R 2 .
We take Y to be the circle S 1 ⊂ R 2 , that is, the space spanned by unit vectors in R 2 .
Now, S 1 is a homogeneous space: any two points s 0 , s 1 ∈ S 1 are related by a rotation.
Without loss of generality, we take the reference vector y
to be the vector (1 , 0) ∈ S 1 .
Then given a vector y ∈ S 1 , we can write
[Equation]
thus, the function ξ : S 1 → SO (2) is determined by ξ ( y ) =
g θ such that θ = arccos( y x ) =
arcsin( y y ) .
Orthogonal group SO (3) .
We assume that X has no fixed points, as this is usually the case for generic shapes (point clouds) in R 3 .
It would be tempting to take Y to be the sphere S 2 ⊂ R 3 , that is, the space spanned by unit vectors in R 3 .
While this space is homogeneous, it does not satisfy the condition that the stabilizers of G are trivial.
In fact, given any vector y 1 ∈ S 2 , we have
G y 1 = { g ∈ SO (3) | g is a rotation about y 1 } .
In order to construct a space with the desired property, consider a second vector y 2 ∈ S 2 orthogonal to y 1 , y 2 ⊂ y ⊥ 1 .
Taking Y to be the space spanned by y 1 , y 2 ∈ S 2 , it is easy to see that now all the stabilizers are trivial.
Finally, let y
=
y 1 × y 2 ∈ S 2 , then we construct the rotation matrix
[Equation]
, which satisfies
[Equation]
Symmetric group S n .
A suitable space Y is the set of ordered collections of unique elements of the set M = { 1 , 2 , . . . , n } .
For instance, for n = 3 , we have Y =
It is trivial to see that the action of the permutation group on the set Y is free, that is, all the stabilizers are trivial.
Explicitely, given any permutation-equivariant vector w ∈ R n , we obtain an element y = argsort ( w ) ∈ Y .
Moreover, it is also obvious that any element in Y can be written as P σ (1 , 2 , . . . , n ) =
( σ (1) , σ (2) , . . .
, σ ( n )) , that is, a group element acting on the canonical y
= (1 , 2 , . . . , n ) .
Translation group T n .
Here we take Y = R n , which is homogeneous with respect to the translation group.
In fact, any vector y ∈ Y can be trivially written as y =
y
+ 0 =
y + y 0 , where 0 is the origin of R n .
Our group function takes therefore the form ξ ( y ) =
y .
Euclidean group SE ( n ) .
A generic transformation of the Euclidean group on a n -dimensional representation v ∈ V is
[Equation]
Let µ = ( µ 1 , µ 2 , . . .
, µ n +1 ) be a collection of n + 1 n -dimensional SE ( n ) -equivariant vectors, that is, µ i ( ρ X ( g ) x )
= ρ Y ( g ) µ ( x ) , i = 1 , . . . , n .
We construct (cid:98) y
a = ( µ a − µ n +1 ) /
|| µ a − µ n +1 || ∈ S n , a = 1 , . . . , n , where S n is the unit n -dimensional sphere.
These n ortho-normal vectors are translation invariant but rotation equivariant, and are suitable to construct the rotation matrix
[Equation]
(cid:98) y n ) , (6) while the extra vector (cid:98) y n +1 = µ n +1 can be used to predict the translation action.
Putting all together, the space Y is described by n vectors y a = (cid:98)
y a + (cid:98) y n +1 , and y
= I n is the n × n unit matrix, as ( R + (cid:98) y n +1 ) I n =
( (cid:98) y· · · (cid:98) y n ) ⊺ + (cid:98) y n +1 I n = ( y· · · y n ) ⊺ .
Related Work
Group equivariant neural networks.
Group equivariant neural networks have shown great success for various groups and data types.
There are two main approaches to implement equivariance in a layer and, hence, in a neural network.
The first, and perhaps the most common, imposes equivariance on the space of functions and features learned by the network.
Thus, the parameters of the model are constrained to satisfy equivariance Thomas et al.
(2018); Weiler & Cesa (2019a); Weiler et al. (2018a); Esteves et al.
The disadvantage of this approach consists in the difficulty of designing suitable architectures for all components of the model, transforming correctly under the group action
Xu et al.
The second approach to equivariance consists in lifting the map from the space of features to the group G , and equivariance is defined on functions on the group itself Romero &
Hoogendoorn (2020); Romero et al.
Hoogeboom et al.
Although this strategy avoids the architectural constraints, applicability is limited to homogeneous spaces Hutchinson et al.
and involves an increased dimensionality of the feature space, due to the lifting to G .
Equivariance has been explored in a variety of architecture and data structures: Convolutional Neural Networks
Cohen & Welling (2016a); Worrall et al.
; Weiler et al.
(2018c)
; Bekkers et al.
; Thomas et al.
; Dieleman et al.
; Kondor & Trivedi (2018); Cohen & Welling (2016b); Cohen et al.
; Finzi et al.
Transformers Vaswani et al.
Fuchs et al.
Hutchinson et al. (2021); Romero & Cordonnier (2020), Graph Neural Networks Defferrard et al.
; Bruna et al. ; Kipf & Welling (2016); Gilmer et al.
Satorras et al.
(2021) and Normalizing
Flows Rezende & Mohamed (2015); Köhler et al.
; Boyda et al.
These methods are usually trained in a supervised manner and combined with a symmetric function (e.g. pooling) to extract group-invariant representations.
Group equivariant autoencoders.
Another line of related work is concerned with group equivariant autoencoders.
Such models utilize specific network architectures to encode and decode data in an equivariant way, resulting into equivariant representations only Hinton et al.
(2011); Sabour et al. (2017); Kosiorek et al.
; Guo et al.
Feige (2019) use weak supervision in an AE to extract invariant and equivariant representations.
Winter et al.
(2021) implement a permutationinvariant AE to learn graph embeddings, in which the permutation matrix for graph matching is learned during training.
In that sense, the present work can be seen as a generalization of their approach for a generic data type and any group. [Figure]
Unsupervised invariant representation learning.
The field of unsupervised invariant representation learning can be roughly divided into two categories.
The first consists in learning an approximate group action in order to match the input and the reconstructed data. For instance, Mehr et al. (2018b) propose to encode the input in quotient space, and train the model with a loss that is defined by taking the infimum over the group G . While this is feasible for (small) finite groups, for continuous groups they either have to approximately discretize them or perform a separate optimization of the group action at every back propagation step to find the best match.
Other work Shu et al.
Koneripalli et al.
(2020) proposes to disentangle the embedding in a shape-like and a deformation-like component.
While this is in spirit with our work, their transformations are local (we focus on global transformations) and are approximative, that is, the components are not explicitly invariant and equivariant with respect to the transformation, respectively.
In the case of 2D/3D data, co-alignment of shapes can be used to match the input and the reconstructed shapes.
Some approaches are unfeasible Wang et al.
(2012) as they are not compatible with a purely unsupervised approach, while other Averkiou et al.
; Chaouch & Verroust-Blondet (2008, 2009) leverage symmetry properties of the data and PCA decomposition, exhibiting however limitation regarding scalability.
For graphs, the problem of graph matching Bunke & Jiang (2000) has been tackled in several works and with different approaches, for instance algorithmically, e.g., Ding et al.
(2020), or by means of a GNN Li et al.
On the topic of group theory-based embedding disentanglement, some works are based on the definition of Higgins et al.
(2018) of a disentangled representations. We refer to this as “symmetrybased decomposition”, where the various factors in the disentangled representation correspond to the decomposition of symmetry groups acting on the data space. In Pfau et al. , the authors show that, with some assumption on the geometry of the underlying data space, it is possible to learn to factorize a Lie group from the orbits in data space.
The works Hosoya (2019); Keurti et al.
(2022), for instance, design unsupervised generative VAEs approaches for learning representation corresponding to orthogonal symmetry actions on the data space.
In our work, on the other hand, we learn a decomposition into separate group representations . These are all representations of the same group, but act differently on different data space (analogously to different SO (3) representations identified by the angular quantum number l = 0 , 1 , 2 , . . . ).  Experiments In this section we present differnt experiments for the various groups discussed in Section 3.[-
-]
5.1 Rotated MNIST
In the first experiment, we train an SO(2)-invariant autoencoder on the original (non-rotated) MNIST dataset and validate the trained model on the rotated MNIST dataset (ref. mni) which consists of randomly rotated versions of the original MNIST dataset.
For the functions η and ψ we utilize
SO(2)-Steerable Convolutional Neural Networks Weiler & Cesa (2019b).
For more details about the
[0,0,100] [100,0,0] [0,100,0] [50,50,0] [50,0,50] [0,50,50] [8, 6, 2, 7, 9, 2, 8, 5, 8, 0, 9, 7, 9, 6, 7, 3, 9, 4, 6, 9, 1, 7, 5, 9, 3, 7, 3, 7, 6, 8, 8, 1, 1, 4, 5, 9, 2, 0, 1, 8, 8, 3, 2, 5, 5, 7, 6, 7, 4, 1, 1, 0, 2, 8, 7, 8, 4, 9, 6, 4, 0, 4, 2, 9, 0, 5, 8, 8, 3, 4, 3, 9, 9, 7, 4, 4, 3, 3, 7, 3, 9, 6, 1, 0, 1, 7, 2, 3, 9, 9, 8, 8, 7, 5, 1, 9, 7, 6, 8, 0] [1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5] 𝑥= 𝑥′= a) b) c)
P= network architecture and training, we refer to Appendix B.
In Figure 3 we show images in different rotations and the respective reconstructed images by the trained model.
The model decodes the different rotated versions of the same image (i.e., elements from the same orbit) to the same canonical output orientation (second row in Figure 3).
The trained model manages to predict the right rotation matrix (group action) to align the decoded image with the input image, resulting in an overall low reconstruction error.
Note that the model never saw rotated images during training but still manages to encode and reconstruct them due to its inherent equivariant design.
We find that the encoded latent representation is indeed rotation invariant (up to machine precision), but only for rotations of an angle θ = n · π 2 , n ∈ N .
For all other rotations, we see slight variations in the latent code, which, however, is to be expected due to interpolation artifacts for rotations on a discretized grid.
Still, inspecting the 2d-projection of the latent code of our proposed model in Figure 2, we see distinct clusters for each digit class for the different images from the test dataset, independent of the orientation of the digits in the images.
In contrast, the latent code of a classical autoencoder exhibits multiple clusters for different orientations of the same digit class.
5.2 Set of Digits
Next, we train a permutation-invariant autoencoder on sets of digits.
A set with N digits is represented by concatenating one-hot vectors of each digit in a N × D -dimensional matrix, where we take D = 10 .
Notice that this matrix-representation of a set is not permutation invariant.
We randomly sampled 1.000.000 different sets for training and 100.000 for the final evaluation with N = 20 , 30 , 40 , 100 , respectively, removing all permutation equivariant sets (i.e., there are no two sets that are the same up to a permutation).
For comparison, we additionally trained a classical non-permutation-invariant autoencoder with the same number of parameters and layers as our permutation-invariant version.
For more details on the network architecture and training we refer to Appendix C. Here, we demonstrate how the separation of the permutation-invariant information of the set (i.e., the composition of the set) from the (irrelevant) order-information results in a significant reduction of the space needed to encode the set.
In Figure 4a, we plot the element-wise reconstruction accuracy of different sized sets for both models for varying embedding (bottleneck) sizes.
As the classical autoencoder has to store both the composition of digits in the set (i.e., number of elements for each of the 10 digits classes) as well as their order in the permutation-dependent matrix representation, the reconstruction accuracy drops for increasing size of the set N for a fixed embedding size.
For the same reason, perfect reconstruction accuracy is only achieved if the embedding dimension is at least as large as the number of digits in the set.
On the contrary, our proposed permutation invariant autoencoder achieves perfect reconstruction accuracy with a significant lower embedding size.
Crucially, as no order information has to be stored in the embedding, this embedding size for perfect reconstruction accuracy also stays the same for increasing size N of the set.
In Figure 4b we show one example for a set x with N = 100 digits, with the predicted canonical orbit element ˆ x and the predicted permutation matrix.
As perhaps expected, the canonical element clusters together digits with same value, while not using the commonly used order of Arabic numerals.
This learned order (here [1,9,4,0,3,6,8,7,2,5]) stays fixed for the trained network for different inputs but changes upon re-initialization
[Figure] In Figure 4c we show the two-dimensional embedding of a permutation invariant autoencoder trained on set of N = 100 elements chosen from D = 3 different classes (e g. digits 0,1,2).
As the sets only consists of 3 different elements (but in different compositions and order) we can visualize the (cid:0) D + N −
N (cid:1) =
(cid:0) 102100 (cid:1)
= 5151 elements in the two-dimensional embedding and colour them according to their composition.
As our proposed auteoncoder only needs to store the information about the set composition and not the order, the embedding is perfectly structured with respect to the composition as can be seen by the colour gradients in the visualization of the embedding.
5.3 Point Cloud
Point clouds are a common way to describe objects in 3D space, such as the atom positions of a molecule or the surface of an object.
As such, they usually adhere to 3D translation and rotation symmetries and are unordered, i e., permutation invariant.
Hence, we investigate in the next experiment a combined SE( 3 )- and S N -invariant autoencoder for point cloud data.
We use the Tetris Shape toy dataset Thomas et al.
(2018) which consists of 8 shapes, where each shape includes N = 4 points in 3 D space, representing the center of each Tetris block.
To generate various shapes, we augment theshapes by adding Gaussian noise with σ = 0 .
01 standard deviation on each node’s position.
Different orientations are obtained by rotating the point cloud with a random rotation matrix R ∈ SO (3) and further translating all node positions with the same random translation vector t ∈ R 3 ≃ T 3 .
For additional details on the network architecture and training we refer to Appendix D. In Figure 5 we visualize the input points and output points before and after applying the predicted rotation.
The model successfully reconstructs the input points with high fidelity (mean squared error of ∼ 4 × 10 − 5 ) for all shapes and arbitrary translations and rotations.
Figure 5b shows the two-dimensional embedding of the trained SE( 3 )- and S N -invariant autoencoder.
Augmenting the points with random noise results into slight variations in the embedding, while samples of the same Tetris shape class still cluster together.
The embedding is invariant with respect to rotations, translation and permutations of the points.
Notably, the SE(3)-invariant representations can distinguish the two chiral shapes (compare green and violet coloured shapes in the bottom right of Figure 5b).
These two shapes are mirrored versions of themselves and should be distinguished in an SE( 3 ) equivariant model.
Models that achieve SE( 3 ) invariant representations by restricting themselves to composition of symmetric functions only, such as working solely on distances (e.g. SchNet Schütt et al.
(2018)) or angles (e.g.
ANI-1 Smith et al.
between points fail to distinguish these two shapes Thomas et al.
Molecular Conformations.
We showcase our learning framework on real-world data by autoencoding the atom types and geometries of small molecules from the QM9 database Ramakrishnan et al.
We achieved a reconstruction RMSE of 0 .
15 ± 0 .
07 Å for atom coordinates and perfect atom type accuracy on 5000 unseen test conformations (see Figure 5c for two examples and Appendix E.2.2 for more reconstruction predictions).
Given a point cloud of N nodes, the G = SE (3) × S N -invariant embedding z has to store information about the Cartesian coordinates P ∈ R 3 N as well as the 5 distinct atom types A ∈ { 0 , 1 } 5 N represented as one-hot encodings.
The largest molecule in the QM9 database has N max = 29 atoms, thus the degrees of freedom of the data space 3 X are 3 · 29 · 5 · 29 = 12615 . Our embeddings compress this high-dimensional space of molecular conformations into z ∈ Z ⊂ R 256 dimensions. 5.4 ShapeNet
We also run experiments on the ShapeNet dataset Chang et al.
We utilized 3D
Steerable CNNs proposed by Weiler et al.
(2018b) as equivariant encoder for the 3d voxel input space. We utilized the scalar outputs as rotation-invariant embedding ( z ) and predict (analogously to our experiments on 3d point clouds) 2 rotation-equivariant vectors to construct a rotation matrix ρ ( g ) . In Figure 11 in the Appendix we show example reconstructions of shapes from the SE (3) invariant representations.
Similar to our MNIST experiment, we compared the resulting embedding space to the embeddings produced by a non-invariant autoencoder model.
As the dataset comes in an aligned form (e.g., cars are always aligned in the same orientation), we additionally applied random 90 degree rotations to remove this bias (while avoiding interpolation artifacts) when training the non-invariant model.
Random rotations are also applied to the common test set.
In Figure 6 we visualize a TSNE projection of the embeddings of both models.
We can see a well structured embedding space for our model with distinct clusters for the different shape classes.
On the other hand, the embeddings produced by the non-invariant autoencoder is less structured and one can make out different clusters for the same shape label but in different orientations.
Moreover, we compared the downstream performance and generalizability of a KNN classifier on shape classification, trained on 1000 embeddings and tested on the rest.
The classifier based on our rotation-invariant embeddings achieved an accuracy of 0.
while the classifier based on the non-invariant embeddings achieved an accuracy of only 0.63.
Conclusion and Future Work
In this work we proposed a novel unsupervised learning strategy to extract representations from data that are separated in a group invariant and equivariant part for any group G .
We defined the sufficient conditions for the different parts of our proposed framework, namely the encoder, decoder and group function without further constraining the choice of a ( G -) specific network architecture.
In fact, we demonstrate the validity and flexibility of our proposed framework for diverse data types, groups and network architectures.
To the best of our knowledge, we propose the first general framework for unsupervised learning of separated invariant-equivariant representations valid for any group.
Our learning strategy can be applied to any AE framework, including variational AEs.
It would be compelling to extend our approach to a fully probabilistic approach, where the group action function samples from a probability distribution.
Such formalism would be relevant in scenarios where some elements of a group orbit occur with different frequencies, enabling this to be reflected in the generation process.
For instance, predicting protein-ligand binding sites depends on the molecule’s orientation with respect to the protein pocket or cavity.
Thus, in a generative approach, it would be highly compelling to generate a group action reflecting a candidate molecule’s orientation in addition to a candidate ligand.
We plan to return to these generalization and apply our learning strategy to non-trivial real-world applications in future work.
Appendix A Proofs
Proposition A.1.
Any suitable group function ψ : X → G is G -equivariant at a point x ∈ X up the stabilizer G x , i.e., ψ
( ρ X ( g ) x ) ⊆ g · ψ ( x ) G x .
Proof : As the relation (see Property 2.2)
[Equation]
) must hold for any x ∈ X , it must hold for any point x ′ =
ρ X ( g ) x in the orbit of x , which then reads
[Equation]
where we used the invariance of η .
On the other hand, applying ρ X ( g ) to both sides of (8) we have
[Equation]
since η ( ρ X ( g ′ ) x ) =
η ( x ) and ρ X ( g 1 ) ρ X ( g 2 ) =
ρ X ( g 1 g 2 ) .
Combining (9) and (10) it follows that
[Equation]
11) that is, ψ ( x ) − 1 · g − 1 · ψ ( ρ X ( g ) x )) ∈
G δ ( η ( x )) .
Now, since x and δ ( η ( x )) by assumption belong to the same orbit of G , it follows that they have isomorphic stabilizers, G δ ( η ( x )) ≃ G x .
Thus, we have shown that ψ ( ρ X ( g ) x ))
=
g · ψ ( x ) · g ′ , where g ′ ∈ G x , which proves our claim.
Proposition A.2.
The image of any suitable group function ψ : X → G is surjective into GG X , where
G X is the stabilizers of all the points of X .
Proof : Let x ∈
X be such that x = δ ( η ( x )) , that is, ψ ( x ) =
G x , the stabilizer of x .
Note that each orbit cointains at least one such element.
For any element g ∈ G we have that, using
Proposition A.1, ψ ( ρ X ( g ) x )
= g · ψ ( x ) · ˜ g , where ˜ g ∈ G x .
Since ψ ( x ) · ˜ g ∈ G x as well, it then follows that the image of ψ is G up to an action by an element of the stabilizer G x .
Applying the above reasoning to every points x ∈ X , we have that Im ( ψ ) = ∪ x ∈ X GG x =
G ∩ x ∈ X G x , where ∩ x ∈ X G x = G X
= { g ∈ G | ρ X ( g ) x
= x, ∀ x ∈ X } , proving our claim.
Lemma A.3.
Any suitable group function ψ is an isomorphism
O x ≃ G/G x for any x ∈ X , where
O x ⊂ X is the orbit of x with respect to G in X .
Proof : Surjectivity follows directly from Proposition A.2.
To show injectivity, consider x, x ′ ∈
O x such that ψ ( x ′ ) =
ψ ( x ) · ˜ g , where ˜ g ∈ G x .
From Proposition 2.3 it follows that x ′ = x , which proves the claim.
Proposition A.4.
Let ψ = ξ ◦ µ be a suitable group function and let µ : X → Y be G -equivariant.
Then, G x = G µ ( x ) for all x ∈ X .
Proof : Let g ∈ G x , that is,
ρ X ( g ) x = x .
Applying µ to both sides of this equation we obtain µ ( x ) = µ ( ρ X ( g ) x )
=
ρ Y ( g ) µ ( x ) , where we used the G -equivariance of µ .
Hence, G x ⊆ G µ ( x ) .
To prove the opposite inclusion, let g ∈ G µ ( x ) but g / ∈ G x , and let x ′ =
ρ X ( g ) x .
Now, µ ( x ′ )
=
ρ Y ( g ) µ ( x ) = µ ( x ) , thus µ , and therefore ψ = ξ ◦ µ , maps the distinct element x, x ′ to the same group element ψ ( x ) = ψ ( x ′ ) , in contradiction with Proposition 2.3.
Proposition A.5.
Given y, y 0 , the element g such that y ≡ ρ Y ( g ) y 0 is unique up to the stabilizer
G y 0 .
Proof : Suppose that there exist g 1 , g 2 ∈ G
such that ρ Y ( g 1 ) y
=
ρ Y ( g 2 )
y 0 , then ρ Y ( g − 1 2 g 1 )
y
= y 0 , which implies g − 1 2 g 1 ∈ G y 0 .
Proposition A.6.
Let ψ = ξ ◦ µ where µ and ξ are as described above.
Then, ψ is a suitable group function.
Proof : We show that our construction describes an isomorphism O x ≃ G/G x for all x ∈ X .
Given x ∈ X and g ∈ G , Propositions A.4 and A.5 imply
[Equation]
that is, ψ possesses the G -equivariant property as required in Proposition 2.3, which in turns imply injectivity, as in Lemma A.3.
Surjectivity follows from the same argument as in Proposition A.2, since the proof only relies on the equivariant properties of ψ , which we showed in (12).
B Model architecture Rotated MNIST
We follow Weiler & Cesa (2019b) and use steerable CNNs to parameterize functions η and µ .
In contrast to classical CNNs, CNNs with O(2)-steerable kernels transform feature fields respecting the transformation law under actions of O (2) .
We can define scalar fields s : R 2 → R and vector fields v : R 2 → R 2 that transform under group actions (rotations) the following:
[Equation]
Thus, scalar values are moved from one point on the plane R 2 to another but are not changed, while vectors are moved and changed (rotated) equivalently.
Hence, we can utilize steerable CNNs to encode samples in R 2 in O (2) -invariant scalar features and O (2)
-equivariant vector features.
We can use the scalar features s as G -invariant representation z ∈ Z and following Section 3 (Orthogonal group SO (2) ) utilizing a single vector features v to construct the rotation matrix R as:
[Equation]
In our experiments we used seven layers of steerable CNNs as implemented by Weiler & Cesa (2019b).
We did not use pooling layers, as we found them to break rotation equivariance and only averaged over the two spatial dimensions after the final layer to extract the final invariant embedding and equivariant vector.
In each layer we used 32 hidden scalar and 32 hidden vector fields.
In the final layer we used 32 scalar fields (32 dimensional invariant embedding) and one vector feature field.
The Decoding function δ : Z → R 2 can be parameterized by a regular CNN.
In our experiments we used six layers of regular CNNs with 32 hidden channels, interleaved with bilinear upsampling layers starting from the embedding expanded to a 2 × 2 × 32 tensor.
Training was done on one NVIDIA Tesla V100 GPU in approximately 6 hours.
C Model architecture Set of Digits
We can rewrite the equation P σ (1 , 2 , . . . , n ) =
( σ (1) , σ (2) , . . .
, σ ( n )) , in vector form by representing set elements by standard n × 1 column vectors e i (one-hot encoding) and σ by a permutation matrix P σ whose (i,j) entry is 1 if i = σ ( j ) and 0 otherwise, then:
[Equation]
Hence, encoding function η should encode a set of elements in a permutation invariant way and ψ should map a set M to a permutation matrix P σ :
[Equation]
We follow Zaheer et al.
and parameterize η by a neural network γ that is applied element-wise on the set followed by an invariant aggregation function Σ (e.g. sum or average) and a second neural network β : η ( X ) = β (
[Equation]
X γ ( x )) . In our experiments we parameterized γ and β with regular feed-forward neural networks with three layers respectively, also using ReLU activations and Batchnorm.
The output of function γ is equivariant and can also be used to construct ψ .
We follow Winter et al. (2021) and define a function s : R d → R mapping the output of γ for every set element to a scalar value.
By sorting the resulting scalars, we construct the permutation matrix P σ with entries p ij that would sort the set of elements with respect to the output of s :
[Equation]
As the argsort operation is not differentiable, we utilizes a continuous relaxation of the argsort operator proposed in (Prillo & Eisenschlos, 2020; Grover et al., 2019):
[Equation]
sort
[Equation]
where the softmax operator is applied row-wise, d ( x, y ) is the L 1 -norm and τ ∈ R + a temperatureparameter.
Decodingfunction δ can be parameterized by a neural network that maps the permutation-invariant set representation back to either the whole set or single set elements.
In the letter case, where the same function is used to map the same set representation to the different elements, additional fixed position embeddings can be fed into the function to decode individual elements for each position/index.
For the reported results we choose this approach, using one-hot vectors as position embeddings and a 4-layer feed-forward neural network.
Training was done on one NVIDIA Tesla V100 GPU in approximately 1 hours.
D Model architecture Point Cloud - Tetris 3D & QM
We implement a graph neural network (GNN) that transform equivariantly under rotations and translations in 3D space, respecting the invariance and equivariance constraints mentioned in Eq.
(6) and (7) for n = 3 .
Assume we have a point cloud of N particles each located at a certain position x i ∈ R 3 in Cartesian space.
Now given some arbitrary ordering σ ( · ) for the points, we can store the positional coordinates in the matrix P =
[ x 1 , ..., x N ] ∈ R N × 3 .
Standard Graph Neural Networks (GNNs) perform message passing Gilmer et al.
(2017) on a local neighbourhood for each node.
Since we deal with a point cloud, common choice is to construct neighbourhoods through a distance cutoff c > 0 .
The edges of our graph are specified by relative positions
[Equation]
and the neighbourhood of node i is defined as N ( i ) =
{ j : d ij :=
|| x ij || ≤ c } .
Now, our data (i.e., the point cloud) lives on a vector space X , where we want to learn an SE(3) invariant and equivariant embedding wrt.
arbitrary rotations and translations in 3 D space.
Let the feature for node i consist of an invariant (type-0) embedding h i ∈ R F s , an equivariant (type-1) embedding w i ∈ R 3 × F v that transforms equivariantly wrt.
arbitrary rotation but is invariant to translation.
Such a property can be easily obtained, when operating with relative positions.
Optionally, we can model another equivariant (type-1) embedding t i ∈ R 3 which transforms equivariantly wrt.
translation and rotation.
As our model needs to learn to predict group actions in the SE(3) symmetry, we require to predict an equivariant translation vector ( b ∈ T 3 ), as well as a rotation matrix ( A ∈ SO (3) ), where we will dedicate the t vector to the translation and the w vector(s) to the rotation matrix.
As point clouds might not have initial features, we initialize the SE(3)-invariant embeddings as one-hot encoding h i
=
e i for each node i = 1 , . . .
, N .
The (vector) embedding dedicated for predicting the rotation matrix is initialized as zero-tensor for each particle, i.e., w i = {+
+} and the translation vector is initialized as the absolute positional coordinate, i.e. to, t i = x i .
We implement following edge function ϕ
e : R 2 F s +
(cid:55)→ R F s +2 F v + k with
[Equation]
(20) and set k = 1 if the GNN should model the translation and k = 0 else.
Notice that the message m ij in Eq.
(20) only depends on SE(3) invariant embeddings.
Now, (assuming k = 1 ) we further split the message tensor into 4 tensors,
[Equation]
which we require to compute the aggregated messages for the SE(3) invariant and equivariant node embeddings.
Weincludea row-wise transform ϕ s : R F s (cid:55)→ R [Equation] s for the invariant embeddings using a linear layer:
[Equation]
The aggregated messages for invariant (type-0) embedding h i are calculated using:
[Equation]
where ⊙ is the (componentwise) scalar-product.
The aggregated equivariant features are computed using the tensor-product ⊗ and scalar-product ⊙ from (invariant) type-0 representations with (equivariant) type-1 representations:
[Equation]
where 1 ∈ R 3 is the vector with 1 ’s as components and ( a × b ) denotes the cross product between two vectors a, b ∈ R 3 .
The tensor in Eq.
(23) is equivariant to arbitary rotations and invariant to translations.
It is easy to prove the translation invariance, as any translation t ∗ ∈ T 3 acting on points x i , x j does not change the relative position x ij =
( x j + t ∗ ) − ( x i + t ∗ ) =
x j − x i .
To prove the rotation equivariance, we first observe that given any rotation matrix A ∈ SO (3) acting on the provided data, as a consequence relative positions rotate accordingly, since
[Equation]
The tensor product ⊗ between two vectors u ∈ R 3 and v ∈ R F s , commonly also referred to as outer product is defined as
[Equation]
and returns a matrix given two vectors.
For the case that a group representation of SO(3), i.e. a rotation matrix R , acts on u , it is obvious to see with the associativity property
[Equation]
The cross product ( w i × w j ) ∈ R 3 × F v used in equation (23) between type-1 features w i and w j is applied separately on the last axis.
The cross product has the algebraic property of rotation invariance, i.e. given a rotation matrix
A acting on two 3-dimensional vectors a, b ∈ R 3 the following holds:
[Equation]
Now, notice that the quantities that "transform as a vector" which we call type-1 embeddings are in
S = { x ij , w i , t i } Ni,j =1 .[-
-]
Given a rotation matrix A acting on elements of S , we can see that the result in (23)
[Equation]
is rotationally equivariant.
We update the hidden embedding with a residual connection
[Equation]
and use a Gated-Equivariant layer with equivariant non-linearities as proposed in the PaiNN architecture Schütt et al.
(2021) to enable an information flow between type-0 and type-1 embeddings.
The type-1 embedding for the translation vector is updated in a residual fashion
[Equation]
where we can replace the tensor-product with a scalar-product, as m t,ij ∈ R .
The result in Eq.
(26) is translation and rotation equivariant as the first summand t i is rotation and translation equivariant, while the second summand is only rotation equivariant since we utilize relative positions.
For the SE(3) Tetris experiment, the encoding function η : X (cid:55)→ Z is a 5-layer GNN encoder with
F = F s = F v = 32 scalar- and vector channels and implements the translation vector, i.e. k = 1 .
The encoding network η outputs four quantities: two SE(3) invariant node embedding matrices (cid:101) H, M ∈ R N × F , one SO(3) equivariant order-3 tensor (cid:102) W ∈ R N × 3 × F as well as another SE(3) equivariant matrix T ∈ R N × 3 .
We use two linear layers 4 to obtain the SE(3) invariant embedding matrix H ∈ R N × 2 as well as the SO(3) equivariant embedding tensor W ∈ R N × 3 × 2 .
Notice that the linear layer returning the
W tensor can be regarded as the function ψ rot that aims to predict the group action in the SO(3) symmetry, while we use the identity map for the translation vector, i.e. ψ transl = T .
As point clouds can be regarded as sets, we obtain an permutation invariant embedding by averaging over the first dimension of the { H, W, T } tensors,
[Equation]
while we use the M matrix to predict the permutation matrix P σ with the ψ perm function, in similar fashion as described in Eq.
To construct the rotation matrix R out of 2 vectors in R 3 as described in Section 3, we utilize the SO(3) equivariant embedding w .
The decoding network δ : Z (cid:55)→ X is similar to the encoder a 5 -layer SE( 3 )-equivariant GNN but does not model the translation vector, i.e. k = 0 .
The decoder δ maps the SE( 3 ) as well as S( N )-invariant embedding h back to a reconstructed point cloud ˆ P ∈ R N × 3 .
At the start of decoding, we utilize a linear layer to map the G − invariant embedding h ∈ R 2 to a higher-dimension, i.e.
[Equation]
Next, to “break” the symmetry and provide the nodes with initial type-0 features, we utilize fixed (deterministic) positional encodings as suggested by Winter et al.
(2021) for each node i = 1 , . .
. , N to be summed with ˜ h .
Notice that this addition enables us to obtain distinct initial type-0 embeddings { ˆ h i } Ni =1 .
For the start positions, we implement a trainable parameter matrix P θ of shape ( N × 3) for the decoder.
Now,given an initial node embedding ˆ H ∈ R N × F s , we apply the S( N ) group action, by multiplying the predicted permutation matrix P σ with ˆ H from the left to obtain the canonical ordering as
[Equation]
To retrieve the correct orientation required for the pairwise-reconstruction loss, we multiply the constructed rotation matrix R with the initial start position matrix P θ
[Equation]
[Equation]
[Table]
With such construction, we can feed the two tensors to the decoder network δ to obtain the reconstructed point cloud as
[Equation]
(33) where t ∈ R 3 is the predicted translation vector from the encoder network, added row-wise for each node position.
E Further Experiments E.1 Rotated MNIST
We also implemented and trained the quotient autoencoder (QAE) approach proposed by Mehr et al.
(2018a) on the MNIST dataset for the group SO (2) , discretized in 36 rotations with the loss
[Equation]
(34) where x is a MNIST sample and y is the reconstructed sample.
We evaluated the resulting embeddings on the rotated MNIST test set (in such a way that the evaluation is the same as for our model). In Figure 7 we plot TSNE embeddings for this approach, and we can observe that the embedding space shows a clearer structure, in comparison with the classical model. However, in comparison, our approach results in a better clustering of the different digits classes.
That shows that the discretization step, while it helps in structuring the embedding space in “signal clusters”, still does not capture the full continuous nature of the group.
To further quantitatively compare the three methods (ours,
QAE and classical AE), we evaluated the reconstruction loss as well as the (digit class) classification accuracy of a KNN classifier trained on 1000 embeddings of each method.
We present in the table below the results for the reconstruction loss and for the classification accuracy of a KNN classifier trained on the AE embeddings.
To obtain a fair comparison, we kept the architecture and the training hyperparameters exactly identical for all the strategies.
We note that our strategy outperforms both the classical AE as well as the strategy of QAE in both tasks.
In an additional experiment, we trained a fully equivariant AE (that is, the embedding itself is fully equivariant, i.e. multiple 2-dimensional vectors) on MNIST with G = SO (2) , followed by an invariant pooling afterwards (after the training) to extract the invariant part.
Specifically, we have trained KNN classifiers on (a) the invariant embedding corresponding to the norm of the 2dimensional vectors forming the bottleneck representation, (b) the angles between the first and all other vectors and on (c) the full invariant embedding we obtained by combining the the norms and angles.
We choose the number of vectors in the bottleneck in such a way that the dimensionality of the full invariant representation coincides with the one of our model. We visualized the resulting TSNE embeddings in Figure 7 and show the downstream performance of the KNN classifiers in Table 1. From the results we can see that, in comparison to the approximate invariant (QAE) and our invariant trained model, the invariant projected equivariant representations perform inferior. Although we extract a complete invariant representation (which performs better than a subset of this representation like the norm or angle part), the resulting representation is apparently not as expressive and e.g. useful in a downstream classification task.
This aligns well with our hypothesis, that our proposed framework poses a sensible supervisory signal to extract expressive invariant representations that are superior to invariant projections of equivariant features.
[Table] E.2 QM  For the QM9 dataset, we use the same model components as described in the Tetris experiment, with the difference of including atom species as SE (3) − invariant features and setting F s = 256 , F v =and increasing the dimensionality of the latent space to 256 .
E.2.1 Finetuning
We performed additional experiments on the pretrained group-invariant AE on the extended GEOMQM9 dataset Axelrod & Gomez-Bombarelli (2021) which, as opposed to the standard QM9 dataset ( ≈ 130 k samples), contains multiple conformations of small molecules.
We trained the autoencoder on a reduced set of GEOM-QM9 ( ≈ 641 k ), containing up to 10 conformations per molecule and utilized this pretrained encoder network to regress (invariant) energy targets, such as internal energy U or enthalpy H on the original QM9 dataset. [Figure]
We observed that the pretrained encoder network learns faster and achieves better generalization performance than the architectural identical network trained from scratch.
In Figure 8 we illustrate the learning curves for the two networks on different fraction on 5% and 25% labelled samples from the original QM9 dataset to analzye the benefit of finetuning a pre-trained encoder network in a low-data regime, when regressing on the enthalpy H .
On a held-out test dataset of 1000 samples, the pretrained encoder network achieves superior generalization performance in terms of R 2 with 0 .vs. 0 .
0970 in the 5% data regime, and 0 .
9908 vs. 0 .
9093 in the 25% data regime compared to the encoder that was trained from scratch.
In Table2 we show additional comparisons of the pretrained network against a network that was trained from scratch for 50 epochs on the restricted dataset.
As shown in Table 2, the pretrained encoder achieves improved generalization performance on the test dataset compared to its architectural identical model that was trained from scratch.
We believe that training the group-invariant autoencoder on a larger diverse dataset of (high-quality) molecular conformations facilitates new opportunities in robust finetuning on different data-scarse datasets for molecular property prediction.
E.2.2 Molecular Conformations: Further Examples
We show additional reconstructions of 12 randomly selected small molecules from the QM9 test dataset.
Noticeably, our trained autoencoder is able to reconstruct molecular conformations with complex geometries as depicted in the third column (from the left).
We notice that the AE is not able to perfectly reconstruct the conformation shown in the 4th column of the 2nd row.
Although this molecule does not exhibit a complicated geometrical structure, its atomistic composition (of only containing nitrogen and carbon as heavy atoms) could be the reason why the encoding of the conformation is pointing into a non-densely populated region in the latent space, as nitrogen does not have a large count in the total QM9 database, see Figure 10.
Training was done on one NVIDIA Tesla V100 GPU in approximately 1 day.
[Figure]
[Figure]