G EOMETRIC AND P HYSICAL Q UANTITIES IMPROVE E( 3 ) E QUIVARIANT M ESSAGE P ASSING
Pol
A BSTRACT
Including covariant information, such as position, force, velocity or spin is important in many tasks in computational physics and chemistry.
We introduce Steerable
E( 3 ) Equivariant Graph Neural Networks (SEGNNs) that generalise equivariant graph networks, such that node and edge attributes are not restricted to invariant scalars, but can contain covariant information, such as vectors or tensors.
This model , composed of steerable MLPs, is able to incorporate geometric and physical information in both the message and update functions
Through the deﬁnition of steerable node attributes the MLPs provide a new class of activation functions for general use with steerable feature ﬁelds
We discuss ours and related work through the lens of equivariant non linear convolutions , which further allows us to pin -point the successful components of SEGNNs: non-linear message aggregation improves upon classic linear (steerable) point convolutions; steerable messages improve upon recent equivariant graph networks that send invariant messages
We demonstrate the effectiveness of our method on several tasks in computational physics and chemistry and provide extensive ablation studies.
I NTRODUCTION
The success of Convolutional Neural Networks (CNNs) (LeCun et al., 1998; 2015; Schmidhuber, 2015; Krizhevsky et al., 2012) is a key factor for the rise of deep learning, attributed to their capability of exploiting translation symmetries, hereby introducing a strong inductive bias.
Recent work has shown that designing CNNs to exploit additional symmetries via group convolutions has even further increased their performance (Cohen & Welling, 2016; 2017; Worrall et al., 2017;
Cohen et al., 2018; Kondor & Trivedi, 2018; Weiler et al., 2018;
Bekkers et al., 2018; Bekkers, 2019; Weiler &
Cesa, 2019).
Graph neural networks (GNNs) and CNNs are closely related to each other via their aggregation of local information.
More precisely, CNNs can be formulated as message passing layers (Gilmer et al., 2017) based on a sum aggregation of messages that are obtained by relative position-dependent linear transformations of neighbouring node features.
The power of message passing layers is, however, that node features are transformed and propagated in a highly non-linear manner.
Equivariant GNNs have been proposed before as either PointConv-type (Wu et al., 2019;
Kristof et al., 2017) implementations of steerable (Thomas et al., 2018; Anderson et al., 2019;
Fuchs et al., 2020) or regular group convolutions (Finzi et al., 2020).
The most important component in these methods are the convolution layers.
Although powerful, such layers only (pseudo 1 ) linearly transform the graphs and non-linearity is only obtained via point-wise activations.
In this paper, we propose non-linear E(3) equivariant message passing layers using the same principles that underlie steerable group convolutions, and view them as non-linear group convolutions .
Central to our method is the use of steerable vectors and their equivariant transformations to represent and process node features; we present the underlying mathematics of both in Sec. 2 and illustrate it in Fig.
1 on a molecular graph.
As a consequence, information at nodes and edges can now be rotationally invariant (scalar) or covariant (vector, tensor).
In steerable message passing frameworks, the Clebsch-Gordan (CG) tensor product is used to steer the update and message functions by geometric information such as relative orientation (pose).
Through a notion of steerable node attributes we provide a new class of equivariant activation functions for general use with steerable feature ﬁelds (Weiler et al., 2018; Thomas et al., 2018).
Node attributes can include information such as node velocity, force, or atomic spin.
Currently, especially in molecular modelling, most datasets are build up merely of atomic number and position information.
In this paper, we demonstrate the potential of enriching node attributes with more geometric and physical quantities.
We demonstrate the effectiveness of SEGNNs by setting a new state of the art on n-body toy datasets, in which our method leverages the abundance of geometric and physical quantities available.
We further test our model on the molecular datasets QM9 and OC20.
Although here only (relative) positional information is available as geometric quantity, SEGNNs achieve state of the art on the IS2RE dataset of OC20, and competitive performance on QM9.
For all experiments we provide extensive ablation studies.
The main contributions of this paper are: (i) A generalisation of equivariant GNNs such that node and edge attributes are not restricted to scalars. (ii)
A new class of equivariant activation functions for steerable vector ﬁelds, based on the introduction of steerable node attributes and steerable multi-layer perceptrons, which permit the injection of geometric and physical quantities into node updates.
(iii) A unifying view on various equivariant GNNs through the deﬁnition of non-linear convolutions.
(iv) Extensive experimental ablation studies that shows the beneﬁt of steerable over non-steerable (invariant) message passing, and the beneﬁt of non-linear over linear convolutions.
G ENERALISED E( 3 ) EQUIVARIANT STEERABLE MESSAGE PASSING
Message passing networks.
Consider a graph G =
( V , E ) , with nodes v i ∈ V and edges e ij ∈ E , with feature vectors f i ∈ R c
n attached to each node, and edge attributes a ij ∈ R c e attached to each edge.
Graph neural networks (GNNs) (Scarselli et al., 2009; Kipf & Welling, 2017; Defferrard et al., 2016; Battaglia et al., 2018) are designed to learn from graph-structured data and are by construction permutation equivariant with respect to the input.
A speciﬁc type of GNNs are message passing networks (Gilmer et al., 2017), where a layer updates node features via the following steps:
compute message m ij from node v j to
[Equation]
aggregate messages and update node features v i :
[Equation]
where N ( i ) represents the set of neighbours of node v i , and φ m and φ f are commonly parameterised by multilayer perceptrons (MLPs).
Equivariant message passing networks.
Our objective is to build graph neural networks that are robust to rotations, reﬂections, translations and permutations.
This is a desirable property since some prediction tasks, such as molecular energy prediction, require E(3) invariance, whereas others, like force prediction, require equivariance.
From a technical point of view, equivariance of a function φ to certain transformations means that for any transformation parameter g and all inputs x we have
T (cid:48) g
[ φ ( x )]
=
φ ( T g [ x ]) , where T g and T (cid:48)
g denote transformations on the input and output domain of φ , respectively.
Equivariant operators applied to atomic graphs allow us to preserve the geometric structure of the system as well as enriching it with increasingly abstract directional information.
We build E(3) equivariant GNNs by constraining the functions φ m and φ f of Eqs.
(1-2) to be equivariant, which in return guarantees equivariance of the entire network.
In the following, we introduce the core components behind our method; full mathematical details and background can be found in App. A.
Steerable features.
In this work, we achieve equivariant graph neural networks by working with steerable feature vectors , which we denote with a tilde, e.g. a vector ˜ h is steerable.
Steerability of a vector means that for a certain transformation group with transformation parameters g , the vector transforms via matrix-vector multiplication D ( g )˜ h .
For example, a Euclidean vector in Ris steerable for rotations
g = R ∈ SO (3) by multiplying the vector with a rotation matrix, thus
D ( g ) =
R .
We are however not restricted to only work with 3D vectors; via the construction of steerable vector spaces, we can generalise the notion of 3D rotations to arbitrarily large vectors.
Central to our approach is the use of Wigner-D matrices D ( l ) ( g ) 2 .
These are (2 l + 1 × 2 l + 1) - dimensional matrix representations that act on (2 l +1) -dimensional
vector spaces.
These vector spaces that are transformed by l -th degree Wigner-D matrices will be referred to as type- l steerable vector spaces and denoted with V l .
We note that we can combine two independent steerable vector spaces
V l 1 and V l 2 of type l 1 and l 2 by the direct sum, denoted by V =
V l 1 ⊕ V l 2 .
Such a combined vector space then transforms by the direct sum of Wigner D-matrices, i.e., via D ( g )
=
D ( l 1 ) ( g ) ⊕ D ( l 2 ) ( g ) , which is a block-diagonal matrix with the Wigner-D matrices along the diagonal.
We denote the direct sum of type- l vector spaces up to degree l = L by V L :=
V 0 ⊕ V 1 ⊕ · · · ⊕ V L , and n copies of the the same vector space with nV := V ⊕ V ⊕ . . .
⊕ V (cid:124)
[Equation]
Regular MLPs are based on transformations between d -dimensional type-0 vector spaces i.e., R d = dV 0 , and are a special case of our steerable
MLPs that act on steerable vector spaces of arbitrary type.
Steerable MLPs.
Like regular MLPs, steerable MLPs are constructed by interleaving linear mappings (matrix-vector multiplications) with non-linearities.
Now however, the linear maps transform between steerable vector spaces at layer i − 1 to layer i via ˜ h
i =
W i ˜ a ˜ h
i − 1 .
Steerable MLPs thus have the same functional form as regular MLPs, although, in our case, the linear transformation matrices W i ˜ a , deﬁned below, are conditioned on geometric information (e.g. relative atom positions) which is encoded in the steerable vector ˜ a .
Both vectors ˜ a and ˜ h are steerable vectors.
In this work we will however use the vector ˜ a to have geometric and structural information encoded and the steer the information ﬂow of ˜ h through the network.
In order to guarantee that W i ˜ a maps between steerable vector spaces, the matrices are deﬁned via the Clebsch-Gordan tensor product.
By construction the resultant MLPs are equivariant for every transformation parameter g via
[Equation]
provided that the steerable vectors ˜ a that condition the MLPs are also obtained equivariantly.
Spherical harmonic embedding of vectors.
We can convert any vector x ∈ R 3 into a type- l vector through the evaluation of spherical harmonics Y ( l ) m : S 2 → R at x (cid:107) x (cid:107) .
For any x ∈ R
[Equation]
is a type- l steerable vector.
The spherical harmonic functions Y ( l ) m are functions on the sphere Sand we visualise them as such in Figure 2.
We will use spherical harmonic embeddings to include geometric and physical information into steerable MLPs.
Mapping between steerable vector spaces.
The Clebsch-Gordan (CG) tensor product ⊗ cg :
V l 1 × V l 2 → V l is a bilinear operator that combines two O( 3 ) steerable input vectors of types l 1 and l 2 and returns another steerable vector of type l .
Let ˜ h ( l ) ∈
V l = R 2 l +1 denote a steerable vector of type l and h ( l ) m its components with m = − l, − l + 1 , . . .
, l .
The CG tensor product is given by
[Equation]
in which w is a learnable parameter that scales the product, and C ( l,m
[Equation]
l
[Equation]
m 2 ) are the ClebschGordan coefﬁcients that ensure that the resulting vector is type- l steerable.
The CG tensor product is a sparse tensor product, as generally many coefﬁcients are zero.
Most notably, C ( l,m ) ( l 1 ,m 1 )( l 2 ,m 2 ) =
whenever l < | l 1 − l 2 | or l > l 1 + l 2 .
While Eq.
(5) only describes the product between steerable vectors of a single type, e.g. ˜ h
( l 1 ) ∈
V l 1 and ˜ h
( l 2 ) ∈
V l 2 , it is directly extendable to mixed type steerable vectors that may have multiple channels/multiplicities within a type.
In this case, every input to output sub-vector pair gets its own index in a similar way as the weights in a standard linear layer are indexed with input-output indices.
We then denote the CG product with ⊗ W cg with boldfaced
W to indicate that it is parametrised by a collection of weights.
In order to stay close to standard notation used with MLPs, we treat the CG product with a ﬁxed vector ˜ a in one of its inputs as a steerable linear layer conditioned on ˜ a , denoted with
[Equation]
where the latter indicates that the CG weights depend on some quantity d , e.g. relative distances.
Steerable activation functions.
The common recipe for deep neural networks is to alternate linear layers with element-wise non-linear activation functions.
In the steerable setting, careful consideration is required to ensure that the activation functions are equivariant; currently available classes of activations include Fourier-based (Cohen et al., 2018), norm-altering (Thomas et al., 2018), or gated non-linearities (Weiler et al., 2018).
We use gated non-linearities in all our architectures and shortly discuss their working principle in Sec.
C in the appendix.
The resulting steerable MLPs themselves in turn provide a new class of steerable activation functions, that is the ﬁrst in its kind in directly leveraging local geometric cues.
Namely, through steerable node attributes ˜ a , either derived from the physical setup (forces, velocities) or from predictions (similar to gating).
The MLPs can be applied node-wise and be generally used in steerable feature ﬁelds as non-linear activations.
2. S TEERABLE E( 3 ) E QUIVARIANT G RAPH N EURAL N ETWORKS
We extend the message passing equations (1)-(2) and deﬁne a message passing layer that updates steerable node features ˜ f i ∈ V L at node v i via the following steps:
[Equation]
Here, (cid:107) x
j − x i (cid:107) 2 is the squared relative distance between two nodes v i and v j , φ m and φ f are O( 3 ) steerable MLPs, ˜ a ij ∈ V L and ˜ a i ∈ V L are steerable edge and node attributes.
If additional attributes exist, such as pair-wise distance (cid:107) x j − x i (cid:107) , they can either be concatenated to the attributes that condition our steerable MLPs, or as is more commonly done (Sec. 3) add as inputs to φ m and φ f .
We do the latter, and stack all inputs to a single steerable vector by which the steerable MLP layer is given: ˜ h
1 = σ ( W ˜ a ij ˜ h
i ) , with ˜
h
i = (cid:16) ˜ f
i , ˜ f j , (cid:107) x
j − x i (cid:107) 2 (cid:17) ∈
V f ⊕ V f ⊕ V 0 , where V f is the user speciﬁed steerable vector space of node representations.
The message network φ m is steered via edge attributes ˜ a ij , and the node update network φ f is similarly steered via node attributes ˜ a i .
Injecting geometric and physical quantities.
In order to make SEGNNs more expressive, we include geometric and physical information in the edge and node updates.
For that purpose, the edge attributes are obtained via the spherical harmonic embedding (Eq.
(4)) of relative positions, in most cases, but possibly also relative force or relative momentum.
The node attributes could e.g. be the average edge embedding of relative positions over neighbours of a node, i.e., ˜ a i =
[Equation]
|
[Equation]
and could additionally include node force, spin or velocities, as we do in the N-body experiment.
The use of steerable node attributes in the steerable MLPs that deﬁne φ f allows us to not just integrate geometric cues into the message functions, but also leverage it in the node updates.
We observe that the more geometric and physical quantities are injected the better SEGNNs perform.
M ESSAGE P ASSING AS C ONVOLUTION , R ELATED W ORK
Recent literature shows a trend towards building architectures that improve performance by means of maximally preserving equivariance through groups convolutions (either in regular or tensor-product form, see App. B).
Convolutions, however, are ”just” linear operators and non-linearities are only introduced through point-wise activation functions.
This is in contrast to architectures that are built without explicit use of group convolutions, but instead rely on the highly non-linear framework of message passing.
In the following we show that many related works are connected through a notion of non-linear convolution , a term that we coin based on the following.
Any linear operator which is equivariant is a group convolution (Kondor & Trivedi, 2018; Bekkers, 2019) and their discrete implementations can be written in message passing form.
We then call any non-linear operator that is equivariant, and which can be written in simple message passing form, a non-linear convolution .
This framing allows us to place related work in a unifying context and to identify two important aspects of successful architectures: (i) equivariant layers improve upon invariant ones and (ii) non-linear layers improve upon linear ones.
Both come together in SEGNNs via steerable non-linear convolutions.
Point convolutions as equivariant linear message passing.
Consider a feature map f : R d → R c l .
A convolution layer (deﬁned via cross-correlation) with a point-wise non-linearity σ is given by
[Equation]
with W : R d → R c l +1 × c l a convolution kernel that provides for every relative position a matrix that linearly transforms features from R c l to R c l +1 .
Point convolutions , generally referred to as
PointConvs (Wu et al., 2019), and SchNet (Kristof et al., 2017) implement Eq.
(9) on point clouds.
For a sparse input feature map consisting of location-feature pairs ( x i , f i ) , the point convolution is given by f (cid:48)
i = (cid:80) j ∈N ( i ) W ( x j − x i ) f
i , which describes a linear message passing layer of Eqs.
(1)-(2) in which the messages are m ij = W
( x j − x i )
f j and the message update f (cid:48) i =
(cid:80)
j m ij .
In the above convolutions, the transformation matrices W are conditioned on relative positions x j − x i , which is typically done in one of the following three approaches.
(i) Classically, feature maps are processed on dense regular grids with shared neighbourhoods and thus the transformations W ij can be stored for a ﬁnite set of relative positions x j − x i in a single tensor.
This method however does not generalise to non-uniform grids such as point clouds.
Continuous kernel methods parametrise the transformations either by (ii) expanding W into a continuous basis or (iii) directly parametrising them with MLPs via W ( x j − x i ) =
MLP ( x j − x i ) .
Steerable kernel methods 3 are of type (ii) and rely on a steerable basis , such as 3D spherical harmonics Y ( l ) m , via
[Equation]
with basis coefﬁcients W ( l ) m typically depending on pair-wise distances.
We next show how such kernels connect to steerable group convolutions and provide a detailed background in App.
B.
Steerable (group) convolutions.
In context of the steerable framework of Sec. 2, linear feature transformations W are equivalent to steerable linear transformations (Eq.
(6)) conditioned on the scalar “1”.
I.e, with h i ∈
R d in the usual and ˜ h ∈ dV 0 the steerable setting, messages are obtained by
[Equation]
When the transformations are parametrised in a steerable basis (10) we can make the identiﬁcation
[Equation]
in which ˜ a ij = Y ( l ) m ( x j − x i ) are spherical harmonic embeddings (Eq.
(4)) of x j − x i , and the weights that parametrise the CG tensor product depend on pair-wise distances.
We can thus perform convolutions either in the regular or in the steerable setting, where the latter has the beneﬁt of allowing us to directly derive what the convolution result would be if the kernel were to be rotated via
[Equation]
Steerable vectors obtained via convolutions with steerable kernels thus generate signals on O(3) via the Wigner-D matrices.
This relation is in fact established by the inverse Fourier transform on O(3) (cf.
App.
A), by which we can treat steerable feature vectors ˜ f
i at each location x i as a function on the group O(3).
Steerable convolutions thus produce feature maps on the full group E(3) that for every possible translation/position x and rotation R provide a feature response f
( x , R ) .
It is precisely this mechanism of transforming convolution kernels via the group action (via W ( g − 1 · x j ) =
W ( R − 1 ( x j − x ) ) that underlies group convolutions (Cohen & Welling, 2016).
Message passing via explicit kernel rotations (l.h.s.
of (13)) corresponds to regular group convolutions , and via steerable transformations (r.h.s.
of (13))
to steerable group convolutions .
The equivariant steerable methods (Thomas et al., 2018; Anderson et al., 2019; Miller et al., 2020;
Fuchs et al., 2020) that we compare against in our experiments can all be written in convolution form
[Equation]
where, in the latter case, the linear transformations additionally depend on an input dependent attention mechanism as in (Anderson et al., 2019; Fuchs et al., 2020), and can be seen as a steerable
PointConv version of attentive group convolutions (Romero et al., 2020).
In these attention-based cases, convolutions are augmented with input dependent weights α via W ˜ a ij (˜ f i , ˜ f
j , (cid:107) x
j − x i (cid:107) )
=
α (˜ f i , ˜ f j ) W ˜ a ij ( (cid:107) x
j − x i (cid:107) ) .
This makes the convolution non-linear, however, the transformation of input features still happens linearly and thus describes what one may call a pseudo-linear transformation.
Finally, the recently proposed LieConv (Finzi et al., 2020) and NequIP (Batzner et al., 2021) also fall in the convolutional message passing class.
LieConv is a PointConv-type variation of regular group convolutions on Lie groups (Bekkers, 2019).
NeuqIP follows the approach of Tensor Field
Networks (Thomas et al., 2018), and weighs interactions using an MLP with radial basis functions as input.
These functions are obtained as solution of the Schr¨odinger equation.
Finally, steerable methods fall into a more general class of coordinate independent convolutions (Weiler et al., 2021) which allow to ensure equivariance locally, even when global symmetries can not be deﬁned.
Equivariant message passing as non-linear convolution.
EGNNs (Satorras et al., 2021) are equivariant to transformations in E( n ) and outperform most aforementioned steerable methods.
This is somewhat surprising as it sends invariant messages, which are obtained via MLPs of the form
[Equation]
where h i =
( f i , f j , (cid:107) x
j − x i (cid:107) 2 ) .
These messages resemble the convolutional messages of point convolutions due to their dependency on relative positions.
There are, however, two important differences: (i) the messages are non-linear transformations of the neighbouring feature values f j via an MLP and (ii) the messages are only conditioned on the distance between point pairs, and are therefore E( n ) invariant.
As such, we regard EGNN layers as non-linear convolutions with isotropic message functions (the non-linear counterpart of rotationally invariant kernels).
In our work, we lift the isotropy constraint and generalise to non-linear steerable convolutions via messages of the form
[Equation]
with ˜ h
i =
(˜ f i , ˜ f j , (cid:107) x
j − x i (cid:107) 2 ) ∈
V f ⊕ V f ⊕ V 0 .
The MLP is then conditioned on attribute ˜ a ij , which could e.g. be a spherical harmonic embedding of x j − x i .
This allows for the creation of messages more general than those found in convolution, while carrying covariant geometrical information.
Related equivariant message passing methods.
A different but also fully message passing based approach can be found in Geometric Vector Perceptrons (GVP)
(Jing et al., 2020),
Vector
Neurons (Deng et al., 2021), and PaiNN (Sch¨utt et al., 2021).
Compared to SEGNNs which treat equivariant information as fully steerable features, these architectures update scalar-valued attributes using the norm of vector-valued attributes, and therefore with O( 3 ) invariant information.
These methods restrict the ﬂow of information between attributes of different types, whereas the ClebschGordan tensor product in SEGNNs allows for interaction between spherical harmonics of all orders throughout the network.
Methods such as Dimenet++ (Klicpera et al., 2020), SphereNet (Liu et al., 2021), and GemNet (Klicpera et al., 2021) incorporate relative orientation in a second-order message passing scheme that considers angles between the central point and neighbours-of-neighbours.
In contrast, our method directly leverages angular information in a ﬁrst-order message passing scheme using steerable vectors. We attribute the success of such methods to the fact that they equivariantly process point clouds of local orientations ( x i , r ij ) ∈
R 3 × S 2 , deﬁned by relative positions between atoms, by sending messages between edges (local orientations) rather than nodes. As such, they can be thought of as non-linear regular group convolutions on the homogeneous space of positions and orientations ( R 3 × S 2 ) with isotropic (zonal) message functions, where the symmetry constraint is induced by the quotient R 3 × S 2 ≡ SE (3) / SO (2) (Bekkers, 2019, Thm. 1).
E XPERIMENTS
Implementation details.
The implementation of SEGNN’s O(3) steerable MLPs is based on the e3nn library (Geiger et al., 2021a).
We either deﬁne the steerable vector spaces as V = nV L = l max (N-body, QM9 experiments), i.e., n copies of steerable vector spaces up to order l max , or by dividing an n -dimensional vector space V into L approximately equally large type- l sub-vector spaces (OC experiments) as is done in Finzi et al.
Furthermore, for a fair comparison between experiments with different l max , we choose n such that the total number of weights in the CG products corresponds to that of a regular (type-0) linear layer.
Further implementation details are in App.
C.
SEGNN architectures and ablations.
We consider several variations of SEGNNs.
On all tasks we have at least one fully steerable ( l f > 0 , l a > 0 ) SEGNN tuned for the speciﬁc task at hand.
We perform ablation experiments to investigate two main principles that sets SEGNNs apart from the literature.
A
The case of non-steerable vs steerable EGNNs is obtained by applying the same SEGNN network with different speciﬁcations of maximal spherical harmonic order in the feature vectors ( l f ) and the attributes ( l a ).
EGNN (Satorras et al., 2021) arises as a special case with l f
=
l
a = 0 .
These models will be labelled SEGNN.
A2 In this ablation, we use steerable equivariant point conv methods (Thomas et al., 2018) with messages as in Eq.
(14) and regular gated non-linearities as activation/update function, labelled SE linear , and compare it to the same network but with messages obtained in a non-linear manner via 2-layer steerable MLPs as in Eq.
(16), labelled as SE non-linear .
N-body system.
The charged N-body particle system experiment (Kipf et al., 2018) consists of 5 particles that carry a positive or negative charge, having initial position and velocity in a 3dimensional space.
The task is to estimate all particle positions after 1.000 timesteps.
We build upon the experimental setting introduced in (Satorras et al., 2021).
Steerable architectures are designed such that the parameter budget at l f = 1 and l a = 1 matches that of the EGNN implementation.
We input the relative position to the center of the system and the velocity as vectors of type l = 1 with odd parity.
We further input the norm of the velocity as scalar, which altogether results in an input [Table] vector ˜ h ∈ V 0 ⊕ V 1 ⊕ V 1 .
The output is embedded as difference vector to the initial position (odd parity), i.e. ˜ o ∈ V 1 .
In doing so, we keep E( 3 ) equivariance for vector valued inputs and outputs.
The edge attributes are obtained via the spherical harmonic embedding of x j − x i as described in
Eq. 4.
Messages additionally have the product of charges and absolute distance included.
SEGNN architectures are compared to steerable equivariant (SE linear ) and steerable non-linear point conv methods (SE non-linear ).
Results and ablation studies are shown in Tab. 1.
A full ablation is outlined in App.
C. Steerable architectures obtain the best results for l f = 1 and l a = 1 , and don’t beneﬁt from higher orders of l f and l a .
We consider a ﬁrst SEGNN architecture where the node attributes are the averaged edge embeddings, i.e. mean over relative orientation, labelled SEGNN G since only geometric information is used.
The second SEGNN architecture has the spherical harmonics embedding of the velocity added to the node attributes.
It can thus leverage geometric (orientation) and physical (velocity) information, and is consequently labelled SEGNN G+P .
Including physical information in addition to geometric information in the node updates considerably boosts SEGNN performance.
We further test SEGNNs on a gravitational 100-body system (Sec.
C.2 in the appendix).
QM9.
The QM9 dataset (Ramakrishnan et al., 2014; Ruddigkeit et al., 2012) consists of small molecules up to 29 atoms, where each atom is described with 3D position coordinates and one-hot mode embedding of its atomic type (H, C, N, O, F).
The aim is to regress various chemical properties for each of the molecules, optimising on the mean absolute error (MAE) between predictions and ground truth.
We use the dataset partitions from Anderson et al.
Table 2 shows SEGNN results on the QM9 dataset.
In Table 3, we show that by steering with the relative orientation between atoms we observe that for higher (maximum) orders of steerable feature vectors, the performance increases, especially when a small cutoff radius is chosen.
While previous methods use relatively large cutoff radii of 4.5-11 ˚A, we use a cutoff radius of
˚A. Doing so results in a sharp reduction of the number of messages per layer, as shown in App. C. Tables 2 and 3 together show that SEGNNs outperform an architecturally comparable baseline EGNN, whilst stripping away attention modules from it and reducing graph connectivity from fully connected to only 2 ˚ A distant atoms.
It is however apt to note that runtime is still limited by the relatively expensive calculation of the Clebsch-Gordan tensor products.
We further note that SEGNNs produce results on par with the best performing methods on the non-energy variables, however lag behind state of the art on the energy variables ( G , H , U ,
U 0 ).
We conjecture that such targets could beneﬁt from more involved (e.g. including attention or neighbour-neighbour interactions) or problem-tailored architectures, such as those compared against.
OC20.
The Open Catalyst Project OC20 dataset (Zitnick et al., 2020; Chanussot et al., 2021), consists of molecular adsorptions onto surfaces.
We focus on the Initial Structure to Relaxed Energy (IS2RE) task, which takes as input an initial structure and targets the prediction of the energy in the ﬁnal, relaxed state.
The IS2RE training set consists of over 450,000 catalyst adsorbate combinations with 70 atoms on average.
Optimisation is done for MAE between the predicted and ground truth energy.
Additionally, performance is measured in the percentage of structures in which the predicted energy is within a 0 .
02 eV threshold (EwT).
The four test splits contain in-distribution (ID) catalysts and adsorbates, out-of-domain adsorbates (OOD Ads), out-of-distribution catalysts (OOD Cat), and out-of-distribution adsorbates and catalysts (OOD Both).
Table 4 shows SEGNN results on the OC dataset and comparisons with existing methods.
We compare to models which have obtained results by training on the IS2RE training set such as SphereNet (Liu et al., 2021) and DimeNet++ (Klicpera et al., 2019; 2020).
The best SEGNN performance is seen for l f = 1 and l a = 1 (see App. C).
A full ablation study, comparing performance and runtime for different orders l f and l a is found in App. C).
[Table]
[Table] [Table]
C ONCLUSION
We have introduced SEGNNs which generalise equivariant graph networks, such that node and edge information is not restricted to be invariant (scalar), but can also be vector- or tensor-valued.
SEGNNs are the ﬁrst networks which allow the steering of node updates by leveraging geometric and physical cues, introducing a new class of equivariant activation functions.
We demonstrate the potential of
SEGNNs by applying it to a wide range of different tasks.
Extensive ablation studies have further shown the beneﬁt of steerable over non-steerable (invariant) message passing, and the beneﬁt of non-linear over linear convolutions.
On the OC20 ISRE taks , SEGNNs outperform all competitors.
R EPRODUCIBILITY S TATEMENT
We have included error bars, reproducibility checks and ablation studies wherever we found it necessary and appropriate.
For example, for the N-body experiment we have reproduced the results of Satorras et al.
(2021), we have ablated different (maximum) orders of steerable feature vectors, and we have stated mean and standard deviation of the results which we have obtained by running the same experiments eight times with different initial seeds.
For the OC20 experiments, we have stated ofﬁcial numbers from the Open Catalyst Project challenge in the paper.
Thus, our comparisons to other methods are obtained from their respective best entries to the challenge.
We have further ablated runtimes, different cutoff radii and different (maximum) orders of steearable feature vectors, see
Sec.
C in the appendix.
We have done this by running the experiments eight times with different initial random seeds to be able to report mean and standard deviation of the results.
For the reproducibility of the QM9 experiments, we have uploaded our code and included a command which reproduces results of the α variable.
We have described our architecture in Sec. 2.1 and provided further implementation details in
Appendix Section C. We have not introduced new mathematical results.
However, we have used concepts from different mathematical ﬁelds and therefore included a self-contained mathematical exposition in our appendix.
We have further included proof of equivariance and properties of Wigner
D matrices and spherical harmonics in the appendix.
In Sec. 3, we have introduced a unifying view on various equivariant graph neural networks through the deﬁnition of non-linear convolutions, which allows us to draw comparisons with many other methods; we verify our ﬁndings in the N-body experiments of Sec. 4.
E THICAL S TATEMENT
The societal impact of SEGNNs is difﬁcult to predict.
However, SEGNNs are well suited for physical and chemical modeling and therefore potential shortcuts for computationally expensive simulations.
And if used as such, SEGNNs might potentially be directly or indirectly related to reducing the carbon footprint.
On the downside, relying on simulations always requires rigorous cross-checks and monitoring, especially when simulations or simulated quantities are learned.
A CKNOWLEDGMENTS
Johannes Brandstetter thanks the Institute of Advanced Research in Artiﬁcial Intelligence (IARAI) and the Federal State Upper Austria for the support.
This work is part the research programme VENI (grant number 17290), ﬁnanced by the Dutch Research Council (NWO).
The authors thank Markus
Holzleitner for helpful comments on this work
A M ATHEMATICAL BACKGROUND
This appendix provides the mathematical background and intuition for steerable MLPs.
We remark that the reader may appreciate several related works, such as, (Thomas et al., 2018; Anderson et al., 2019;
Fuchs et al., 2020), as excellent alternative resources 5 to get acquainted with the group/representation theory used in this paper.
In this appendix we introduce the theory from our own perspective which is tuned towards the idea of steerable MLPs and our viewpoint on group convolutions.
It provides complementary intuition to the aforementioned resources.
The main concepts explained in this appendix are:
Group deﬁnition and examples of groups (Section A.1).
The entire framework builds upon notions from group theory and as such a formal deﬁnition is in order.
In this paper, we model transformations such as translation, rotation and reﬂection as groups.
Invariance , equivariance and representations (Section A.2).
A function is said to be invariant to a transformation if its output is unaffected by a transformation of the input.
A function is said to be equivariant if its output transforms predictably under a transformation of the input.
In order to make the deﬁnition precise, we need a deﬁnition of representations; a representation formalises the notion of transformations applied to vectors in the context of group theory.
Steerable vectors , Wigner-D matrices and irreducible representations (Section A.3).
Whereas regular MLPs work with feature vectors whose elements are scalars, our steerable
MLPs work with feature vectors
consisting
of steerable feature vectors
Steerable feature vectors
are vectors that transform via so-called
Wigner
-D matrices , which are representations of the orthogonal group O
Wigner
D matrices
are the smallest possible group representations and can be used to deﬁne any representation (or conversely, any representation can be reduced to a tensor product of Wigner-D matrices via a change of basis).
As such, the Wigner-D matrices are irreducible representations.
Spherical harmonics (Section A.4).
Spherical harmonics are a class of functions on the sphere S 2 and can be thought of as a Fourier basis on the sphere.
We show that spherical harmonics are steered by the Wigner-D matrices and interpret steerable vectors as functions on S 2 , which justiﬁes the glyph visualisations used in this paper.
Moreover, spherical harmonics allow the embedding of three-dimensional displacement vectors into arbitrarily large steerable vectors.
Clebsch-Gordan tensor product and steerable MLPs (Section A.5).
In a regular MLP one maps between input and output vector spaces linearly via matrix vector multiplication and applies non-linearities afterwards.
In steerable MLPs one maps between steerable input and steerable output vector spaces via the Clebsch-Gordan tensor product.
Akin to the learnable weight matrix in regular MLPs, the learnable Glebsch-Gordan tensor product is the workhorse of our steerable MLPs.
After these concepts are introduced we will in Section B revisit the convolution operator in the light of the steerable, group theoretical viewpoint that we take in this paper.
In particular, we show that steerable group convolutions are equivalent to linear group convolutions with convolution kernels expressed in a spherical harmonic basis.
With this in mind, we argue that our approach via message passing can be thought of as building neural networks via non-linear group convolutions.
A. G ROUP DEFINITION AND THE GROUPS E( 3 ) AND O( 3 )
Group deﬁnition.
A group is an algebraic structure that consists of a set G and a binary operator · , the group product, that satisﬁes the following axioms: Closure : for all h, g ∈ G we have h · g ∈ G ;
Identity : there exists an identity element e ∈ G ; Inverse : for each g ∈ G there exists an inverse element g − 1 ∈ G such that g − 1 · g = g · g − 1 = e ; and Associativity : for each g, h, i ∈ G we have ( g · h ) · i = g · ( h · i ) .
The Euclidean group E( 3 ).
In this work, we are interested in the group of three-dimensional translations, rotations, and reﬂections which is denoted with E(3), the 3D Euclidean group.
Such transformations are parametrised by pairs of translation vectors x ∈ R 3 and orthogonal transformation matrices
R ∈ O (3) .
The E(3) group product and inverse are deﬁned by
[Equation]
with g = ( x , R ) , g (cid:48) =
( x (cid:48) , R ) ∈ E (3) .
One can readily see that with these deﬁnitions all four group axioms are satisﬁed, and that it therefore deﬁnes a group.
The group product can be seen as a description for how two E( 3 ) transformations parametrised by g and g (cid:48) applied one after another are described by single transformation parametrised by g · g (cid:48) .
The transformations themselves act on the vector space of 3D positions via the group action, which we also denote with · , via
[Equation]
where g = ( x , R ) ∈ E (3) and y ∈ R 3 .
The orthogonal group O( 3 ) and special orthogonal group SO( 3 ).
The group E (3) =
R 3 (cid:111) O
(3) is a semi-direct product (denoted with (cid:111) ) of the group of translations R 3 with the group of orthogonal transformations
O( 3 ).
This means that we can conveniently decompose E( 3 )-transformations in an
O( 3 )-transformation (rotation and/or reﬂection) followed by a translation.
In this work we will mainly focus on dealing with O( 3 ) transformations as translations are trivially dealt with.
When representing the group elements of O( 3 ) with matrices R , as we have done before, the group product and inverse are simply given by the matrix-product and matrix-inverse.
I.e., with g = R , g (cid:48)
=
R (cid:48) ∈ G
=
O (3) the group product and inverse are deﬁned by
[Equation]
The group acts on R 3 by matrix-vector multiplication, i.e., g · y :=
Ry .
The group elements of O(3) are square matrices with determinant − 1 or 1 .
Their action on R 3 deﬁnes a reﬂection and/or rotation.
The special orthogonal group SO(3) has the same group product and inverse, but excludes reﬂections.
The group thus consists of matrices with determinant 1 .
The sphere S 2 is a homogeneous space of SO(3).
The sphere is not a group as we cannot deﬁne a group product on S 2 that satisﬁes the group axioms.
It can be convenient to treat it as a homogeneous space of the groups O(3) or SO(3).
A space X is called a homogeneous space of a group G if for any two points x, y ∈
X there exists a group element g ∈ G such that y = g · x .
The sphere S 2 is a homogeneous space of the rotation group SO(3) since any point on the sphere can be reached via the rotation of some reference vector.
Consider for example an XYX parametrisation of SO(3) rotations in which three rotations are applied one after another via
[Equation]
with n x and n y denoting unit vectors along the x and y axis, and R α, n x denotes a rotation of α degrees around axis n x .
We can model points on the sphere in a similar way via Euler angles via
[Equation]
So, with two rotation angles, any point on the sphere can be reached.
In the above we set γ = 0 in the parametrisation of the rotation matrix (an element from SO( 3 )) that rotates the reference vector n x , but it should be clear that with any γ the same point n α,γ is reached.
This means that there are many group elements in SO( 3 ) that all map n x to the same point on the sphere.
A. I NVARIANCE , EQUIVARIANCE AND REPRESENTATIONS
Group representations.
We previously deﬁned the group product, which tells us how elements of a group interact.
We also showed that the groups E( 3 ) and O( 3 ) can transform the three dimensional vector space R 3 via the group action.
We usually think of the groups E( 3 ) and O( 3 ) as groups that describe transformations on R 3 , but these groups are not restricted to transformations on R 3 and can generally act on arbitrary vector spaces via representations.
A representation is an invertible linear transformation ρ ( g ) :
V → V parametrised by group elements g ∈ G that acts on some vector space
V , and which follows the group structure (it is a group homomorphism) via
[Equation]
with v ∈ V .
A representation can act on inﬁnite-dimensional vector spaces such as functions.
E.g., the so-called left-regular representations L g of E( 3 ) on functions f : R 3 → R on R 3 is given by
[Equation]
i.e., it transforms the function by letting g − 1 act on the domain from the left.
Here we used the notation L g [ f ] to indicate that L g transforms the function f ﬁrst, which creates a new function
L ( g )[ f ]( x ) , which is then sampled at x .
When representations transform ﬁnite dimensional vectors v ∈ V = R d , they are d × d dimensional matrices.
In this work, we denote such matrix representations with boldface D .
A familiar example of a matrix representation of O( 3 ) on R 3 are the matrices g
= R ∈ O (3) themselves, i.e., D ( g ) x = Rx .
Finally, any two representations, say D ( g ) and D (cid:48) ( g ) , are equivalent if they relate via a similarity transform via
[Equation]
i.e., such representations describe one and the same thing but in a different basis, and the change of basis is carried out by Q .
Now that representations have been introduced we can formally deﬁne equivariance.
Invariance and equivariance.
Equivariance is a property of an operator φ : X → Y that maps between input and output vector spaces X and Y .
Given a group G and its representations ρ X and ρ Y which transform vectors in X and Y respectively, an operator φ : X → Y is said to be equivariant if it satisﬁes the following constraint
[Equation]
Thus, with an equivariant map, the output transforms predictably with transformations on the input.
One might say that no information gets lost when the input is transformed, merely re-structured.
One way to interpret Eq.
(A.3) is therefore that the operators ρ X ( g ) :
X → X and ρ Y ( g ) :
Y → Y describe the same transformation, but in different spaces.
Invariance is a special case of equivariance in which ρ Y =
I
Y for all g ∈ G .
I.e., an operator φ : X → Y is said to be invariant if it satisﬁes the following constraint
[Equation]
Thus, with an invariant operator, the output of φ is unaffected by transformations applied to the input.
A. S TEERABLE VECTORS , W IGNER -D MATRICES AND IRREDUCIBLE REPRESENTATIONS
One strategy to build equivariant MLPs is to deﬁne input and output spaces of the MLPs and deﬁne how these spaces transform under the action of a group.
This then sets an equivariance constraint on the operator that maps between these spaces.
By only working with such equivariant operators we can guarantee that the entire learning framework is equivariant.
In our work, the proposed graph neural networks are translation equivariant by construction as any form of spatial information only enters the pipeline in the form of relative positions between nodes ( x j − x i ).
Then, any remaining operations are designed to be O( 3 ) equivariant such that, together with the given translation equivariance, the complete framework is fully E( 3 ) equivariant.
Since translations are trivially dealt with, we focus on SO( 3 ) and O( 3 ) and show how to build equivariant
MLPs through the use of the Clebsch-Gordan tensor product.
Wigner-D matrices are irreducible representations.
For SO( 3 ) there exists a collection of representations, indexed with their order l ≥ 0 , which act on vector spaces of dimension 2 l + 1 .
These representations are called Wigner-D matrices and we denote them with D ( l ) ( g ) .
The use of Wigner-D matrices is motivated by the fact that any matrix representation D ( g ) of SO( 3 ) that acts on some vector space V can be “reduced” to an equivalent block diagonal matrix representation with Wigner-D matrices along the diagonal:
[Equation]
with Q the change of basis that makes them equivalent.
The individual Wigner-D matrices themselves cannot be reduced and are hence irreducible representations of SO(3).
Thus, since the block diagonal representations are equivalent to D we may as well work with them instead.
This is convenient since each block, i.e., each Wigner-D matrix D ( l i ) , only acts on a sub-space V l 1 of V .
As such we can factorise V =
V l 1 ⊕ V l 2 ⊕ . .
. , which motivates the use of steerable vector spaces and their direct sums as presented in Sec. 2.
The Wigner-D matrices are the irreducible representations of SO( 3 ), but we can easily adapt these representations to be suitable for O( 3 ) by including the group of reﬂections as a direct product.
We will still refer to these representations as Wigner-D matrices in the entirety of this work, opting to avoid the distinction in favour of clarity of exposition.
We further remark that explicit forms of the Wigner-D matrices can e.g. be found books such as in Sakurai & Napolitano (2017) and their numerical implementations in code libraries such as the e3nn library (Geiger et al., 2021a).
Steerable vector spaces.
The (2 l + 1) -dimensional vector space on which a Wigner-D matrix of order l acts will be called a type l steerable vector space and is denoted with V l .
E.g., a type-3 vector h ∈ V 3 is transformed by g ∈ O (3) via h (cid:55)→ D 3 ( g ) h .
We remark that this deﬁnition is equivalent to the deﬁnition of steerable functions commonly used in computer vision (Freeman et al., 1991; Hel-Or & Teo, 1996) via the viewpoint that steerable vectors can be regarded as the basis coefﬁcients of a function expanded in a spherical harmonic basis.
We elicit this viewpoint in Sec.
A.4 and B.
At this point we are already familiar with type-0 and type-1 steerable vector spaces.
Namely, typevectors h ∈ V
= R are scalars, which are invariant to transformations g ∈ O (3) , i.e., D 0 ( g )
h
= h .
Type-1 features are vectors h ∈ R 3 which transform directly via the matrix representation of the group, i.e., D 1 ( g ) h
= Rh .
A. S PHERICAL HARMONICS
Spherical harmonics.
Related to the Wigner-D matrices and their steerable vector spaces are the spherical harmonics 6 .
Spherical harmonics are a class of functions on the sphere S 2 , akin to the familiar circular harmonics that are best known as the 1D Fourier basis.
As with a Fourier basis, spherical harmonics form an orthonormal basis for functions on S 2 .
In this work we use the real-valued spherical harmonics and denote them with Y ( l ) m : S 2 → R .
Spherical Harmonics are Wigner-D functions.
One can also think of spherical harmonics as functions ˜ Y ( l ) m : SO (3) → R on SO (3) that are invariant to a sub-group of rotations via
[Equation]
in which we used the parametrisation for S 2 and O( 3 ) given in (A.2) and (A.1) respectively.
Then, by deﬁnition, ˜ Y ( l ) m is invariant with respect to rotation angle γ , i.e.., ∀ γ ∈ [0 , 2 π ) :
[Equation]
˜ Y ( l ) m ( R α,β, 0 ) .
This viewpoint of regarding the spherical harmonics as γ -invariant functions on O( 3 ) helps us to draw the connection to the Wigner-D functions D ( l ) mn that make up the 2 l + 1 × 2 l +elements of the Wigner-D matrices.
Namely, the n = 0 column of Wigner-D functions are also γ -invariant and, in fact, correspond (up to a normalisation factor) to the spherical harmonics via
[Equation]
The mapping from vectors into spherical harmonic coefﬁcients is equivariant.
It then directly follows that vectors of spherical harmonics are steerable by the Wigner-D matrices of the same degree.
Let a ( l ) ( n ) :
= ( Y ( l ) − l ( n ) , . . .
, Y ( l ) l ( n ))
T be the embedding of a direction vector n ∈ S 2 in spherical harmonics.
Then this vector embedding is equivariant as it satisﬁes
[Equation]
Using the S 2 and O( 3 ) parametrization of (A.2) and (A.1) this is derived as follows
[Equation]
Steerable vectors represent steerable functions on S 2 .
Just like the 1D Fourier basis forms a complete orthonormal basis for 1D functions, the spherical harmonics Y ( l ) m form an orthonormal basis for L 2 ( S 2 ) , the space of square integrable functions on the sphere.
Any function on the sphere can thus be represented by a steerable vector ˜ a ∈ V 0 ⊕ V 1 ⊕ . . .
when it is expressed in a spherical harmonic basis via
[Equation]
Since spherical harmonics form an orthonormal basis, the coefﬁcient vector a can directly be obtained by taking L 2 ( S 2 ) -inner products of the function f with the spherical harmonics, i.e. ,
[Equation]
Equation (A.9) is sometimes referred to as the Fourier transform on S 2 , and Eq.
(A.8) as the inverse spherical Fourier transform.
Thus, one can identify steerable vectors a with functions on the sphere
S 2 via the spherical Fourier transform.
In this paper, we visualise such functions on S 2 via glyph-visualisations which are obtained as surface plots by taking n ∈ S 2 and scaling it by | f ( n ) | =
sign ( f ( n ))
f ( n ) :
[Equation]
⇐⇒ where each point on this surface is color-coded with the function value f ( n ) .
The visualisations are thus color-coded spheres that are stretched in each direction n via (cid:107) f ( n ) (cid:107) .
Steerable vectors also represent steerable functions on O( 3 ).
In order to draw a connection between group equivariant message passing and group convolutions, as we did in Sec.
3 of the main paper, it is important to understand that steerable vectors also represent functions on the group
SO( 3 ) via an SO( 3 )-Fourier transform.
The collection of (2 l + 1)
Wigner-D functions D ( l ) mn form an orthonormal basis for L 2 ( SO (3)) .
This orthonormal basis allows for a Fourier transform that maps between the function space L 2 ( SO (3)) and steerable vector space V ; the forward and inverse Fourier transform on SO( 3 ) are respectively given by
[Equation]
with d g the Haar measure of the group.
Noteworthy, the forward Fourier transform generates a matrix of Fourier coefﬁcients, rather than a vector in spherical case.
The coefﬁcent matrix is steerable by left-multiplication with the Wigner-D matrices of the same type D ( l ) .
A. C LEBSCH -G ORDAN PRODUCT AND STEERABLE MLP S
In a regular MLP one maps between input and output vector spaces linearly via matrix-vector multiplication and applies non-linearities afterwards.
In steerable MLPs, one maps between steerable input and output vector spaces via the Clebsch-Gordan tensor product and applies non-linearities afterwards.
Akin to the learnable weight matrix in regular MLPs, the learnable Glebsch-Gordan tensor product is the main workhorse of our steerable MLPs.
Clebsch-Gordan tensor product.
The Clebsch-Gordan (CG) tensor product allows us to map between steerable input and output spaces.
While there is much to be said about tensors and tensor products in general, we here intend to focus on intuition.
In general, a tensor product involves the multiplication between all components of two input vectors.
E.g., with two vectors h 1 ∈ R d 1 and h 2 ∈ R d 2 , the tensor product is given by
[Equation]
which we can ﬂatten into a d 1 d 2 -dimensional vector via an operation which we denote with vec( h 1 ⊗ h 2 ) .
In our steerable setting we would like to work exclusively with steerable vectors and as such we would like for any two steerable vectors ˜ h 1 ∈ V l 1 and ˜ h 2 ∈ V l 2 , that the tensor product’s output is again steerable with a O( 3 ) representation D ( g ) such that the following equivariance constraint is satisﬁed:
[Equation]
Via the identity vec( AXB ) =
( B T ⊗ A ) vec( X ) , we can show that the output is indeed steerable:
[Equation]
The resulting vector vec( ˜ h 1 ⊗ ˜ h 2 ) is thus steered by a representation D ( g )
=
D ( l 2 ) ( g ) ⊗ D ( l 1 ) ( g ) .
Since any matrix representation of O( 3 ) can be reduced to a direct sum of Wigner-D matrices (see (A.5)), the resulting vector can be organised via a change of basis into parts that individually transform via Wigner-D matrices of different type.
I.e. ˜ h =
vec(˜ h 1 ⊗ ˜ h
) ∈
V =
V 0 ⊕ V 1 ⊕ . .
, with V l the steerable sub-vector spaces of type l .
With the CG tensor product we directly obtain the vector components for the steerable sub-vectors of type l as follows.
Let ˜ h ( l ) ∈
V l = R 2 l +1 denote a steerable vector of type l and h ( l ) m its components with m = − l, − l + 1 , . . .
, l .
Then the m -th component of the type l sub-vector of the output of the tensor product between two steerable vectors of type l 1 and l 2 is given by
[Equation]
, (A.13) in which w is a learnable parameter that scales the product and C ( l,m ) ( l 1 ,m 1 )( l 2 ,m 2 ) are the ClebschGordan coefﬁcients.
The CG tensor product is a sparse tensor product, as generally many of the
C ( l,m ) ( l 1 ,m 1 )( l 2 ,m 2 ) components are zero.
Most notably, C ( l,m ) ( l 1 ,m 1 )( l 2 ,m 2 ) =
whenever l < | l 1 − l 2 | or l > l 1 + l 2 .
E.g., a type-0 and a type-1 feature vector cannot create a type-2 feature vector.
Well known examples of the CG product are the scalar product ( l 1 = 0 , l 2 = 1 , l = 1 ), which takes as input a scalar and a type-1 vector to generate a type-1 vector, the dot product ( l 1 = 1 , l 2 = 1 , l = 0 ) and cross product ( l 1 = 1 , l 2 = 1 , l = 1 ).
Examples of instances of the CG product are:
• The product of two scalars is a CG product which takes as input two type-0 “vectors” to generate another scalar ( l 1 = 0 , l 2 = 0 , l = 0 ).
• The scalar product, which takes as input a scalar and a type-1 vector to generate a typevector ( l 1 = 0 , l 2 = 1 , l = 1 ).
• The dot product, which takes two type-1 vectors as input to produce a scalar ( l 1 = 1 , l 2 = 1 , l = 0 ).
• The cross product, which takes two type-1 vectors as input to produce another type-1 vector ( l 1 = 1 , l 2 = 1 , l = 1 ).
In a standard linear layer, an input vector is transformed via multiplication with the weight matrix, where weights and elements of the input vector are simply multiplied.
For l > 0 elements of the
Clebsch-Gordan tensor product of Eq.
(A.13) more than one mathematical operation is needed for the connection with one weight, as can easily be veriﬁed if h ( l 1 ) m 1 and h ( l 2 ) m 2 are thought of as e.g. typevectors.
This makes calculation of the Clebsch-Gordan tensor product slow for higher order irreps, as can be observed in all experiments.
Steerable MLPs.
The CG tensor product thus allows us to map two steerable input vectors to a new output vector and can furthermore be extended to deﬁne a tensor product between steerable vectors of mixed types.
The CG tensor product can be parametrised by weights where the product is scaled with some weight w for each triplet of types ( l 1 , l 2 , l ) for which the CG coefﬁcients are non-zero 7 .
We indicate such CG tensor products with ⊗ W cg .
While in principle the CG tensor product takes two steerable vectors as input, in this work we mainly use it with one of its input vectors “ﬁxed”.
The CG tensor product can then be regarded as a linear layer that maps between two steerable vector spaces and we denote this W ˜ a ˜ h :
=
˜
h ⊗ W cg ˜ a , with ˜ a the steerable vector that is considered to be ﬁxed.
With this viewpoint we can design MLPs in the same way as we are used to with regular linear layers, and establish clear analogies with convolution layers (Sec. 3 of the main paper).
While in general the CG tensor product between two steerable vectors of type l 1 and l 2 can contain steerable vectors up to degree l = l 1 + l 2 , one typically “band-limits” the output vector by only considering the steerable vectors up to some degree l max .
In our experiments we band-limit the hidden feature representations to l max = l f .
Finally, the amount of interaction between the steerable sub-vectors in the hidden representations of degree ˜ h ∈ V L = l f = V 0 ⊕ V 1 ⊕ . . .
V l f is determined by the maximum order l a of the steerable vector ˜ a on which the steerable linear layer is conditioned.
Namely, the CG tensor product only produces type l steerable sub-vectors for | l f − l a | ≥ l ≤ | l f + l a | .
For example, it is not sensible to embed positions as steerable vectors up to order l a = 5 when the hidden representations are of degree l f = 2 ; the lowest steerable vector type that can be produced with the CG product of a l =sub-vector of ˜ a
with any sub-vector of the hidden representation vector will be l = 3 and since the hidden representations are band-limited to a maximum type of l f = 2 higher order vectors will be ignored.
B S TEERABLE GROUP CONVOLUTIONS
Steerable functions.
Through the equivalence of steerable vectors and spherical functions via the spherical Fourier transform, it is clear that our deﬁnition of steerable vectors coincides with the more common deﬁnition of steerable functions , as commonly used in computer vision (Freeman et al., 1991).
A function f is called steerable (Hel-Or & Teo, 1996) under a transformation group G if any transformation g ∈ G on f can be written as a linear combination of a ﬁxed, ﬁnite set of n basis functions { φ i } : L g f = n (cid:88) i = α i ( g ) φ
[Equation]
in which L g is the left regular representation of the group G that performs the transformation on f (see section A.2).
In case of functions in a spherical harmonic basis, which we denote with f a :
[Equation]
Y lm ( n ) , it directly follows from Eq.
(A.7) that they are steerable via
[Equation]
In terms of the steerable function deﬁnition in Eq.
(B.1), this means that α ( g ) =
D ( g ) a and Φ =
( Y (0)0 , Y (1) − 1 , Y (1)0 , . . . )
T , i.e. the set of basis functions ﬂattened into a vector.
A translation-rotation template machting motivation for (steerable) group convolutions.
The notion of steerability becomes particularly clear when viewed in the computer vision context (Freeman et al., 1991), where one may be interested in detecting visual features under arbitrary rotations.
Let us consider the case of 3D cross-correlations of a kernel k : R 3 → R with an input feature map f : R 3 → R :
[Equation]
We think of such a kernel k as describing a particular visual pattern.
In many applications, we want to detect such patterns under arbitrary rotations.
For example, in 3D medical image data there is no preferred orientation and features (such as blood vessels, lesions, ...) can appear under any angle, and the same holds for particular atomic patterns in molecules.
So ideally, one wants to apply the convolution kernel under all such transformations and obtain feature maps via
[Equation]
By repeating the convolutions with rotated kernels we are able to detect the presence of a certain feature at all possible angles.
In a group convolution context (Cohen & Welling, 2016), the above is what one usually calls a lifting group convolution (Bekkers, 2019) (feature maps are lifted from Rto the group SE (3) ).
Group convolutions.
In regular group convolutional neural networks one continues to work with such higher dimensional feature maps in which the kernels are also functions on the group.
The lifting and subsequent group convolutions then all have the same form and are deﬁned via the group action on R 3 and group product respectively via
[Equation]
where g ∈ SE (3) , d g the Haar measure on the group and where · in (B.5) and (B.6) respectively denote the group action on R 3 and group product of SE (3) (cf.
Section A.1).
Note that Eq.
(B.5) is exactly the same as Eq.
(B.4)
but in different notation.
The lifting group convolution thus generates a function on the joint space of positions R 3 and rotations
SO (3) .
In numerical implementations, this space needs to be discretised, i.e., for a particular ﬁnite grid of rotations we want to store the results of the convolutions for each rotation R .
This approach then requires that the convolution kernel is continuous and can be sampled under all transformations.
Hence, such kernels can be expanded in a continuous basis such as spherical harmonics (Weiler et al., 2018), B-splines (Bekkers, 2019) or they can be parametrised via MLPs (Finzi et al., 2020).
Alternatively, the kernels are only transformed via a sub-group of transformations in E( 3 ) that leaves the grid on which the kernel is deﬁned intact, as in (Worrall & Brostow, 2018; Winkels & Cohen, 2018).
An advantage of regular group convolution methods is that normal point-wise activation functions can directly be applied to the feature maps; a down-side is that these methods are only equivariant to the sub-group on which they are discretised.
When expressing the convolution kernel in terms of spherical harmonics, however, there is no need for such a discretisation at all and one can obtain the response of the convolution at any rotation R after convolving with the basis functions.
This works as follows.
Steerable template matching.
Suppose a 3D convolution kernel that is expanded in a spherical harmonic basis up to degree L as follows
[Equation]
with ˜ c
= ( c (0)0 , c (1) − 1 , c
T the vector of basis coefﬁcients that can depend on (cid:107) x (cid:107) .
The coefﬁcients can e.g. be parametrised with an MLP that takes as input (cid:107) x (cid:107) and returns the coefﬁcient vector.
We note that such coefﬁcients are then O( 3 ) invariant, i.e., ∀ R ∈ O(3) :
˜ c ( (cid:107) Rx (cid:107) ) =
˜ c ( (cid:107) x (cid:107) ) .
Furthermore, we labelled the vector with a “ ˜ ” to indicate it is a steerable vector as it represents the coefﬁcients relative to a spherical harmonic basis.
It then follows (from Eq.
(B.2))
that the kernel is steerable via
[Equation]
i.e., via a transformation of the coefﬁcient vector ˜ c by it O(3)
representation D ( R ) .
This steerability property, together with linearity of the convolutions and basis expansion, implies that with such steerable convolution kernels we can obtain their convolutional response at any rotation directly from convolutions with the basis functions.
Instead of ﬁrst expanding the kernel in the basis by taking a weighted sum of basis functions with their corresponding coefﬁcients, and only then doing the convolutions, we can change this order and ﬁrst do the convolution with the basis functions and sum afterwards.
In doing so we create a vector of responses ˜ f
( x ) =
( f (0)0 ( x ) , f
[Equation]
1) − 1 ( x ) , f
[Equation]
1)0 ( x ) , . . . )
T of which the elements are given by
[Equation]
Then the result with the convolution kernel (Eq.
(B.7)) is obtained simply by a sum over the vector components which we denote with SumReduce l,m as follows
[Equation]
If one were to be interested in the rotated ﬁlter response at x one can ﬁrst rotate the steerable vector ˜ f (cid:48)
( x ) via the matrix representation D ( R ) and only then do the reduction.
I.e., once the convolutions of (B.8) are done the lifting group convolution result is directly obtained via
[Equation]
A convolution with a kernel expressed in a spherical harmonics basis thus generates a signal on O(3) at each point x .
When only considering the m = 0 component for each order l in the kernel parametrisation, the kernels have an axial symmetry in them due to which the convolution results in a point-wise spherical signal.
This is in fact the situation that we consider in our weighted CG products (Eq. 5) where we do not index the weights with m .
This choice leads to computational efﬁciency.
It is however not necessary to constrain the kernels as such and continue with steerable group convolutions on the full space R 3 (cid:111) SO (3) , this would require working with CG products with weights indexed by both m and m (cid:48)
(Weiler et al., 2018).
Since in this work we choose to with steerable vector spaces
V = m 0 V
⊕ m 1 V 1 ⊕ . .
with arbitrary multiplicities m l for each type, we implement what is called generalised steerable convolutions, of which the SO(3) convolutions are a special case with m l = (2 l + 1) (Kondor et al., 2018).
Steerable group convolutions.
When working with steerable convolution kernels one does not have to work with a grid on O(3).
There are reasons to avoid working with a grid on O( 3 ) as one cannot numerically obtain exact equivariance if the chosen grid is not a sub-group of O( 3 ).
When limiting to a discrete subgroups one can guarantee exact equivariance to the sub-group, but ideally one obtains equivariance to the entire group O( 3 ).
Steerable methods provide a way to build neural networks entirely independent of any sampling on O( 3 ), since, as we have seen, steerable convolutions directly result in functions on the entire group
O( 3 ) via steerable vectors.
That is, at each location x we have a steerable vector ˜ f
( x ) which represents a function on O( 3 ) via the inverse Fourier transform given in Eq.
(A.11).
In fact, the sum reduction in Eq.
(B.9) corresponds to a discrete inverse Fourier transform.
Finally, let us revisit steerable group convolutions one more time but now in the steerable vector notation used throughout this paper.
The steerable convolution, as described in (B.8), is an operator that maps between steerable vector ﬁelds of different types.
In the above example the input feature map was one that only provided a single scalar value per location x , i.e. a type-0 steerable vector, and the output was a steerable vector ﬁeld containing steerable vectors up to type L .
The transition from type-0 vector ﬁeld to a type- L vector ﬁeld happened via tensor products with steerable vectors of spherical harmonics, and this tensor product was parametrised by the coefﬁcients ˜ c .
Suppose a convolution of a single type- l 1 steerable input ﬁeld with a convolution kernel that is expanded in a spherical harmonic basis of only type l 2 via k ( x ) = (cid:80) l 2 m = − l 2 w ( (cid:107) x (cid:107) )
Y ( l ) m (cid:16) x (cid:107) x (cid:107) (cid:17) .
The kernel can then be represented as a steerable vector ﬁeld in itself as ˜ k
( x ) = w ( (cid:107) x (cid:107) )
˜ a ( x ) , with ˜ a the type- lspherical harmonic embedding given in Eq.
5 of the main paper.
Such a steerable convolution maps from input feature maps ˜ f
: R 3 → V l 1 using a convolution kernel ˜ k : R 3 → V l 2 to an output ˜ f (cid:48) :
R 3 → V l via
[Equation]
Here we assumed steerable feature vector ﬁelds of a single type, but in general such convolutions can map between vector ﬁelds of mixed type analogous to the standard convolutional case in CNNs where mappings occur between multi-channel type-0 vector ﬁelds.
Steerable and regular group convolutions.
In conclusion, both steerable and regular group convolutions produce feature maps on the entire group E( 3 ) and they are equivalent when the regular convolution kernel is expanded in a steerable basis.
In regular group convolutions, the response is stored on a particular grid which is e.g. the Cartesian product of a regular 3D grid with a particular discretisation of O( 3 ).
In regular group convolutions, we directly index the responses with ( x , R ) ∈ E (3) (cid:55)→ f
( x , R ) .
In steerable convolutions the ﬁlter responses x → ˜ f ( x ) are stored at each spatial grid point x in steerable vectors ˜ f
( x ) from which functions on the full group O(3) can be obtained via an inverse Fourier transform 8 .
As such one recovers the regular representation via ( x , R ) (cid:55)→ F − 1 [˜ f ( x )]
( R ) .
Regular group convolutions can however not be perfectly equivariant to all transformations in O( 3 ) due to discretisaton artifacts, or they are only equivariant to a discrete sub-group of O( 3 ).
Steerable group convolutions on the other hand are exactly equivariant to all transformations in O( 3 ) via steerable representations of O( 3 ).
C E XPERIMENTS C. P SEUDOCODE OF SEGNN AND ABLATED ARCHITECTURES
In this subsection, we provide pseudocode for our implementation SEGNN and steerable ablations.
Pseudocode for steerable equivariant point conv layers such as (Thomas et al., 2018) with messages as in Eq.
(14) and regular gated non-linearities as activation/update function, labelled SE linear , is outlined in Alg. 1.
Pseudocode for the same network but with messages obtained in a non-linear manner via 2-layer steerable MLPs as in Eq.
(16) is outlined in Alg. 2.
This layer is labelled as SE non-linear .
Finally, pseudocode for SEGNN implementation is provided in Alg.
SEGNN layers allow for the inclusion of geometric and physical quantities via node attributes ˜ a i .
These new node update layers can be regarded as new steerable activation function and allow a functionality which is not possible in layers such as SE linear or SE non-linear .
A more detailed explanation of the Clebsch-Gordan tensor product (CGTensorProduct), the spherical harmonic embedding (SphericalHarmonicEmbedding) and the application of gated non-linearities can be found in the e3nn (Geiger et al., 2021a) library.
Injecting geometric and physical quantities.
In the following algorithms the relative position vector x ij between node f i and node f j is given as an example for a geometric quantity used to steer the message layers.
To get more concrete, we look at Alg.
3 (SEGNN) and discuss edge attributes and node attributes.
Steerable attributes ﬁrst of all have to be embedded via spherical harmonics.
Steerable edge attribute ˜ a ij in most cases consist of relative positions.
Instead of or additional to relative positions also relative forces or relative velocities could be used.
And ﬁnally, also node speciﬁc quantities such as force can be added together to serve as edge attributes.
Steerable node attributes are in most cases real physical quantities.
In Alg.
3 they are sketched with v 1 i and v 2 i , and might comprise velocity, acceleration, spin, or force.
However, also adding the spherical harmonics embedding of relative positions at node f i results in a steerable node attribute.
Lastly, it is to note that if multiple steerable attributes exist they can be either added or concatenated.
However, the latter results in signiﬁcantly more weights in the CG tensor product and does not result in better performance in any of the conducted experiments.
Gated non-linearities.
The gate activation is a direct sum of two sets of irreps.
The ﬁrst set is the set of scalar irreps passed through activation functions.
The second set is the set of higher order irreps, which is multiplied by an additional set of scalar irreps that is introduced solely for the activation layer and passed through activation functions.
For example, in Alg. 1, the scalar irreps g ij are the additional scalar irreps, introduced to “gate” the non-scalar irreps of ˜ m ij .
Algorithm irreps g are used to “gate” introduced in Weiler et al.
A fully documented code for this layer will be applicable in our repo.
Require:
˜ f
i , x ij (cid:46)
Steerable nodes ˜ f
i , relative position vector x ij between node ˜ f i and node ˜ f
j function O3 T ENSOR P RODUCT (input1, input2) output ← CGTensorProduct(input1, input2)
(cid:46)
Apply CG tensor product following Eq.
(6) output ← output + bias (cid:46)
Add bias to zero order irreps return output end function ˜ a ij ← SphericalHarmonicEmbedding( x ij ) (cid:46)
Spherical harmonic embedding of x ij (Eq.
˜
h ij ← ˜ f i ⊕ ˜ f
j ⊕ (cid:107) x ij (cid:107)(cid:46) Concatenate input for messages between ˜ f
i , ˜ f j ˜ m ij ⊕ g ij ← O3 T ENSOR P RODUCT ( ˜ h ij , ˜ a ij ) (cid:46)
[Table]
˜ m i ⊕
g
i ← (cid:88)
j ˜ m ij ⊕ (cid:88)
j g ij (cid:46)
[Table]
˜ f (cid:48)
i ← ˜
f
i + Gate( ˜ m i , Swish( g i ))
(cid:46)
[Table]
linearities (cid:48)
←
Require:
˜ f
i , x ij (cid:46)
Steerable nodes ˜ f
i , relative position vector x ij between node ˜ f i and node ˜ f
j function O3 T ENSOR P RODUCT (input1, input2) output ← CGTensorProduct(input1, input2)
(cid:46)
Apply CG tensor product following Eq.
(6) output ← output + bias (cid:46)
Add bias to zero order irreps return output end function function O3 T ENSOR P RODUCT S WISH G ATE (input1, input2) output ⊕
g
i ← O3 T ENSOR P RODUCT (input1, input2)
(cid:46) Output plus scalar irreps g i output gated ← Gate(output, Swish( g i ))
(cid:46) Transform output via gated non-linearities return output end function ˜ a ij ← SphericalHarmonicEmbedding( x ij ) (cid:46)
Spherical harmonic embedding of x ij (Eq.
˜
h ij ← ˜ f i ⊕ ˜ f
j ⊕ (cid:107) x ij (cid:107)(cid:46) Concatenate input for messages between ˜ f
i , ˜ f j ˜ m ij ← O3 T ENSOR P RODUCT S WISH G ATE ( ˜ h ij , ˜ a ij ) (cid:46)
First non-linear message layer ˜ m
ij ⊕ g ij ← O3 T ENSOR P RODUCT ( ˜ m ij , ˜ a ij ) (cid:46)
Second linear message layer ˜ m i ⊕ g i ← (cid:88)
j ˜ m ij ⊕ (cid:88)
j g ij (cid:46)
Aggregate messages ˜ m ij and irreps g ij ˜ f (cid:48)
i ← ˜
f
i + Gate( ˜ m i , Swish( g i ))
(cid:46) Transform
Require:
˜ f
i , x ij , v 1 i , v 2 i (cid:46)
Steerable nodes ˜ f
i , relative position vector x ij between node ˜ f i and node ˜ f j , geometric or physical quantities v 1 i , v 2 i such as velocity, acceleration, spin, or force.
function O3 T ENSOR P RODUCT (input1, input2) output ← CGTensorProduct(input1, input2)
(cid:46)
Apply CG tensor product following Eq.
(6) output ← output + bias (cid:46)
Add bias to zero order irreps return output end function function O3 T ENSOR P RODUCT S WISH G ATE (input1, input2) output ⊕
g
i ← O3 T ENSOR P RODUCT (input1, input2)
(cid:46) Output plus scalar irreps g i output gated ← Gate(output, Swish( g i ))
(cid:46) Transform output via gated non-linearities return output end function ˜ a ij ← SphericalHarmonicEmbedding( x ij ) (cid:46)
Spherical harmonic embedding of x ij (Eq.
˜ v 1 i ← SphericalHarmonicEmbedding( v 1 i ) (cid:46)
Spherical harmonic embedding of v 1 i (Eq.
˜ v 2 i ← SphericalHarmonicEmbedding( v 2 i ) (cid:46)
Spherical harmonic embedding of v 2 i (Eq.
˜
a
i ← (cid:88)
j ˜ a ij + ˜ v 1 i + ˜ v 2 i (cid:46)
Node attributes ˜ h ij ← ˜ f
i ⊕ ˜ f
j ⊕ (cid:107) x ij (cid:107)(cid:46) Concatenate input for messages between ˜ f
i , ˜ f j ˜ m ij ← O3 T ENSOR P RODUCT S WISH G ATE ( ˜ h ij , ˜ a ij ) (cid:46)
First non-linear message layer ˜ m ij ← O3 T ENSOR P RODUCT S WISH G ATE ( ˜ m ij , ˜ a ij ) (cid:46)
Second non-linear message layer ˜ m i ← (cid:88)
j ˜ m ij (cid:46)
Aggregate messages ˜ m ij ˜ f
(cid:48)
i ← O3 T ENSOR P
RODUCT S WISH G ATE ( ˜ f i ⊕ ˜ m i , ˜ a i ) (cid:46)
First non-linear node update layer ˜ f (cid:48)
i ← ˜
f
i + O3 T ENSOR P RODUCT ( ˜ f (cid:48)
i , ˜ a i ) (cid:46)
Second linear node update layer
C. E XPERIMENTAL DETAILS
Compared methods.
We compared against methods discussed in Sec.
3 of the main paper, namely
NMP (Gilmer et al., 2017), SchNet (Kristof et al., 2017),
Cormorant (Anderson et al., 2019),
L1Net (Miller et al., 2020), LieConv (Finzi et al., 2020), TFN (Thomas et al., 2018), SE(3)- transformer (Fuchs et al., 2020), and EGNN (Satorras et al., 2021).
We additionally compare to CGCNN (Xie & Grossman, 2018), PaiNN (Sch¨utt et al., 2021), Dimenet++ (Klicpera et al., 2020) and SphereNet (Liu et al., 2021).
Implementation details for N-body dataset.
SEGNN architectures, point conv methods (SE linear ), and steearable non-linear point conv methods (SE non-linear ) consist of three parts (sequentially applied):
Embedding network:
Input → { CG ˜ a i → SwishGate → CG ˜ a i } , wherein CG ˜ a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which are applied per node.
Four message passing layers as described in Sec. 2.1 for SEGNN architectures andconvolution layers for SE linear and SE non-linear ablations.
A prediction network: { CG 0˜ a i → Swish → Linear → MeanPool → Linear → Swish → Linear } , in which CG 0 ˜ a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which maps to a vector of 64 scalar (type-0) features.
The remaining layers are regular linear layers, as in Satorras et al.
CG 0˜
a i and Linear are applied per node.
All steerable architectures are designed such that the parameter budget at l f = 1 and l a =matches that of the tested EGNN implementation.
We optimise models using the Adam optimiser (Kingma & Ba, 2014) with learning rate 1e-4, weight decay 1e-8 and batch size 100 for 10000 epochs and minimise the mean absolute error. .
The SwishGate refers to a gated non-linearity (Weiler et al., 2018)
when l > 0 , and a swish activation (Ramachandran et al., 2017) otherwise.
A message network φ m consists of { CG ˜ a ij → SwishGate → CG ˜ a ij → SwishGate } , while the update network φ f consists of { CG ˜ a i → SwishGate → CG ˜ a i → InstanceNorm } , with an instance normalisation (Ulyanov et al., 2016) implementation that is compatible with steerable vectors, based on the BatchNorm implementation of the e3nn library (Geiger et al., 2021a).
In the default setting, however, the instance normalisation is turned off.
We use skip-connections in the message passing layers, adapting Eq.
(8) to yield ˜ f (cid:48) i =
˜
f
i + φ f
(˜ f i , (cid:80) j ˜ m ij , ˜ a i ) .
The convolution layers which are used instead of the message passing layers for SE linear and SE non-linear ablations consist of:
• SE linear : { CG ˜ a ij → (cid:80) j ∈N ( i ) → SwishGate → InstanceNorm } • SE non-linear : { CG ˜ a ij → SwishGate → CG ˜ a ij → (cid:80) j ∈N ( i ) → SwishGate → InstanceNorm }
[Table] [Table]
Gravitational N-body dataset.
The gravitational 100-body particle system experiment is a selfdesigned toy experiment, which is conceptually similar to the charged N-body experiment described in the main paper.
However, we extend the number of particles from 5 to 100, use gravitational interaction, no boundary conditions.
Particle positions are initialised from a unit Gaussian, particle velocities are initialised with norm equal to one and random direction and particle mass is set to one.
Trajectories are generated with by integrating gravitational acceleration in natural units using the leapfrog integrator with δt = 0 .
001 for 5000 steps.
Force smoothing of 0.1 is applied (Dehnen &
Read, 2011).
We predict position or force at step t = 4 given the state at t = 3 .
Such problems are often encountered in physical and astrophysical simulations (Alvaro et al., 2020;
Tobias et al., 2020; Mayr et al., 2021), where usually the force (or acceleration) is used to Euler-update the positions.
Thus, reliable force prediction is of great interest.
An exemplary trajectory is shown in Fig.
C.1.
For the following experiments, we use 10.000 simulation trajectories in the training set, and 2.000 trajectories for the validation and test set, respectively.
The implemented architectures are 4 layer graph neural networks with roughly equal parameter budget, and we train each network for 250 epochs.
The
SEGNN layers are exactly the same as described above for the charged N-body dataset, the EGNN and MPNN layers are the same as described in Satorras et al.
Table C.3 shows results for different numbers of considered interactions (neighbours) for SEGNNs, as well as for message passing networks (MPNNs) and EGNNs.
For SEGNN implementation, we input the relative position to the center of the system and the velocity as vectors of type l = 1 with odd parity.
We further input the norm of the velocity as scalar, which altogether results in an input vector ˜ h ∈ V 0 ⊕ V 1 ⊕ V 1 .
The output is embedded as difference vector to the initial position (odd parity) or the directly predicted force after 1.000 timesteps, i.e. ˜ o ∈ V 1 .
In doing so, we keep E( 3 ) equivariance for vector valued inputs and outputs.
The edge attributes are obtained via the spherical harmonic embedding of x j − x i as described in Eq. 4.
The node attributes comprise the sum of the edge attributes plus the spherical harmonic embedding of the velocity.
The MPNNs take the position and the velocity as input.
Due to the vector-valued inputs and outputs, equivariance is not preserved.
For EGNNs, equivariance is only preserved for the prediction of future positions, for the force prediction it is not.
MPNNs and SEGNN( l f = 0 , l a = 0 ) are conceptually very similar.
Interestingly, MPNNs, which use PyTorch’s Linear operation, are approximately 5 times faster than our SEGNN implementation, which uses Einsum operations.
In general, the position and force prediction for the 100-body problem is intrinsically very difﬁcult due to the wide range of different dynamics, where the main error contributions arise from a few outlier trajectories.
However, aside from unavoidable errors,
SEGNNs generalise much better than default MPNNs or EGNNs do.
The results strongly suggest the applicability of SEGNNs to large physical (simulation) datasets
[Table] [Table]
Implementation details for QM9.
Our QM9 hyperparameters strongly resemble those found in (Satorras et al., 2021), whose architecture we took as a starting point for our own.
The network consists of three parts (sequentially applied):
Embedding network:
Input → { CG ˜ a i → SwishGate → CG ˜ a i } , wherein CG ˜ a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which are applied per node.
Seven message passing layers as described in Sec. 2.1. 3.
A prediction network: { CG 0˜ a i → Swish → Linear → MeanPool → Linear → Swish → Linear } , in which CG 0˜
a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which maps to a vector of 128 scalar (type-0) features.
The remaining layers are regular linear layers, as in Satorras et al.
CG 0˜
a i and Linear are applied per node.
Message network, update network and skip-connections are used as described for the N-body task.
In contrast to the other tasks, the hidden irreps correspond to N copies for every order, selected to correspond to a 128-dimensional linear layer in terms of number of parameters.
We optimise models using the Adam optimiser (Kingma & Ba, 2014) with learning rate 5e-4, weight decay 1e-8 and batch size 128 for 1000 epochs and minimise the mean absolute error.
The learning rate is reduced by a factor of ten at 80 % and 90 % of training.
Targets are normalised by subtracting the mean and dividing by the mean absolute deviation.
We found that pre-processing the molecular graphs for a speciﬁc cutoff radius on QM9 was beneﬁcial.
Figure C.2 shows the number of messages as a function of cutoff radius for the train partition of QM9.
It shows that a network with cutoff radius of 2 ˚ A sends ∼ 6 × fewer messages on average in every layer compared to a cutoff radius of 5 ˚A, with far smaller variance.
Implementation details for the Open Catalyst Project OC20 dataset.
Our OCP hyperparameters resemble those from the N-body task, but with an overall larger network architecture.
The network consists of three parts (sequentially applied):
Embedding network:
Input → { CG ˜ a i → SwishGate → CG ˜ a i } , wherein CG ˜ a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which are applied per node.
Seven message passing layers as described in Sec. 2.1. 3.
A prediction network: { CG 0˜ a i → Swish → Linear → MeanPool → Linear → Swish → Linear } , in which CG 0˜
a i denotes a steerable linear layer conditioned on node attributes ˜ a i and which maps to a vector of 256 scalar (type-0) features.
The remaining layers are regular linear layers, as in (Satorras et al., 2021). CG 0˜ a i and Linear are applied per node.
Message network, update network and skip-connections are used as described for the QM9 tasks.
The input is a 256-dimensional one-hot representation of atom types, all hidden vectors are 256dimensional or their steerable “weight balanced” equivalent (cf Sec. 4), where we divide into equally large type- l sub-vector spaces.
We optimise models using the AdamW optimiser (Loshchilov & Hutter, 2017) with learning rate 1e-4, weight decay 1e-8 and batch size 8 for 20 epochs and minimise the mean absolute error.
The learning rate is reduced by a factor of ten at 50 % and 75 % of training.
Ablation study for the Open Catalyst Project OC20 dataset, speed comparison.
Table C. shows SEGNN ablation of the performance when using different (maximum) orders of steerable features l f and attributes l a , ablation for different cutoff radii of 5 ˚A and 3 ˚A, as well as runtime comparisons.
All results are obtained on the validation set.
The case l a = 0 and l f = 0 corresponds to our EGNN implementation.
The SE linear corresponds to our implementation as outlined in Alg.and can be seen as instance of e.g. TFNs Thomas et al.
All methods have been optimised using roughly the same parameter budget as SEGNNs.
in general do not improve results.
The Dimenet++ runtime is given as reference.
[Table]
4.98 % 2.51 % 4.40 % 2.60 % 0.051 SEGNN ( l f = 2 ,l a = 2 ,3˚A) 0.
5.22 % 2.82 % 4.87 % 2.98 % 0.234 Dimenet++ - - - - - - - - 0.
D L ICENSES
This work would not have been possible without the existence of free software.
As we have built extensively on existing assets, we mention them and their licenses here.
Our codebase uses Python under the PSF License Agreement, using NumPy under the BSD 3-Clause ”New” or ”Revised” License.
Our models were implemented in PyTorch (Paszke et al., 2019)
(BSD license) using CUDA (proprietary license).
We used PyTorch extensions such as PyTorch Geometric (Fey & Lenssen, 2019) (MIT license) and e3nn (Geiger et al., 2021b)
(MIT license).
For tracking runs we used Weights & Biases (Biewald, 2020) (MIT license).
The QM9 (Ramakrishnan et al., 2014; Ruddigkeit et al., 2012) dataset was used under CC0 1.
Universal (CC0 1.0) Public Domain Dedication and OC20 (Chanussot et al., 2020) was used under a
Creative Commons Attribution 4.0 License.
The QM9 dataloaders were adapted from (Anderson et al., 2019) under an Educational and Not-for-Proﬁt Research License.