Deep Meta Learning
Deep Meta Learning
Abstract Deep neural networks can achieve great successes when presented
with large data sets and sufficient computational resources. However, their
ability to learn new concepts quickly is limited. Meta-learning is one approach
to address this issue, by enabling the network to learn how to learn. The
field of Deep Meta-Learning advances at great speed, but lacks a unified, in-
depth overview of current techniques. With this work, we aim to bridge this
gap. After providing the reader with a theoretical foundation, we investigate
and summarize key methods, which are categorized into i) metric-, ii) model-,
and iii) optimization-based techniques. In addition, we identify the main open
challenges, such as performance evaluations on heterogeneous benchmarks,
and reduction of the computational costs of meta-learning.
Keywords Meta-learning · Learning to learn · Few-shot learning · Transfer
learning · Deep learning
1 Introduction
65
Metric-based MetaOptNet
Model-based
LEO
Optimization-based
60
Accuracy (%)
SNAIL
55
BMAML
LR-D2
Meta-SGD Relation nets R2-D2
50 LLAMA GNN
Meta nets
MAML Prototypical nets
Reptile iMAML
LSTM
45 meta-learner
Matching nets
0
2
12
64
-1
1
3
8-
2-
4-
-2
et
64
4-
-2
3
sN
2-
4-
12
4-
RN
-3
-3
-6
-6
Re
6-
92
32
64
W
-9
-6
-1
64
64
96
Fig. 1 The accuracy scores of the covered techniques on 1-shot miniImageNet classification.
The used feature extraction backbone is displayed on the x-axis. As one can see, there is a
strong relationship between the network complexity and the classification performance.
1 Here, inductive bias refers to the assumptions of a model which guide predictions on
Expression Meaning
Meta-learning Learning to learn
Tj = (DTtr , D test ) A task consisting of a labeled support and query set
j Tj
Support set The train set DT tr associated with a task T
j
j
Query set The test set DTtest associated with a task T
j
j
xi Example input vector i in the support set
yi (One-hot encoded) label of example input xi from the support set
k Number of examples per class in the support set
N Number of classes in the support and query sets of a task
x Input in the query set
y A (one-hot encoded) label for input x
(f /g/h)◦ Neural network function with parameters ◦
Inner-level At the level of a single task
Outer-level At the meta-level: across tasks
Fast weights A term used in the literature to denote task-specific parameters
Base-learner Learner that works at the inner-level
Meta-learner Learner that operates at the outer-level
θ The parameters of the base-learner network
LD Loss function with respect to task/dataset D
Input embedding Penultimate layer representation of the input
Task embedding An internal representation of a task in a network/system
SL Supervised Learning
RL Reinforcement Learning
Table 1 Some notation and meaning, which we use throughout this paper.
2 Foundation
In this section, we build the necessary foundation for investigating Deep Meta-
Learning techniques in a consistent manner. To begin with, we contrast regular
learning and meta-learning. Afterwards, we briefly discuss how Deep Meta-
Learning relates to different fields, what the usual training and evaluation
procedure looks like, and which benchmarks are often used for this purpose.
We finish this section by describing the context and some applications of the
meta-learning field.
the correct setting for θ that minimizes an empirical loss function LD , which
must capture how the model is performing, such that appropriate adjustments
to its parameters can be made. In short, we wish to find
where SL stands for “supervised learning". Note that this objective is specific
to data set D, meaning that our model fθ may not generalize to examples
outside of D. To measure generalization, one could evaluate the performance
on a separate test data set, which contains unseen examples. A popular way to
do this is through cross-validation, where one repeatedly creates train and test
splits Dtr , Dtest ⊂ D and uses these to train and evaluate a model respectively
(Hastie et al., 2009).
Finding globally optimal parameters θ SL is often computationally infeasi-
ble. We can, however, approximate them, guided by pre-defined meta-knowledge
ω (Hospedales et al., 2020), which includes, e.g., the initial model parameters
θ, choice of optimizer, and learning rate schedule. As such, we approximate
θ SL ≈ gω (D, LD ), (2)
ω ∗ := arg min ETj vp(T ) [LTj (gω (Tj , LTj ))]. (3)
ω | {z } | {z }
Outer-level Inner-level
Here, the inner-level concerns task-specific learning, while the outer-level con-
cerns multiple tasks. One can now easily see why this is meta-learning: we
learn ω, which allows for quick learning of tasks Tj at the inner-level. Hence,
we are learning to learn.
6 Mike Huisman et al.
T
X
θ RL := arg min Etraj γ t r(st , πθ (st )), (4)
θ t=0
where we take the expectation over the possible trajectories traj = (s0 , πθ (s0 ),
. . . sT , πθ (sT )) due to the random nature of MDPs (Duan et al., 2016). Note
that γ is a hyperparameter that can prioritize short- or long-term rewards by
decreasing or increasing it, respectively.
Also in the case of reinforcement learning it is often infeasible to find the
global optimum θ RL , and thus we settle for approximations. In short, given a
learning method ω, we approximate
where again Tj is the given MDP, and gω is the optimization algorithm, guided
by pre-defined meta-knowledge ω.
Note that in a Markov Decision Process (MDP), the agent knows the state
at any given time step t. When this is not the case, it becomes a Partially
Observable Markov Decision Process (POMDP), where the agent receives only
observations O, and uses these to update its belief with regard to the state it
is in (Sutton and Barto, 2018).
The meta abstraction has as its object a group of tasks, or Markov Decision
Processes (MDPs) in the case of reinforcement learning. Thus, instead of max-
imizing the expected reward on a single MDP, the meta reinforcement learning
objective is to maximize the expected reward over various MDPs, by learning
A Survey of Deep Meta-Learning 7
meta-knowledge ω. Here, the MDPs are sampled from some distribution p(T ).
So, we wish to find a set of parameters
XT
∗ t
ω := arg min ETj vp(T ) Etraj
.
γ r(st , πgω (Tj ,LTj ) (st )) (6)
ω
t=0
| {z }
Outer-level | {z }
Inner-level
Now that we have provided a formal basis for our discussion for both supervised
and reinforcement meta-learning, it is time to contrast meta-learning briefly
with two related areas of machine learning that also have the goal to improve
the speed of learning. We will start with transfer learning.
Transfer Learning In Transfer Learning, one tries to transfer knowledge
of previous tasks to new, unseen tasks (Pan and Yang, 2009; Taylor and Stone,
2009), which can be challenging when the new task comes from a different
distribution than the one used for training Iqbal et al. (2018). The distinction
between Transfer Learning and Meta-Learning has become more opaque over
time. A key property of meta-learning techniques, however, is their meta-
objective, which explicitly aims to optimize performance across a distribution
over tasks (as seen in previous sections by taking the expected loss over a
distribution of tasks). This objective need not always be present in Transfer
Learning techniques, e.g., when one pre-trains a model on a large data set,
and fine-tunes the learned weights on a smaller data set.
Multi-task learning Another, closely related field, is that of multi-task
learning. In multi-task learning, a model is jointly trained to perform well on
multiple fixed tasks (Hospedales et al., 2020). Meta-learning, in contrast, aims
to find a model that can learn new (previously unseen) tasks quickly. This
difference is illustrated in Figure 2.
2 Adapted from [Link]
8 Mike Huisman et al.
In the previous section, we have described the learning objectives for (meta)
supervised and reinforcement learning. We will now describe the general set-
ting that can be used to achieve these objectives. In general, one optimizes a
meta-objective by using various tasks, which are data sets in the context of
supervised learning, and (Partially Observable) Markov Decision Processes in
the case of reinforcement learning. This is done in three stages: the i) meta-
train stage, ii) meta-validation stage, and iii) meta-test stage, each of which
is associated with a set of tasks.
First, in the meta-train stage, the meta-learning algorithm is applied to
the meta-train tasks. Second, the meta-validation tasks can then be used to
evaluate the performance on unseen tasks, which were not used for training. Ef-
fectively, this measures the meta-generalization ability of the trained network,
which serves as feedback to tune, e.g., hyper-parameters of the meta-learning
algorithm. Third, the meta-test tasks are used to give a final performance
estimate of the meta-learning technique.
quires access to a data set D. The sampling process is guided by the N -way,
k-shot principle, which states that every training data set DTtrj should contain
exactly N classes and k examples per class, implying that |DTtrj | = N · k. Fur-
thermore, the true labels of examples in the test set DTtest j
must be present
tr tr
in the train set DTj of a given task Tj . DT j acts as a support set, literally
supporting classification decisions on the query set DTtest j
. Importantly, note
that with this terminology, the query set (or test set) of a task is actually used
during the meta-training phase. Furthermore, the fact that the labels across
stages are disjoint ensures that we test the ability of a model to learn new
concepts.
The meta-learning objective in the training phase is to minimize the loss
function of the model predictions on the query sets, conditioned on the support
sets. As such, for a given task Tj , the model ‘sees’ the support set, and extracts
information from the support set to guide its predictions on the query set. By
applying this procedure to different episodes/tasks Tj , the model will slowly
accumulate meta-knowledge ω, which can ultimately speed up learning on new
tasks.
The easiest way to achieve this is by doing this with regular neural net-
works, but as was pointed out by various authors (see, e.g., Finn et al. (2017))
more sophisticated architectures will vastly outperform such networks. In the
remainder of this work, we will review such architectures.
At the meta-validation and meta-test stages, or evaluation phases, the
learned meta-information in ω is fixed. The model is, however, still allowed
to make task-specific updates to its parameters θ (which implies that it is
learning). After task-specific updates, we can evaluate the performance on the
test sets. In this way, we test how well a technique performs at meta-learning.
N -way, k-shot classification is often performed for small values of k (since
we want our models to learn new concepts quickly, i.e., from few examples).
In that case, one can refer to it as few-shot learning.
Here, we briefly describe some benchmarks that can be used to evaluate meta-
learning algorithms.
– Omniglot (Lake et al., 2011): This data set presents an image recogni-
tion task. Each image corresponds to one out of 1 623 characters from 50
different alphabets. Every character was drawn by 20 people. Note that in
this case, the characters are the classes/labels.
– ImageNet (Deng et al., 2009): This is the largest image classification
data set, containing more than 20K classes and over 14 million colored
images. miniImageNet is a mini variant of the large ImageNet data set
(Deng et al., 2009) for image classification, proposed by Vinyals et al.
(2016) to reduce the engineering efforts to run experiments. The mini data
set contains 60 000 colored images of size 84 × 84. There are a total of 100
classes present, each accorded by 600 examples. tieredImageNet (Ren et al.,
10 Mike Huisman et al.
Deep neural networks have achieved remarkable results on various tasks in-
cluding image recognition, text processing, game playing, and robotics (Silver
et al., 2016; Mnih et al., 2013; Wu et al., 2016), but their success depends on
the amount of available data (Sun et al., 2017) and computing resources. Deep
meta-learning reduces this dependency by allowing deep neural networks to
learn new concepts quickly. As a result, meta-learning widens the applicability
of deep learning techniques to many application domains. Such areas include
few-shot image classification (Finn et al., 2017; Snell et al., 2017; Ravi and
Larochelle, 2017), robotic control policy learning (Gupta et al., 2018; Naga-
bandi et al., 2019) (see Figure 4), hyperparameter optimization (Antoniou
et al., 2019; Schmidhuber et al., 1997), meta-learning learning rules (Bengio
et al., 1991, 1997; Miconi et al., 2018, 2019), abstract reasoning (Barrett et al.,
A Survey of Deep Meta-Learning 11
Fig. 4 Learning continuous robotic control tasks is an important application of Deep Meta-
Learning techniques. Image taken from (Yu et al., 2019).
2018), and many more. For a larger overview of applications, we refer inter-
ested readers to Hospedales et al. (2020).
Table 2 High-level overview of the three Deep Meta-Learning categories, i.e., i) metric-,
ii) model-, and iii) optimization-based techniques, and their main strengths and weaknesses.
Recall that Tj is a task, DT tr the corresponding support set, k (x, x ) a kernel function
j
θ i
returning the similarity between the two inputs x and xi , yi are true labels for known
inputs xi , θ are base-learner parameters, and gϕ is a (learned) optimizer with parameters
ϕ.
In the remainder of this work, we will look in more detail at individual meta-
learning methods. As indicated before, the techniques can be grouped into
three main categories (Vinyals, 2017), namely i) metric-, ii) model-, and iii) opti-
mization-based methods. We will discuss them in that order.
To help give an overview of the methods, we draw your attention to the fol-
lowing tables. Table 2 summarizes the three categories and provides key ideas,
and strengths of the approaches. The terms and technical details are explained
more fully in the remainder of this paper. Table 3 contains an overview of all
techniques that are discussed further on.
A Survey of Deep Meta-Learning 13
3 Metric-based Meta-Learning
X
pθ (Y |x, DTtrj ) = kθ (x, xi )yi . (7)
tr
(xi ,yi )∈DT
j
3.1 Example
Fig. 5 Illustration of our metric-based example. The blue vector represents the new input
from the query set, whereas the red vectors are inputs from the support set which can be
used to guide our prediction for the new input.
a pair (xi , yi ). For simplicity, the example will not use an embedding function,
which maps example inputs onto an (more informative) embedding space. Our
query set only contains one example DTtest j
= {([4, 0.5], y)}. Then, the goal is
to predict the correct label for new input [4, 0.5] using only examples in DTtrj .
The problem is visualized in Figure 5, where red vectors correspond to example
inputs from our support set. The blue vector is the new input that needs to be
classified. Intuitively, this new input is most similar to the vector [6, 0], which
means that we expect the label for the new input to be the same as that for
[6, 0], i.e., 4.
Suppose we use a fixed similarity kernel, namely the cosine similarity,
x·xT
i.e., k(x, xi ) = ||x||·||xi
i ||
, where ||v|| denotes the length of vector v, i.e.,
pP
||v|| = ( n vn2 ). Here, vn denotes the n-th element of placeholder vector
v (substitute v by x or xi ). We can now compute the cosine similarity be-
tween the new input [4, 0.5] and every example input√xi , as done in Table 4,
where we used the facts that ||x|| = || [4, 0.5] || = 42 + 0.52 ≈ 4.03, and
x [4,0.5]
||x|| ≈ 4.03 = [0.99, 0.12].
From this table and Equation 7, it follows that the predicted probability
distribution pθ (Y |x, DTtrj ) = −0.12y1 −0.58y2 −0.37y3 +0.99y4 = −0.12[1, 0, 0, 0]−
0.58[0, 1, 0, 0]−0.37[0, 0, 1, 0]+0.99[0, 0, 0, 1] = [−0.12, −0.58, −0.37, 0.99]. Note
that this is not really a probability distribution. That would require normal-
ization such that every element is at least 0 and the sum of all elements is 1.
For the sake of this example, we do not perform this normalization, as it is
clear that class 4 (the class of the most similar example input [6, 0]) will be
predicted.
16 Mike Huisman et al.
xi xi x
xi yi ||xi || ||xi || ||xi ||
· ||x||
Table 4 Example showing pair-wise input comparisons. Numbers were rounded to two
decimals.
One may wonder why such techniques are meta-learners, for we could take
any single data set D and use pair-wise comparisons to compute predictions.
At the outer-level, metric-based meta-learners are trained on a distribution of
different tasks, in order to learn (among others) a good input embedding func-
tion. This embedding function facilitates inner-level learning, which is achieved
through pair-wise comparisons. As such, one learns an embedding function
across tasks to facilitate task-specific learning, which is equivalent to “learning
to learn", or meta-learning.
After this introduction to metric-based methods, we will now cover some
key metric-based techniques.
A Siamese neural network (Koch et al., 2015) consists of two neural networks
fθ that share the same weights θ. Siamese neural networks take two inputs
x1 , x2 , and compute two hidden states fθ (x1 ), fθ (x2 ), corresponding to the
activation patterns in the final hidden layers. These hidden states are fed into
a distance layer, which computes a distance vector d = |fθ (x1 ) − fθ (x2 )|,
where di is the absolute distance between the i-th elements of fθ (x1 ) and
fθ (x2 ). From this distance vector, the similarity between x1 , x2 is computed
as σ(αT d), where σ is the sigmoid function (with output range [0,1]), and α
is a vector of free weighting parameters, determining the importance of each
di . This network structure can be seen in Figure 6.
Koch et al. (2015) applied this technique to few-shot image recognition
in two stages. In the first stage, they train the twin network on an image
verification task, where the goal is to output whether two input images x1 and
x2 have the same class. The network is thus stimulated to learn discriminative
features. In the second stage, where the model is confronted with a new task,
the network leverages its prior learning experience. That is, given a task Tj =
(DTtrj , DTtest
j
), and previously unseen input x ∈ DTtest
j
, the predicted class ŷ is
equal to the label yi of the example (xi , yi ) ∈ DTtrj which yields the highest
similarity score to x. In contrast to other techniques mentioned further in this
section, Siamese neural networks do not directly optimize for good performance
across tasks (consisting of support and query sets). However, they do leverage
learned knowledge from the verification task to learn new tasks quickly.
A Survey of Deep Meta-Learning 17
Matching networks (Vinyals et al., 2016) build upon the idea that underlies
Siamese neural networks (Koch et al., 2015). That is, they leverage pair-wise
comparisons between the given support set DTtrj = {(xi , yi )}m i=1 (for a task
test
Tj ), and new inputs x ∈ DTj from the query set which we want to classify.
However, instead of assigning the class yi of the most similar example input
xi , matching networks use a weighted combination of all example labels yi in
the support set, based on the similarity of inputs xP i to new input x. More
m
specifically, predictions are computed as follows: ŷ = i=1 a(x, xi )yi , where a
is a non-parametric (non-trainable) attention mechanism, or similarity kernel.
This classification process is shown in Figure 7. In this figure, the input to fθ
has to be classified, using the support set DTtrj (input to gθ ).
The attention that is used consists of a softmax over the cosine similarity
c between the input representations, i.e.,
where fφ and gϕ are neural networks, parameterized by φ and ϕ, that map raw
inputs to a (lower-dimensional) latent vector, which corresponds to the output
of the final hidden layer of a neural network. As such, the neural networks act as
embedding functions. The larger the cosine similarity between the embeddings
18 Mike Huisman et al.
of x and xi , the larger a(x, xi ), and thus the influence of label yi on the
predicted label ŷ for input x.
Vinyals et al. (2016) propose two main choices for the embedding functions.
The first is to use a single neural network, granting us θ = φ = ϕ and thus
fφ = gϕ . This setup is the default form of matching networks, as shown in
Figure 7. The second choice is to make fφ and gϕ dependent on the support
set DTtrj using Long Short-Term Memory networks (LSTMs). In that case, fφ is
represented by an attention LSTM, and gϕ by a bidirectional one. This choice
for embedding functions is called Full Context Embeddings (FCE), and yielded
an accuracy improvement of roughly 2% on miniImageNet compared to the
regular matching networks, indicating that task-specific embeddings can aid
the classification of new data points from the same distribution.
Matching networks learn a good feature space across tasks for making
pair-wise comparisons between inputs. In contrast to Siamese neural networks
(Koch et al., 2015), this feature space (given by weights θ) is learned across
tasks, instead of on a distinct verification task.
In summary, matching networks are an elegant and simple approach to
metric-based meta-learning. However, these networks are not readily applica-
ble outside of supervised learning settings and suffer from performance degra-
dation when label distributions are biased (Vinyals et al., 2016).
Just like matching networks (Vinyals et al., 2016), prototypical networks (Snell
et al., 2017) base their class predictions on the entire support set DTtrj . How-
ever, instead of computing the similarity between new inputs and examples
in the support set, prototypical networks only compare new inputs to class
prototypes (centroids), which are single vector representations of classes in
A Survey of Deep Meta-Learning 19
some embedding space. Since there are fewer (or equal) class prototypes than
the number of examples in the support set, the amount of required pair-wise
comparisons decreases, saving computational costs.
Fig. 8 Prototypical networks for the case of few-shot learning. The ck are class prototypes
for class k which are computed by averaging the representations of inputs (colored circles) in
the support set. Note that the representation space is partitioned into three disjoint areas,
where each area corresponds to one class. The class with the closest prototype to the new
input x in the query set is then given as prediction. Source: Snell et al. (2017).
The underlying idea of class prototypes is that for a task Tj , there ex-
ists an embedding function that maps the support set onto a space where
class instances cluster nicely around the corresponding class prototypes (Snell
et al., 2017). Then, for a new input x, the class of the prototype nearest to
that input will be predicted. As such, prototypical networks perform nearest
centroid/prototype classification in a meta-learned embedding space. This is
visualized in Figure 8.
More formally, given a distance function d : X × X → [0, +∞) (e.g. Eu-
clidean distance) and embedding function fθ , parameterized by θ, prototypical
networks compute class probabilities pθ (Y |x, DTtrj ) as follows
exp[−d(fθ (x), ck )]
pθ (y = k|x, DTtrj ) = P , (9)
yi exp[−d(fθ (x), cyi )]
where ck is the prototype/centroid for class k and yi are the classes in the
support set DTtrj . Here, a class prototype for class k is defined as the average of
all vectors xi in the support set such that yi = k. Thus, classes with prototypes
that are nearer to the new input x obtain larger probability scores.
Snell et al. (2017) found that the squared Euclidean distance function as
d gave rise to the best performance. With that distance function, prototypical
networks can be seen as linear models. To see this, note that −d(fθ (x), ck ) =
−||fθ (x) − ck ||2 = −fθ (x)T fθ (x) + 2cTk fθ (x) − cTk ck . The first term does not
depend on the class k, and does thus not affect the classification decision. The
remainder can be written as wTk fθ (x) + bk , where wk = 2ck and bk = −cTk ck .
20 Mike Huisman et al.
Fig. 9 Relation network architecture. First, the embedding network fϕ embeds all inputs
from the support set DT tr (the five example inputs on the left), and the query input (be-
j
low the fϕ block). All support set embeddings fϕ (xi ) are then concatenated to the query
embedding fϕ (x). These concatenated embeddings are passed into a relation network gφ ,
which computes a relation score for every pair (xi , x). The class of the input xi that yields
the largest relation score gφ ([fϕ (x), fϕ (xi )]) is then predicted. Source: Sung et al. (2018).
Note that this is linear in the output of network fθ , not linear in the input
of the network x. Also, Snell et al. (2017) show that prototypical networks
(coupled with Euclidean distance) are equivalent to matching networks in one-
shot learning settings, as every example in the support set will be its prototype.
In short, prototypical networks save computational costs by reducing the
required number of pair-wise comparisons between new inputs and the sup-
port set, by adopting the concept of class prototypes. Additionally, prototyp-
ical networks were found to outperform matching networks (Vinyals et al.,
2016) in 5-way, k-shot learning for k = 1, 5 on Omniglot (Lake et al., 2011)
and miniImageNet (Vinyals et al., 2016), even though they do not use com-
plex task-specific embedding functions. Despite these advantages, prototypical
networks are not readily applicable outside of supervised learning settings.
labels. A classification decision is then made by picking the class of the example
input which yields the largest relation score (or similarity). Note that Relation
networks thus do not use the idea of class prototypes, and simply compare new
inputs x to all example inputs xi in the support set, as done by, e.g., matching
networks (Vinyals et al., 2016).
More formally, we are given a support set DTtrj with some examples (xi , yi ),
and a new (previously unseen) input x. Then, for every combination (x, xi ),
the Relation network produces a concatenated embedding [fϕ (x), fϕ (xi )],
which is vector obtained by concatenating the respective embeddings of x
and xi . This concatenated embedding is then fed into the relation module gφ .
Finally, gφ computes the relation score between x and xi as
The predicted class is then ŷ = yarg maxi ri . This entire process is shown in
Figure 9. Remarkably enough, Relation networks use the Mean-Squared Error
(MSE) of the relation scores, rather than the more standard cross-entropy
loss. The MSE is then propagated backwards through the entire architecture
(Figure 9).
The key advantage of Relation networks is their expressive power, induced
by the usage of a trainable similarity function. This expressivity makes this
technique very powerful. As a result, it yields better performance than previ-
ously discussed techniques that use a fixed similarity metric.
Graph neural networks (Garcia and Bruna, 2017) use a more general and
flexible approach than previously discussed techniques for N -way, k-shot clas-
sification. As such, graph neural networks subsume Siamese (Koch et al., 2015)
and prototypical networks (Snell et al., 2017). The graph neural network ap-
proach represents each task Tj as a fully-connected graph G = (V, E), where
V is a set of nodes/vertices and E a set of edges connecting nodes. In this
graph, nodes v i correspond to input embeddings fθ (xi ), concatenated with
their one-hot encoded labels yi , i.e., v i = [fθ (xi ), yi ]. For inputs x from the
query set (for which we do not have the labels), a uniform prior over all N
possible labels is used: y = [ N1 , . . . , N1 ]. Thus, each node contains an input and
label section. Edges are weighted links that connect these nodes.
The graph neural network then propagates information in the graph using
a number of local operators. The underlying idea is that label information can
be transmitted from nodes of which we do have the labels, to nodes for which
we have to predict labels. Which local operators are used, is out of scope for
this paper, and the reader is referred to Garcia and Bruna (2017) for details.
By exposing the graph neural network to various tasks Tj , the propagation
mechanism can be altered to improve the flow of label information in such a
way that predictions become more accurate. As such, in addition to learning
22 Mike Huisman et al.
Fig. 10 Processing in an attentive recurrent comparator. At every time step, the model
takes a glimpse of a part of an image and incorporates this information into the hidden state
ht . The final hidden state after taking various glimpses of a pair of images is then used to
compute a class similarity score. Source: Shyam et al. (2017).
Attentive recurrent comparators (ARCs) (Shyam et al., 2017) differ from pre-
viously discussed techniques as they do not compare inputs as a whole, but
by parts. This approach is inspired by how humans would make a decision
concerning the similarity of objects. That is, we shift our attention from one
object to the other, and move back and forth to take glimpses of different
parts of both objects. In this way, information of two objects is fused from the
beginning, whereas other techniques (e.g., matching networks (Vinyals et al.,
2016) and graph neural networks (Garcia and Bruna, 2017)) only combine
information at the end (after embedding both images) (Shyam et al., 2017).
Given two inputs xi and x, we feed them in interleaved fashion repeatedly
into a recurrent neural network (controller): xi , x, . . . , xi , x. Thus, the image
at time step t is given by It = xi if t is even else x. Then, at each time
step t, the attention mechanism focuses on a square region of the current
A Survey of Deep Meta-Learning 23
Use graph
GNN
neural
(Garcia et al. Use a neural network
networks
2017) as trainable similarity
function instead of
Compare cosine similarity
query inputs
with class
Matching nets prototypes Prototypical nets
Siamese nets Relation nets
(Vinyals et al.
(Koch et al. 2015) No auxiliary (Snell et al. 2017) (Sung et al. 2018)
2016)
task. Train
under same
conditions as
those at test time Compare inputs
by taking ARC
biologically (Shyam et al.
inspired glimpses 2017)
be fast at test-time when tasks are small, as the networks do not need to
make task-specific adjustments. However, when tasks at meta-test time become
more distant from the tasks that were used at meta-train time, metric-learning
techniques are unable to absorb new task information into the network weights.
Consequently, performance may degrade.
Furthermore, when tasks become larger, pair-wise comparisons may be-
come prohibitively expensive. Lastly, most metric-based techniques rely on
the presence of labeled examples, which make them inapplicable outside of
supervised learning settings.
4 Model-based Meta-Learning
where f represents the black-box neural network model, and θ its parameters.
4.1 Example
Using the same example as in Section 3, suppose we are given a task support
set DTtrj = {([0, −4], 1), ([−2, −4], 2), ([−2, 4], 3), ([6, 0], 4)}, where a tuple de-
notes a pair (xi , yi ). Furthermore, suppose our query set only contains one
example DTtest
j
= {([4, 0.5], 4)}. This problem has been visualized in Figure 5
(in Section 3). For the sake of the example, we do not use an input embed-
ding function: our model will operate on the raw inputs of DTtrj and DTtest j
. As
an internal state, our model uses an external memory matrix M ∈ R4×(2+1) ,
with four rows (one for each example in our support set), and three columns
(the dimensionality of input vectors, plus one dimension for the correct label).
Our model proceeds to process the support set sequentially, reading the ex-
amples from DTtrj one by one, and by storing the i-th example in the i-th row
of the memory module. After processing the support set, the memory matrix
contains all examples, and as such, serves as internal task representation.
Given the new input [4, 0.5], our model could use many different techniques
to make a prediction based on this representation. For simplicity, assume that
it computes the dot product between x, and every memory M (i) (the 2-D
vector in the i-th row of M , ignoring the correct label), and predicts the
class of the input which yields the largest dot product. This would produce
scores −2, −10, −6, and 24 for the examples in DTtrj respectively. Since the last
example [6, 0] yields the largest dot product, we predict that class, i.e., 4.
Note that this example could be seen as a metric-based technique where
the dot product is used as a similarity function. However, the reason that
this technique is model-based is that it stores the entire task inside a memory
module. This example was deliberately easy for illustrative purposes. More
advanced and successful techniques have been proposed, which we will now
cover.
Recurrent meta-learners (Duan et al., 2016; Wang et al., 2016) are, as the name
suggests, meta-learners based on recurrent neural networks. The recurrent
26 Mike Huisman et al.
external memory allows for quick task-specific adaptation. For this, Santoro
et al. (2016) used Neural Turing Machines (Graves et al., 2014). Here, the
controller is parameterized by θ and acts as the long-term memory of the
memory-augmented neural network, while the external memory module is the
short-term memory.
The workflow of memory-augmented neural networks is displayed in Fig-
ure 13. Note that the data from a task is processed as a sequence, i.e., data
are fed into the network one by one. The support set is fed into the memory-
augmented neural network first. Afterwards, the query set is processed. During
the meta-train phase, training tasks can be fed into the network in arbitrary
order. At time step t, the model receives input xt with the label of the pre-
vious input, i.e., yt−1 . This was done to prevent the network from mapping
class labels directly to the output (Santoro et al., 2016).
denotes the cosine similarity between key kt and the memory (from P a previous
input) stored in row i, i.e., Mt (i). Then, the representation r t = i wtr (i)M (i)
is retrieved, which is simply a linear combination of all keys (i.e., rows) in
memory matrix M .
defined as follows:
(
0 if wtu (i) > `u(n)
w`u
t (i) = .
1 else
Meta networks are divided into two distinct subsystems (consisting of neural
networks), i.e., the base- and meta-learner (whereas in memory-augmented
neural networks the base- and meta-components are intertwined). The base-
learner is responsible for performing tasks, and for providing the meta-learner
with meta-information, such as loss gradients. The meta-learner can then com-
pute fast task-specific weights for itself and the base-learner, such that it can
30 Mike Huisman et al.
Fig. 16 Layer augmentation setup used to combine slow and fast weights. Source:
Munkhdalai and Yu (2017).
Fig. 17 Architecture and workflow of SNAIL for supervised and reinforcement learning
settings. The input layer is red. Temporal Convolution blocks are orange; attention blocks
are green. Source: Mishra et al. (2018).
Fig. 18 Schematic view of how conditional neural processes work. Here, h denotes a net-
work outputting a representation for a observation, a denotes an aggregation function for
these representations, and g denotes a neural network that makes predictions for unlabelled
observations, based on the aggregated representation. Source: Garnelo et al. (2018).
SNAIL consists of three building blocks. The first is the DenseBlock, which
applies a single 1D convolution to the input, and concatenates (in the fea-
ture/horizontal direction) the result. The second is a TCBlock, which is sim-
ply a series of DenseBlocks with exponentially increasing dilation rate of the
temporal convolutions (Mishra et al., 2018). Note that the dilation is nothing
but the temporal distance between two nodes in a network. For example, if we
use a dilation of 2, a node at position p in layer L will receive the activation
from node p − 2 from layer L − 1. The third block is the AttentionBlock, which
learns to focus on the important parts of prior experience.
In similar fashion to memory-augmented neural networks (Santoro et al.,
2016) (Section 4.3), SNAIL also processes task data in sequence, as shown in
Figure 17. However, the input at time t is accompanied by the label at time
t, instead of t − 1 (as was the case for memory-augmented neural networks).
SNAIL learns internal dynamics from seeing various tasks so that it can make
good predictions on the query set, conditioned upon the support set.
A key advantage of SNAIL is that it can be applied to both supervised
and reinforcement learning tasks. In addition, it achieves good performance
compared to previously discussed techniques. A downside of SNAIL is that
finding the correct architecture of TCBlocks and DenseBlocks can be time-
consuming.
Fig. 19 Neural statistician architecture. Edges are neural networks. All incoming inputs to
a node are concatenated.
h i
L(Θ) = −ETj vp(T ) E`vU (0,...,k·N −1) QΘ (y Tj |DTc j , xTj ) . (12)
A neural statistician (Edwards and Storkey, 2017) differs from earlier ap-
proaches as it learns to compute summary statistics, or meta-features, of data
sets in an unsupervised manner. These latent embeddings (making the ap-
proach model-based) can then later be used for making predictions. Despite
the broad applicability of the model, we discuss it in the context of Deep
Meta-Learning.
A Survey of Deep Meta-Learning 35
Y L−1
Y
q(c, z 1:L |D; φ) = q(c|D; φ) q(zL |x, c; φ) q(z i |z i+1 , x, c; φ). (13)
x∈D i=1
Fig. 20 The relationships between the covered model-based meta-learning techniques. The
neural statistician and conditional neural process (CNP) form an island in the model-based
approaches.
the idea of feeding the entire support set in sequential fashion into the model
and then making predictions for the query set inputs using the internal state
of the model. Such a model-based approach, where inputs sequentially enter
the model was also taken by recurrent meta-learners (Duan et al., 2016; Wang
et al., 2016) in the reinforcement learning setting. Meta networks (Munkhdalai
and Yu, 2017) also use a large black-box solution but generate task-specific
weights for every task that is encountered. SNAIL (Mishra et al., 2018) tries
to improve the memory capacity and ability to pinpoint memories, which is
limited in recurrent neural networks, by using attention mechanisms coupled
with special temporal layers. Lastly, the neural statistician and conditional
neural process (CPN) are two techniques that try to learn the meta-features
of data sets in an end-to-end fashion. The neural statistician uses the distance
between meta-features to make class predictions, while the conditional neural
process conditions classifiers on these features.
Advantages of model-based approaches include the flexibility of the in-
ternal dynamics of the systems, and their broader applicability compared to
most metric-based techniques. However, model-based techniques are often out-
performed by metric-based techniques in supervised settings (e.g. graph neu-
ral networks (Garcia and Bruna, 2017); Section 3.6), may not perform well
when presented with larger data sets (Hospedales et al., 2020), and generalize
less well to more distant tasks than optimization-based techniques (Finn and
Levine, 2018). We discuss this optimization-based approach next.
5 Optimization-based Meta-Learning
5.1 Example
Suppose we are faced with a linear regression problem, where every task is
associated with a different function f (x). For this example, suppose our model
only has two parameters: a and b, which together form the function fˆ(x) =
ax + b. Suppose further that our meta-training set consists of four different
tasks, i.e., A, B, C, and D. Then, according to the optimization-based view, we
wish to find a single set of parameters {a, b} from which we can quickly learn
the optimal parameters for each of the four tasks, as displayed in Figure 21.
In fact, this is the intuition behind the popular optimization-based technique
MAML (Finn et al., 2017). By exposing our model to various meta-training
tasks, we can update the parameters a and b to facilitate quick adaptation.
We will now discuss the core optimization-based techniques in more detail.
Fig. 22 Workflow of the LSTM optimizer. Gradients can only propagate backwards through
solid edges. ft denotes the observed loss at time step t. Source: Andrychowicz et al. (2016).
where α is the learning rate, and LTj (θ t ) is the loss function with respect to
task Tj and network parameters at time t, i.e., θ t . The key idea underlying
LSTM optimizers (Andrychowicz et al., 2016) is to replace the update term
(−α∇LTj (θ t )) by an update proposed by an LSTM g with parameters ϕ.
Then, the new update becomes
θ t+1 := θ t + gϕ (∇θt LTj (θ t )). (16)
This new update allows the optimization strategy to be tailored to a specific
family of tasks. Note that this is meta-learning, i.e., the LSTM learns to learn.
As such, this technique basically learns an update policy.
The loss function used to train an LSTM optimizer is:
" T #
X
L(ϕ) = ELTj wt LTj (θ t ) , (17)
t=1
where T is the number of parameter updates that are made, and wt are weights
indicating the importance of performance after t steps. Note that generally, we
are only interested in the final performance after T steps. However, the authors
found that the optimization procedure was better guided by equally weighting
the performance after each gradient descent step. As is often done, second-
order derivatives (arising from the dependency between the updated weights
and the LSTM optimizer) were ignored due to the computational expenses as-
sociated with the computation thereof. This loss function is fully differentiable
and thus allows for training an LSTM optimizer (see Figure 22). To prevent a
parameter explosion, the same network is used for every coordinate/weight in
the base-learner’s network, causing the update rule to be the same for every
parameter. Of course, the updates depend on their prior values and gradients.
The key advantage of LSTM optimizers is that they can enable faster
learning compared to hand-crafted optimizers, also on different data sets than
those used to train the optimizer. However, Andrychowicz et al. (2016) did
not apply this technique to few-shot learning. In fact, they did not apply it
A Survey of Deep Meta-Learning 39
Fig. 23 LSTM meta-learner computation graph. Gradients can only propagate backwards
through solid edges. The base-learner is denoted as M . (Xt , Yt ) are training sets, whereas
(X, Y ) is the test set. Source: Ravi and Larochelle (2017).
across tasks at all. Thus, it is unclear whether this technique can perform
well in few-shot settings, where few data per class are available for training.
Furthermore, the question remains whether it can scale to larger base-learner
architectures.
next time step t + 1, the LSTM computes ct+1 and sets the weights of the
base-learner equal to that. There is thus a one-to-one correspondence between
ct and θ t . The meta-learner’s learning rate αt (see Equation 18), is set equal
to σ(wα · [∇θt−1 LTt (θ t−1 ), LTt (θ t ), θt−1 , αt−1 ] + bα ), where σ is the sigmoid
function. Note that the output is a vector, with values between 0 and 1, which
denote the the learning rates for the corresponding parameters. Furthermore,
wα and bα are trainable parameters that part of the LSTM meta-learner. In
words, the learning rate at any time depends on the loss gradients, the loss
value, the previous parameters, and the previous learning rate. The forget
gate, ft , determines what part of the cell state should be forgotten, and is
computed in a similar fashion, but with different weights.
To prevent an explosion of meta-learner parameters, weight-sharing is used,
in similar fashion to LSTM optimizers proposed by Andrychowicz et al. (2016)
(Section 5.2). This implies that the same update rule is applied to every weight
at a given time step. The exact update, however, depends on the history of that
specific parameter in terms of the previous learning rate, loss, etc. For simplic-
ity, second-order derivatives were ignored, by assuming the base-learner’s loss
does not depend on the cell state of the LSTM optimizer. Batch normalization
was applied to stabilize and speed up the learning process.
In short, LSTM optimizers can learn to optimize a base-learner by main-
taining a one-to-one correspondence over time between the base-learner’s weights
and the LSTM cell state. This allows the LSTM to exploit commonalities in
the tasks, allowing for quicker optimization. However, there are simpler ap-
proaches (e.g. MAML (Finn et al., 2017)) that outperform this technique.
on the previous set of weights, loss gradients, and objective functions, and use
guided policy search to train it.
In summary, Li and Malik (2018) made the first step towards general
optimization through reinforcement learning optimizers, which were shown
able to generalize across network architectures and data sets. However, the
base-learner architecture that was used was quite small. The question remains
whether this approach can scale to larger architectures.
5.5 MAML
Fig. 24 MAML learns an initialization point from which it can perform well on various
tasks. Source: Finn et al. (2017).
where we used L0Dtest (θ 0j ) to denote the derivative of the loss function with re-
Tj
spect to the query set, evaluated at the post-update parameters θ 0j . The term
α∇2θ LDTtr (θ) contains the second-order gradients. The computation thereof is
j
expensive in terms of time and memory costs, especially when the optimiza-
tion trajectory is large (when using a larger number of gradient updates s per
task). Finn et al. (2017) experimented with leaving out second-order gradients,
by assuming ∇θ θ 0j = I, giving us First Order MAML (FOMAML, see Equa-
tion 22). They found that FOMAML performed reasonably similar to MAML.
This
P means0 that updating the initialization using only first order gradients
0
L
Tj vp(T ) D test (θ j ) is roughly equal to using the full gradient expression of
Tj
the meta-loss in Equation 22. One can extend the meta-loss to incorporate
multiple gradient steps by substituting θ 0j by a multi-step variant.
MAML is trained as follows. The initialization weights θ are updated by
continuously sampling a batch of m tasks B = {Tj v p(T )}m i=1 . Then, for
every task Tj ∈ B, an inner update is performed to obtain θ 0j , in turn granting
an observed loss LDTtest (θ 0j ). These losses across a batch of tasks are used in
j
the outer update
X
θ := θ − β∇θ LDTtest (θ 0j ). (23)
j
Tj ∈B
A Survey of Deep Meta-Learning 43
5.6 iMAML
where DTtest
j
is the query set corresponding to task Tj . This equation is a simple
result of applying the chain rule. Importantly, note that ∇θ (θ 0j ) differentiates
through A(θ, DTtrj ), while L0Dtest (θ 0j ) does not, as it represents the gradient of
Tj
the loss function evaluated at θ 0j . Rajeswaran et al. (2019) make use of the
following lemma.
If (I + λ1 ∇2θ LDTtr (θ 0j )) is invertible (i.e., (I + λ1 ∇2θ LDTtr (θ 0j ))−1 exists), then
j j
−1
1 2
∇θ (θ 0j ) 0
= I + ∇θ LDTtr (θ j ) . (25)
λ j
1 2
g Tj I+ ∇θ LDTtr (θ 0j ) g j − g Tj L0Dtest (θ 0j ) = 0 , (28)
λ j Tj
5.7 Meta-SGD
where is the element-wise product. Note that this means that alpha (learning
rate) is now a vector—hence the bold font— instead of scalar, which allows for
greater flexibility in the sense that each parameter has its own learning rate.
The goal is to learn the initialization θ, and learning rate vector α, such that
the generalization ability is as large as possible. More mathematically precise,
the learning objective is
minα,θ ETj vp(T ) [LDTtest (θ 0j )] = ETj vp(T ) [LDTtest (θ − α ∇θ LDTtr (θ))], (30)
j j j
where we used a simple substitution for θ 0j . LDTtr and LDTtest are the losses
j j
computed on the support and query set respectively. Note that this formula-
tion stimulates generalization ability (as it includes the query set loss LDTtest ,
j
which can be observed during the meta-training phase). The learning process
is visualized in Figure 25. Note that the meta-SGD optimizer is trained to
46 Mike Huisman et al.
maximize generalization ability after only one update step. Since this learning
objective has a fully differentiable loss function, the meta-SGD optimizer itself
can be trained using standard SGD.
In summary, Meta-SGD is more expressive than MAML as it does not only
learn an initialization but also learning rates per parameter. This, however,
does come at the cost of an increased number of hyperparameters.
5.8 Reptile
1
minθ ETj vp(T ) [ d(θ, θ ∗j )2 ]. (31)
2
A Survey of Deep Meta-Learning 47
1 1
∇θ ETj vp(T ) [ d(θ, θ ∗j )2 ] = ETj vp(T ) [ ∇θ d(θ, θ ∗j )2 ]
2 2
= ETj vp(T ) [θ − θ ∗j ], (32)
where we used the fact that the gradient of the squared Euclidean distance
between two points x1 and x2 is the vector 2(x1 − x2 ). Nichol et al. (2018) go
on to argue that performing gradient descent on this objective would result in
the following update rule
1
θ = θ − ∇θ d(θ, θ ∗j )2
2
= θ − (θ ∗j − θ). (33)
Since we do not know θ ∗Tj ,
one can approximate this by term by k steps of gra-
dient descent SGD(LTj , θ, k). In short, Reptile can be seen as gradient descent
on the distance minimization objective given in Equation 31. A visualization is
shown in Figure 26. The initialization θ is moving towards the optimal weights
for tasks 1 and 2 in interleaved fashion (hence the oscillations).
Fig. 26 Schematic visualization of Reptile’s learning trajectory. Here, θ ∗1 and θ ∗2 are the
optimal weights for tasks T1 and T2 respectively. The initialization parameters θ oscillate
between these. Adapted from Nichol et al. (2018).
k N k
1 X X X
µen , σ en = gφr gφe (x`np ), gφe (x`mq ) ,
2
(34)
Nk m=1
`p =1 `q =1
where φr , φe are parameters for the relation net and encoder respectively.
Intuitively, the three summations ensure that every example with class n in
DTtrj is paired with every example from all classes n. Given µen , and σ en , one
can sample a latent code z n v N (µen , diag(σ e2
n )) for class n, which serves as
latent embedding of the task training data.
The decoder can then generate a task-specific initialization θ n for class n as
follows. First, one computes a mean and variance for a Gaussian distribution
A Survey of Deep Meta-Learning 49
Online MAML (Finn et al., 2019) is an extension of MAML (Finn et al., 2017)
to make it applicable to online learning settings (Anderson, 2008). In the online
setting, we are presented with a sequence of tasks Tt with corresponding loss
functions {LTt }Tt=1 , for some potentially infinite time horizon T . The goal is to
pick a sequence of parameters {θ t }Tt=1 that performs well on the presented loss
functions. This objective is captured by the RegretT over the entire sequence,
which is defined by Finn et al. (2019) as follows
T
X T
X
RegretT = LTt (θ 0t ) − minθ LTt (θ 0t ), (36)
t=1 t=1
where θ are the initial model parameters (just as MAML), and θ 0t are param-
eters resulting from a one-step gradient update (starting from θ) on task t.
Here, the left term reflects the updated parameters chosen by the agent (θ t ),
whereas the right term presents the minimum obtainable loss (in hindsight)
from a single fixed set of parameters θ. Note that this setup assumes that the
agent can make updates to its chosen parameters (transform its initial choice
at time t from θ t to θ 0t ).
Finn et al. (2019) propose FTML (Follow The Meta Leader), inspired by
FTL (Follow The Leader) (Hannan, 1957; Kalai and Vempala, 2005), to mini-
mize the regret. The basic idea is to set the parameters for the next time step
(t + 1) equal to the best parameters in hindsight, i.e.,
t
X
θ t+1 := argminθ LTk (θ 0k ). (37)
k=1
5.11 LLAMA
Grant et al. (2018) mold MAML into a probabilistic framework, such that a
probability distribution over task-specific parameters θ 0j is learned, instead of a
single one. In this way, multiple potential solutions can be obtained for a task.
The resulting technique is called LLAMA (Laplace Approximation for Meta-
Adaptation). Importantly, LLAMA is only developed for supervised learning
settings.
A Survey of Deep Meta-Learning 51
X
LDTtest (θ 0j ) = − log p(yi |xi , θ 0j ). (39)
j
test
xi ,yi ∈DT
j
ever, increase the computational costs. On top of that, the used Laplace ap-
proximation (in ML-LAPLACE) can be quite inaccurate (Grant et al., 2018).
5.12 PLATIPUS
query and support data sets respectively. The idea is that the mean of the
Gaussian distributions should be close to the updated mean µθ because we
want to enable fast learning. As one can see, the training process is very
similar to that of MAML (Finn et al., 2017) (Section 5.5), with some small
adjustments to allow us to work with the probability distributions over θ.
At test-time, one can simply sample a new initialization θ from the prior
distribution p(θ|DTtrj ) (note that q cannot be used at test-time as we do not
have access to DTtestj
), and apply a gradient update on the provided support
set DTtrj . Note that this allows us to sample multiple potential initializations θ
for the given task.
The key advantage of PLATIPUS is that it is aware of its uncertainty, which
greatly increases the applicability of Deep Meta-Learning in critical domains
such as medical diagnosis (Finn et al., 2018). Based on this uncertainty, it can
ask for labels of some inputs it is unsure about (active learning). A downside
to this approach, however, is the increased computational costs, and the fact
that it is not applicable to reinforcement learning.
M
1 X
p(y test
j |θ 0j ) ≈ p(y test
j |θ m
Tj ), (42)
M m=1
where θ m Tj is the m-th particle obtained by training on the support set DTj of
tr
task Tj .
Yoon et al. (2018) proposed a new meta-loss to train BMAML, called the
Chaser Loss. This loss relies on the insight that we want the approximated
parameter distribution (obtained from the support set pnTj (θ Tj |Dtr , Θ 0 )) and
true distribution p∞ tr
Tj (θ Tj |D ∪ D
test
) to be close to each other (since the task
is the same). Here, n denotes the number of SVGD steps, and Θ 0 is the set of
initial particles, in similar fashion to the initial parameters θ seen by MAML.
Since the true distribution is unknown, Yoon et al. (2018) approximate it by
running SVGD for s additional steps, granting us the leader Θ n+s Tj , where the
s additional steps are performed on the combined support and query set. The
intuition is that as the number of updates increases, the obtained distributions
become more like the true ones. Θ nTj in this context is called the chaser as it
wants to get closer to the leader. The proposed meta-loss is then given by
M
X X
LBM AM L (Θ 0 ) = ||θ n,m n+s,m 2
Tj − θ Tj ||2 . (43)
Tj ∈B m=1
costs is a direction for future work (Yoon et al., 2018). Furthermore, SVGD
is sensitive to the selected kernel function, which was pre-defined in BMAML.
However, Yoon et al. (2018) point out that it may be beneficial to learn the
kernel function instead. This is another possibility for future research.
Bertinetto et al. (2019) take a quite different approach. That is, they pick
simple base-learners that have an analytical closed-form solution. The intu-
ition is that the existence of a closed-form solution allows for good learning
efficiency. They propose two techniques using this principle, namely R2-D2
(Ridge Regression Differentiable Discriminator), and LR-D2 (Logistic Regres-
sion Differentiable Discriminator). We cover both in turn.
Let gφ : X → Re be a pre-trained input embedding model (e.g. a CNN),
which outputs embeddings with a dimensionality of e. Furthermore, assume
that we use a linear predictor function f (gφ (xi )) = gφ (xi )W , where W is a
e × o weight matrix, and o is the output dimensionality (of the label). When
using (regularized) Ridge Regression (done by R2-D2), one uses the optimal
W , i.e.,
where X ∈ Rn×e is the input matrix, containing n rows (one for each em-
bedded input gφ (xi )), Y ∈ Rn×o is the output matrix with correct outputs
corresponding to the inputs, and γ is a regularization term to prevent overfit-
ting. Note that the analytical solution contains the term (X T X) ∈ Re×e , which
is quadratic in the size of the embeddings. Since e can become quite large when
using deep neural networks, Bertinetto et al. (2019) use Woodburry’s identity
Ŷ = αXtest W ∗ + β, (46)
The technique can also be applied to iterative solvers when the optimiza-
tion steps are differentiable (Bertinetto et al., 2019). LR-D2 uses the Logistic
Regression objective and Newton’s method as solver. Outputs y ∈ {−1, +1}n
are now binary. Let w denote a parameter row of our linear model (param-
eterized by W ). Then, the i-th iteration of Newton’s method updates wi as
follows
making it quadratic in the input size, which is not a big problem since n is
small in the few-shot setting. The main difference compared to R2-D2 is that
the base-solver has to be run for multiple iterations to obtain W .
In the few-shot setting, the base-level optimizers compute the weight ma-
trix W for a given task Ti . The obtained loss on the query set of a task LDtest
is then used to update the parameters φ of the input embedding function (e.g.
CNN) and the hyperparameters of the base-learner.
Lee et al. (2019) have done similar work to Bertinetto et al. (2019), but
with linear Support Vector Machines (SVMs) as base-learner. Their approach
is dubbed MetaOptNet and achieved state-of-the-art performance on few-
shot image classification.
In short, simple differentiable solvers are simple, reasonably fast in terms
of computation time, but limited to few-shot learning settings. Investigating
the use of other simple base-learners is a direction for future work.
Use reinforcement
learning for optimization
Adapt for few-
LSTM optimizer shot learning LSTM meta-
RL optimizer
(Andrychowicz et learner
(Li et al. 2018)
al. 2016) (Ravi et al. 2017)
Replace trainable
optimizer by gradient
descent
Reptile
BMAML LEO
(Nichol et al.
(Yoon et al. 2018) (Rusu et al. 2018)
2018) Learn
multiple
First-order Optimize in lower-
initializations
simplification dimensional space
MAML
(Finn et al. 2017)
methods. The LSTM meta-learner (Ravi and Larochelle, 2017) extends the
LSTM optimizer to the few-shot setting by not only learning the optimization
procedure but also a good set of initial weights. This way, it can be used
across tasks. MAML (Finn et al., 2017) is a simplification of the LSTM meta-
learner as it replaces the trainable LSTM optimizer by hand-crafted gradient
descent. MAML has received considerable attention within the field of deep
meta-learning, and has, as one can see, inspired many other works.
Meta-SGD is an enhancement of MAML that not only learns the initial
parameters, but also the learning rates (Li et al., 2017). LLAMA (Grant et al.,
2018), PLATIPUS (Finn et al., 2018), and online MAML (Finn et al., 2019)
extend MAML to the active and online learning settings. LLAMA and PLATI-
PUS are probabilistic interpretations of MAML, which allow them to sample
multiple solutions for a given task and quantify their uncertainty. BMAML
(Yoon et al., 2018) takes a more discrete approach as it jointly optimizes
a discrete set of M initializations. iMAML (Rajeswaran et al., 2019) aims
to overcome the computational expenses associated with the computation of
58 Mike Huisman et al.
6 Concluding Remarks
In this section, we give a helicopter view of all that we discussed, and the field
of Deep Meta-Learning in general. We will also discuss challenges and future
research.
6.1 Overview
In recent years, there has been a shift in focus in the broad meta-learning
community. Traditional algorithm selection and hyperparameter optimization
for classical machine learning techniques (e.g. Support Vector Machines, Lo-
gistic Regression, Random Forests, etc.) have been augmented by Deep Meta-
Learning, or equivalently, the pursuit of self-improving neural networks that
can leverage prior learning experience to learn new tasks more quickly. Instead
of training a new model from scratch for different tasks, we can use the same
(meta-learning) model across tasks. As such, meta-learning can widen the ap-
plicability of powerful deep learning techniques to domains where fewer data
are available and computational resources are limited.
Deep Meta-Learning techniques are characterized by their meta-objective,
which allows them to maximize performance across various tasks, instead of a
single one, as is the case in base-level learning objectives. This meta-objective
is reflected in the training procedure of meta-learning methods, as they learn
A Survey of Deep Meta-Learning 59
on a set of different meta-training tasks. The few-shot setting lends itself nicely
towards this end, as tasks consist of few data points. This makes it computa-
tionally feasible to train on many different tasks, and it allows us to evaluate
whether a neural network can learn new concepts from few examples. Task
construction for training and evaluation does require some special attention.
That is, it has been shown beneficial to match training and test conditions
(Vinyals et al., 2016), and perhaps train in a more difficult setting than the
one that will be used for evaluation (Snell et al., 2017).
On a high level, there are three categories of Deep Meta-Learning tech-
niques, namely i) metric-, ii) model-, and iii) optimization-based ones, which
rely on i) computing input similarity, ii) task embeddings with states, and
iii) task-specific updates, respectively. Each approach has strengths and weak-
nesses. Metric-learning techniques are simple and effective (Garcia and Bruna,
2017) but are not readily applicable outside of the supervised learning setting
(Hospedales et al., 2020). Model-based techniques, on the other hand, can
have very flexible internal dynamics, but lack generalization ability to more
distant tasks than the ones used at meta-train time (Finn and Levine, 2018).
Optimization-based approaches have shown greater generalizability, but are in
general computationally expensive, as they optimize a base-learner for every
task (Finn and Levine, 2018; Hospedales et al., 2020).
Table 2 provides a concise, tabular overview of these approaches. Many
techniques have been proposed for each one of the categories, and the under-
lying ideas may vary greatly, even within the same category. Table 3, therefore,
provides an overview of all methods and key ideas that we have discussed in
this work, together with their applicability to supervised learning (SL) and
reinforcement learning (RL) settings, key ideas, and benchmarks that were
used for testing them. Table 5 displays an overview of the 1- and 5-shot clas-
sification performances (reported by the original authors) of the techniques
on the frequently used miniImageNet benchmark. Moreover, it displays the
used backbone (feature extraction module) as well as the final classification
mechanism. From this table, it becomes clear that the 5-shot performance is
typically better than the 1-shot performance, indicating that data scarcity is
a large bottleneck for achieving good performance. Moreover, there is a strong
relationship between the expressivity of the backbone and the performance.
That is, deeper backbones tend to give rise to better classification performance.
The best performance is achieved by MetaOptNet, yielding a 1-shot accuracy
of 64.09% and a 5-shot accuracy of 80.00%. Note however that MetaOptNet
used a deeper backbone than most of the other techniques.
Despite the great potential of Deep Meta-Learning techniques, there are still
open challenges, which we discuss here.
Figure 1 in Section 1 displays the accuracy scores of the covered meta-
learning techniques on 1-shot miniImageNet classification. Techniques that
60 Mike Huisman et al.
were not tested in this setting by the original authors are omitted. As we
can see, the performance of the techniques is related to the expressivity of
the used backbone (ordered in increasing order on the x-axis). For example,
the best-performing techniques, LEO and MetaOptNet, use the largest net-
work architectures. Moreover, the fact that different techniques use different
backbones poses a problem as it is difficult to fairly compare their classifica-
tion performance. An obvious question arises to which degree the difference in
performance is due to methodological improvements, or due to the fact that
a better backbone architecture was chosen. For this reason, we think that it
would be useful to perform a large-scale benchmark test where techniques are
compared when they use the same backbones. This would also allow us to
A Survey of Deep Meta-Learning 61
get a more clear idea of how the expressivity of the feature extraction module
affects the performance.
Another challenge of Deep Meta-Learning techniques is that they can be
susceptible to the memorization problem (meta-overfitting), where the neural
network has memorized tasks seen at meta-training time and fails to generalize
to new tasks. More research is required to better understand this problem.
Clever task design and meta-regularization may prove useful to avoid such
problems (Yin et al., 2020).
Another problem is that most of the meta-learning techniques discussed
in this work are evaluated on narrow benchmark sets. This means that the
data that the meta-learner used for training are not too distant from the data
used for evaluating its performance. As such, one may wonder how well these
techniques are able to adapt to more distant tasks. Chen et al. (2019) showed
that the ability to adapt to new tasks decreases as they become more distant
from the tasks seen at training time. Moreover, a simple non-meta-learning
baseline (based on pre-training and fine-tuning) can outperform state-of-the-
art meta-learning techniques when meta-test tasks come from a different data
set than the one used for meta-training.
In reaction to these findings, Triantafillou et al. (2020) have recently pro-
posed the Meta-Dataset benchmark, which consists of various previously used
meta-learning benchmarks such as Omniglot (Lake et al., 2011) and ImageNet
(Deng et al., 2009). This way, meta-learning techniques can be evaluated in
more challenging settings where tasks are diverse. Following Hospedales et al.
(2020), we think that this new benchmark can prove to be a good means to-
wards the investigation and development of meta-learning algorithms for such
challenging scenarios.
As mentioned earlier in this section, Deep Meta-Learning has the appeal-
ing prospect of widening the applicability of deep learning techniques to more
real-world domains. For this, increasing the generalization ability of these tech-
niques is very important. Additionally, the computational costs associated with
the deployment of meta-learning techniques should be small. While these tech-
niques can learn new tasks quickly, meta-training can be quite computationally
expensive. Thus, decreasing the required computation time and memory costs
of Deep Meta-Learning techniques remains an open challenge.
Some real-world problems demand systems that can perform well in online,
or active learning settings. The investigation of Deep Meta-Learning in these
settings (Finn et al., 2018; Yoon et al., 2018; Finn et al., 2019; Munkhdalai
and Yu, 2017; Vuorio et al., 2018) remains an important direction for future
work.
Yet another direction for future research is the creation of compositional
Deep Meta-Learning systems, which instead of learning flat and associative
functions x → y, organize knowledge in a compositional manner. This would
allow them to decompose an input x into several (already learned) components
c1 (x), . . . , cn (x), which in turn could help the performance in low-data regimes
(Tokmakov et al., 2019).
62 Mike Huisman et al.
References
arXiv:160908144
Yin M, Tucker G, Zhou M, Levine S, Finn C (2020) Meta-Learning without
Memorization. In: International Conference on Learning Representations,
ICLR’20
Yoon J, Kim T, Dia O, Kim S, Bengio Y, Ahn S (2018) Bayesian Model-
Agnostic Meta-Learning. In: Advances in Neural Information Processing
Systems 31, Curran Associates Inc., NIPS’18, pp 7332–7342
Younger AS, Hochreiter S, Conwell PR (2001) Meta-learning with backprop-
agation. In: International Joint Conference on Neural Networks, IEEE,
IJCNN’01, vol 3
Yu T, Quillen D, He Z, Julian R, Hausman K, Finn C, Levine S (2019) Meta-
World: A Benchmark and Evaluation for Multi-Task and Meta Reinforce-
ment Learning. arXiv preprint arXiv:191010897