M ETA - LEARNING S YMMETRIES BY R EPARAMETERIZATION
Anonymous authors
Paper under double-blind review
A BSTRACT
Many successful deep learning architectures are equivariant to certain transformations in order to conserve parameters and improve generalization: most famously, convolution layers are equivariant to shifts of the input.
This approach only works when practitioners know the symmetries of the task and can manually construct an architecture with the corresponding equivariances.
Our goal is an approach for learning equivariances from data, without needing to design custom task-speciﬁc architectures.
We present a method for learning and encoding equivariances into networks by learning corresponding parameter sharing patterns from data.
Our method can provably represent equivariance-inducing parameter sharing for any ﬁnite group of symmetry transformations.
Our experiments suggest that it can automatically learn to encode equivariances to common transformations used in image processing tasks.
We provide our experiment code at [ REDACTED ].
I NTRODUCTION
In deep learning, the convolutional neural network (CNN) (LeCun et al., 1998) is a prime example of exploiting equivariance to a symmetry transformation to conserve parameters and improve generalization.
In image classiﬁcation (Russakovsky et al., 2015; Krizhevsky et al., 2012) and audio processing (Graves and Jaitly, 2014; Hannun et al., 2014) tasks, we may expect the layers of a deep network to learn feature detectors that are translation equivariant: if we translate the input, the output feature map is also translated.
Convolution layers satisfy translation equivariance by deﬁnition, and produce remarkable results on these tasks.
The success of convolution’s “built in” inductive bias suggests that we can similarly exploit other equivariances to solve machine learning problems.
However, there are substantial challenges with building in inductive biases.
Identifying the correct biases to build in is challenging, and even if we do know the correct biases, it is often difﬁcult to build them into a neural network.
Practitioners commonly avoid this issue by “training in” desired equivariances (usually the special case of invariances) using data augmentation.
However, data augmentation can be challenging in many problem settings and we would prefer to build the equivariance into the network itself.
For example, robotics sim2real transfer approaches train agents that are robust to varying conditions by varying the simulated environment dynamics (Song et al., 2020).
But this type of augmentation is not possible once the agent leaves the simulator and is trying to learn or adapt to a new task in the real world.
Additionally, building in incorrect biases may actually be detrimental to ﬁnal performance (Liu et al., 2018b).
In this work we aim for an approach that can automatically learn and encode equivariances into a neural network.
This would free practitioners from having to design custom equivariant architectures for each task, and allow them to transfer any learned equivariances to new tasks.
Neural network layers can achieve various equivariances through parameter sharing patterns, such as the spatial parameter sharing of standard convolutions.
In this paper we reparameterize network layers to learnably represent sharing patterns.
We leverage meta-learning to learn the sharing patterns that help a model generalize on new tasks.
The primary contribution of this paper is an approach to automatically learn equivariance-inducing parameter sharing, instead of using custom designed equivariant architectures.
We show theoretically that reparameterization can represent networks equivariant to any ﬁnite symmetry group.
Our experiments show that meta-learning can recover various convolutional architectures from data, and learn invariances to common data augmentation transformations.
R ELATED W ORK
A number of works have studied designing layers with equivariances to certain transformations such as permutation, rotation, reﬂection, and scaling (Gens and Domingos, 2014;
Cohen and Welling, 2016; Zaheer et al., 2017; Worrall et al., 2017; Cohen et al., 2019; Weiler and Cesa, 2019; Worrall and Welling, 2019).
These approaches focus on manually constructing layers analagous to standard convolution, but for other symmetry groups.
Rather than building symmetries into the architecture, data augmentation (Beymer and Poggio, 1995; Niyogi et al., 1998) trains a network to satisfy them.
Diaconu and Worrall (2019) use a hybrid approach that pre-trains a basis of rotated ﬁlters in order to deﬁne roto-translation equivariant convolution.
Unlike these works, we aim to automatically build in symmetries by acquiring them from data.
Our approach is motivated in part by theoretical work characterizing the nature of equivariant layers for various symmetry groups.
In particular, the analysis of our method as learning a certain kind of convolution is inspired by Kondor and Trivedi (2018), who show that under certain conditions all linear equivariant layers are (generalized) convolutions.
Shawe-Taylor (1989) and Ravanbakhsh et al.
(2017) analyze the relationship between desired symmetries in a layer and symmetries of the weight matrix.
Ravanbakhsh et al. (2017) show that we can make a layer equivariant to the permutation representation of any discrete group through a corresponding parameter sharing pattern in the weight matrix. From this perspective, our reparameterization is a way of representing possible parameter sharing patterns, and the training procedure aims to learn the correct parameter sharing pattern that achieves a desired equivariance. Prior work on automatically learning symmetries include methods for learning invariances in Gaussian processes (van der
Wilk et al., 2018) and learning symmetries of physical systems (Greydanus et al., 2019; Cranmer et al., 2020). Concurrent work by Benton et al.
(2020) has a very similar goal to ours; they aim to automatically learn invariances in neural networks from data. However, the method is very different: Benton et al. (2020) sums over transformations of the input to achieve invariance, while our method aims to learn parameter sharing of the layer weights which induces equivariance. Moreover, their approach focuses on learning relatively simple distributions over the group of afﬁne transformations, and uses convenient properties of that group to simplify learning.
Our method aims to learn potentially any ﬁnite symmetry group.
Contrasting these two approaches is to some extent a trade-off between easier training on more convenient transformation classes, versus expressivity over larger classes of transformations.
Finally, we deﬁne an objective for learning symmetries driven directly by generalization error (in a meta-learning framework), while the objective in Benton et al.
(2020) adds a regularizer to the training loss to encourage learning symmetries.
Another very recent line of work has shown that more general Transformer (Vaswani et al., 2017) style architectures can match or outperform traditional CNNs on image tasks, without baking in translation symmetry (Dosovitskiy et al., 2020).
Their results suggest that Transformer architectures can automatically learn symmetries and other inductive biases from data, but typically only with very large training datasets.
One can also consider automatic data augmentation strategies (Cubuk et al., 2018; Lorraine et al., 2019) as a way of learning symmetries, though the symmetries are not embedded into the network in a transferable way.
Our work is related to neural architecture search (Zoph and Le, 2016; Brock et al., 2017; Liu et al., 2018a; Elsken et al., 2018), which also aims to automate part of the model design process.
Although architecture search methods are varied, they are generally not designed to exploit symmetry or learn equivariances.
Evolutionary methods for learning both network weights and topology (Stanley and
Miikkulainen, 2002; Stanley et al., 2009) are also not motivated by symmetry considerations.
Our method learns to exploit symmetries that are shared by a collection of tasks, a form of metalearning (Thrun and Pratt, 2012; Schmidhuber, 1987; Bengio et al., 1992; Hochreiter et al., 2001).
We extend gradient based meta-learning (Finn et al., 2017; Li et al., 2017; Antoniou et al., 2018) to separately learn parameter sharing patterns (which enforce equivariance) and actual parameter values.
Separately representing network weights in terms of a sharing pattern and parameter values is a form of reparameterization .
Prior work has used weight reparameterization in order to “warp” the loss surface (Lee and Choi, 2018; Flennerhag et al., 2019) and to learn good latent spaces (Rusu et al., 2018) for optimization, rather than to encode equivariance.
HyperNetworks (Ha et al., 2016;
Schmidhuber, 1992) generate network layer weights using a separate smaller network, which can be viewed as a nonlinear reparameterization, albeit not one that encourages learning equivariances.
Modular meta-learning (Alet et al., 2018) is a related technique that aims to achieve combinatorial generalization on new tasks by stacking meta-learned “modules,” each of which is a neural network.
This can be seen as parameter sharing by re-using and combining modules, rather than using our layerwise reparameterization.
P RELIMINARIES
In Sec. 3.1, we review gradient based meta-learning, which underlies our algorithm.
Sections 3.
and 3.3 build up a formal deﬁnition of equivariance and group convolution (Cohen and Welling, 2016), a generalization of standard convolution which deﬁnes equivariant operations for other groups such as rotation and reﬂection.
These concepts are important for a theoretical understanding of our work as a method for learning group convolutions in Sec. 4.2.
3. G RADIENT B ASED M ETA -L EARNING
Our method is a gradient-based meta-learning algorithm that extends MAML (Finn et al., 2017), which we brieﬂy review here.
Suppose we have some task distribution p ( T ) , where each task dataset is split into training and validation datasets {D tri , D vali } .
For a model with parameters ✓ , loss L , and learning rate ↵ , the “inner loop” updates ✓ on the task’s training data: ✓ 0 = ✓  ↵ r ✓ L ( ✓ , D tr ) .
In the “outer loop,” MAML meta-learns a good initialization ✓ by minimizing the loss of ✓ 0 on the task’s validation data, with updates of the form ✓ ✓  ⌘ dd ✓ L ( ✓ 0 , D val ) .
Although MAML focuses on meta-learning the inner loop initialization ✓ , one can extend this idea to meta-learning other things such as the inner learning rate ↵ .
In our method, we meta-learn a parameter sharing pattern at each layer that maximizes performance across the task distribution.
3. G ROUPS AND G ROUP A CTIONS
Symmetry and equivariance is usually studied in the context of groups and their actions on sets; refer to Dummit and Foote (2004) for more comprehensive coverage.
A group G is a set closed under some associative binary operation, where there is an identity element and each element has an inverse.
Consider the group ( Z , +) (the set of integers with addition): we can add any two integers to obtain another, each integer has an additive inverse, and 0 is the additive identity.
A group G can act on a set X through some action ⇢ : G !
Aut ( X ) which maps each g 2 G to some transformation on X . ⇢ must be a homomorphism, i.e. ⇢ ( gh ) =
⇢ ( g ) ⇢ ( h ) for all g, h 2 G , and Aut ( X ) is the set of automorphisms on X (bijective homomorphisms from X to itself).
As a shorthand we write gx := ⇢ ( g )( x ) for any x 2 X .
Any group can act on itself by letting X =
G : for ( Z , +) , we deﬁne the action gx = g + x for any g, x 2 Z .
The action of a group G on a vector space V is called a representation , which we denote ⇡ : G !
GL ( V ) .
Recall GL ( V ) is the set of invertible linear maps on V .
Assume the vectors v 2 V are discrete, with components v [ i ] .
If we already have G ’s action on the indices, a natural corresponding representation is deﬁned ( ⇡ ( g ) v )
[ i ] := v [ g  1 i ] .
As a concrete example, consider the representation of G =
( Z , +) for inﬁnite length vectors.
The indices are also integers, so the group is acting on itself as deﬁned above.
Then ( ⇡ ( g ) v )
[ i ] = v [ g  1 i ] = v
[ i  g ] for any g, i 2 Z .
Hence this representation of Z shifts vectors by translating their indices by g spaces.
3. E QUIVARIANCE AND C ONVOLUTION
A function (like a neural network layer) is equivariant to some transformation if transforming the function’s input is the same as transforming its output.
To be more precise, we must deﬁne what those transformations of the input and output are.
Consider a neural network layer  : R n !
R m .
Assume we have two representations ⇡ 1 , ⇡ 2 of group G on R n and R m , respectively.
For each g 2 G , ⇡ 1 ( g ) transforms the input vectors, while ⇡ 2 ( g ) transforms the output vectors.
The layer  is G - equivariant with respect to these transformations if  ( ⇡ 1 ( g ) v ) =
⇡ 2 ( g )  ( v ) , for any g G, v 2 R n .
If we choose ⇡ 2 ⌘ id we get  ( ⇡ 1 ( g ) v ) =
( v ) , showing that invariance is a type of equivariance .
Deep networks contain many layers, but function composition preserves equivariance.
So if we achieve equivariance in each individual layer, the whole network will be equivariant.
Pointwise nonlinearities such as ReLU and sigmoid are already equivariant to any permutation of the input and output indices, which includes translation, reﬂection, and rotation.
Hence we are primarily focused on enforcing equivariance in the linear layers.
Prior work (Kondor and Trivedi, 2018) has shown that a linear layer  is equivariant to the action of some group if and only if it is a group convolution, which generalizes standard convolutions to arbitrary groups.
For a speciﬁc
G , we call the corresponding group convolution “ G -convolution” to distinguish it from standard convolution.
Intuitively, G -convolution transforms a ﬁlter according to each g 2 G , then computes a dot product between the transformed ﬁlter and the input.
In standard convolution, the ﬁlter transformations correspond to translation (Fig. 1).
G -equivariant layers convolve an input v 2 R n with a ﬁlter 2 R n .
Assume the group G = { g 1 , · · · , g m } is ﬁnite:
[Equation]
In this work, we present a method that represents and learns parameter sharing patterns for existing layers, such as fully connected layers.
These sharing patterns can force the layer to implement various group convolutions, and hence equivariant layers.
E NCODING AND L EARNING E QUIVARIANCE
To learn equivariances automatically, our method introduces a ﬂexible representation that can encode possible equivariances, and an algorithm for learning which equivariances to encode.
Here we describe this method, which we call Meta-learning Symmetries by Reparameterization (MSR).
4. L EARNABLE P ARAMETER S HARING
As Fig.
1 shows, a fully connected layer can implement standard convolution if its weight matrix is constrained with a particular sharing pattern , where each row contains a translated copy of the same underlying ﬁlter parameters.
This idea generalizes to equivariant layers for other transformations like rotation and reﬂection, but the sharing pattern depends on the transformation.
Since we do not know the sharing pattern a priori, we “reparameterize” fully connected weight matrices to represent them in a general and ﬂexible fashion.
A fully connected layer  : R n !
R m with weight matrix
W 2 R m ⇥ n is deﬁned for input x by  ( x ) =
Wx .
We can optionally incorporate biases by appending a dimension with value “1” to the input x .
We factorize W as the product of a “symmetry matrix” U and a vector v of k “ﬁlter parameters”:
[Equation]
For fully connected layers, we reshape 1 the vector vec ( W ) 2 R mn into a weight matrix W 2 R m ⇥ n .
Intuitively, U encodes the pattern by which the weights W will “share” the ﬁlter parameters v .
Crucially, we can now separate the problem of learning the sharing pattern (learning U ) from the problem of learning the ﬁlter parameters v .
In Sec. 4.3, we discuss how to learn U from data.
The symmetry matrix for each layer has mnk entries, which can become too expensive in larger layers.
Kronecker factorization is a common approach for approximating a very large matrix with smaller ones (Martens and Grosse, 2015; Park and Oliva, 2019).
In Appendix A we describe how
In practice, there are certain equivariances that are expensive to meta-learn, but that we know to be useful: for example, standard 2D convolutions for image data.
However, there may be still other symmetries of the data (i.e., rotation, scaling, reﬂection, etc.)
that we still wish to learn automatically.
This suggests a “hybrid” approach, where we bake-in equivariances we know to be useful, and learn the others.
Indeed, we can directly reparameterize a standard convolution layer by reshaping vec ( W ) into a convolution ﬁlter bank rather than a weight matrix.
By doing so we bake in translational equivariance, but we can still learn things like rotation equivariance from data.
4. P ARAMETER SHARING AND GROUP CONVOLUTION
By properly choosing the symmetry matrix U of Eq. 2, we can force the layer to implement arbitrary group convolutions (Eq. 1) by ﬁlter v .
Recall that group convolutions generalize standard convolution to deﬁne operations that are equivariant to other transformations, such as rotation.
Hence by choosing U properly we can enforce various equivariances, which will be preserved regardless of the value of v .
Proposition 1 Suppose G is a ﬁnite group { g 1 , . . .
, g m } .
There exists a U G 2 R mn ⇥ n such that for any v 2 R n , the layer with weights vec ( W )
=
U G v implements G -convolution on input x 2 R n .
Moreover, with this ﬁxed choice of U G , any G -convolution can be represented by a weight matrix vec ( W ) =
U G v for some v 2 R n .
Intuitively, U can store the symmetry transformations ⇡ ( g ) for each g 2 G , thus capturing how the ﬁlters should transform during G -convolution.
For example, Fig. 2 shows how U can implement convolution on the permutation group S 2 .
We present a proof in Appendix B.
Subject to having a correct U G , v is precisely the convolution ﬁlter in a G -convolution.
This will motivate the notion of separately learning the convolution ﬁlter v and the symmetry structure U in the inner and outer loops of a meta-learning process, respectively.
4. M ETA - LEARNING EQUIVARIANCES
Meta-learning generally applies when we want to learn and exploit some shared structure in a distribution of tasks
p ( T ) .
In this case, we assume the task distribution has some common underlying symmetry: i.e., models trained for each task should satisfy some set of shared equivariances.
We extend gradient based meta-learning to automatically learn those equivariances.
Suppose we have an L -layer network.
We collect each layer’s symmetry matrix and ﬁlter parameters:
U , v { U [Equation] , · · · , U L } , { v 1 , · · · , v L } .
Since we aim to learn equivariances that are shared across p (
T ) ,the symmetry matrices should not change with the task.
Hence, for any T i ⇠ p ( T ) the inner loop ﬁxes U and only updates v using the task training data:
[Equation]
where L is simply the supervised learning loss, and ↵ is the inner loop step size.
During metatraining, the outer loop updates U by computing the loss on the task’s validation data using v 0 :
[Equation]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table] [Figure] [Table] We illustrate the inner and outer loop updates in Fig. 3.
Note that in addition to meta-learning the symmetry matrices, we can also still meta-learn the ﬁlter initialization v as in prior work.
In practice we also take outer updates averaged over mini-batches of tasks, as we describe in Alg. 1.
After meta-training is complete, we freeze the symmetry matrices U .
On a new test task T k ⇠ p ( T ) , we use the inner loop (Eq. 3) to update only the ﬁlter v .
The frozen U enforces meta-learned parameter sharing in each layer, which improves generalization by reducing the number of taskspeciﬁc inner loop parameters.
For example, the sharing pattern of standard convolution makes the weight matrix constant along any diagonal, reducing the number of per-task parameters (see Fig. 1)
C AN WE RECOVER CONVOLUTIONAL STRUCTURE ?
We now introduce a series of synthetic meta-learning problems, where each problem contains regression tasks that are guaranteed to have some symmetries, such as translation, rotation, or reﬂection.
We combine meta-learning methods with general architectures not designed with these symmetries in mind to see whether each method can automatically meta-learn these equivariances.
5. L EARNING ( PARTIAL ) TRANSLATION SYMMETRY
Our ﬁrst batch of synthetic problems contains tasks with translational symmetry: we generate outputs by feeding random input vectors through a 1-D locally connected (LC) layer with ﬁlter size 3 and no bias.
Each task corresponds to different values of the LC ﬁlter, and the meta-learner must minimize mean squared error (MSE) after observing a single input-output pair.
For each problem we constrain the LC ﬁlter weights with a rank k 2 { 1 , 2 , 5 } factorization, resulting in partial translation symmetry (Elsayed et al., 2020).
In the case where rank k = 1 , the LC layer is equivalent to convolution (ignoring the biases) and thus generates exactly translation equivari- ant task data.
We apply both MSR and MAML to this problem using a single fully connected layer (MSR-FC and MAML-FC), so these models have no translation equivariance built in and must meta-learn it to solve the tasks efﬁciently.
For comparison, we also train convolutional and locally connected models with MAML (MAML-Conv and MAML-LC).
Since MAML-Conv has built in translation equivariance, we expect it to at least perform well on the rank k = 1 problem.
We also ran two ablations of MSR that use the same reparameterization (Eq. 2) but vary the training procedure. In MSRJoint, we allow U and v to be jointly updated in the inner loop, instead of only updating v in the inner loop.
Hence MSRJoint is trained identically to MAML, but with reparameterized weights. MTSR is an ablation of MSR that trains using m ulti- t ask learning instead of meta-learning.
Given data from training task T i , MTSR jointly optimizes U (shared symmetry matrix) and v ( i ) (task speciﬁc ﬁlter parameters) using the MSE loss.
For a new test task we freeze the optimized U and optimize a newly initialized ﬁlter v using the test task’s training data, then evaluate MSE on held out data.
Even though the true that generates the data has width 3 , for MSR
MTSR we initialize the learned ﬁlter v to be the same size as the input, per Prop. 1.
In principle, these methods should automatically meta-learn that the true ﬁlter is sparse, and to ignore the extra dimensions in v .
Appendix D.1 further explains the experimental setup.
Table 1 shows how each method performs on each of the synthetic problems, with columns denoting the rank k of the problem’s data.
The “small vs large train dataset” results differ only in that the latter contains 5 or 10 times more examples per training task, depending on k .
On fully translation equivariant data ( k = 1 ), MAML-Conv performs best due to its architecture having built in translation equivariance.
MSR-FC is the only non-convolutional architecture to perform comparably to
MAML-Conv for k = 1 .
Fig.
4 shows that MSR-FC has learned to produce weight matrices with convolutional parameter sharing structure, indicating it has “learned convolution” from the data.
Appendix C.1 visualizes the meta-learned U , which we ﬁnd implements convolution as Sec. 4.
predicted.
Meanwhile, MAML-FC and MAML-LC perform signiﬁcantly worse as they are unable to meta-learn this structure.
On partially symmetric data ( k = 2 , k = 5 ), MSR-FC performs well due to its ability to ﬂexibly meta-learn even partial symmetries.
MAML-Conv performs worse here since the convolution assumption is overly restrictive, while MAML-FC and MAML-LC are not able to meta-learn much structure.
MSR-Joint-FC performs comparably to or worse than MSR-FC across the board. Note that following prior work (Li et al., 2017), all methods use meta-learned inner learning rates on parameters that change in the inner loop. For MSR-Joint-FC we observe that the meta-learned inner loop learning rates corresponding to U are signiﬁcantly smaller than the inner learning rates corresponding to v , suggesting that U is changing relatively little in the inner loop (see Appendix Table 4 ).
MTSR-FC performs signiﬁcantly worse than MSR-FC with small training datasets, but performs comparably with large datasets.
This indicates that although our reparameterization can be trained by either multi-task learning or meta-learning, the meta-learning approach (Alg. 1) is more efﬁcient at learning from less data.
5. L EARNING EQUIVARIANCE TO ROTATIONS AND FLIPS
[Table]
We also created synthetic problems with 2-D synthetic image inputs and outputs, in order to study rotation and ﬂip equivariance.
We generate task data by passing randomly generated inputs through a single layer E(2)-equivariant steerable CNN (Weiler and Cesa, 2019) conﬁgured to be equivariant to combinations of translations, discrete rotations by increments of 45  , and reﬂections.
Hence our synthetic task data contains rotation and reﬂection in addition to translation symmetry.
Each task corresponds to different values of the data-generating network’s weights.
We apply MSR and MAML to a single standard convolution layer, which guarantees translation equivariance.
Each method must still meta-learn rotation and reﬂection (ﬂip) equivariance from the data.
Tableshows that MSR easily learns rotation and rotation+reﬂection equivariance on top of the convolutional model’s built in translational equivariance.
Appendix C.2 visualizes the ﬁlters MSR produces, which we see are rotated and/or ﬂipped versions of the same ﬁlter.
C AN WE LEARN INVARIANCES FROM AUGMENTED DATA ?
[Table]
[Table] task data split
[Table]
[Table]
Practitioners commonly use data augmentation to train their models to have certain invariances.
Since invariance is a special case of equivariance, we can also view data augmentation as a way of learning equivariant models.
The downside is that we need augmented data for each task.
While augmentation is often possible during meta-training, there are many situations where it is impractical at meta-test time.
For example, in robotics we may meta-train a robot in simulation and then deploy (meta-test) in the real world, a kind of sim2real transfer strategy (Song et al., 2020).
During meta-training we can augment data using the simulated environment, but we cannot do the same at meta-test time in the real world.
Can we instead use MSR to learn equivariances from data augmentation at training time, and encode those learned equivariances into the network itself?
This way, the network would preserve learned equivariances on new meta-test tasks without needing any additional data augmentation.
Alg. 2 describes our approach for meta-learning invariances from data augmentation, which wraps around any meta-learning algorithm using generic data augmentation procedures.
Recall that each task is split into training and validation data T i =
{D tri , D vali } .
We use the data augmentation procedure to only modify the validation data , producing a new validation dataset ˆ D vali for each task.
We re-assemble each modiﬁed task ˆ T
i {D tri , ˆ D vali } .
So for each task, the meta-learner observes unaugmented training data, but must generalize to augmented validation data.
This forces the model to be invariant to the augmentation transforms without actually seeing any augmented training data.
We apply this augmentation strategy to Omniglot
(Lake et al., 2015) and MiniImagenet (Vinyals et al., 2016)
few shot classiﬁcation to create the Aug-Omniglot and Aug-MiniImagenet benchmarks.
Our data augmentation function contains a combination of random rotations, ﬂips, and resizes (rescaling), which we only apply to task validation data as described above.
The problem is set up analogous to (Finn et al., 2017): for each task, the model must classify images into one of either 5 or 20 classes ( n -way) and receives either 1 or 5 examples of each class in the task training data ( kshot). Of course, unlike Finn et al. (2017) our Aug-Omniglot and Aug-MiniImagenet benchmarks contain transformed task validation data.
We tried combining Alg. 2 with our MSR method and three other meta-learning algorithms: MAML (Finn et al., 2017), ANIL (Raghu et al., 2019), and Prototypical Networks (ProtoNets)
(Snell et al., 2017).
While the latter three methods all have the potential to learn equivariant features through
Alg. 2, we hypothesize that since MSR enforces learned equivariance through its symmetry matrices it should outperform these feature-metalearning methods.
We also paired MAML with a model that has built in rotation and reﬂection equivariance using steerable ﬁlters from Weiler and Cesa (2019).
We call this baseline “MAML+D8” since its 45  rotation and reﬂection symmetries correspond to the dihedral group D8.
Appendix D.3 describes the experimental setup and methods implementations in more detail.
Table 3 shows each method’s meta-test accuracies on both benchmarks.
Across different settings
MSR performs either comparably to the best method, or the best.
MAML and ANIL perform similarly to each other, and usually worse than MSR, suggesting that learning equivariant or invariant features is not as helpful as learning equivariant layer structures.
ProtoNets perform well on the easier Aug-Omniglot benchmark, but evidently struggle with learning a transformation invariant metric space on the harder Aug-MiniImagenet problems.
Note that MSR’s reparameterization increases the number of meta-learned parameters at each layer, so MSR models contain more total parameters than [Table]
corresponding MAML models. The “MAML (Big)” results show MAML performance with very large models containing more total parameters than the corresponding MSR models.
The results show that MSR also outperforms these larger MAML models despite having fewer total parameters.
D ISCUSSION AND F UTURE W ORK
We introduce a method for automatically meta-learning equivariances in neural network models, by encoding learned equivariance-inducing parameter sharing patterns in each layer.
On new tasks, these sharing patterns reduce the number of task-speciﬁc parameters and improve generalization.
Our experiments show that this method can improve few-shot generalization on task distributions with shared underlying symmetries.
We also introduce a strategy for meta-training invariances into networks using data augmentation, and show that it works well with our method.
By encoding equivariances into the network as a parameter sharing pattern, our method has the beneﬁt of preserving learned equivariances on new tasks so it can learn more efﬁciently.
Machine learning thus far has beneﬁted from exploiting human knowledge of problem symmetries, and we believe this work presents a step towards learning and exploiting symmetries automatically.
This work leads to numerous directions for future investigation.
In addition to generalization beneﬁts, standard convolution is practical since it exploits the parameter sharing structure to improve computational efﬁciency, relative to a fully connected layer of the same input/output dimensions.
While MSR we can improve computational efﬁciency by reparameterizing standard convolution layers, it does not exploit learned structure to further optimize its computation.
Can we automatically learn or ﬁnd efﬁcient implementations of these more structured operations?
Additionally, MSR is focused on learning ﬁnite symmetry groups, while approximating inﬁnite ones (e.g., learning 45  - increment rotation symmetry as an approximation to continuous rotation symmetry).
Unfortunately, the number of parameters increases with the resolution of the approximation, so further research would be useful in discovering more scalable methods of approximating and learning continuous symmetries.
Finally, our method is best for learning symmetries which are shared across a distribution of tasks.
Further research on quickly discovering symmetries which are particular to a single task would make deep learning methods signiﬁcantly more useful on many difﬁcult real world problems.