M ETA D ROPOUT : L EARNING TO P ERTURB L ATENT F EATURES FOR G ENERALIZATION
A BSTRACT
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.
Speciﬁcally, 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 classiﬁcation datasets, whose results show that it signiﬁcantly improves the generalization performance of the base model, and largely outperforms existing regularization methods such as information bottleneck, manifold mixup, and information dropout.
I NTRODUCTION
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 difﬁcult 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 speciﬁc 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.
train train train test test test
Yet, learning how much and which features to perturb is difﬁcult 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.
Speciﬁcally, 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 signiﬁcantly 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 classiﬁcation.
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 classiﬁcation, on which our model signiﬁcantly improves the performance of the base models.
R ELATED W ORK
Meta learning While the literature on meta-learning (Thrun & Pratt, 1998) is vast, here we discuss a few relevant existing works for few-shot classiﬁcation.
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 classiﬁcation 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 classiﬁcation show that the performance can signiﬁcantly improve with larger networks, meta-level regularizers or ﬁne-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 (cid:96) 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) 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 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).
L EARNING TO P ERTURB L ATENT F EATURES
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 ) } Ni =1 and a test set D te = { ( x te j , y te j ) } Mj =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-speciﬁc 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
[Equation]
log p
[Equation]
, where
[Equation]
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. M ETA - 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 classiﬁcation 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.
[Figure]
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 ; θ , φ ) =
(cid:80) Ni =1 log E
z
i ∼ p
( z i | 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 ﬁnal θ ∗ .
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 veriﬁed that Softplus works better.
First, we generate input-dependent noise z ( l ) given the latent features h ( l − 1) from the previous layer.
[Equation]
where µ ( l ) := µ ( l ) ( h ( l − 1) ) is parameterized by φ and θ .
Note that although the variance of a is ﬁxed 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 θ : h
[Equation]
where ◦ denotes the element-wise multiplication.
3. C ONNECTION TO V ARIATIONAL I NFERENCE
Fixed
Lastly, we explain the connection between the lower bound in Eq.
2 and the variational inference with the graphical model in Figure 3.
Suppose we are given a training set D
= { ( x i , y i ) }
Ni =1 , 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 ﬁxed and we only optimize θ .
Based on this speciﬁc context, we derive the lower bound L ( θ ) as follows:
[Equation]
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.
By maximizing
L ( θ ) , we obtain the task-speciﬁc model parameter θ ∗ that can make more accurate predictions on the test examples, owing to the knowledge transfer from φ ∗ , which regularizes the ﬁnal form of the conditional prior p ( z | x ; θ ∗ , φ ∗ ) .
E XPERIMENTS
We now validate our meta-dropout on few-shot classiﬁcation tasks for its effectiveness.
Baselines and our models We ﬁrst introduce the two most important baselines and our model.
We compare against other few-shot meta-learning baselines, using their reported performances.
) MAML.
Model Agnostic Meta Learning by Finn et al.
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 classiﬁcation.
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), 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.
[Table]
[Figure]
Base networks.
We use the standard network architecture for the evaluation of few-shot classiﬁcation 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 classiﬁcation, we use the meta-batchsize of B =and the inner-gradient stepsize of α = 0 .
For 5-shot classiﬁcation, we use B = 6 and α = 0 .
We train for total 40 K iterations with meta-learning rate 10 − 3 .
mimiImageNet: We use B = 4 and α = 0 . 01 .
We train for 60 K 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.
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. F EW - SHOT C LASSIFICATION E XPERIMENTS
Table 1 shows the classiﬁcation 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 classiﬁcation 1 .
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 classiﬁcation 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.
[Table]
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 ﬁrst compare meta-dropout against mixup variants.
The perturbation for mixup regularization is deﬁned 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.
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 signiﬁcantly degrades the few-shot classiﬁcation 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 conﬂict 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 signiﬁcantly 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 (cid:96) 1 , (cid:96) 2 , and (cid:96) ∞ 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 (cid:15) for each inner-gradient step 2 ).
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 regularizers 3 fail to defend against adversarial attacks, meta-dropout not only improves with the best accuracy in Table 2.
We veriﬁed that for those baselines, interestingly, adversarial robustness is not much sensitive to hyperparameter selection.
[Table]
[Figure]
generalization (clean accuracies), but also improves adversarial robustness signiﬁcantly.
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.
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 signiﬁcant as in Omniglot dataset, the overall tendencies look similar
[Figure]
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 ` er & 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 ablate features of our model to examine the effect of each feature.
First, we show the performance of pure MAML model that has same network architecture with
Meta-dropout (More parameters), by unﬁxing φ and removing randomness from Meta-dropout.
The performance improvement from more parameters was subtle compared to other features.
We also 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 ﬁxed multiplicative noise, such that a in Eq.
5 follows a ∼ N ( 0 , I ) without any trainable parameters.
Weight Gaussian: MAML with fully factorized Gaussian weights whose variances are meta-learned.
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 ﬁxed distribution (Fixed Gaussian) nor the input-independent noise (Weight Gaussian and Independent) outperforms the base MAML, whereas our meta-dropout model signiﬁcantly 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 against Deterministic Meta-dropout where we force a in Eq.
5 to be deterministic: a = µ , for both training and test examples.
We can see that although there are some gain from deterministically meta-learning the representation space via µ , we can signiﬁcantly improve the performance by injecting stochastic noise (meta-dropout).
Lastly, we compare against a variant of meta-dropout that instead of using ﬁxed I in Eq.
5, learns the variance in an input-dependent manner (meta-dropout w/ learned variance) but it underperforms meta-dropout with ﬁxed 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 deﬁnition, 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.
C ONCLUSION
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 difﬁcult 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 speciﬁc graphical model in Fig.
We validate our method on benchmark datasets for few-shot classiﬁcation, on which it signiﬁcantly 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 A LGORITHM
We provide the pseudocode for meta-training and meta-testing of Meta-dropout.
˜ z i p θ k +1 ← θ k + α ∇ θ k 1 N (cid:80)
Ni =1 log p ( y tr i | x tr i , ˜
z
i ; θ k ) θ ∗ ← θ K 10: θ ← θ + β 1 M (cid:80) Mj =1 ∇ θ log p ( y te j | x te j , z j = z
j ; θ ∗ ) 11:
φ ← φ + β 1 M (cid:80) Mj
=1 ∇ φ log p ( y te j | x te j , z j =
z
j ; θ ∗ )
θ k +1 ← θ k + α ∇ θ k 1 N (cid:80) Ni =1 1 S (cid:80)
Ss =1 log p ( y tr i | x tr i z ( s ) i θ k ) te j , z j = z j ; θ ∗ ) for j = 1 , . .
, M
B M ETA - DROPOUT WITH A DDITIVE N OISE
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]
where λ is a hyperparameter for controlling how far each noise variable can spread out to cover nearby test examples.
We ﬁx λ = 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 miniImageNet (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 H OW TO VISUALIZE DECISION BOUNDARY
Visualization in Figure 4 shows 2D-mapped latent features and binary classiﬁcation decision boundary of two random classes in a task.
After parameters are adapted to the given task, we make binary classiﬁer of random classes c 1 and c 2 by taking only two columns of ﬁnal linear layer parameters :
W = [ w c 1 , w c 2 ] and b =
[ b c 1 , b c 2 ] .
Then we compute the last latent features H ( L ) of data points in the classes.
The decision hyperplane of the linear classiﬁer 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.
[Equation]
D A DVERSARIAL R OBUSTNESS E XPERIMENT WITH MINI I MAGE N ET
[Figure]
Figure 6 plots the clean and adversarial accuracies over varying size of (cid:15) .
Although the difference between models are not as remarkable as in Figure
[Figure]
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
[Figure]
E M ORE VISUALIZATIONS
In order to see the meaning of perturbation at input level
[Figure]
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.
[Figure] [Figure]