Title: META-LEARNING UPDATE RULES FOR UNSUPER-VISED REPRESENTATION LEARNING

Abstract: A major goal of unsupervised learning is to discover data representations that are useful for subsequent tasks, without access to supervised labels during training. Typically, this involves minimizing a surrogate objective, such as the negative log likelihood of a generative model, with the hope that representations useful for subsequent tasks will arise as a side effect. In this work, we propose instead to directly target later desired tasks by meta-learning an unsupervised learning rule which leads to representations useful for those tasks. Specifically, we target semi-supervised classification performance, and we meta-learn an algorithman unsupervised weight update rule -that produces representations useful for this task. Additionally, we constrain our unsupervised update rule to a be a biologically-motivated, neuron-local function, which enables it to generalize to different neural network architectures, datasets, and data modalities. We show that the meta-learned update rule produces useful features and sometimes outperforms existing unsupervised learning techniques. We further show that the meta-learned unsupervised update rule generalizes to train networks with different widths, depths, and nonlinearities. It also generalizes to train on data with randomly permuted input dimensions and even generalizes from image datasets to a text task.
Published as a conference paper at ICLR 2019 we learn a transferable learning rule which does not require access to labels and generalizes across both data domains and neural network architectures. Although we focus on the meta-objective of semi-supervised classification here, in principle a learning rule could be optimized to generate representations for any subsequent task.
RELATED WORK
Unsupervised learning is a topic of broad and diverse interest. Here we briefly review several techniques that can lead to a useful latent representation of a dataset. In contrast to our work, each method imposes a manually defined training algorithm or loss function whereas we learn the algorithm that creates useful representations as determined by a meta-objective.
Autoencoders (Hinton and Salakhutdinov, 2006) work by first compressing and optimizing reconstruction loss. Extensions have been made to de-noise data (Vincent et al., 2008; 2010) , as well as compress information in an information theoretic way (Kingma and Welling, 2013) . Le et al. (2011) further explored scaling up these unsupervised methods to large image datasets.
Generative adversarial networks (Goodfellow et al., 2014) take another approach to unsupervised feature learning. Instead of a loss function, an explicit min-max optimization is defined to learn a generative model of a data distribution. Recent work has shown that this training procedure can learn unsupervised features useful for few shot learning (Radford et al., 2015; Donahue et al., 2016; Dumoulin et al., 2016) .
Other techniques rely on self-supervision where labels are easily generated to create a non-trivial 'supervised' loss. Domain knowledge of the input is often necessary to define these losses. Noroozi and Favaro ( 2016) use unscrambling jigsaw-like crops of an image. Techniques used by Misra et al. (2016) and Sermanet et al. (2017) rely on using temporal ordering from videos.
Another approach to unsupervised learning relies on feature space design such as clustering. Coates and Ng (2012) showed that k-means can be used for feature learning. Xie et al. ( 2016) jointly learn features and cluster assignments. Bojanowski and Joulin (2017) develop a scalable technique to cluster by predicting noise. Other techniques such as Schmidhuber (1992), Hochreiter and Schmidhuber (1999), and Olshausen and Field (1997) define various desirable properties about the latent representation of the input, such as predictability, complexity of encoding mapping, independence, or sparsity, and optimize to achieve these properties.
Most meta-learning algorithms consist of two levels of learning, or 'loops' of computation: an inner loop, where some form of learning occurs (e.g. an optimization process), and an outer loop or metatraining loop, which optimizes some aspect of the inner loop, parameterized by meta-parameters. The performance of the inner loop computation for a given set of meta-parameters is quantified by a meta-objective. Meta-training is then the process of adjusting the meta-parameters so that the inner loop performs well on this meta-objective. Meta-learning approaches differ by the computation performed in the inner loop, the domain, the choice of meta-parameters, and the method of optimizing the outer loop. Some of the earliest work in meta-learning includes work by Schmidhuber (1987), which explores a variety of meta-learning and self-referential algorithms. Similarly to our algorithm, Bengio et al. (1990; 1992) propose to learn a neuron local learning rule, though their approach differs in task and problem formulation. Additionally, Runarsson and Jonsson (2000) meta-learn supervised learning rules which mix local and global network information. A number of papers propose meta-learning for few shot learning (Vinyals et al., 2016; Ravi and Larochelle, 2016; Mishra et al., 2017; Finn et al., 2017; Snell et al., 2017) , though these do not take advantage of unlabeled data. Others make use of both labeled and unlabeld data (Ren et al., 2018) . Hsu et al. (2018) uses a task created with no supervision to then train few-shot detectors. Garg (2018) use meta-learning for unsupervised learning, primarily in the context of clustering and with a small number of meta-parameters.

1. INTRODUCTION:

Supervised learning has proven extremely effective for many problems where large amounts of labeled training data are available. There is a common hope that unsupervised learning will prove similarly powerful in situations where labels are expensive, impractical to collect, or where the prediction target is unknown during training. Unsupervised learning however has yet to fulfill this promise. One explanation for this failure is that unsupervised representation learning algorithms are typically mismatched to the target task. Ideally, learned representations should linearly expose high level attributes of data (e.g. object identity) and perform well in semi-supervised settings. Many current unsupervised objectives, however, optimize for objectives such as log-likelihood of a generative model or reconstruction error, producing useful representations only as a side effect.

Unsupervised representation learning seems uniquely suited for meta-learning (Hochreiter et al., 2001; Schmidhuber, 1995) . Unlike most tasks where meta-learning is applied, unsupervised learning does not define an explicit objective, which makes it impossible to phrase the task as a standard optimization problem. It is possible, however, to directly express a meta-objective that captures the quality of representations produced by an unsupervised update rule by evaluating the usefulness of the representation for candidate tasks. In this work, we propose to meta-learn an unsupervised update rule by meta-training on a meta-objective that directly optimizes the utility of the unsupervised representation. Unlike hand-designed unsupervised learning rules, this meta-objective directly targets the usefulness of a representation generated from unlabeled data for later supervised tasks.

By recasting unsupervised representation learning as meta-learning, we treat the creation of the unsupervised update rule as a transfer learning problem. Instead of learning transferable features, x 0 , is passed through the base model, which is parameterised by W and colored green. The goal of the UnsupervisedUpdate is to modify W to achieve a top layer representation x L which performs well at few-shot learning. In order to train the base model, information is propagated backwards by the UnsupervisedUpdate in a manner analogous to backprop. Unlike in backprop however, the backward weights V are decoupled from the forward weights W . Additionally, unlike backprop, there is no explicit error signal as there is no loss. Instead at each layer, and for each neuron, a learning signal is injected by a meta-learned MLP parameterized by θ, with hidden state h. Weight updates are again analogous to those in backprop, and depend on the hidden state of the pre-and postsynaptic neurons for each weight.

To allow easy comparison against other existing approaches, we present a more extensive survey of previous work in meta-learning in table form in Table 1 , highlighting differences in choice of task, structure of the meta-learning problem, choice of meta-architecture, and choice of domain.

To our knowledge, we are the first meta-learning approach to tackle the problem of unsupervised representation learning, where the inner loop consists of unsupervised learning. This contrasts with transfer learning, where a neural network is instead trained on a similar dataset, and then fine tuned or otherwise post-processed on the target dataset. We additionally believe we are the first representation meta-learning approach to generalize across input data modalities as well as datasets, the first to generalize across permutation of the input dimensions, and the first to generalize across neural network architectures (e.g. layer width, network depth, activation function).

3. MODEL DESIGN:

We consider a multilayer perceptron (MLP) with parameters φ t as the base model. The inner loop of our meta-learning process trains this base model via iterative application of our learned update rule. See Figure 1 for a schematic illustration and Appendix A for a more detailed diagram.

In standard supervised learning, the 'learned' optimizer is stochastic gradient descent (SGD). A supervised loss l (x, y) is associated with this model, where x is a minibatch of inputs, and y are the corresponding labels. The parameters φ t of the base model are then updated iteratively by performing SGD using the gradient ∂l(x,y) ∂φt . This supervised update rule can be written as φ t+1 = SupervisedUpdate(φ t , x t , y t ; θ), where t denotes the inner-loop iteration or step. Here θ are the meta-parameters of the optimizer, which consist of hyper-parameters such as learning rate and momentum.

In this work, our learned update is a parametric function which does not depend on label information, φ t+1 = UnsupervisedUpdate(φ t , x t ; θ). This form of the update rule is general, it encompasses many unsupervised learning algorithms and all methods in Section 2.1.

In traditional learning algorithms, expert knowledge or a simple hyper-parameter search determines θ, which consists of a handful of meta-parameters such as learning rate and regularization constants. In contrast, our update rule will have orders of magnitude more meta-parameters, including the weights of a neural network. We train these meta-parameters by performing SGD on the sum of the MetaObjective over the course of (inner loop) training in order to find optimal parameters θ * ,

EQUATION

that minimize the meta-objective over a distribution of training tasks. Note that φ t is a function of θ since θ affects the optimization trajectory.

In the following sections, we briefly review the main components of this model: the base model, the UnsupervisedUpdate, and the MetaObjective. See the Appendix for a complete specification.

Additionally, code and meta-trained parameters θ for our meta-learned UnsupervisedUpdate is available1 .

3.1. BASE MODEL:

Our base model consists of a standard fully connected multi-layer perceptron (MLP), with batch normalization (Ioffe and Szegedy, 2015) , and ReLU nonlinearities. We chose this as opposed to a convolutional model to limit the inductive bias of convolutions in favor of learned behavior from the UnsupervisedUpdate. We call the pre-nonlinearity activations z 1 , • • • , z L , and post-nonlinearity activations x 0 , • • • , x L , where L is the total number of layers, and

x 0 ≡ x is the network input (raw data). The parameters are φ = W 1 , b 1 , V 1 , • • • , W L , b L , V L

, where W l and b l are the weights and biases (applied after batch norm) for layer l, and V l are the corresponding weights used in the backward pass.

3.2. LEARNED UPDATE RULE:

We wish for our update rule to generalize across architectures with different widths, depths, or even network topologies. To achieve this, we design our update rule to be neuron-local, so that updates are a function of pre-and post-synaptic neurons in the base model, and are defined for any base model architecture. This has the added benefit that it makes the weight updates more similar to synaptic updates in biological neurons, which depend almost exclusively on local pre-and post-synaptic neuronal activity (Whittington and Bogacz, 2017) . In practice, we relax this constraint and incorporate some cross neuron information to decorrelate neurons (see Appendix G.5 for more information).

To build these updates, each neuron i in every layer l in the base model has an MLP, referred to as an update network, associated with it, with output h l b i = MLP x l b i, z b i l , V l+1 , δ l+1 ; θ where b indexes the training minibatch. The inputs to the MLP are the feedforward activations (x l & z l ) defined above, and feedback weights and an error signal (V l and δ l , respectively) which are defined below.

All update networks share meta-parameters θ. Evaluating the statistics of unit activation over a batch of data has proven helpful in supervised learning (Ioffe and Szegedy, 2015) . It has similarly proven helpful in hand-designed unsupervised learning rules, such as sparse coding and clustering. We therefore allow h l bi to accumulate statistics across examples in each training minibatch. During an unsupervised training step, the base model is first run in a standard feed-forward fashion, populating x l bi , z l bi . As in supervised learning, an error signal δ l bi is then propagated backwards through the network. Unlike in supervised backprop, however, this error signal is generated by the corresponding update network for each unit. It is read out by linear projection of the per-neuron hidden state h, δ l bi = lin h l bi , and propogated backward using a set of learned 'backward weights' (V l ) T , rather than the transpose of the forward weights (W l ) T as would be the case in backprop (diagrammed in Figure 1 ). This is done to be more biologically plausible (Lillicrap et al., 2016) .

Again as in supervised learning, the weight updates (∆W l ) are a product of pre-and post-synaptic signals. Unlike in supervised learning however, these signals are generated using the per-neuron update networks: ∆W l ij = func h l bi , h l-1 bj , W ij . The full weight update (which involves normalization and decorrelation across neurons) is defined in Appendix G.5.

3.3. META-OBJECTIVE:

The meta-objective determines the quality of the unsupervised representations. In order to meta-train via SGD, this loss must be differentiable. The meta-objective we use in this work is based on fitting a linear regression to labeled examples with a small number of data points. In order to encourage the learning of features that generalize well, we estimate the linear regression weights on one minibatch {x a , y a } of K data points, and evaluate the classification performance on a second minibatch {x b , y b } also with K datapoints,

EQUATION

where x L a , x L b are features extracted from the base model on data x a , x b , respectively. The target labels y a , y b consist of one hot encoded labels and potentially also regression targets from data augmentation (e.g. rotation angle, see Section 4.2). We found that using a cosine distance, CosDist, rather than unnormalized squared error improved stability. Note this meta-objective is only used during meta-training and not used when applying the learned update rule. The inner loop computation is performed without labels via the UnsupervisedUpdate.

4. TRAINING THE UPDATE RULE:



4.1. APPROXIMATE GRADIENT BASED TRAINING:

We choose to meta-optimize via SGD as opposed to reinforcement learning or other black box methods, due to the superior convergence properties of SGD in high dimensions, and the high dimensional nature of θ. Training and computing derivatives through long recurrent computation of this form is notoriously difficult (Pascanu et al., 2013) . To improve stability and reduce the computational cost we approximate the gradients ∂ [MetaObjective] ∂θ via truncated backprop through time (Shaban et al., 2018) . Many additional design choices were also crucial to achieving stability and convergence in meta-learning, including the use of batch norm, and restricting the norm of the UnsupervisedUpdate update step (a full discussion of these and other choices is in Appendix B).

4.2. META-TRAINING DISTRIBUTION AND GENERALIZATION:

Generalization in our learned optimizer comes from both the form of the UnsupervisedUpdate (Section 3.2), and from the meta-training distribution. Our meta-training distribution is composed of both datasets and base model architectures.

We construct a set of training tasks consisting of CIFAR10 (Krizhevsky and Hinton, 2009) and multi-class classification from subsets of classes from Imagenet (Russakovsky et al., 2015) as well as from a dataset consisting of rendered fonts (Appendix H.1.1). We find that increased training dataset variation actually improves the meta-optimization process. To reduce computation we restrict the input data to 16x16 pixels or less during meta-training, and resize all datasets accordingly. For evaluation, we use MNIST (LeCun et al., 1998) , Fashion MNIST (Xiao et al., 2017) , IMDB (Maas et al., 2011) , and a hold-out set of Imagenet classes. We additionally sample the base model architecture. We sample number of layers uniformly between 2-5 and the number of units per layer logarithmically between 64 to 512.

As part of preprocessing, we permute all inputs along the feature dimension, so that the UnsupervisedUpdate must learn a permutation invariant learning rule. Unlike other work, we focus explicitly on learning a learning algorithm as opposed to the discovery of fixed feature extractors that generalize across similar tasks. This makes the learning task much harder, as the UnsupervisedUpdate has to discover the relationship between pixels based solely on their joint statistics, and cannot "cheat" and memorize pixel identity. To provide further dataset variation, we additionally augment the data with shifts, rotations, and noise. We add these augmentation coefficients as additional regression targets for the meta-objective-e.g. rotate the image and predict the rotation angle as well as the image class. For additional details, see Appendix H.1.1.

4.3. DISTRIBUTED IMPLEMENTATION:

We implement the above models in distributed TensorFlow (Abadi et al., 2016) . Training uses 512 workers, each of which performs a sequence of partial unrolls of the inner loop UnsupervisedUpdate, and computes gradients of the meta-objective asynchronously. Training takes ∼8 days, and consists of ∼200 thousand updates to θ with minibatch size 256. Additional details are in Appendix C.

5. EXPERIMENTAL RESULTS:

First, we examine limitations of existing unsupervised and meta learning methods. Then, we show meta-training and generalization properties of our learned optimizer and finally we conclude by visualizing how our learned update rule works. For details of the experimental setup, see Appendix H.

5.1. OBJECTIVE FUNCTION MISMATCH AND EXISTING META-LEARNING METHODS:

To illustrate the negative consequences of objective function mismatch in unsupervised learnin algorithms, we train a variational autoencoder on 16x16 CIFAR10. Over the course of training we evaluate classification performance from few shot classification using the learned latent representations. Training curves can be seen in Figure 2 . Despite continuing to improve the VAE objective throughout training (not shown here), the classification accuracy decreases sharply later in training.

To demonstrate the reduced generalization that results from learning transferable features rather than an update algorithm, we train a prototypical network (Snell et al., 2017) with and without the input shuffling described in Section 4.2. As the prototypical network primarily learns transferrable features, performance is significantly hampered by input shuffling. Results are in Figure 2 . Continuing to optimize a variational auto-encoder (VAE) hurts few-shot accuracy after some number of steps (dashed line). Right: Prototypical networks transfer features rather than a learning algorithm, and perform poorly if tasks don't have consistent data structure. Training a prototypical network with a fully connected architecture (same as our base model) on a MiniImagenet 10-way classification task with either intact inputs (light purple) or by permuting the pixels before every training and testing task (dark purple). Performance with permuted inputs is greatly reduced (gray line). Our performance is invariant to pixel permutation.

5.2. META-OPTIMIZATION:

While training, we monitor a rolling average of the meta-objective averaged across all datasets, model architectures, and the number of unrolling steps performed. In Figure 3 the training loss is continuing to decrease after 200 hours of training, which suggests that the approximate training techniques still produce effective learning. In addition to this global number, we measure performance obtained by rolling out the UnsupervisedUpdate on various meta-training and meta-testing datasets. We see that on held out image datasets, such as MNIST and Fashion Mnist, the evaluation loss is still decreasing. However, for datasets in a different domain, such as IMDB sentiment prediction (Maas et al., 2011) , we start to see meta-overfitting. For all remaining experimental results, unless otherwise stated, we use meta-parameters, θ, for the UnsupervisedUpdate resulting from 200 hours of meta-training. 

5.3. GENERALIZATION:

The goal of this work is to learn a general purpose unsupervised representation learning algorithm. As such, this algorithm must be able to generalize across a wide range of scenarios, including tasks that are not sampled i.i.d. from the meta-training distribution. In the following sections, we explore a subset of the factors we seek to generalize over.

Generalizing over datasets and domains:

In Figure 4 , we compare performance on few shot classification with 10 examples per class. We evaluate test performance on holdout datasets of MNIST and Fashion MNIST at 2 resolutions: 14×14 and 28×28 (larger than any dataset experienced in meta-training). On the same base model architecture, our learned UnsupervisedUpdate leads to performance better than a variational autoencoder, supervised learning on the labeled examples, and random initialization with trained readout layer. To further explore generalization limits, we test our learned optimizer on data from a vastly different domain. We train on a binary text classification dataset: IMDB movie reviews (Maas et al., 2011) , encoded by computing a bag of words with 1K words. We evaluate using a model 30 hours and 200 hours into meta-training (see Figure 4 ). Despite being trained exclusively on image datasets, the 30 hour learned optimizer improves upon the random initialization by almost 10%. When meta-training for longer, however, the learned optimizer "meta-overfits" to the image domain resulting in poor performance. This performance is quite low in an absolute sense, for this task. Nevertheless, we find this result very exciting as we are unaware of any work showing this kind of transfer of learned rules from images to text.

TinyMnist:



Generalizing over network architectures:

We train models of varying depths and unit counts with our learned optimizer and compare results at different points in training (Figure 5 ). We find that despite only training on networks with 2 to 5 layers and 64 to 512 units per layer, the learned rule generalizes to 11 layers and 10,000 units per layer. Next we look at generalization over different activation functions. We apply our learned optimizer on base models with a variety of different activation functions. Performance evaluated at different points in training (Figure 5 ). Despite training only on ReLU activations, our learned optimizer is able to improve on random initializations in all cases. For certain activations, leaky ReLU (Maas et al., 2013) and Swish (Ramachandran et al., 2017) , there is little to no decrease in performance. Another interesting case is the step activation function. These activations are traditionally challenging to train as there is no useful gradient signal. Despite this, our learned UnsupervisedUpdate is capable of optimizing as it does not use base model gradients, and achieves performance double that of random initialization.

5.4. HOW IT LEARNS AND HOW IT LEARNS TO LEARN:

To analyze how our learned optimizer functions, we analyze the first layer filters over the course of meta-training. Despite the permutation invariant nature of our data (enforced by shuffling input image pixels before each unsupervised training run), the base model learns features such as those shown in Figure 6 , which appear template-like for MNIST, and local-feature-like for CIFAR10. Early in training, there are coarse features, and a lot of noise. As the meta-training progresses, more interesting and local features emerge.

In an effort to understand what our algorithm learns to do, we fed it data from the two moons dataset. We find that despite being a 2D dataset, dissimilar from the image datasets used in meta-training, the learned model is still capable of manipulating and partially separating the data manifold in a purely unsupervised manner (Figure 6 ). We also find that almost all the variance in the embedding space is dominated by a few dimensions. As a comparison, we do the same analysis on MNIST. In this setting, the explained variance is spread out over more of the principal components. This makes sense as the generative process contains many more latent dimensions -at least enough to express the 10 digits. 

6. DISCUSSION:

In this work we meta-learn an unsupervised representation learning update rule. We show performance that matches or exceeds existing unsupervised learning on held out tasks. Additionally, the update rule can train models of varying widths, depths, and activation functions. More broadly, we demonstrate an application of meta-learning for learning complex optimization tasks where no objective is explicitly defined. Analogously to how increased data and compute have powered supervised learning, we believe this work is a proof of principle that the same can be done with algorithm design-replacing hand designed techniques with architectures designed for learning and learned from data via metalearning.

A MORE DETAILED SYSTEM DIAGRAM:

∂[MetaObjective] ∂θ _ + Unlabeled Data Forward Pass Backward Pass Φ t Φ t+1 + ΔΦ x 0 x 1 x 2 δ 0 h 0 x 3 h 1 h 2 h 3 δ 1 δ 2 ΔΦ t 1 ΔΦ t 2 ΔΦ t 3 Φ t 1 Φ t 2 Φ t 3 Backward (θ) Weight Update (θ)

x 1 The "backward" pass through the base model uses an error signal from the layer above, δ, which is generated by a meta-learned function. e.) The weight updates ∆φ are computed using a convolutional network, using δ and x from the pre-and post-synaptic neurons, along with several other terms discussed in the text.

Convolutional:



B STABILIZING GRADIENT BASED META-LEARNING TRAINING:

Training and computing derivatives through recurrent computation of this form is notoriously difficult Pascanu et al. (2013) . Training parameters of recurrent systems in general can lead to chaos. We used the usual techniques such as gradient clipping (Pascanu et al., 2012) , small learning rates, and adaptive learning rate methods (in our case Adam (Kingma and Ba, 2014)), but in practice this was not enough to train most UnsupervisedUpdate architectures. In this section we address other techniques needed for stable convergence.

When training with truncated backprop the problem shifts from pure optimization to something more like optimizing on a Markov Decision Process where the state space is the base-model weights, φ, and the 'policy' is the learned optimizer. While traversing these states, the policy is constantly meta-optimized and changing, thus changing the distribution of states the optimizer reaches. This type of non-i.i.d training has been discussed at great length with respect to on and off-policy RL training algorithms (Mnih et al., 2013) . Other works cast optimizer meta-learning as RL (Li and Malik, 2017) for this very reason, at a large cost in terms of gradient variance. In this work, we partially address this issue by training a large number of workers in parallel, to always maintain a diverse set of states when computing gradients.

For similar reasons, the number of steps per truncation, and the total number of unsupervised training steps, are both sampled in an attempt to limit the bias introduced by truncation.

We found restricting the maximum inner loop step size to be crucial for stability. Pearlmutter (1996) studied the effect of learning rates with respect to the stability of optimization and showed that as the learning rate increases gradients become chaotic. This effect was later demonstrated with respect to neural network training in Maclaurin et al. (2015) . If learning rates are not constrained, we found that they rapidly grew and entered this chaotic regime.

Another technique we found useful in addressing these problems is the use of batch norm in both the base model and in the UnsupervisedUpdate rule. Multi-layer perceptron training traditionally requires very precise weight initialization for learning to occur. Poorly scaled initialization can make learning impossible (Schoenholz et al., 2016) . When applying a learned optimizer, especially early in meta-training of the learned optimizer, it is very easy for the learned optimizer to cause high variance weights in the base model, after which recovery is difficult. Batch norm helps solve this issues by making more of the weight space usable.

C DISTRIBUTED IMPLEMENTATION:

We implement the described models in distributed Tensorflow (Abadi et al., 2016) . We construct a cluster of 512 workers, each of which computes gradients of the meta-objective asynchronously. Each worker trains on one task by first sampling a dataset, architecture, and a number of training steps. Next, each worker samples k unrolling steps, does k applications of the UnsupervisedUpdate(•; θ), computes the MetaObjective on each new state, computes ∂[MetaObjective] ∂θ and sends this gradient to a parameter server. The final base-model state, φ, is then used as the starting point for the next unroll until the specified number of steps is reached. These gradients from different workers are batched and θ is updated with asynchronous SGD. By batching gradients as workers complete unrolls, we eliminate most gradient staleness while retaining the compute efficiency of asynchronous workers, especially given heterogeneous workloads which arise from dataset and model size variation. An overview of our training can be seen in algorithm F. Due to the small base models and the sequential nature of our compute workloads, we use multi core CPUs as opposed to GPUs. Training occurs over the course of ∼8 days with ∼200 thousand updates to θ with minibatch size 256. For sampling the number of truncated steps (number of times the above unrolls are performed), we use a shifted normal distribution -a normal distribution with the same mean and standard deviation. We chose this based on the expected distribution of the training step, φ iteration number, across the cluster of workers. We initially set the standard deviation low, 20, but slowly increased it over the course of 5000 steps to 20k steps. This slow increase also improved stability and training speed.

H.3 EXPERIMENTAL SETUP:

For each experimental figure, we document the details.

H.3.1 OBJECTIVE FUNCTION MISMATCH:

The VAE we used consists of 3 layers, size 128, with ReLU activations and batch norm between each layer. We then learn a projection to mean and log std of size 32. We sample, and use the inverse architecture to decode back to images. We use a quantized normal distribution (once again parameterized as mean and log std) as a posterior. We train with Adam with a learning rate of 1e-4. To isolate the effects of objective function mismatch and overfitting, we both train on the unlabeled training set and evaluate on the labeled training set instead of a validation set.

H.3.2 GENERALIZATION: DATASET AND DOMAIN:

We use a 4 layer, size 128 unit architecture with a 32 layer embedding for all models. We select performance at 100k training steps for the VAE, and 3k for our learned optimizer.

Our supervised learning baseline consists of the same architecture for the base model but with an additional layer that outputs log probabilities. We train with cross entropy loss on a dataset consisting of only 10 examples per class (to match the other numbers). Surprisingly, the noise from batch norm acts as a regularizer, and allowing us to avoid needing a complex early stopping scheme as test set performance simply plateaus over the course of 10k steps. We train with Adam with a learning rate of 3e-3, selected via a grid over learning rate on test set performance. In this setting, having a true validation set would dramatically lower the amount of labeled data available (only 100 labeled examples) and using the test set only aids in the this baseline's performance.

For the IMDB experiments, we tokenized and selected the top 1K words with an additional set of tokens for unknown, sentence start, and sentence end. Our encoding consisted of a 1 if the word is present, otherwise 0. We used the same 4 layer, 128 hidden unit MLP with an addition layer outputting a 32 dimensional embedding.

H.3.3 GENERALIZATION: NETWORK ARCHITECTURE:

We used ReLU activations and 4 layers of size 128 with an additional layer to 32 units unless otherwise specified by the specific experiment.

H.3.4 EXISTING META LEARNING MODELS:

We trained prototypical networks (Snell et al., 2017) on either intact or shuffled mini-Imagenet images. For shuffled images, we generated a fixed random permutation for the inputs independently for every instantiation of the base network (or 'episode' in the meta-learning literature (Vinyals et al., 2016; Ravi and Larochelle, 2016) ). The purpose of shuffling was to demonstrate the inductive bias of this type of meta-learning, namely that they do not generalize across data domain. Note that the base network trained was the same fully connected architecture like that used in this paper (3 layers, size 128, with ReLU activations and batch normalization between layers). Though the original paper used a convolutional architecture, here we swapped it with the fully connected architecture because the tied weights in a convolutional model do not make sense with shuffled pixels.

:

https://github.com/tensorflow/models/tree/master/research/learning_ unsupervised_learning

Figures and Tables:

Figure 1: Left: Schematic for meta-learning an unsupervised learning algorithm. The inner loop computation consists of iteratively applying the UnsupervisedUpdate to a base model. During metatraining the UnsupervisedUpdate (parameterized by θ) is itself updated by gradient descent on the MetaObjective. Right: Schematic of the base model and UnsupervisedUpdate. Unlabeled input data,x 0 , is passed through the base model, which is parameterised by W and colored green. The goal of the UnsupervisedUpdate is to modify W to achieve a top layer representation x L which performs well at few-shot learning. In order to train the base model, information is propagated backwards by the UnsupervisedUpdate in a manner analogous to backprop. Unlike in backprop however, the backward weights V are decoupled from the forward weights W . Additionally, unlike backprop, there is no explicit error signal as there is no loss. Instead at each layer, and for each neuron, a learning signal is injected by a meta-learned MLP parameterized by θ, with hidden state h. Weight updates are again analogous to those in backprop, and depend on the hidden state of the pre-and postsynaptic neurons for each weight.

Figure 2: Left: Standard unsupervised learning approaches suffer from objective function missmatch.Continuing to optimize a variational auto-encoder (VAE) hurts few-shot accuracy after some number of steps (dashed line). Right: Prototypical networks transfer features rather than a learning algorithm, and perform poorly if tasks don't have consistent data structure. Training a prototypical network with a fully connected architecture (same as our base model) on a MiniImagenet 10-way classification task with either intact inputs (light purple) or by permuting the pixels before every training and testing task (dark purple). Performance with permuted inputs is greatly reduced (gray line). Our performance is invariant to pixel permutation.

Figure 3: Training curves for the training and evaluation task distributions. Our train set consists of MiniImagenet, Alphabet, and MiniCIFAR. Our test sets are Mini Imagenet Test, Tiny Fashion MNIST, Tiny MNIST and IMDB. Error bars denote standard deviation of evaluations with a fixed window of samples evaluated from a single model. Dashed line at 200 hours indicates model used for remaining experiments unless otherwise stated. For a bigger version of this figure, see Appendix E.

Figure 4: Left: The learned UnsupervisedUpdate generalizes to unseen datasets. Our learned update rule produces representations more suitable for few shot classification than those from random initialization or a variational autoecoder and outperforms fully supervised learning on the same labeled examples. Error bars show standard error. Right: Early in meta-training (purple), the UnsupervisedUpdate is able to learn useful features on a 2 way text classification data set, IMDB, despite being meta-trained only from image datasets. Later in meta-training (red) performance drops due to the domain mismatch. We show inner-loop training, consisting of 5k applications of the UnsupervisedUpdate evaluating the MetaObjective each iteration. Error bars show standard error across 10 runs.

Figure 5: Left: The learned UnsupervisedUpdate is capable of optimizing base models with hidden sizes and depths outside the meta-training regime. As we increase the number of units per layer, the learned model can make use of this additional capacity despite never having experienced it during meta-training. Right: The learned UnsupervisedUpdate generalizes across many different activation functions not seen in training. We show accuracy over the course of training on 14x14 MNIST.

Figure 6: Left: From left to right we show first layer base model receptive fields produced by our learned UnsupervisedUpdate rule over the course of meta-training. Each pane consists of first layer filters extracted from φ after 10k applications of UnsupervisedUpdate on MNIST (top) and CIFAR10 (bottom). For MNIST, the optimizer learns image-template-like features. For CIFAR10, low frequency features evolve into higher frequency and more spatially localized features. For more filters, see Appendix D. Center: Visualization of learned representations before (left) and after (right) training a base model with our learned UnsupervisedUpdate for two moons (top) and MNIST (bottom). The UnsupervisedUpdate is capable of manipulating the data manifold, without access to labels, to separate the data classes. Visualization shows a projection of the 32-dimensional representation of the base network onto the top three principal components. Right: Cumulative variance explained using principal components analysis (PCA) on the learned representations. The representation for two moons data (red) is much lower dimensional than MNIST (blue), although both occupy a fraction of the full 32-dimensional space.

Figure App.1: Schematic for meta-learning an unsupervised learning algorithm. We show the hierarchical nature of both the meta-training procedure and update rule. a) Meta-training, where the meta-parameters, θ, are updated via our meta-optimizer (SGD). b) The gradients of the MetaObjective with respect to θ are computed by backpropagation through the unrolled application of the UnsupervisedUpdate. c) UnsupervisedUpdate updates the base model parameters (φ) using a minibatch of unlabeled data. d) Each application of UnsupervisedUpdate involves computing a forward and "backward" pass through the base model. The base model itself is a fully connected network producing hidden states x l for each layer l. The "backward" pass through the base model uses an error signal from the layer above, δ, which is generated by a meta-learned function. e.) The weight updates ∆φ are computed using a convolutional network, using δ and x from the pre-and post-synaptic neurons, along with several other terms discussed in the text.

Figure App.2: More filters extracted over the course of meta-training. Note, due to implementation reasons, the columns do not represent the same point / same iteration of θ. Each filter is extracted after 10k inner loop optimization steps, at φ 10k . From top to bottom we show: MNIST, Tiny MNIST, Alphabet, CIFAR10, and Mini CIFAR10. Filters shift from noise at initialization to more local features later in meta-training.

A comparison of published meta-learning approaches.

Table content: <table><tr><td>Method</td><td>Inner loop updates</td><td colspan="3">Outer loop updates, meta-</td><td>Generalizes to</td></tr><tr><td/><td/><td>parameters</td><td>objective</td><td>optimizer</td><td/></tr><tr><td>Hyper parameter optimization</td><td>many steps of optimization</td><td>optimization</td><td>training or</td><td>Baysian</td><td>test data from a</td></tr><tr><td>Jones (2001); Snoek et al. (2012);</td><td/><td>hyper-</td><td>validation</td><td>methods,</td><td>fixed dataset</td></tr><tr><td>Bergstra et al. (2011); Bergstra</td><td/><td>parameters</td><td>set loss</td><td>random</td><td/></tr><tr><td>and Bengio (2012)</td><td/><td/><td/><td>search, etc</td><td/></tr><tr><td>Neural architecture search Stanley</td><td>supervised SGD training</td><td>architecture</td><td>validation</td><td>RL or</td><td>test loss within</td></tr><tr><td>and Miikkulainen (2002); Zoph</td><td>using meta-learned</td><td/><td>set loss</td><td>evolution</td><td>similar datasets</td></tr><tr><td>and Le (2017); Baker et al. (2017);</td><td>architecture</td><td/><td/><td/><td/></tr><tr><td>Zoph et al. (2018); Real et al.</td><td/><td/><td/><td/><td/></tr><tr><td>(2017)</td><td/><td/><td/><td/><td/></tr><tr><td>Task-specific optimizer (eg for</td><td>adjustment of model weights</td><td>LSTM weights</td><td>task loss</td><td>SGD</td><td>similar domain</td></tr><tr><td>quadratic function identification)</td><td>by an LSTM</td><td/><td/><td/><td>tasks</td></tr><tr><td>(Hochreiter et al., 2001)</td><td/><td/><td/><td/><td/></tr><tr><td>Learned optimizers Jones (2001);</td><td>many steps of optimization of</td><td>parametric</td><td>average or</td><td>SGD or</td><td>new loss</td></tr><tr><td>Maclaurin et al. (2015);</td><td>a fixed loss function</td><td>optimizer</td><td>final loss</td><td>RL</td><td>functions</td></tr><tr><td>Andrychowicz et al. (2016); Chen</td><td/><td/><td/><td/><td>(mixed success)</td></tr><tr><td>et al. (2016); Li and Malik (2017);</td><td/><td/><td/><td/><td/></tr><tr><td>Wichrowska et al. (2017); Bello</td><td/><td/><td/><td/><td/></tr><tr><td>et al. (2017)</td><td/><td/><td/><td/><td/></tr><tr><td>Prototypical networks Snell et al.</td><td>apply a feature extractor to a</td><td>weights of the</td><td>few shot</td><td>SGD</td><td>new image</td></tr><tr><td>(2017)</td><td>batch of data and use soft</td><td>feature</td><td>performance</td><td/><td>classes within</td></tr><tr><td/><td>nearest neighbors to compute</td><td>extractor</td><td/><td/><td>similar dataset</td></tr><tr><td/><td>class probabilities</td><td/><td/><td/><td/></tr><tr><td>MAML Finn et al. (2017)</td><td>one step of SGD on training</td><td>initial weights</td><td>reward or</td><td>SGD</td><td>new goals,</td></tr><tr><td/><td>loss starting from a</td><td>of neural</td><td>training loss</td><td/><td>similar task</td></tr><tr><td/><td>meta-learned network</td><td>network</td><td/><td/><td>regimes with</td></tr><tr><td/><td/><td/><td/><td/><td>same input</td></tr><tr><td/><td/><td/><td/><td/><td>domain</td></tr><tr><td>Evolved Policy Gradient</td><td>performing gradient descent</td><td>parameters of a</td><td>reward</td><td>Evolutionary</td><td>new</td></tr><tr><td>Houthooft et al. (2018)</td><td>on a learned loss</td><td>learned loss</td><td/><td>Strategies</td><td>environment</td></tr><tr><td/><td/><td>function</td><td/><td/><td>configurations,</td></tr><tr><td/><td/><td/><td/><td/><td>both in and not</td></tr><tr><td/><td/><td/><td/><td/><td>in meta-training</td></tr><tr><td/><td/><td/><td/><td/><td>distribution.</td></tr><tr><td>Few shot learning (Vinyals et al.,</td><td>application of a recurrent</td><td>recurrent model</td><td>test loss on</td><td>SGD</td><td>new image</td></tr><tr><td>2016; Ravi and Larochelle, 2016;</td><td>model, e.g. LSTM, Wavenet.</td><td>weights</td><td>training</td><td/><td>classes within</td></tr><tr><td>Mishra et al., 2017)</td><td/><td/><td>tasks</td><td/><td>similar dataset.</td></tr><tr><td>Meta-unsupervised learning for</td><td>run clustering algorithm or</td><td>clustering</td><td>empirical</td><td>varied</td><td>new clustering</td></tr><tr><td>clustering Garg (2018)</td><td>evaluate binary similarity</td><td>algorithm + hy-</td><td>risk mini-</td><td/><td>or similarity</td></tr><tr><td/><td>function</td><td>perparameters,</td><td>mization</td><td/><td>measurement</td></tr><tr><td/><td/><td>binary</td><td/><td/><td>tasks</td></tr><tr><td/><td/><td>similarity</td><td/><td/><td/></tr><tr><td/><td/><td>function</td><td/><td/><td/></tr><tr><td>Learning synaptic learning rules</td><td>run a synapse-local learning</td><td>parametric</td><td>supervised</td><td>gradient</td><td>similar domain</td></tr><tr><td>(Bengio et al., 1990; 1992)</td><td>rule</td><td>learning rule</td><td>loss, or</td><td>descent,</td><td>tasks</td></tr><tr><td/><td/><td/><td>similarity to</td><td>simulated</td><td/></tr><tr><td/><td/><td/><td>biologically-</td><td>annealing,</td><td/></tr><tr><td/><td/><td/><td>motivated</td><td>genetic</td><td/></tr><tr><td/><td/><td/><td>network</td><td>algorithms</td><td/></tr><tr><td>Our work -metalearning for</td><td>many applications of an</td><td>parametric</td><td>few shot</td><td>SGD</td><td>new base</td></tr><tr><td>unsupervised representation</td><td>unsupervised update rule</td><td>update rule</td><td>classifica-</td><td/><td>models (width,</td></tr><tr><td>learning</td><td/><td/><td>tion after</td><td/><td>depth,</td></tr><tr><td/><td/><td/><td>unsuper-</td><td/><td>nonlinearity),</td></tr><tr><td/><td/><td/><td>vised</td><td/><td>new datasets,</td></tr><tr><td/><td/><td/><td>pre-</td><td/><td>new data</td></tr><tr><td/><td/><td/><td>training</td><td/><td>modalities</td></tr></table>

Peer review (iclr2019):
 The paper describes unsupervised learning as a meta-learning problem: the observation is that unsupervised learning rules are effectively supervised by the quality of the representations that they yield relative to subsequent later semi-supervised (or RL) learning. The learning-to-learning algorithm allows for learning network architecture parameters, and also *network-in-networks* that determine the unsupervised learning signal based on pre and post activations. Quality The proposed algorithm is well defined, and it is compared against relevant competing algorithms on relevant problems. The results show that the algorithm is competitive with other approaches like VAE (very slightly outperforms). Clarity The paper is well written and clearly structured. The section 5.4 is a bit hard to understand, with very very small images. Originality There is an extensive literature on meta-learning, which is expanded upon in Appendix A. The main innovation in this work is the parametric update rule for outer loop updates, which does have some similarity to the old work by Bengio in 1990 and 1992. Significance - pros clear and seemingly state-of-the-art results, intuitive approach, -cons only very modestly better than other methods. I would like to get a feel for why VAE is so good tbh (though the authors show that VAE has a problem with objective function mismatch). One comment: the update rule takes as inputs pre and post activity and a backpropagated error; it seems natural to also use the local gradient of the neuron*s transfer function here, as many three or four factor learning rules do.