Meta-learning algorithms for neural networks[18, 8, 29]
prepare networks to quickly adapt to unseen tasks. This is done in a meta-training phase that typically involves a large number of supervised learning tasks. Very recently, several approaches had been proposed that perform the meta-training by generating synthetic training tasks from anunsupervised dataset. This requires us to generate samples with specific pairwise information: in-class pairs of samples that are with high likelihood in the same class, and out-of-class pairs that are with high likelihood not in the same class. For instance, UMTRA  and AAL  achieve this through random selection from a domain with many classes for out-of-class pairs and by augmentation for in-class pairs. CACTUs  creates synthetic labels through unsupervised clustering of the domain. Unfortunately, these algorithms depend on domain specific expertise for the appropriate clustering and augmentation techniques.
In this paper, we rely on recent advances in the field of generative models, such as the variants of generative adversarial networks (GANs) and variational autoencoders (VAEs), to generate the in-class and out-of-class pairs of meta-training data. The fundamental idea of our approach is that in-class pairs are close while out-of-class pairs are far away in the latent space representation of the generative model. Thus, we can generate in-class pairs by interpolating between two out-of-class samples in the latent space and choosing interpolation ratios that put the new sample close to one of the objects. From this latent sample, the generative model creates the new in-class object. Our approach requires minimal domain-specific tweaking, and the necessary tweaks are human-comprehensible. For instance, we need to choose thresholds for latent space distance that ensure that classes are in different domains, as well as interpolation ratio thresholds that ensure that the sample is in the same class as the nearest edge. Another advantage of the approach is that we can take advantage of off-the-shelf, pre-trained generative models.
The main contributions of this paper can be summarized as follows:
We describe an algorithm, LAtent Space Interpolation Unsupervised Meta-learning (LASIUM), that creates training data for a downstream meta-learning algorithm starting from an unlabeled dataset by taking advantage of interpolation in the latent space of a generative model.
We show that on the most widely used few-shot learning datasets, LASIUM outperforms or performs competitively with other unsupervised meta-learning algorithms, significantly outperforms transfer learning in all cases, and in a number of cases approaches the performance of supervised meta-learning algorithms.
2 Related Work
Meta-learning or “learning to learn” in the field of neural networks is an umbrella term that covers a variety of techniques that involve training a neural network over the course of a meta-training phase, such that when presented with the target task, the network is able to learn it much more efficiently than an unprepared network would. Such techniques had been proposed since the 1980s [27, 2, 19, 30]. In recent years, meta-learning has gained a resurgence, through approaches that either “learn to optimize” [8, 24, 17, 20, 26, 22] or learn embedding functions in a non-parametric setting [29, 32, 25, 14]. Hybrids between these two approaches had also been proposed [31, 33].
Most approaches use labeled data during the meta-learning phase. While in some domains there is an abundance of labeled datasets, in many domains such labeled data is difficult to acquire. Unsupervised meta-learning approaches aim to learn from an unsupervised dataset from a domain similar from that of the target task. Typically these approaches generate synthetic few-shot learning tasks for the meta-learning phase through a variety of techniques. CACTUs  uses a progressive clustering method. UMTRA  utilizes the statistical diversity properties and domain-specific augmentations to generate synthetic training and validation data. AAL  uses augmentation of the unlabeled training set to generate the validation data. The accuracy of these approaches was shown to be comparable with but lower than supervised meta-learning approaches, but with the advantage of requiring orders of magnitude less labeled training data. A common weakness of these approaches is that the techniques used to generate the synthetic tasks (clustering, augmentation, random sampling) are highly domain dependent.
Our proposed approach, LASIUM, takes advantage of generative models trained on the specific domain to create the in-class and out-of-class pairs of meta-training data. The most successful neural-network based generative models in recent years are variational autoencoders (VAE)  and generative adversarial networks (GANs) . The implementation variants of the LASIUM algorithm described in this paper rely on the original VAE model and on two specific variations of the GAN concept, respectively. MSGAN (aka Miss-GAN)  aims to solve the missing mode problem of conditional GANs through a regularization term that maximizes the distance between the generated images with respect to the distance between their corresponding input latent codes. Progressive GANs  are growing both the generator and discriminator progressively, and approach resembling the layer-wise training of autoencoders.
We define an -way, -shot supervised classification task, , as a set composed of data points such that there are exactly samples for each categorical label . During meta-learning, an additional set ,, is attached to each task that contains another data points separate from the ones in . We have exactly samples for each class in as well.
It is straightforward to package -way, -shot tasks with and from a labeled dataset. However, in unsupervised meta-learning setting, a key challenge is how to automatically construct tasks from the unlabeled dataset .
3.2 Generating meta-tasks using generative models
We have seen that in order to generate the training data for the meta-learning phase, we need to generate -way training tasks with training and validation samples. The label associated with the classes in these tasks is not relevant, as it will be discarded after the meta-learning phase. Our objective is simply to generate samples of the type with and with the following properties: (a) all the samples are different (b) any two samples with the same index are in-class samples and (c) any two samples with different index are out-of-class samples. In the absence of human provided labels, the class structure of the domain is defined only implicitly by the sample selection procedure. Previous approaches to unsupervised meta-learning chose samples directly from the training data , or created new samples through augmentation. For instance, we can define the class structure of the domain by assuming that certain types of augmentations keep the samples in-class with the original sample. One challenge of such approaches is that the choice of the augmentation is domain dependent, and the augmentation itself can be a complex mathematical operation.
In this paper we approach the sample selection problem differently. Instead of sampling from , we use the unsupervised dataset to train a generative model
. Generative models represent the full probability distribution of a model, and allow us to sample new instances from the distribution. For many models, this sampling process can be computationally expensive iterative process. Many successful neural network based generative models use thereparametrization trick for the training and sampling which concentrate the random component of the model in a latent representation . By choosing the latent representation
from a simple (uniform or normal) distribution, we can obtain a sample from the complex distributionby passing through a deterministic generator . Two of the most popular generative models, variational autoencoders (VAEs) and generative adversarial networks (GANs) follow this model.
The idea of the LASIUM algorithm is that given a generator component , nearby latent space values and map to in-class samples and . Conversely, and values that are far away from each other, map to out of class samples. Naturally, we still need to define what we mean by “near” and “far” in the latent space and how to choose the corresponding values. However, this is a significantly simpler task than, for instance, defining the set of complex augmentations that might retain class membership.
Training a generative model Our method for generating meta-tasks is agnostic to the choice of training algorithm for the generative model and can use either a VAE or a GAN with minimal adjustments. In our VAE experiments, we used a network trained with the standard VAE training algorithm . For the experiments with GANs we used two different methods mode seeking GANs (MSGAN)  and progressive growing of GANs (proGAN) .
Algorithm 1 describes the steps of our method. We will delve into each step in the following parts of this section.
Sampling out of class instances from the latent space representation: Our sampling techniques differ slightly whether we are using a GAN or VAE. For GAN, we use rejection sampling to find latent space vectors that are at a pairwise distance of at least threshold - see Figure 1(a). When using a VAE, we also have an encoder network that allows us to map from the domain to the latent space. Taking advantage of this, we can additionally sample data points from our unlabeled dataset and embed them into a latent space. If the latent space representation of these images are too close to each other, we re-sample, otherwise we can use the images and their representations and continue the following steps exactly the same as GANs - see Figure 2(a) and (b). We will refer to the vectors selected here as anchor vectors.
Generating in-class latent space vectors Next, having sampled anchor vectors from the latent space representation, we aim to generate new vectors from the latent space representation such that the generated image belongs to the same class as the one of for . This process needs to be repeated for times.
The sampling strategy takes as input the sampled vectors and a number and returns new vectors such that and are an in-class pair for . This ensures that no two belong to the same class and creates groups of vectors in our latent space. We feed these vectors to our generator to get groups of images. From each group we pick the first for and the last for .
What remains is to define the strategy to sample the individual in-class vectors. We propose three different sampling strategies, all of which can be seen as variations of the idea of latent space interpolation sampling. This motivates the name of the algorithm LAtent Space Interpolation Unsupervised Meta-learning (LASIUM).
LASIUM-N (adding Noise): This technique generates in-class samples by adding Gaussian noise to the anchor vector where (see Figure 3-Left). In the context of LASIUM, we can see this as an interpolation between the anchor vector and a noise vector, with the interpolation factor determined by . For the impact of different choices of see the ablation study in section 4.6.
LASIUM-RO (with Random Out-of-class samples) To generate a new in-class sample to anchor vector we first find a random out-of-class sample , and choose an interpolated version closer to the anchor: (see Figure 3-Middle). Here,
is a hyperparameter, which can be tuned to define the size of the class. As we are in a comparatively high-dimensional latent space (in our case, 512 dimensions), we need relatively large values of, such as to define classes of reasonable size. This model effectively allows us to define complex augmentations (such as a person seen without glasses, or in a changed lighting) with only one scalar hyperparameter to tune. By interpolating towards another sample we ensure that we are staying on the manifold that defines the dataset (in the case of Figure 3, this being human faces).
LASIUM-OC (with Other Classes’ samples) This technique is similar to LASIUM-RO, but instead of using a randomly generated out-of-class vector, we are interpolating towards vectors already chosen from the other classes in the same task (see Figure 3-Right). This limits the selection of the samples to be confined to the convex hull defined by the initial anchor points. The intuition behind this approach is that choosing the samples this way focuses the attention of the meta-learner towards the hard to distinguish samples that are between the classes in the few shot learning class (eg. they share certain attributes).
We tested the proposed algorithms on three few-shot learning benchmarks: (a) the -way Omniglot , a benchmark for few-shot handwritten character recognition, (b) the -way CelebA few-shot identity recognition, and (c) the CelebA attributes dataset  proposed as a few-shot learning benchmark by  that comprises binary classification (
-way) tasks in which each task is defined by selecting 3 different attributes and 3 boolean values corresponding to each attribute. Every image in a certain task-specific class has the same attributes with each other while does not share any of these attributes with images in the other class. Last but not least we evaluate our results on (d) the mini-ImageNet few-shot learning benchmark.
We partition each dataset into meta-training, meta-validation, and meta-testing splits between classes. To evaluate our method, we use the classes in the test set to generate 1000 tasks as described in section 3.2. We set to be 15. We average the accuracy on all tasks and report a confidence interval. To ensure that comparisons are fair, we use the same random seed in the whole task generation process. For the Omniglot dataset, we report the results for , and . For CelebA identity recognition, we report our results for and . For CelebA attributes, we follow the and tasks as proposed by .
As baseline algorithms for our approach we follow the practice of recent papers in the unsupervised meta-learning literature. The simplest baseline is to train the same network architecture from scratch with images. More advanced baselines can be obtained by learning an unsupervised embedding on and use it for downstream task training. We used the ACAI , BiGAN [6, 7], and DeepCluster  as representative of the unsupervised learning literature. On top of these embeddings, we report accuracy for
The direct competition for our approach are the current state-of-the-art algorithms in unsupervised meta-learning. We compare our results with CACTUs-MAML , CACTUs-ProtoNets  and UMTRA . Finally, it is useful to compare our approach with algorithms that require supervised data. We include results for supervised standard transfer learning from VGG19 pre-trained on ImageNet  and two supervised meta-learning algorithms, MAML , and ProtoNets .
4.2 Neural network architectures
Since excessive tuning of hyperparameters can lead to the overestimation of the performance of a model , we keep the hyperparameters of the unsupervised meta-learning as constant as possible (including the MAML, and ProtoNets model architectures) in all experiments. Our model architecture consists of four stacked convolutional blocks. Each block comprises 64 filters that carry outmax-pooling. For the MAML experiments, classification is performed by a fully connected layer, whereas for the ProtoNets model we compute distances based on the feature vectors produced by the last convolution module without any dense layers. The input size to our model is for CelebA and for Omniglot.
For Omniglot, our VAE model is constructed symmetrically. The encoder is composed of four convolutional blocks, with batch normalization and ReLU activation following each of them. A dense layer is connected to the end such that given an input image of shape , the encoder produces a latent vector of length . On the other side, the decoder starts from a dense layer whose output has length . It is then fed into four modules each of which consists of a transposed convolutional layer, batch normalization and the ReLU non-linearity. We use kernels,
channels and a stride offor all the convolutional and transposed convolutional layers. Hence, the generated image has the size of
that is identical to the input images. This VAE model is trained for 1000 epochs with a learning rate of 0.001.
Our GAN generator gets an input of size which is the dimensionality of the latent space and feeds it into a dense layer of size . After applying a Leaky ReLU with , we reshape the output of dense layer to 128 channels of shape . Then we feed it into two upsampling blocks, where each block has a transposed convolution with 128 channels, kernels and strides. Finally, we feed the outcome of the upsampling blocks into a convolution layer with 1 channel and a kernel with sigmoid activaiton. The discriminator takes a input and feeds it into three convolution layers with 64, 128 and 128 channels and strides. We apply leaky ReLU activation after each convolution layer with . Finally we apply a global16].
For the CelebA GAN experiments, we use the pre-trained network architecture described in . For VAE, we use the same architecture as we described for Omniglot VAE with one more convolution block and more channels to handle the larger input size of . The exact architecture is described in section 4.6.
4.3 Results on Omniglot
Table 1 shows the results on the Omniglot dataset. We find that the LASIUM-RO-GAN-MAML configuration outperforms all the unsupervised approaches, including the meta-learning based ones like CACTUs  and UMTRA . Beyond the increase in performance, we must note that the competing approaches use more domain specific knowledge (in case of UMTRA augmentations, in case of CACTUs, learned clustering). We also find that on this benchmark, LASIUM outperforms transfer learning using the much larger VGG-19 network.
As expected even the best LASIUM result is worse than the supervised meta-learning models. However, we need to consider that the unsupervised meta-learning approaches use several orders of magnitude less labels. For instance, the 95.29% accuracy of LASIUM-RO-GAN-MAML was obtained with only 25 labels, while the supervised approaches used 25,000.
|Algorithm||Feature Extractor||= 1||= 5|
|Training from scratch|
|MLP with dropout||ACAI|
|MLP with dropout||BiGAN|
|Transfer Learning (VGG-19)|
4.4 Results on CelebA
Table 2 shows our results on the CelebA identity recognition tasks where the objective is to recognize different people given images for each. We find that on this benchmark as well, the LASIUM-RO-GAN-MAML configuration performs better than other unsupervised meta-learning models as well as transfer learning with VGG-19 - it only falls slightly behind LASIUM-RO-GAN-ProtoNets on the one-shot case. As we have discussed in the case of Omniglot results, the performance remains lower then the supervised meta-learning approaches which use several orders of magnitude more labeled data.
Finally, Table 3 shows our results for CelebA attributes benchmark introduced in . A peculiarity of this dataset is that the way in which classes are defined based on the attributes, the classes are unbalanced in the dataset, making the job of synthetic task selection more difficult. We find that LASIUM-N-GAN-MAML obtains the second best on this test with a performance of , within the confidence interval of the winner, CACTUs MAML with BiGAN . In this benchmark, transfer learning with the VGG-19 network performed better than all unsupervised meta-learning approaches, possibly due to existing representations of the discriminating attributes in that much more complex network.
|Algorithm||= 1||= 5||= 15|
|Training from scratch|
|Transfer Learning (VGG-19)|
|Training from scratch||N/A|
|MLP with dropout||BiGAN|
|MLP with dropout||DeepCluster|
|Transfer Learning (VGG-19)||N/A|
4.5 Results on mini-ImageNet
In this section, we evaluate our algorithm on mini-ImageNet benchmark. Its complexity is high due to the use of ImageNet images. In total, there are 100 classes with 600 samples of color images per class. These 100 classes are divided into 64, 16, and 20 classes respectively for sampling tasks for meta-training, meta-validation, and meta-test. A big difference between mini-ImageNet and CelebA is that we have to classify a group of concepts instead of just the identity of a subject. This makes interpreting the latent space a bit trickier. For example, it is not rational to interpolate between a bird and a piano. However, the assumption that nearby latent vectors belong to nearby instances is still valid. Thereby, we could be confident by not getting too far from the current latent vector, we generate something which belongs to the same class (identity).
For mini-ImageNet we use a pre-trained network BigBiGAN111https://tfhub.dev/deepmind/bigbigan-resnet50/1. Our experiments show that our method is very effective and can outperform state-of-the-art algorithms. See Table 4 for the results on mini-ImageNet benchmark. Figure 4 demonstrates tasks constructed for mini-ImageNet by LASIUM-N with .
|Algorithm||Embedding||= 1||= 5||= 20||= 50|
|Training from scratch||N/A|
|MLP with dropout||BiGAN|
|MLP with dropout||DeepCluster|
4.6 Hyperparameters and ablation studies
We also report the ablation studies on different strategies for task construction in Table 7. We run all the algorithm for just 1000 iterations and compared between them. We also apply a small shift to Omniglot images.
|Number of classes|
|Inner learning rate||0.4||0.05||0.05||0.05|
|Meta learning rate||0.001||0.001||0.001||0.001|
|Evaluation adaptation steps||50||50||50||50|
|Number of classes|
|Meta learning rate||0.001||0.001||0.001||0.001|
We described LASIUM, an unsupervised meta-learning algorithm for few-shot classification. The algorithm is based on interpolation in the latent space of a generative model to create synthetic meta-tasks. In contrast to other approaches, LASIUM requires minimal domain specific knowledge. We found that LASIUM outperforms state-of-the-art unsupervised algorithms on the Omniglot and CelebA identity recognition benchmarks and competes very closely with CACTUs on the CelebA attributes learning benchmark.
This work had been in part supported by the National Science Foundation under Grant Number IIS-1409823.
-  (2019) Assume, augment and learn: unsupervised few-shot meta-learning via random labels and data augmentation. arXiv preprint arXiv:1902.09884. Cited by: §1, §2.
-  (1990) Learning a synaptic learning rule. Université de Montréal, Département d’Informatique et de Recherche Opérationelle. Cited by: §2.
-  (2019) Understanding and improving interpolation in autoencoders via an adversarial regularizer. In Int’l Conf. on Learning Representations (ICLR), Cited by: §4.1.
Deep clustering for unsupervised learning of visual features.
Proc. of the European Conf. on Computer Vision (ECCV), pp. 132–149. Cited by: §4.1.
-  (2014) Auto-encoding variational bayes. In Proc. of the Int’l Conf. on Learning Representations (ICLR), Vol. 1. Cited by: §2, §3.2.
-  (2017) Adversarial feature learning. In Int’l Conf. on Learning Representations (ICLR), Cited by: §4.1.
-  (2017) Adversarially learned inference. In Int’l Conf. on Learning Representations (ICLR), Cited by: §4.1.
Model-agnostic meta-learning for fast adaptation of deep networks.
Proc. of Int’l Conf. on Machine Learning (ICML), pp. 1126–1135. Cited by: §1, §2, §4.
-  (2014) Generative adversarial nets. In Advances in Neural Information Processing Systems (NeurIPS), pp. 2672–2680. Cited by: §2.
-  (2019) Unsupervised learning via meta-learning. In Int’l Conf. on Learning Representations (ICLR), Cited by: §1, §2, §4.1, §4.3, §4.4, §4.
-  (2018) Progressive growing of GANs for improved quality, stability, and variation. Proc. of the Int’l Conf. on Learning Representations (ICLR). Cited by: §2, §3.2, §4.2.
-  (2019) Unsupervised meta-learning for few-shot image classification. In Advances in Neural Information Processing Systems (NeurIPS), pp. 10132–10142. Cited by: §1, §2, §4.1, §4.3.
-  (2011) One shot learning of simple visual concepts. In Proc. of the Annual Meeting of the Cognitive Science Society, Vol. 33. Cited by: §4.
-  (2019) Learning to propagate labels: Transductive propagation network for few-shot learning. In Int’l Conf. on Learning Representations (ICLR), Cited by: §2.
-  (2015-12) Deep learning face attributes in the wild. In Proc. of Int’l Conf. on Computer Vision (ICCV), Cited by: §4.
Mode seeking generative adversarial networks for diverse image synthesis.
Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition, pp. 1429–1437. Cited by: §2, §3.2, §4.2.
-  (2017) Meta-learning with temporal convolutions. arXiv preprint arXiv:1707.03141. Cited by: §2.
-  (2018) A Simple Neural Attentive Meta-Learner. In Int’l Conf. on Learning Representations (ICLR), Cited by: §1.
-  (1992) Meta-neural networks that learn by learning. In [Proc. 1992] IJCNN Int’l Joint Conf. on Neural Networks, Vol. 1, pp. 437–442. Cited by: §2.
-  (2018) On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999. Cited by: §2.
Realistic evaluation of deep semi-supervised learning algorithms. In Advances in Neural Information Processing Systems (NeurIPS), pp. 3235–3246. Cited by: §4.2.
-  (2019) Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems (NeurIPS), pp. 113–124. Cited by: §2.
-  (2016) Optimization as a model for few-shot learning. Proc. of Int’l Conf. on Learning Representations (ICLR). Cited by: §4.
-  (2016) Optimization as a model for few-shot learning. Int’l Conf. on Learning Representations (ICLR). Cited by: §2.
-  (2018) Meta-Learning for Semi-Supervised Few-Shot Classification. In Int’l Conf. on Learning Representations (ICLR), Cited by: §2.
-  (2019) Meta-Learning with Latent Embedding Optimization. In Int’l Conf. on Learning Representations (ICLR), Cited by: §2.
-  (1987) Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-… hook. Ph.D. Thesis, Technische Universität München. Cited by: §2.
-  (2015) Very deep convolutional networks for large-scale image recognition. Int’l Conf. on Learning Representations (ICLR). Cited by: §4.1.
-  (2017) Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems (NeurIPS), pp. 4077–4087. Cited by: §1, §2.
-  (1998) Learning to learn. Kluwer Academic Publishers. Cited by: §2.
-  (2020) Meta-Dataset: A Dataset of Datasets for Learning to Learn from Few Examples. In Int’l Conf. on Learning Representations (ICLR), Cited by: §2.
-  (2016) Matching networks for one shot learning. In Advances in Neural Information Processing Systems (NeurIPS), pp. 3630–3638. Cited by: §2.
-  (2019) A hybrid approach with optimization-based and metric-based meta-learner for few-shot learning. Neurocomputing 349, pp. 202–211. Cited by: §2.