Title: META DROPOUT: LEARNING TO PERTURB LATENT FEATURES FOR GENERALIZATION

Abstract: A machine learning model that generalizes well should obtain low errors on unseen test examples. Thus, if we know how to optimally perturb training examples to account for test examples, we may achieve better generalization performance. However, obtaining such perturbation is not possible in standard machine learning frameworks as the distribution of the test data is unknown. To tackle this challenge, we propose a novel regularization method, meta-dropout, which learns to perturb the latent features of training examples for generalization in a metalearning framework. Specifically, we meta-learn a noise generator which outputs a multiplicative noise distribution for latent features, to obtain low errors on the test instances in an input-dependent manner. Then, the learned noise generator can perturb the training examples of unseen tasks at the meta-test time for improved generalization. We validate our method on few-shot classification datasets, whose results show that it significantly improves the generalization performance of the base model, and largely outperforms existing regularization methods such as information bottleneck, manifold mixup, and information dropout.

1. INTRODUCTION:

Obtaining a model that generalizes well is a fundamental problem in machine learning, and is becoming even more important in the deep learning era where the models may have tens of thousands of parameters. Basically, a model that generalizes well should obtain low error on unseen test examples, but this is difficult since the distribution of test data is unknown during training. Thus, many approaches resort to variance reduction methods, that reduce the model variance with respect to the change in the input. These approaches include controlling the model complexity (Neyshabur et al., 2017) , reducing information from inputs (Tishby et al., 1999) , obtaining smoother loss surface (Shirish Keskar et al., 2017; Neyshabur et al., 2017; Chaudhari et al., 2017; Santurkar et al., 2018) , smoothing softmax probabilities (Pereyra et al., 2017) or training for multiple tasks with multi-task (Caruana, 1997) and meta-learning (Thrun & Pratt, 1998) .

A more straightforward and direct way to achieve generalization is to simulate the test examples by perturbing the training examples during training. Some regularization methods such as mixup (Zhang et al., 2017) follow this approach, where the training examples are perturbed to the direction of the other training examples to mimic test examples. The same method could be also applied to the latent feature space, to achieve even larger performance gain (Verma et al., 2019) . However, these approaches are all limited in that they do not explicitly aim to lower the generalization error on the test examples. How can we then perturb the training instances such that the perturbed instances will be actually helpful in lowering the test loss? Enforcing this generalization objective is not straightforward in standard learning framework since the test data is unobservable.

To solve this seemingly impossible problem, we resort to meta-learning (Thrun & Pratt, 1998) which aims to learn a model that generalize over a distribution of tasks, rather than a distribution of data instances from a single task. Generally, a meta-learner is trained on a series of tasks with random training and test splits. While learning to solve diverse tasks, it accumulates the meta-knowledge that is not specific to a single task, but is generic across all tasks, which is later leveraged when learning for a novel task. During this meta-training step, we observe both the training and test data. That is, we can explicitly learn to perturb the training instances to obtain low test loss in this meta-learning framework. The learned noise generator then can be used to perturb instances for generalization at meta-test time. Yet, learning how much and which features to perturb is difficult for two reasons. First of all, meaningful directions of perturbation may differ from one instance to another, and one task to another. Secondly, a single training instance may need to cover largely different test instances with its perturbation, since we do not know which test instances will be given at test time. To handle this problem, we propose to learn an inputdependent stochastic noise; that is, we want to learn distribution of noise, or perturbation, that is meaningful for a given training instance. Specifically, we learn a noise generator for each layer features of the main network, given lower layer features as input. We refer to this meta-noise generator as metadropout that learns to regularize.

Also the learned noise distribution is transferable, which is especially useful for few-shot learning setting where only a few examples are given to solve a novel task. Figure 1 depicts such a scenario where the noise generator perturbs each input instance to help the model predict better decision boundaries.

In the remaining sections, we will explain our model in the context of existing work and propose the learning framework for meta-dropout. We compare our method to existing regularizers such as manifold mixup (Verma et al., 2019) , information bottleneck, and information dropout (Achille & Soatto, 2018) , which our method significantly outperforms. We further show that meta-dropout can be understood as meta-learning the variational inference framework for the graphical model in Figure 3 . Finally, we validate our work on multiple benchmark datasets for few-shot classification.

Our contribution is threefold.

• We propose a novel regularization method called meta-dropout that generates stochastic input-dependent perturbations to regularize few-shot learning models, and propose a metalearning framework to train it. • We compare with the existing regularizers such as information bottleneck (Achille & Soatto, 2018; Alemi et al., 2017) and manifold mixup (Verma et al., 2019) . We also provide the probabilistic interpretation of our approach as learning to regularize the variational inference framework for the graphical model in Figure 3 . • We validate our method on multiple benchmark datasets for few-shot classification, on which our model significantly improves the performance of the base models.

2. RELATED WORK:

Meta learning While the literature on meta-learning (Thrun & Pratt, 1998) is vast, here we discuss a few relevant existing works for few-shot classification. One of the most popular approaches is metric-based meta-learning that learns a shared metric space (Koch et al., 2015; Vinyals et al., 2016; Snell et al., 2017; Oreshkin et al., 2018; Mishra et al., 2018) over randomly sampled few-shot classification problems, to embed the instances to be closer to their correct embeddings by some distance measure regardless of their classes. The most popular models among them are Matching networks (Vinyals et al., 2016) which leverages cosine distance measure, and Prototypical networks (Snell et al., 2017) that make use of Euclidean distance. On the other hand, gradient-based approaches (Finn et al., 2017; 2018; Li et al., 2017; Lee & Choi, 2018; Ravi & Beatson, 2019; Zintgraf et al., 2019) learns a shared initialization parameter, which can rapidly adapt to new tasks with only a few gradient steps. Recent literatures on few-shot classification show that the performance can significantly improve with larger networks, meta-level regularizers or fine-tuning (Lee et al., 2019; Rusu et al., 2019) . Lastly, meta-learning of the regularizers has been also addressed in Balaji et al. (2018) , which proposed to meta-learn 1 regularizer for domain adaptation. However, while this work focuses on the meta-learning of the hyperparameter of generic regularizers, our model is more explicitly targeting generalization via input perturbation.

Dropout Dropout (Srivastava et al., 2014) is a regularization technique to randomly drop out neurons during training. In addition to feature decorrelation and ensemble effect, we could also interpret dropout regularization as a variational approximation for posterior inference of the network weights (Gal & Ghahramani, 2016) , in which case we can even learn the dropout rates with stochastic gradient variational Bayes (Kingma et al., 2015; Gal et al., 2017) . The dropout regularization could be viewed as a noise injection process. In case of standard dropout, the noise follows the Bernoulli distribution, but we could also use Gaussian multiplicative noise to the parameters instead (Wang & Manning, 2013) . It is also possible to learn the dropout probability in an inputdependent manner as done with Adaptive Dropout (Standout) (Ba & Frey, 2013) , which could be interpreted as variational inference on input-dependent latent variables (Sohn et al., 2015; Xu et al., 2015; Heo et al., 2018; Lee et al., 2018) . However, meta-dropout is fundamentally different from adaptive dropout, as it makes use of previously obtained meta-knowledge in posterior variance inference, while adaptive dropout resorts only to training data and prior distribution.

Regularization methods There exist large number of regularization techniques for improving the generalization performance of deep neural networks (Srivastava et al., 2014; Ioffe & Szegedy, 2015; Ghiasi et al., 2018) , but we only discuss approaches based on input-dependent perturbations that are closely related to meta-dropout. Mixup (Zhang et al., 2017) training instances via input perturbations, these heuristics may or may not improve generalization, while meta dropout perturbs the input while explicitly aiming to minimize the test loss in a metalearning framework. Information-theoretic regularizers (Alemi et al., 2017; Achille & Soatto, 2018) are also relevant to our work, where they inject input-dependent noise to latent features to forget some of the information from the inputs, resulting in learning high-level representations that are invariant to less meaningful variations. Yet, meta-dropout has a more clear and direct objective to improve on the generalization. Adversarial learning (Goodfellow et al., 2015) is also somewhat related to our work, which perturbs the examples towards the direction that maximizes the training loss, as meta dropout also tend to pertub inputs to the direction of decision boundaries. In the experiments section, we show that meta dropout also improves adversarial robustness, which implies the connection between adversarial robustness and generalization (Stutz et al., 2019) .

3. LEARNING TO PERTURB LATENT FEATURES:

We now describe our problem setting and the meta-learning framework for learning to perturb training instances in the latent feature space, for improved generalization. The goal of meta-learning is to learn a model that generalizes over a task distribution p(T ). This is usually done by training the model over large number of tasks (or episodes) sampled from p(T ), each of which consists of a training set D tr = {(x tr i , y tr i )} N i=1 and a test set D te = {(x te j , y te j )} M j=1 . Suppose that we are given such a split of D tr and D te . Denoting the initial model parameter of an arbitrary neural network as θ, Model Agnostic Meta Learning (MAML) (Finn et al., 2017) aims to infer task-specific model parameter θ * with one or a few gradient steps with the training set D tr , such that θ * can quickly generalize to D te with a few gradient steps. Let α denote the inner-gradient step size, X and Y denote the concatenation of input data instances and their associated labels respectively for both training and test set. Then, we have

min θ E p(T ) - 1 M log p(Y te |X te ; θ * ) , where θ * = θ -α∇ θ - 1 N log p(Y tr |X tr ; θ) . (1)

Optimizing the objective in Eq. 1 is repeated over many random splits of D tr and D te , such that the initial model parameter θ captures the most generic information over the task distribution p(T ).

3.1. META-DROPOUT:

A notable limitation of MAML is that the knowledge transfer to unseen tasks is done only by sharing the initial model parameter over the entire task distribution. When considering few-shot classification task for instance, this means that given the initial θ, the inner-gradient steps at the meta-test time only depends on few training instances, which could potentially lead to learning sub-optimal decision boundaries. Thus, it would be desirable if we could transfer additional information from the meta-learning step, that could help the model to generalize better. Based on this motivation, we propose to capture a transferable noise distribution from the given tasks at the meta-training time, and inject the learned noise at the meta-test time, such that the noise samples would perturb the latent features of the training instances to explicitly improve the decision boundaries. Toward this goal, we propose to learn an input-dependent noise distribution, such that the noise is individually tailored for each instance. This is because the optimal direction and the amount of perturbation for each input instance may vary largely from one instance to another. We empirically validate the effectiveness of this input-dependent noise generation in our experiments (Table 3 ). We denote the shared form of the noise distribution as p(z|x tr ; θ, φ), with φ as the additional meta-parameter for the noise generator that does not participate in the inner-optimization.

Note that the noise distribution has dependency on the main parameter θ, due to input dependency (see Figure 2 ).

Recall that each inner-gradient step requires to compute the gradient over the training marginal loglikelihood (Eq. 1). In our case of training with the input-dependent noise generator p(z|x tr ; θ, φ), the marginal log-likelihood is obtained by considering all the plausible perturbations for each instance:

log p(Y tr |X tr ; θ, φ) = N i=1 log E zi∼p(zi|x tr i ;θ,φ) [p(y tr i |x tr i , z i ; θ)].

In this work, we instead consider its lower bound, which simply corresponds to the expected loss over the noise distribution (See section 3.2 for more discussion).

EQUATION

We take the gradient ascent steps with this lower bound. Following Kingma & Welling (2014) , we use reparameterization trick to evaluate the gradient of the expectation w.r.t. θ and φ, such that z = Softplus(µ + ε) and ε ∼ N (0, I) (See Eq. 5). Then, the associated Monte-carlo (MC) samples allow to compute the gradients through the deterministic function µ parameterized by φ and θ. We use MC sample size S = 1 for meta-training and S = 30 for meta-testing.

EQUATION

By taking the proposed gradient step, the target learning process can consider all the plausible perturbations of the training examples that can help explain the test dataset. Extension to more than one inner-gradient step is also straightforward: for each inner-gradient step, we perform MC integration to estimate the model parameter at the next step, and repeat this process until we get the final θ * .

Finally, we evaluate and maximize the performance of θ * on the test examples, by optimizing θ and φ for the following meta-objective over the task distribution p(T ). Considering that the test examples should remain as stable targets we aim to generalize to, we deterministically evaluate its log-likelihood by forcing the variance of a to be zero in Eq. 5 (i.e. a = µ). Denoting z as the one obtained from such deterministic a, we have

EQUATION

By applying the same deterministic transformation µ to both training and test examples, they can share the same consistent representation space, which seems important for performance. Lastly, to compute the gradient of Eq. 4 w.r.t. φ, we must compute second-order derivative, otherwise the gradient w.r.t. φ will always be zero. See Algorithm 1 and 2 for the pseudocode of Meta-dropout.

Form of the noise We apply input-dependent multiplicative noise to the latent features at all layers (Ba & Frey, 2013 ) (See Figure 2 ). Here we suppress the dependency on θ and φ for better readability. We propose to use simple Softplus transformation of a Gaussian noise distribution. We could use other types of transformations, such as exponential transformation (i.e. Log-Normal distribution), but we empirically verified that Softplus works better. First, we generate input-dependent noise z (l) given the latent features h (l-1) from the previous layer.

z (l) = Softplus(a (l) ), a (l) ∼ N (a (l) |µ (l) , I) (5)

where µ (l) := µ (l) (h (l-1) ) is parameterized by φ and θ. Note that although the variance of a is fixed as I, we can still adjust the noise scale at each dimension via the mean µ (l) , with the scale of the noise suppressed at certain dimensions by the Softplus function. While we could also model the variance in an input-dependent manner, we empirically found that this does not improve the generalization performance (Table 3 ). Then, we can obtain the latent features h (l) for the current layer l, by applying the noise to the pre-activation f (l) := f (l) (h (l-1) ) parameterized by θ:

EQUATION

)

where • denotes the element-wise multiplication. , where for each instance x i , the generative process involves latent z i conditioned on x i . Note that during the inner-gradient steps, the global parameter φ * is fixed and we only optimize θ. Based on this specific context, we derive the lower bound L(θ) as follows:

3.2. CONNECTION TO VARIATIONAL INFERENCE:

log p(Y|X; θ, φ * ) ≥ N i=1 E q(zi|xi,yi) [log p(y i |x i , z i ; θ)] -KL[q(z i |x i , y i ) p(z i |x i ; θ, φ * )] (7) = N i=1 E p(zi|xi;θ,φ * ) [log p(y i |z i , x i ; θ)] (8) = L(θ).

where from Eq. 7 to Eq. 8 we let the approximate posterior q(z|x, y) share the same form with the conditional prior p(z|x; θ, φ * ), such that the KL divergence between them becomes zero. By sharing the same form, we can let the training and testing pipeline be consistent (note that the label y is not available for the test examples, see Sohn et al. (2015) and Xu et al. (2015) ). By maximizing L(θ), we obtain the task-specific model parameter θ * that can make more accurate predictions on the test examples, owing to the knowledge transfer from φ * , which regularizes the final form of the conditional prior p(z|x; θ * , φ * ).

4. EXPERIMENTS:

We now validate our meta-dropout on few-shot classification tasks for its effectiveness.

Baselines and our models We first introduce the two most important baselines and our model. We compare against other few-shot meta-learning baselines, using their reported performances. 1) MAML. Model Agnostic Meta Learning by Finn et al. (2017) . First-order approximation is not considered for fair comparison against the baselines that use second-order derivatives.

2) Meta-SGD. A variant of MAML whose learning rate vector is element-wisely learned for the inner-gradient steps (Li et al., 2017) .

3) Meta-dropout. MAML or Meta-SGD with our learnable input-dependent noise generator.

Datasets We validate our method on the following two benchmark datasets for few-shot classification. 1) Omniglot: This gray-scale hand-written character dataset consists of 1623 classes with 20 examples of size 28 × 28 for each class. Following the experimental setup of Vinyals et al. (2016) , we use 1200 classes for meta-training, and the remaining 423 classes for meta-testing. We further augment classes by rotating 90 degrees multiple times, such that the total number of classes is 1623 × 4. 2) miniImageNet: This is a subset of ILSVRC-2012 (Deng et al., 2009) Base networks. We use the standard network architecture for the evaluation of few-shot classification performance (Finn et al., 2017) , which consists of 4 convolutional layers with 3 × 3 kernels ("same" padding), and has either 64 (Omniglot) or 32 (miniImageNet) channels. Each layer is followed by batch normalization, ReLU, and max pooling ("valid" padding).

Experimental setup. Omniglot: For 1-shot classification, we use the meta-batchsize of B = 8 and the inner-gradient stepsize of α = 0.1. For 5-shot classification, we use B = 6 and α = 0.4. We train for total 40K iterations with meta-learning rate 10 -3 . mimiImageNet: We use B = 4 and α = 0.01. We train for 60K iterations with meta-learning rate 10 -4 . Both datasets: Each inneroptimization consists of 5 SGD steps for both meta-training and meta-testing. Each task consists of 15 test examples. Note that the testing framework becomes transductive via batch normalization, as done in Finn et al. (2017) . We use Adam optimizer (Kingma & Ba, 2014) with gradient clipping of [-3, 3] . We used TensorFlow (Abadi et al., 2016) for all our implementations.

4.1. FEW-SHOT CLASSIFICATION EXPERIMENTS:

Table 1 shows the classification results obtained with conventional 4-layer convolutional neural networks on Omniglot and mimiImageNet dataset. The base MAML or Meta-SGD with Meta-dropout outperform all the baselines, except for the Prototypical Networks trained with "higher way" (20way) on the miniImageNet 5-shot classification1 . Figure 4 visualizes the learned decision boundaries of MAML and meta-dropout. We observe that the perturbations from meta-dropout generate datapoints that are close to the decision boundaries for the classification task at the test time, which could effectively improve the generalization accuracy. See Appendix section E for more visualizations, including stochastic activations and input-level projections of perturbations. Comparison against perturbation-based regularization methods In Table 2 , we compare with the existing regularization methods based on input-dependent perturbation, such as Mixup (Zhang et al., 2017; Verma et al., 2019) and Information-theoretic regularizers (Achille & Soatto, 2018; Alemi et al., 2017) . We train the base MAML with the baseline regularizers added to the innergradient steps, and set the number of perturbations for each step to 1 for meta-training and 30 for meta-testing, as in the case of Meta-dropout. We meta-train additional parameters from the baselines by optimizing them in the inner-gradient steps for fair comparison.

We first compare meta-dropout against mixup variants. The perturbation for mixup regularization is defined as a linear interpolation of both inputs and labels between two randomly sampled training datapoints. We interpolate at both the input and manifold level following Verma et al. (2019) . The interpolation ratio λ ∈ [0, 1] follows λ ∼ Beta(γ, γ), and we use γ ∈ {0.2, 1, 2} following the settings of the original paper. Table 2 shows that Mixup regularization significantly degrades the few-shot classification performance within the range of γ we considered. This is because, in the meta-learning framework, the interpolations of each task-adaptation process ignores the larger task distribution, which could conflict with the previously accumulated meta-knowledge.

Next, we compare with the information-theoretic regularizers. Information Bottleneck (IB) method (Tishby & Zaslavsky, 2015) is a framework for searching for the optimal tradeoff between forgetting of unnecessary information in inputs (nuisances) and preservation of information for correct prediction, with the hyperparameter β controlling the tradeoff. The higher the β, the more strongly the model will forget the inputs. We consider the two recent variations for IB-regularization for deep neural networks, namely Information Dropout (Achille & Soatto, 2018) and Variational Information Bottleneck (VIB) (Alemi et al., 2017) . Those information-theoretic regularizers are relevant to meta-dropout as they also inject input-dependent noise, which could be either multiplicative (Information Dropout) or additive (VIB). However, the assumption of optimal input forgetting does not hold in meta-learning framework, because it will forget the previous task information as well.

Table 2 shows that these regularizers significantly underperform ours in the meta-learning setting.

Adversarial robustness Lastly, we investigate if the perturbations generated from meta-dropout can improve adversarial robustness (Goodfellow et al., 2015) as well. Projected gradient descent (PGD) (Madry et al., 2017) attack of 1 , 2 , and ∞ norm is considered. As an adversarial learning baseline on MAML framework, we compare with a variant of MAML that adversarially perturbs each training example in its inner-gradient steps (10 PGD steps with radius for each inner-gradient step2 ). Their outer objective maintains as test loss for fair comparison with other models. At metatest time, we test all the baselines with PGD attack (200 steps) of all types of perturbations.

In Figure 5 , we see that whereas the baseline regularizers such as manifold-mixup and informationtheoretic regularizers3 fail to defend against adversarial attacks, meta-dropout not only improves generalization (clean accuracies), but also improves adversarial robustness significantly. It means that the perturbation directions toward test examples can generalize to adversarial perturbations. This result is impressive considering neither the inner nor the outer optimization of meta-dropout involves explicit adversarial training. Although we need further research to clarify the relationship between the two, the results are exciting since existing models for adversarial learning achieve robustness at the expense of generalization accuracy. See Stutz et al. (2019) for the discussion about disentangling between generalization and adversarial robustness. The results from miniImageNet dataset is in Appendix D. Although the gap is not as significant as in Omniglot dataset, the overall tendencies look similar.

Moreover, Figure 6 (a), 6(b) and 6(c) shows that meta-dropout can even generalize across multiple types of adversarial attacks we considered. Generalization between multiple types of perturbations is only recently investigated by Tramèr & Boneh (2019) , which is a very important problem as most of the existing adversarial training methods target a single perturbation type at a time, limiting their usefulness. We believe that the results in Figure 5 can have a great impact in this research direction.

Ablation study In Table 3 , we compare our model against other types of noise generator, to justify the use of input-dependent multiplicative noise for meta-dropout. We describe the baseline noise generators as follows: 1) Fixed Gaussian: MAML with fixed multiplicative noise, such that a in Eq. 5 follows a ∼ N (0, I) without any trainable parameters. 2) Weight Gaussian: MAML with fully factorized Gaussian weights whose variances are meta-learned. 3) Independent Gaussian: MAML with input-independent multiplicative noise, such that a ∼ N (µ, I), where learnable parameter µ has the same dimensionality to the channels (similarly to channel-wise dropout). We see from the Table 3 that neither the fixed distribution (Fixed Gaussian) nor the input-independent noise (Weight Gaussian and Independent) outperforms the base MAML, whereas our meta-dropout model significantly outperforms MAML. The results support our claim that the input-dependent noise generators are more transferable across tasks, as it can generate noise distribution adaptively for each instance.

We also compare with the MAML with additional parameters φ (deterministic a in Eq. 5) that participate in the inner-gradient steps as well, which we denote as (MAML + More param). We get slight improvements from the base MAML by doing so. Deterministic Meta-dropout is MAML + More param with φ not participating in the inner-gradient steps as with meta-dropout. Although there are some gain from deterministically meta-learning the representation space with φ, we can significantly improve the performance by injecting stochastic noise (meta-dropout). Lastly, we com-pare against a variant of meta-dropout that instead of using fixed I in Eq. 5, learns the variance in an input-dependent manner (meta-dropout w/ learned variance) but it underperforms meta-dropout with fixed variance.

Note that the slightly good performance of Deterministic Meta-dropout and Fixed Gaussian does not hurt our claim on the effectiveness of multiplicative noise, because multiplicative noise, by definition, consists of two parts: deterministic multiplication and pure random noise. For example, Bernoulli dropout consists of Bernoulli retain probability 0 ≤ p ≤ 1 (deterministic multiplication) and actual random sampling (pure random noise). In this vein, we can say that Deterministic Metadropout demonstrates the effectiveness of meta-learning the probability p, and Fixed Gaussian shows the effectiveness of injecting (multiplying) pure random noise N (0, I) on each feature location. Overall, our meta-dropout combines the two components, which are complementary each other, into a novel input-dependent form of perturbation function.

5. CONCLUSION:

We proposed a novel regularization method for deep neural networks, meta-dropout, which learns to perturb the latent features of training examples for improved generalization. However, learning how to optimally perturb the input is difficult in a standard learning scenario, as we do not know which data will be given at the test time. Thus, we tackle this challenge by learning the inputdependent noise generator in a meta-learning framework, to explicitly train it to minimize the test loss during meta-training. Our noise learning process could be interpreted as meta-learning of a variational inference for a specific graphical model in Fig. 3 . We validate our method on benchmark datasets for few-shot classification, on which it significantly improves the generalization performance of the target meta-learning model, while largely outperforming existing regularizers based on input-dependent perturbation. As future work, we plan to investigate the relationships between generalization and adversarial robustness.

A ALGORITHM:

We provide the pseudocode for meta-training and meta-testing of Meta-dropout. for k = 0 to K -1 do 6:

Sample zi ∼ p(z i |x tr i ; φ, θ k ) for i = 1, . . . , N 7:

θ k+1 ← θ k + α∇ θ k 1 N N i=1 log p(y tr i |x tr i , zi ; θ k ) 8:

end for 9: 

θ * ← θ K 10: θ ← θ + β 1 M M j=1 ∇ θ log p(y te j |x te j , z j = z j ; θ * ) 11: φ ← φ + β 1 M M j=1 ∇ φ log p(

EQUATION

i ; θ k ) 8: end for 9: θ * ← θ K 10: Evaluate p(y te j |x te j , z j = z j ; θ * ) for j = 1, . . . , M

B META-DROPOUT WITH ADDITIVE NOISE:

In this section, we introduce the additive noise version of our meta-dropout, introduced in Table 2 . At each layer l, we add Gaussian noise z (l) whose mean is zero and covariance is diagonal, i.e. z (l) ∼ N (z (l) |0, diag(σ 2 )), to the preactivation features at each layer, i.e. f (l) := f (l) (h (l-1) ). The diagonal covariance is generated from each previous layer's activation h (l-1) in input-dependent manner. i.e. σ (l) := σ(h (l-1) ), and we meta-learn such covariance networks σ (1) , . . . , σ (L) over the task distribution. Putting together,

EQUATION

EQUATION

)

where λ is a hyperparameter for controlling how far each noise variable can spread out to cover nearby test examples. We fix λ = 0.1 in all our experiments, that seems to help stabilize the overall training process. Reparameterization trick is applied to obtain stable and unbiased gradient estimation w.r.t. the mean and variance of the Gaussian distribution, following Kingma and Welling Kingma & Welling (2014) .

We empirically found that this additive noise version of meta-dropout performs well on Omniglot dataset, but shows somewhat suboptimal performance on more complicated dataset such as miniIm-ageNet (See Table 2 ). We may need more research on different noise types, but for now, we suggest to use the multiplicative version of meta-dropout in Eq. 5 which seems to perform well on most of the cases.

C HOW TO VISUALIZE DECISION BOUNDARY:

Visualization in Figure 4 shows 2D-mapped latent features and binary classification decision boundary of two random classes in a task. After parameters are adapted to the given task, we make binary classifier of random classes c The decision hyperplane of the linear classifier in the latent space is given as,

EQUATION

X-coordinates in our 2D visualization are inner product values between latent features and the normal vector of the decision hyperplane i.e. latent features are projected to orthogonal direction of the decision hyperplane.

EQUATION

Y-coordinates are determined by t-distributed stochastic neighbor emgedding (t-SNE) to reduce all other dimensions.

EQUATION

The points on the decision hyperplane is projected to a vertical line with following x-coordinate in the 2D space. Figure 6 plots the clean and adversarial accuracies over varying size of . Although the difference between models are not as remarkable as in Figure 5 , our meta-dropout seems to be the only model that improves both clean and adverarial accuracies. More research seems required to investigate what makes difference between Omniglot and mimiImageNet dataset.

EQUATION

E MORE VISUALIZATIONS:

In order to see the meaning of perturbation at input level, we reconstruct expected perturbed image from perturbed features. A separate deconvolutional decoder network is trained to reconstruct original image from unperturbed latent features, then the decoder is used to reconstruct perturbed image from perturbed features of 3rd layer. 

:

Strictly, this result is not comparable with others as all other models are trained with 5-way classification problems during meta-training.

We choose as minimum and maximum value within the overall attack range for the test examples.

For the hyperparameters of each baseline, we choose the one with the best accuracy in Table2. We verified that for those baselines, interestingly, adversarial robustness is not much sensitive to hyperparameter selection.

Figures and Tables:

Figure 1: Concepts. In the feature space, each training instance stochastically perturbs so that the resultant decision boundaries (red line) explain well for the test examples. Note that the noise distribution does not have to cover the test instances directly.

Figure 2: Model architecture. Each bottom layer generates the noise for upper layer with parameter φ.



Figure 3: Graphical model

Figure 4: Visualization of the task-specific decision boundaries in the last latent feature space. We use the model trained with 1-shot. The visualizations are the projection of the features after completing the last (5 th ) inner-gradient step, where the sampled 4 examples (2 examples ( , ) × 2 classes) participate in the inneroptimization. (a) and (b) are drawn from the same task. See Appendix C for the details about this visualization.

Figure 5: Adversarial robustness against PGD attack with varying size of radius . The region of clean accuracies are magnified for better visualization.

Meta-training 1: Input: Task distribution p(T ), Number of inner steps K, Inner step size α, Outer step size β. 2: while not converged do 3: Sample (D tr , D te ) ∼ p(T )

1 and c 2 by taking only two columns of final linear layer parameters : W = [w c1 , w c2 ] and b = [b c1 , b c2 ]. Then we compute the last latent features H (L) of data points in the classes.

Figure 6: Adversarial robustness against PGD attack with varying size of radius . The region of clean accuracies are magnified for better visualization.

Figure 7: Feature Visualization Layer activations and perturbed activations in Omniglot datset.

Figure 8: Visualization of stochastic features. We visualize the deterministic activations and the corresponding stochastic activations with perturbation.

randomly pairs training instances and interpolates between them to generate additional training examples. Verma et al. (2019) further extends the technique to perform the same procedure in the latent feature spaces at each layer of deep neural networks. While mixup variants are related to meta-dropout as they generate additional

Table content: <table/>

, consisting of 100 classes with 600 examples of size 84 × 84 per each class. There are 64, 16 and 20 classes for meta-train/validation/test respectively. Few-shot classification performance on conventional 4-layer convolutional neural networks. All reported results are average performances over 1000 randomly selected episodes with standard errors for 95% confidence interval over tasks.

Table content: <table><tr><td/><td colspan="2">Omniglot 20-way</td><td colspan="2">miniImageNet 5-way</td></tr><tr><td>Models</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>Meta-Learning LSTM (Ravi &amp; Larochelle, 2017)</td><td>-</td><td>-</td><td colspan="2">43.44±0.77 60.60±0.71</td></tr><tr><td>Matching Networks (Vinyals et al., 2016)</td><td>93.8</td><td>98.7</td><td colspan="2">43.56±0.84 55.31±0.73</td></tr><tr><td>Prototypical Networks (Snell et al., 2017)</td><td>95.4</td><td>98.7</td><td colspan="2">46.14±0.77 65.77±0.70</td></tr><tr><td>Prototypical Networks (Snell et al., 2017) (Higher way)</td><td>96.0</td><td>98.9</td><td colspan="2">49.42±0.78 68.20±0.66</td></tr><tr><td>MAML (our reproduction)</td><td colspan="4">95.23±0.17 98.38±0.07 49.58±0.65 64.55±0.52</td></tr><tr><td>Meta-SGD (our reproduction)</td><td colspan="4">96.16±0.14 98.54±0.07 48.30±0.64 65.55±0.56</td></tr><tr><td>Reptile (Nichol et al., 2018)</td><td colspan="4">89.43±0.14 97.12±0.32 49.97±0.32 65.99±0.58</td></tr><tr><td>Amortized Bayesian ML (Ravi &amp; Beatson, 2019)</td><td>-</td><td>-</td><td>45.00±0.60</td><td>-</td></tr><tr><td>Probabilistic MAML (Finn et al., 2018)</td><td>-</td><td>-</td><td>50.13±1.86</td><td>-</td></tr><tr><td>MT-Net (Lee &amp; Choi, 2018)</td><td>96.2±0.4</td><td>-</td><td>51.70±1.84</td><td>-</td></tr><tr><td>CAVIA (512) (Zintgraf et al., 2019)</td><td>-</td><td>-</td><td colspan="2">51.82±0.65 65.85±0.55</td></tr><tr><td>MAML + Meta-dropout</td><td colspan="4">96.63±0.13 98.73±0.06 51.93±0.67 67.42±0.52</td></tr><tr><td>Meta-SGD + Meta-dropout</td><td colspan="4">97.02±0.13 99.05±0.05 50.87±0.63 65.55±0.57</td></tr><tr><td>train</td><td/><td/><td/><td/></tr><tr><td>perturbed train</td><td/><td/><td/><td/></tr><tr><td>test</td><td/><td/><td/><td/></tr><tr><td>decision boundary</td><td/><td/><td/><td/></tr></table>

Comparison against existing perturbation-based regularization techniques. The performances are obtained by applying the regularizers to the inner gradient steps of MAML.

Table content: <table><tr><td>Models</td><td>Noise</td><td>Hyper-</td><td colspan="2">Omniglot 20-way</td><td colspan="2">miniImageNet 5-way</td></tr><tr><td>(MAML +)</td><td>Type</td><td>parameter</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>No perturbation</td><td/><td>None</td><td colspan="4">95.23±0.17 98.38±0.07 49.58±0.65 64.55±0.52</td></tr><tr><td>Input &amp; Manifold Mixup</td><td/><td>γ = 0.2</td><td colspan="4">89.78±0.25 97.86±0.08 48.62±0.66 63.86±0.53</td></tr><tr><td>(Zhang et al., 2017)</td><td>Pairwise</td><td>γ = 1</td><td colspan="4">87.00±0.28 97.27±0.10 48.24±0.62 62.32±0.54</td></tr><tr><td>(Verma et al., 2019)</td><td/><td>γ = 2</td><td colspan="4">87.26±0.28 97.14±0.17 48.42±0.64 62.56±0.55</td></tr><tr><td>Variational</td><td/><td colspan="5">β = 10 -5 92.09±0.22 98.85±0.07 48.12±0.65 64.78±0.54</td></tr><tr><td>Information Bottleneck</td><td>Add.</td><td colspan="5">β = 10 -4 93.01±0.20 98.80±0.07 46.75±0.63 64.07±0.54</td></tr><tr><td>(Alemi et al., 2017)</td><td/><td colspan="5">β = 10 -3 94.98±0.16 98.75±0.07 47.59±0.60 63.30±0.53</td></tr><tr><td>Information Dropout</td><td/><td colspan="5">β = 10 -5 94.49±0.17 98.50±0.07 50.36±0.68 65.91±0.55</td></tr><tr><td>(ReLU ver.)</td><td>Mult.</td><td colspan="5">β = 10 -4 94.36±0.17 98.53±0.07 49.14±0.63 64.96±0.54</td></tr><tr><td>(Achille &amp; Soatto, 2018)</td><td/><td colspan="5">β = 10 -3 94.28±0.17 98.65±0.07 43.78±0.61 63.36±0.56</td></tr><tr><td>Meta-dropout</td><td>Add.</td><td>0.1</td><td colspan="4">96.55±0.14 99.04±0.05 50.25±0.66 66.78±0.53</td></tr><tr><td>(See Appendix B for Add.)</td><td>Mult.</td><td>None</td><td colspan="4">96.63±0.13 98.73±0.06 51.93±0.67 67.42±0.52</td></tr></table>

Ablation study on the noise types applied to the inner-gradient steps. ( ) means that the baseline is a core component ofMeta-dropout.)

Table content: <table><tr><td>Models</td><td colspan="3">Rand. Learn. Input</td><td colspan="2">Omniglot 20-way</td><td colspan="2">miniImageNet 5-way</td></tr><tr><td>(MAML+)</td><td>samp.</td><td>mult.</td><td>dep.</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>None</td><td>X</td><td>X</td><td>X</td><td colspan="4">95.23±0.17 98.38±0.07 49.58±0.65 64.55±0.52</td></tr><tr><td>Fixed Gaussian ( )</td><td>O</td><td>X</td><td>X</td><td colspan="4">95.44±0.17 98.99±0.06 49.39±0.63 66.84±0.54</td></tr><tr><td>Weight Gaussian</td><td>O</td><td>X</td><td>X</td><td colspan="4">94.32±0.18 98.35±0.07 49.37±0.64 64.78±0.54</td></tr><tr><td>Independent Gaussian</td><td>O</td><td>O</td><td>X</td><td colspan="4">94.36±0.18 98.26±0.08 50.31±0.64 66.97±0.54</td></tr><tr><td>MAML + More param</td><td>X</td><td>O</td><td>O</td><td colspan="4">95.83±0.15 97.85±0.09 50.63±0.64 65.20±0.51</td></tr><tr><td>Determ. Meta-drop. ( )</td><td>X</td><td>O</td><td>O</td><td colspan="4">95.99±0.14 97.78±0.09 50.75±0.63 65.62±0.53</td></tr><tr><td>Meta-drop. w/ learned var.</td><td>O</td><td>O</td><td>O</td><td colspan="4">95.98±0.15 98.87±0.06 50.93±0.68 66.15±0.56</td></tr><tr><td>Meta-dropout</td><td>O</td><td>O</td><td>O</td><td colspan="4">96.63±0.13 98.73±0.06 51.93±0.67 67.42±0.52</td></tr></table>

y te j |x te j , z j = z j ; θ * )

Table content: <table><tr><td>12: end while</td></tr><tr><td>Algorithm 2 Meta-testing</td></tr></table>

Peer review (iclr2020):
The paper proposes learning to add input-dependent noise to improve the generalization of MAML-style meta-learning algorithm. The proposed method is evaluated on OmniGlot and miniImageNet. The paper reports improvements upon MAML, MAML with meta-learned parameter-wise learning rates, as well as a few regularization methods that are based on input/hidden state perturbations (Mixup, Variational Information Bottleneck). An ablation study also compares the proposed meta-dropout algorithm with a number of modifications, such as a fixed noise, input-independent noise, etc. It is furthermore shown that meta-dropout somewhat improves the model’s robustness against an adversarial attack. The paper is somewhat incremental considering that Li et al, (2017) and Balaji et al, (2018) have already proposed meta-learning parameter-wise learning rates and parameter-wise regularization coefficient respectively. One difference from the methods above is that in the proposed method noise is controlled by the input. The ablation however shows that in 5-shot classification case simply adding non-trainable noise works quite well. It seems like the choice of the particular method for adding the noise was performed using the test set. If it’s true, this is methodologically wrong: model selection should be performed on a development set (or meta-development) set. Futhermore, Table 2 contains some results named “Add.”, which I guess stands for additive noise. I did not find an explanation of what is the specific method for adding noise used in this case. Such additive noise is also missing from ablation experiments. Overall, it seems that paper falls short of clearly proving that back-propagating through MAML to the noise parameters is helpful. The “Deterministic Meta-Dropout” performs better than baseline MAML, and arguably, meaning that some part of the improvement upon MAML can be due to the architectural differences and not due to noise. “Independent Gaussian” and “Weight Gaussian” baselines perform worse than non-trainable noise (“Fixed Gaussian”). Learning the variance for the noise is shown to be detrimental. There is just too much confusion in the results, the improvements are not very robust. The paper writing is okay, but there are serious issues. I am not sure I understand the argument in Section 3.2 that meta-dropout performs variational inference. It seems like Equation 7 is wrong because y_i is missing from the second argument of the KL divergence term. The transition to Equation 8 is therefore also wrong, and as far as I can understand, the whole argument breaks down. Line 7 in Algorithm 1 in Appendix A (which by the way should really be in the main text) does not make sense. Other issues: - the second sentence of the abstract is not implied by the first, the usage of “thus” does not seem appropriate - the intro should probably mention L1 and L2 regularization as well - in Section 3.1 there is a forward reference to Equation 5, makes understanding the text quite hard - “meta-droput”, “robustenss”: typos in many places - Figure 4 visualization is not clear. - the architectural change required to add noise is not explained in the paper (i.e. what is phi and how it’s used) - no comparison to meta-learned L1 regularization - a baseline is missing in which phi is treated as a part of 	heta and trained with vanilla MAML