Learning Lie Group Symmetry Transformations with Neural Networks
The problem of detecting and quantifying the presence of symmetries in
datasets is useful for model selection, generative modeling, and data analysis,
amongst others. While existing methods for hard-coding transformations in
neural networks require prior knowledge of the symmetries of the task at hand,
this work focuses on discovering and characterizing unknown symmetries present
in the dataset, namely, Lie group symmetry transformations beyond the
traditional ones usually considered in the field (rotation, scaling, and
translation). Specifically, we consider a scenario in which a dataset has been
transformed by a one-parameter subgroup of transformations with different
parameter values for each data point. Our goal is to characterize the
transformation group and the distribution of the parameter values. The results
showcase the effectiveness of the approach in both these settings.
Alex Gabel, Victoria Klein, Riccardo Valperga, Jeroen S. W. Lamb, Kevin Webster, Rick Quax, Efstratios Gavves
# Learning Lie Group Symmetry Transformations with Neural Networks

###### Abstract

The problem of detecting and quantifying the presence of symmetries in datasets is useful for model selection, generative modeling, and data analysis, amongst others. While existing methods for hard-coding transformations in neural networks require prior knowledge of the symmetries of the task at hand, this work focuses on discovering and characterizing unknown symmetries present in the dataset, namely, Lie group symmetry transformations beyond the traditional ones usually considered in the field (rotation, scaling, and translation). Specifically, we consider a scenario in which a dataset has been transformed by a one-parameter subgroup of transformations with different parameter values for each data point. Our goal is to characterize the transformation group and the distribution of the parameter values. The results showcase the effectiveness of the approach in both these settings.

Machine Learning, ICML, ICML

## 1 Introduction

It has been shown that restricting the hypothesis space of functions that neural networks are able to approximate using known properties of data improves performance in a variety of tasks (Worrall and Welling, 2019; Cohen et al., 2018; Weiler et al., 2018; Zaheer et al., 2017; Cohen and Welling, 2016). The field of Deep Learning has produced a prolific amount of work in this direction, providing practical parameterizations of function spaces with the desired properties that are also universal approximators of the target functions (Yarotsky, 2022). In physics and, more specifically, time-series forecasting of dynamical systems, symmetries are ubiquitous and laws of motion are often symmetric with respect to various transformations such as rotations and translations, while transformations that preserve solutions of equations of motions are in one way or another associated with conserved quantities (Noether, 1918). In computer vision, successful neural network architectures are often invariant with respect to transformations that preserve the perceived object identity as well as all pattern information, such as translation, rotation and scaling. Many of these transformations are smooth and differentiable, and thus belong to the family of Lie groups, which is the class of symmetries we deal with in this work.

Although methods that hard-code transformations are capable of state-of-the-art performance in various tasks, they all require prior knowledge about symmetries in order to restrict the function space of a neural network. A broad class of, a priori unknown, transformations come into play in the context of modelling dynamical systems and in applications to physics. On the other hand, in vision tasks,

Figure 1: The distribution of transformations in a toy dataset that correspond to the Lie groups of rotation and (isotropic) scaling, given in terms of the parameters degree and scaling factor respectively; crucially, these groups are differentiable and can be (locally) decomposed into one-parameter subgroups.
identity-preserving transformations are often known beforehand. Despite this, these transformations are expressed differently by different datasets. As a result, algorithms for not only _discovering_ unknown symmetries but also _quantifying_ the presence of specific transformations in a given dataset, may play a crucial role in informing model selection for scientific discovery or computer vision, by identifying and describing physical systems through their symmetries and selecting models that are invariant or equivariant with respect to only those symmetries that are _actually_ present in the dataset under consideration.

In this work, we address the problem of qualitatively and quantitatively detecting the presence of symmetries with respect to one-parameter subgroups within a given dataset (see Figure 1). In particular, let \(\phi(t)\) be a one parameter subgroup of transformations. We consider the scenario in which a dataset \(\{x_{i}\}_{i=1}^{N}\) has been acted on by \(\phi(t)\), with a _different_ value of the parameter \(t\) for every point \(x_{i}\). Our goal is to characterise the group of transformations \(\phi(t)\), as well as the _distribution_ from which the parameters \(t\) have been sampled. We propose two models: a naive approach that successfully manages to identify the underlying one-parameter subgroup, and an autoencoder model that learns transformations of a one-parameter subgroup in the latent space and is capable of extracting the overall shape of the \(t\)-distributions. The cost of the latter is that the one-parameter subgroup in the latent space is not necessarily identical to that in pixel space. The work is structured as follows: Section 2 introduces some basic tools from Lie group theory; Section 3 outlines the method; Section 5 provides an overview of the existing methods that are related to our own; and lastly, results are shown in Section 4.

## 2 Background

The theoretical underpinnings of symmetries or invariance can be described using group theory (Fulton and Harris, 1991). In particular, we present the necessary theory of one-parameter subgroups (Olver, 1993) on which our method is based, following the logic of Oliver (2010).

### One-parameter subgroups

We focus on learning invariances with respect to one-parameter subgroups of a Lie group \(G\), which offer a natural way to describe continuous symmetries or invariances of functions on vector spaces.

**Definition 2.1**.: A **one-parameter subgroup** of \(G\) is a differentiable homomorphism \(\phi:\mathbb{R}\to G\), more precisely, such that \(\phi(t+s)=\phi(t)\phi(s)\) for all \(t,s\in\mathbb{R}\).

Let the action of \(\phi\) on the vector space \(X\subset\mathbb{R}^{n}\) be a transformation \(T:X\times\mathbb{R}\to X\) that is continuous in \(x\in X\) and \(t\in\mathbb{R}\). Because of continuity, for sufficiently small \(t\) and some fixed \(x\in X\), the action is given by

\[T(x,t)\approx x+tA(x)\text{ where }A(x):=\frac{\partial T(x,t)}{\partial t} \Bigg{|}_{t=0}. \tag{1}\]

Note that this is equivalent to taking a first-order Taylor expansion in \(t\) around \(t=0\).

### Generators

In general, we can use \(A(x)\) in (1) to construct what is known as the **generator** of a one-parameter subgroup \(\phi\) of a Lie group \(G\), that in turn will characterise an ordinary differential equation, the solution to which coincides with the action \(T\) on \(X\).

Let \(C^{\infty}(X)\) be the space of smooth functions from \(X\) to \(X\). The generator of \(\phi\) is defined as a linear differential operator \(L:C^{\infty}(X)\to C^{\infty}(X)\) such that

\[L=\sum_{i=0}^{n}(A(x))_{i}\frac{\partial}{\partial x_{i}} \tag{2}\]

describing the vector field of the infinitesimal increment \(A(x)t\) in (1), where \(\partial/\partial x_{i}\) are the unit vectors of \(X\) in the coordinate directions for \(i=1,\dots,n\). It can be shown (Olver, 1993) that, for a fixed \(x\in X\), that \(T(x,t)\) is the solution to the ordinary differential equation

\[\frac{dT(x,t)}{dt}=LT(x,t)\quad\text{where}\quad T(x,0)=x. \tag{3}\]

The solution to (3) is the exponential \(T(x,t)=e^{tL}x\) where

\[e^{tL}:=\sum_{k=0}^{\infty}\frac{(tL)^{k}}{k!}, \tag{4}\]

where \(L^{k}\) is the operator \(L\) applied \(k\) times iteratively.

For a one-parameter subgroup \(\phi\) of a matrix Lie group \(G\subset GL(n,\mathbb{R})\) and a fixed \(x\in X\), it can be shown (Olver, 1993) that there exists a unique matrix \(A\in\mathbb{R}^{n\times n}\) such that \(A(x)=Ax\). This is a more restrictive approach as groups such as translations cannot be written as a matrix multiplication.

## 3 Method

As in Rao and Ruderman (1998); Sanborn et al. (2022); Dehmamy et al. (2021) the semi-supervised symmetry detection setting that we consider consists of learning the generator \(L\) of a one-parameter subgroup \(\phi\) from pairs of observations of the form \(\{(x_{i},\bar{x}=T(x_{i},t_{i}))\}_{i=1}^{N}\), where \(N\) is the number of observations and each \(t_{i}\in\mathbb{R}\) is drawn from some unknown distribution \(p(t)\). Not only do we attempt to learn the generator \(L\), but also the unknown distribution \(p(t)\) of the parameters \(\{t_{i}\}_{i=1}^{N}\).
### Parametrisation of the generator

Deciding how to parametrise \(L\) has an effect on the structure of the model and ultimately on what one-parameter subgroups we are able to learn. For simplicity, consider one-parameter subgroups acting on \(X\subset\mathbb{R}^{2}\), although this operator can be defined for higher-dimensional vector spaces. The generator \(L\) of \(\phi\) is given as in Eq. (2) and we parametrise \(A(x,y)\) as a linear operator in the basis \(\{1,x,y\}\) with a coefficient matrix \(A=\alpha\in\mathbb{R}^{2\times 3}\), giving

\[L^{\alpha} :=(\alpha_{11}+\alpha_{12}x+\alpha_{23}y)\frac{\partial}{ \partial x} \tag{5}\] \[+(\alpha_{12}+\alpha_{22}x+\alpha_{23}y)\frac{\partial}{\partial y}.\]

In this particular basis, for different values of \(\alpha\), the generator \(L^{\alpha}\) is able to express one-parameter sub-groups of the affine group. This includes the "traditional" symmetries that are usually considered (translation, rotation, and isotropic scaling) and all other affine transformations1. This can be generalized to any functional form of the generator by augmenting the basis accordingly.

Footnote 1: Alternatively, the constant terms can be thought of as the drift terms (i.e. translation) and the four others can be arranged into a diffusion matrix.

### Discretisation and interpolation

The generator \(L^{\alpha}\) is constructed as an operator that acts on a function \(f:\mathbb{R}^{2}\to\mathbb{R}\), given, in practice, by \(I\in\mathbb{R}^{n\times n}\) such that \(I_{ij}=f(i,j)\) are evaluations of \(f\) on a regularly-sampled \(n\times n\) grid \(M\) of points \(M_{ij}=(i,j)\in\mathbb{R}^{2}\). We then vectorise \(I\), obtaining a point in a vector space \(\tilde{I}\in\mathbb{R}^{n^{2}}\) such that \(\tilde{I}_{i+j}:=I_{ij}\) and construct the matrix operator \(L^{\alpha}\in\mathbb{R}^{n^{2}\times n^{2}}\) as

\[L^{\alpha} :=(\alpha_{11}+\alpha_{12}X_{x}+\alpha_{13}X_{y})\frac{\partial}{ \partial X_{x}} \tag{6}\] \[+(\alpha_{21}+\alpha_{22}X_{x}+\alpha_{23}X_{y})\frac{\partial}{ \partial X_{y}},\]

acting on \(\tilde{I}\), where \(X_{x}\in\mathbb{R}^{n^{2}\times n^{2}}\) and \(X_{y}\in\mathbb{R}^{n^{2}\times n^{2}}\) are such that \((X_{x})_{ij}:=i\) and \((X_{y})_{ij}:=j\), while \(\partial/\partial X_{x}\) and \(\partial/\partial X_{y}\) are also matrix operators in \(\mathbb{R}^{n^{2}\times n^{2}}\). The exponential in (4) and the action \(T\) coincides with the matrix exponential.

In order to define \(\partial/\partial X_{x}\) and \(\partial/\partial X_{y}\) as operators that transform by infinitesimal amounts at discrete locations, we require an interpolation function. The Shannon-Whittaker theorem (Marks, 2012) states that any square-integrable, piecewise continuous function that is band-limited in the frequency domain can be reconstructed from its discrete samples if they are sufficiently close and equally spaced. For sake of interpolations, we will also assume that the

Figure 2: Model architecture.
function is periodic.

Interpolation: 1DIn the case where \(M\) is a discrete set of \(n\) points in 1D, we have that \(I(i+n)=I(i)\) for all \(i=1,\ldots,n\) samples. Shannon-Whittaker interpolation reconstructs the signal for all \(x\in\mathbb{R}\) as

\[\begin{split}& I(x)=\sum_{i=0}^{n-1}I(i)Q(x-i),\quad\text{ where}\\ & Q(x)=\frac{1}{n}\left[1+2\sum_{p=1}^{n/2-1}\cos\left(\frac{2 \pi px}{n}\right)\right]\end{split} \tag{7}\]

Differentiating \(Q\) with respect to \(x\) and evaluating it at every \(x_{i}\in M\) gives an analytic expression for a vector field in \(\mathbb{R}^{n}\), describing continuous changes in \(x\) at all \(n\) points (Rao & Ruderman, 1998). This is precisely what \(\partial/\partial x\) or \(\partial/\partial y\) in (5) are.

Interpolation: 2DIn the case where \(M\) is a grid of \(n\times n\) points in 2D, we construct the \(n\times n\) matrices of the partial derivatives of \(Q\) with respect to \(x\) and \(y\), analogously to the 1D case, stacking them to construct the \(n^{2}\times n^{2}\) block diagonal matrices \(\partial/\partial X_{x}\) and \(\partial/\partial X_{y}\). It is worth noting that alternative interpolation techniques can be used to obtain the operators and the method does not depend on any specific one.

Two different architectures, the main model and the latent model, are proposed to learn \(L^{\alpha}\) and, in doing so, the action \(T\).

#### 3.2.1 Naive model

The coefficients \(\alpha\) of \(L^{\alpha}\) are approximated by fixed coefficients that are shared across the dataset, while the parameter \(t_{i}\) is approximated by \(\hat{t}_{i}\) that depends on the input pair \((x_{i},\bar{x}_{i})\). We learn

1. the coefficients \(\alpha\in\mathbb{R}^{2\times 3}\) of the generator \(L^{\alpha}\) and
2. the parameters \(\theta\) of an MLP \(f_{\theta}\) that returns \(f_{\theta}(x_{i},\bar{x}_{i})=:\hat{t}_{i}\) as a function of every input pair,

such that the solution to (3) for \(L^{\alpha}\) is approximated by

\[\hat{T}(x_{i},\bar{x}_{i}):=e^{f_{\theta}(x_{i},\bar{x}_{i})L^{\alpha}}\,x_{i}. \tag{8}\]

The model objective is then given by the reconstruction loss

\[\mathcal{L}_{T}(x_{i},\bar{x}_{i})=||\hat{T}_{\phi}(x_{i},\bar{x}_{i})-\bar{x }_{i}||^{2}. \tag{9}\]

#### 3.2.2 Latent model

While the model described above will prove to work sufficiently well for learning the coefficients \(\alpha\) of \(L^{\alpha}\), the matrix exponential function in \(\hat{T}\) in (8) can be costly to compute and difficult to optimise in high dimensions; consider that the cost of the matrix exponential in a single forward pass is roughly \(O(n^{3})\) using the algorithm of Al-Mohy & Higham (2010).

As a result, a different version of the model is proposed that incorporates an autoencoder for reducing dimension. The concept remains the same, but \(x_{i}\) is now mapped to some latent space \(Z\subset\mathbb{R}^{n_{Z}}\) for \(n_{Z}\ll n\), such that the exponential is taken in a significantly lower dimension. This is done by an encoder \(h_{\psi}:X\to Z\) and a decoder \(d_{\psi}:Z\to X\) such that \(z_{i}=h_{\psi}(x_{i})\) and \(x_{i}\approx d_{\psi}(z_{i})\).

We learn

1. the parameters \(\psi\) of an MLP autoencoder,
2. the coefficients \(\tilde{\alpha}\in\mathbb{R}^{2\times 3}\) of the generator \(L^{\tilde{\alpha}}\) for a one-parameter subgroup \(\phi_{Z}\) acting on the latent space \(Z\),
3. the parameters \(\theta\) of an MLP \(f_{\theta}\) that returns \(f_{\theta}(x_{i},\bar{x}_{i})=:\hat{t}_{i}\) as a function of every original input pair \((x_{i},\bar{x}_{i})\),

such that the solution to (3) for \(L^{\alpha}\), the generator in the original space, is approximated by

\[\hat{T}^{Z}(x_{i},\bar{x}_{i})=d_{\psi}(e^{f_{\theta}(x_{i},\bar{x}_{i})L^{ \tilde{\alpha}}}h_{\psi}(x_{i})). \tag{10}\]

It is important to note that enforcing good reconstruction of the autoencoder alone does not enforce the commutativity of the diagram in Figure 3. To make it commutative, we use an objective that is a weighted sum of multiple terms. A simple reconstruction term for the autoencoder on each input example

\[\mathcal{L}_{R}(x_{i}):=||d_{\psi}(h_{\psi}(x_{i}))-x_{i}||^{2}, \tag{11}\]

a transformation-reconstruction term in the original space

\[\mathcal{L}_{T}^{X}(x_{i},\bar{x}_{i}):=||\hat{T}_{\phi}^{Z}(x_{i},\bar{x}_{i}) -\bar{x}_{i}||^{2}, \tag{12}\]

a transformation-reconstruction term in the latent space

\[\mathcal{L}_{T}^{Z}(x_{i},\bar{x}_{i}):=||e^{f_{\theta}(x_{i},\bar{x}_{i})L^{ \tilde{\alpha}}}h_{\psi}(x_{i})-h_{\psi}(\bar{x}_{i})||^{2}, \tag{13}\]

and a Lasso term on the generator coefficients \(\tilde{\alpha}\). The overall loss of the latent model is

\[\begin{split}\mathcal{L}(x_{i},\bar{x}_{i})&=\lambda _{R}(\mathcal{L}_{R}(x_{i})+\mathcal{L}_{R}(\bar{x}_{i}))\\ &+\,\lambda_{X}\mathcal{L}_{T}^{X}(x_{i},\bar{x}_{i})+\lambda_{Z} \mathcal{L}_{T}^{Z}(x_{i},\bar{x}_{i})\\ &+\lambda_{L}||\tilde{\alpha}||^{2},\end{split} \tag{14}\]

where \(\lambda_{R},\lambda_{X},\lambda_{Z},\lambda_{L}\in\mathbb{R}\) are treated as hyperparameters.
Recovering the groupIt is important to note that the one-parameter subgroup corresponding to the generator \(L^{\tilde{\alpha}}\) and the generator \(L^{\alpha}\) are _not_ necessarily the same; \(L^{\tilde{\alpha}}\) is the generator corresponding to some action on \(X\) of a one-parameter subgroup \(\phi\), while \(L^{\alpha}\) is a different generator corresponding to some action on \(Z\) of a different one-parameter subgroup \(\phi_{Z}\).

### Uniqueness

For both the naive model in Section 3.2.1 and the latent model in 3.2.2, the approximations \(\hat{t}_{i}\) for the values of the parameters \(t_{i}\) require interpretation. Both models parameterise \(\hat{T}\) or \(\hat{T}^{Z}\) with the products \(\hat{t}_{i}L^{\alpha}\) or \(\hat{t}_{i}L^{\tilde{\alpha}}\) respectively, where \(\hat{t}_{i}=f_{\theta}(x_{i},\bar{x}_{i})\). While both the values of \(\hat{t}_{i}L^{\alpha}\) and \(\hat{t}_{i}L^{\tilde{\alpha}}\) are unique for a given action on \(X\) and \(Z\) respectively, their decomposition is only unique up to a constant. Therefore, \(L^{\alpha}\) or \(L^{\tilde{\alpha}}\) and \(\hat{t}\) approximate the generators and the parameter respectively up to a constant. Consequently, the one-parameter subgroup \(\phi\) can only be deduced by the values of the individual coefficients in \(\alpha\)_relative to one another_, as opposed to in absolute, likewise for \(\phi_{Z}\) and \(\tilde{\alpha}\). We therefore recover a scaled approximation for the distribution of \(\hat{t}_{i}\).

### The most general setting

Suppose we are given a labelled dataset \(\mathcal{D}=\{(x_{i},c_{i})\}_{i=1}^{N}\) and a one-parameter subgroup \(\phi\). Then we call \(\mathcal{D}\)_symmetric_ or _invariant with respect to \(\phi\)_ if the action of \(\phi\) preserves the object identity of the data points, where by object identity we mean any property of the data that we might be interested in. For example, in the case of MNIST handwritten digits, rigid transformations preserve their labels 2 and therefore, can be considered symmetries of the dataset. Now suppose that every \(x_{i}\) in \(\mathcal{D}\) is acted on with a one-parameter subgroup \(\phi_{t}\) to get \(T\mathcal{D}=\left\{(T(x_{i},t_{i}),c_{i})\right\}_{i=1}^{N}\). The most general, fully unsupervised symmetry detection setting consists of learning \(\phi\), and characterize the distribution of the parameter \(t\) from just \(\mathcal{\bar{D}}\). The idea is that, under the assumption that points with the same label are sufficiently similar for the subgroup transformation to account for the important difference3, we can use labels to group data points, and compare those data points using methods such as the one presented in this paper. We leave the fully unsupervised symmetry detection setting for future work although we will emphasize that the proposed method can, in principle, be used in such setting without substantial changes to the architecture.

Footnote 2: With the exception of the number ‘9’ that, if rotated 180 degrees becomes a ‘6’.

## 4 Experiments

### Experiment setting

In practice, we experiment with a dataset of MNIST digits transformed with either 2D rotations or translations in one direction. To test the method's ability to learn distributions of these transformations, for each one-parameter subgroup \(\phi\in\{SO(2),T(2)\}\) we construct a dataset \(\{x_{i},T(x_{i},t_{i})\}_{i=1}^{N}\) by sampling the parameters \(t_{i}\in\mathbb{R}\) from various _multimodal_ distributions.

As in (Rao & Ruderman, 1998), the dataset is composed of signals \(I:M\longrightarrow\mathbb{R}\) regularly-sampled from a discrete grid of \(n^{2}\) points \((x,y)\in\mathbb{R}^{2}\) for \(n=28\). The signals \(I\) are vectorised into points in \(\mathbb{R}^{784}\) as described in Section 3.2. The implementation of the naive model is available here.

### Main model experiments

The naive model architecture outlined in 3.2.1 consists of a fully-connected, 3-layer MLP for \(f_{\theta}\) that was trained jointly with the coefficients \(\alpha_{ij}\) using Adam (Kingma & Ba, 2014) with a learning rate of 0.001. Given the disproportionate number of trainable parameters in \(f_{\theta}\) and the 6 coefficients in \(\alpha\), updating \(\alpha_{ij}\) roughly 10 times for every update of \(\theta\) in \(f_{\theta}\) was found to be beneficial during training.

CoefficientsFigure 4 shows the evolution of \(\alpha_{ij}\) during training. It can be seen that after a few hundred steps, the coefficients \(\alpha_{ij}\) that do not correspond to the infinitesimal generator of the symmetry expressed by the dataset drop to zero, while those that do, settle to values compatible with those of the ground truth generator \(L\).

### Latent model experiments

The latent model outlined in 3.2.2 consists of a fully-connected, 3-layer MLP \(f_{\theta}\), as in (8), to approximate
\(\hat{t}\), and two fully-connected, 3-layer MLPs with decreasing/increasing hidden dimensions for the encoder \(h_{\psi}\) and \(d_{\psi}\). We set the latent space to \(n_{Z}=25\). Similar to the naive model experiment above, \(f_{\theta}\) was trained jointly with the coefficients \(\alpha_{ij}\) using Adam (Kingma & Ba, 2014) with learning rate 0.001.

ParametersAfter every epoch (roughly 500 steps), the outputs of \(\hat{t}=f_{\theta}\) were collected in a histogram to show \(p(\hat{t})\). Figure 5 shows how the distribution of \(\hat{t}\) changes during training and how multimodal distributions are clearly recovered, showing the same number of modes as the ground truth distribution from which the transformations were sampled.

## 5 Related Work

**Symmetries in Neural Networks** Numerous studies have tackled the challenges associated with designing neural network layers and/or models that are equivariant with respect to specific transformations (Finzi et al., 2021).

Figure 4: Training evolution of the coefficients \(\alpha\) defining the generator \(L^{\alpha}\) of the one-parameter subgroup, that are shown to converge to the ground-truth non-zero coefficients \(\alpha\) for rotated (\(-\alpha_{22}=\alpha_{13}=1\) and \(0\) otherwise) and translated (\(\alpha_{11}=1\) and \(0\) otherwise) MNIST.

Figure 5: Training evolution of the distributions \(p(\hat{t})\) of the learned parameters \(\hat{t}\) computed by \(f_{\theta}\) for the validation set. The figure shows that \(p(\hat{t})\) resembles the original multi-modal distributions \(p(t)\) of the transformations expressed by the dataset.
These transformations include continuous symmetries such as scaling (Worrall and Welling, 2019), rotation on spheres (Cohen et al., 2018), local gauge transformations (Cohen et al., 2019) and general E(2) transformations on the Euclidean plane (Weiler and Cesa, 2019), as well as discrete transformations like permutations of sets (Zaheer et al., 2017) and reversing symmetries (Valberga et al., 2022). Another line of research focuses on establishing theoretical principles and practical techniques for constructing general group-equivariant neural networks. Research in such areas show improved performances on tasks related to symmetries, but nonetheless require prior knowledge about the symmetries themselves.

Symmetry DetectionSymmetry detection aims to discover symmetries from observations, a learning task that is of great importance in of itself. Detecting symmetries in data not only lends itself to more efficient and effective machine learning models but also in discovering fundamental laws that govern data, a long-standing area of interest in the physical sciences. Learned symmetries can then be incorporated after training in equivariant models or used for data augmentation for downstream tasks. In physics and dynamical systems, the task of understanding and discovering symmetries is a crucial one; in classical mechanics and more generally Hamiltonian dynamics, continuous symmetries of the Hamiltonian are of great significance since they are associated, through Noether's theorem (Noether, 1918), to conservation laws such as conservation of angular momentum or conservation of charge.

The first work on learning symmetries of one-parameter subgroups from observations were Rao and Ruderman (1998) and Miao and Rao (2007), which outline MAP-inference methods for learning infinitesimally small transformations. Sohl-Dickstein et al. (2010) propose a transformation-specific smoothing operation of the transformation space to overcome the issue of a highly non-convex reconstruction objective that includes an exponential map. These methods are close to ours in that we also make use of the exponential map to obtain group elements from their Lie algebra. Despite this, Sohl-Dickstein et al. (2010) do not consider the task of characterizing the distribution of the parameter of the subgroup nor do they consider the whole of pixel-space, using small patches instead. Cohen and Welling (2014) focus on disentangling and learning the distributions of multiple compact "toroidal" one-parameter subgroups in the data.

Neural Symmetry DetectionA completely different approach to symmetry discovery is that of Sanborn et al. (2022), who's model uses a group invariant function known as the bispectrum to learn group-equivariant and group-invariant maps from observations. Benton et al. (2020) consider a task similar to ours, attempting to learn groups with respect-to-which the data is invariant, however, the objective places constraints directly on the network parameters as well as the distribution of transformation parameters with which the data is augmented. Alternatively, Dehmamy et al. (2021) require knowledge of the specific transformation parameter for each input pair (differing by that transformation), unlike our model, where no knowledge of the one-parameter group is used in order to find the distribution of the transformation parameter.

Latent TransformationsLearning transformations of a one-parameter subgroup in latent space (whether that subgroup be identical to the one in pixel space or not) has been accomplished by Keurti et al. (2023) and Zhu et al. (2021). Nevertheless, other works either presuppose local structure in the data by using CNNs instead of fullly-connected networks or focus on disentangling interpretable features instead of directly learning generators that can be used as an inductive bias for a new model.

In contrary to the other works mentioned above, we propose a promising framework in which we can simultaneously

* perform symmetry detection in pixel-space, without assuming any inductive biases are present in the data \(a\)_priori_,
* parametrize the generator such that non-compact groups (e.g. translation) can be naturally incorporated,
* and learn both the generator and the parameter distributions.

## 6 Discussion

In this work we proposed a framework for learning one-parameter subgroups of Lie group symmetries from observations. Our method uses a neural network to predict the one-parameter of every transformation that has been applied to datapoints, and the coefficients of a linear combination of pre-specified generators. We show that our method can learn the correct generators for a variety of transformations as well as characterize the distribution of the parameter that has been used for transforming the dataset.

While the goal of learning both the coefficients of the generator and the distribution of the transformation parameter has not been accomplished by only one model in this work, modifying our existing framework to do so is a priority for future work. In addition, the proposed method lends itself well to being composed to form multiple layers, which can then be applied to datasets that express multiple symmetries. By doing so, ideally, each layer would learn one individual symmetry. We leave this study, and the more general, fully unsupervised setting described in 3.4, for future work.
## Acknowledgements

This publication is based on work partially supported by the EPSRC Centre for Doctoral Training in Mathematics of Random Systems: Analysis, Modelling and Simulation (EP/S023925/1) and the Dorris Chen Award granted by the Department of Mathematics, Imperial College London.
