Generalizing from a Few Examples: A Survey on Few-Shot Learning

Yaqing Wang, Quanming Yao, James Kwok, Lionel M. Ni

Introduction

“Can machines think?” This is the question raised in Alan Turing’s seminal paper entitled “Computing Machinery and Intelligence” (Turing, 1950) in 1950. He made the statement that “The idea behind digital computers may be explained by saying that these machines are intended to carry out any operations which could be done by a human computer”. In other words, the ultimate goal of machines is to be as intelligent as humans. In recent years, due to the emergence of powerful computing devices (e.g., GPU and distributed platforms), large data sets (e.g., ImageNet data with 1000 classes (Deng et al., 2009)), advanced models and algorithms (e.g., convolutional neural networks (CNN) (Krizhevsky et al., 2012) and long short-term memory (LSTM) (Hochreiter and Schmidhuber, 1997)), AI speeds up its pace to be like humans and defeats humans in many fields. To name a few, AlphaGo (Silver et al., 2016) defeats human champions in the ancient game of Go; and residual network (ResNet) (He et al., 2016) obtains better classification performance than humans on ImageNet. AI also supports the development of intelligent tools in many aspects of daily life, such as voice assistants, search engines, autonomous driving cars, and industrial robots.

Albeit its prosperity, current AI techniques cannot rapidly generalize from a few examples. The aforementioned successful AI applications rely on learning from large-scale data. In contrast, humans are capable of learning new tasks rapidly by utilizing what they learned in the past. For example, a child who learned how to add can rapidly transfer his knowledge to learn multiplication given a few examples (e.g., 2×3=2+2+22\times 3=2+2+2 and 1×3=1+1+11\times 3=1+1+1). Another example is that given a few photos of a stranger, a child can easily identify the same person from a large number of photos.

Bridging this gap between AI and humans is an important direction. It can be tackled by machine learning, which is concerned with the question of how to construct computer programs that automatically improve with experience (Mitchell, 1997; Mohri et al., 2018). In order to learn from a limited number of examples with supervised information, a new machine learning paradigm called Few-Shot Learning (FSL) (Fink, 2005; Fei-Fei et al., 2006) is proposed. A typical example is character generation (Lake et al., 2015), in which computer programs are asked to parse and generate new handwritten characters given a few examples. To handle this task, one can decompose the characters into smaller parts transferable across characters, and then aggregate these smaller components into new characters. This is a way of learning like human (Lake et al., 2017). Naturally, FSL can also advance robotics (Craig, 2009), which develops machines that can replicate human actions. Examples include one-shot imitation (Wu and Demiris, 2010), multi-armed bandits (Duan et al., 2017), visual navigation (Finn et al., 2017), and continuous control (Yoon et al., 2018).

Another classic FSL scenario is where examples with supervised information are hard or impossible to acquire due to privacy, safety or ethic issues. A typical example is drug discovery, which tries to discover properties of new molecules so as to identify useful ones as new drugs (Altae-Tran et al., 2017). Due to possible toxicity, low activity, and low solubility, new molecules do not have many real biological records on clinical candidates. Hence, it is important to learn effectively from a small number of samples. Similar examples where the target tasks do not have many examples include FSL translation (Kaiser et al., 2017), and cold-start item recommendation (Vartak et al., 2017). Through FSL, learning suitable models for these rare cases can become possible.

FSL can also help relieve the burden of collecting large-scale supervised data. For example, although ResNet (He et al., 2016) outperforms humans on ImageNet, each class needs to have sufficient labeled images which can be laborious to collect. FSL can reduce the data gathering effort for data-intensive applications. Examples include image classification (Vinyals et al., 2016), image retrieval (Triantafillou et al., 2017), object tracking (Bertinetto et al., 2016), gesture recognition (Pfister et al., 2014), image captioning, visual question answering (Dong et al., 2018), video event detection (Yan et al., 2015), language modeling (Vinyals et al., 2016), and neural architecture search (Brock et al., 2018).

Driven by the academic goal for AI to approach humans and the industrial demand for inexpensive learning, FSL has drawn much recent attention and is now a hot topic. Many related machine learning approaches have been proposed, such as meta-learning (Santoro et al., 2016; Finn et al., 2017; Ravi and Larochelle, 2017), embedding learning (Vinyals et al., 2016; Bertinetto et al., 2016; Sung et al., 2018) and generative modeling (Fei-Fei et al., 2006; Salakhutdinov et al., 2012; Edwards and Storkey, 2017). However, currently, there is no work that provides an organized taxonomy to connect these FSL methods, explains why some methods work while others fail, nor discusses the pros and cons of different approaches. Therefore, in this paper, we conduct a survey on the FSL problem. In contrast, the survey in (Shu et al., 2018) only focuses on concept learning and experience learning for small samples.

Contributions of this survey can be summarized as follows:

We give a formal definition on FSL, which naturally connects to the classic machine learning definition in (Mitchell, 1997; Mohri et al., 2018). The definition is not only general enough to include existing FSL works, but also specific enough to clarify what the goal of FSL is and how we can solve it. This definition is helpful for setting future research targets in the FSL area.

We list the relevant learning problems for FSL with concrete examples, clarifying their relatedness and differences with respect to FSL. These discussions can help better discriminate and position FSL among various learning problems.

We point out that the core issue of FSL supervised learning problem is the unreliable empirical risk minimizer, which is analyzed based on error decomposition (Bottou and Bousquet, 2008) in machine learning. This provides insights to improve FSL methods in a more organized and systematic way.

We perform an extensive literature review, and organize them in an unified taxonomy from the perspectives of data, model and algorithm. We also present a summary of insights and a discussion on the pros and cons of each category. These can help establish a better understanding of FSL methods.

We propose promising future directions for FSL in the aspects of problem setup, techniques, applications and theories. These insights are based on the weaknesses of the current development of FSL, with possible improvements to make in the future.

The remainder of this survey is organized as follows. Section 2 provides an overview for FSL, including its formal definition, relevant learning problems, core issue, and a taxonomy of existing works in terms of data, model and algorithm. Section 3 is for methods that augment data to solve FSL problem. Section 4 is for methods that reduce the size of hypothesis space so as to make FSL feasible. Section 5 is for methods that alter the search strategy of algorithm to deal with the FSL problem. In Section 6, we propose future directions for FSL in terms of problem setup, techniques, applications and theories. Finally, the survey closes with conclusion in Section 7.

2. Notation and Terminology

Overview

In this section, we first provide a formal definition of the FSL problem in Section 2.1 with concrete examples. To differentiate the FSL problem from relevant machine learning problems, we discuss their relatedness and differences in Section 2.2. In Section 2.3, we discuss the core issue that makes FSL difficult. Section 2.4 then presents a unified taxonomy according to how existing works handle the core issue.

As FSL is a sub-area in machine learning, before giving the definition of FSL, let us recall how machine learning is defined in the literature.

A computer program is said to learn from experience EE with respect to some classes of task TT and performance measure PP if its performance can improve with EE on TT measured by PP.

For example, consider an image classification task (TT), a machine learning program can improve its classification accuracy (PP) through EE obtained by training on a large number of labeled images (e.g., the ImageNet data set (Krizhevsky et al., 2012)). Another example is the recent computer program AlphaGo (Silver et al., 2016), which has defeated the human champion in playing the ancient game of Go (TT). It improves its winning rate (PP) against opponents by training on a database (EE) of around 30 million recorded moves of human experts as well as playing against itself repeatedly. These are summarized in Table 1.

Typical machine learning applications, as in the examples mentioned above, require a lot of examples with supervised information. However, as mentioned in the introduction, this may be difficult or even not possible. FSL is a special case of machine learning, which targets at obtaining good learning performance given limited supervised information provided in the training set Dtrain{D}_{\text{train}}, which consists of examples of inputs xix_{i}’s along with their corresponding output yiy_{i}’s (Bishop, 2006). Formally, we define FSL in Definition 2.2.

Few-Shot Learning (FSL) is a type of machine learning problems (specified by EE, TT and PP), where EE contains only a limited number of examples with supervised information for the target TT.

Existing FSL problems are mainly supervised learning problems. Concretely, few-shot classification learns classifiers given only a few labeled examples of each class. Example applications include image classification (Vinyals et al., 2016), sentiment classification from short text (Yu et al., 2018) and object recognition (Fei-Fei et al., 2006). Formally, using notations from Section 1.2, few-shot classification learns a classifier hh which predicts label yiy_{i} for each input xix_{i}. Usually, one considers the NN-way-KK-shot classification (Vinyals et al., 2016; Finn et al., 2017), in which Dtrain{D}_{\text{train}} contains I=KNI=KN examples from NN classes each with KK examples. Few-shot regression (Finn et al., 2017; Yoon et al., 2018) estimates a regression function hh given only a few input-output example pairs sampled from that function, where output yiy_{i} is the observed value of the dependent variable yy, and xix_{i} is the input which records the observed value of the independent variable xx. Apart from few-shot supervised learning, another instantiation of FSL is few-shot reinforcement learning (Duan et al., 2017; Al-Shedivat et al., 2018), which targets at finding a policy given only a few trajectories consisting of state-action pairs.

We now show three typical scenarios of FSL (Table 2):

Acting as a test bed for learning like human. To move towards human intelligence, it is vital that computer programs can solve the FSL problem. A popular task (TT) is to generate samples of a new character given only a few examples (Lake et al., 2015). Inspired by how humans learn, the computer programs learn with the EE consisting of both the given examples with supervised information and pre-trained concepts such as parts and relations as prior knowledge. The generated characters are evaluated through the pass rate of visual Turing test (PP), which discriminates whether the images are generated by humans or machines. With this prior knowledge, computer programs can also learn to classify, parse and generate new handwritten characters with a few examples like humans.

Learning for rare cases. When obtaining sufficient examples with supervised information is hard or impossible, FSL can learn models for the rare cases. For example, consider a drug discovery task (TT) which tries to predict whether a new molecule has toxic effects (Altae-Tran et al., 2017). The percentage of molecules correctly assigned as toxic or non-toxic (PP) improves with EE obtained by both the new molecule’s limited assay, and many similar molecules’ assays as prior knowledge.

Reducing data gathering effort and computational cost. FSL can help relieve the burden of collecting large number of examples with supervised information. Consider few-shot image classification task (TT) (Fei-Fei et al., 2006). The image classification accuracy (PP) improves with the EE obtained by a few labeled images for each class of the target TT, and prior knowledge extracted from the other classes (such as raw images to co-training). Methods succeed in this task usually have higher generality. Therefore, they can be easily applied for tasks of many samples.

In comparison to Table 1, Table 2 has one extra column under “experience EE” which is marked as “prior knowledge”. As EE only contains a few examples with supervised information directly related to TT, it is natural that common supervised learning approaches often fail on FSL problems. Therefore, FSL methods make the learning of target TT feasible by combining the available supervised information in EE with some prior knowledge, which is “any information the learner has about the unknown function before seeing the examples” (Mahadevan and Tadepalli, 1994). One typical type of FSL methods is Bayesian learning (Lake et al., 2015; Fei-Fei et al., 2006). It combines the provided training set Dtrain{D}_{\text{train}} with some prior probability distribution which is available before Dtrain{D}_{\text{train}} is given (Bishop, 2006).

When there is only one example with supervised information in EE, FSL is called one-shot learning (Fei-Fei et al., 2006; Vinyals et al., 2016; Bertinetto et al., 2016). When EE does not contain any example with supervised information for the target TT, FSL becomes a zero-shot learning problem (ZSL) (Lampert et al., 2009). As the target class does not contain examples with supervised information, ZSL requires EE to contain information from other modalities (such as attributes, WordNet, and word embeddings used in rare object recognition tasks), so as to transfer some supervised information and make learning possible.

2. Relevant Learning Problems

In this section, we discuss some relevant machine learning problems. The relatedness and difference with respect to FSL are clarified.

Weakly supervised learning (Zhou, 2017) learns from experience EE containing only weak supervision (such as incomplete, inexact, inaccurate or noisy supervised information). The most relevant problem to FSL is weakly supervised learning with incomplete supervision where only a small amount of samples have supervised information. According to whether the oracle or human intervention is leveraged, this can be further classified into the following:

Semi-supervised learning (Zhu, 2005), which learns from a small number of labeled samples and (usually a large number of) unlabeled samples in EE. Example applications are text and webpage classification. Positive-unlabeled learning (Li et al., 2009) is a special case of semi-supervised learning, in which only positive and unlabeled samples are given. For example, to recommend friends in social networks, we only know the users’ current friends according to the friend list, while their relationships to other people are unknown.

Active learning (Settles, 2009), which selects informative unlabeled data to query an oracle for output yy. This is usually used for applications where annotation labels are costly, such as pedestrian detection.

By definition, weakly supervised learning with incomplete supervision includes only classification and regression, while FSL also includes reinforcement learning problems. Moreover, weakly supervised learning with incomplete supervision mainly uses unlabeled data as additional information in EE, while FSL leverages various kinds of prior knowledge such as pre-trained models, supervised data from other domains or modalities and does not restrict to using unlabeled data. Therefore, FSL becomes weakly supervised learning problem only when prior knowledge is unlabeled data and the task is classification or regression.

Imbalanced learning (He and Garcia, 2008) learns from experience EE with a skewed distribution for yy. This happens when some values of yy are rarely taken, as in fraud detection and catastrophe anticipation applications. It trains and tests to choose among all possible yy’s. In contrast, FSL trains and tests for yy with a few examples, while possibly taking the other yy’s as prior knowledge for learning.

Transfer learning (Pan and Yang, 2010) transfers knowledge from the source domain/task, where training data is abundant, to the target domain/task, where training data is scarce. It can be used in applications such as cross-domain recommendation, WiFi localization across time periods, space and mobile devices. Domain adaptation (Ben-David et al., 2007) is a type of transfer learning in which the source/target tasks are the same but the source/target domains are different. For example, in sentiment analysis, the source domain data contains customer comments on movies, while the target domain data contains customer comments on daily goods. Transfer learning methods are popularly used in FSL (Luo et al., 2017; Azadi et al., 2018; Liu et al., 2018), where the prior knowledge is transferred from the source task to the few-shot task.

Meta-learning (Hochreiter et al., 2001) improves PP of the new task TT by the provided data set and the meta-knowledge extracted across tasks by a meta-learner. Specifically, the meta-learner gradually learns generic information (meta-knowledge) across tasks, and the learner generalizes the meta-learner for a new task TT using task-specific information. It has been successfully applied in problems such as learning optimizers (Li and Malik, 2017; Andrychowicz et al., 2016), dealing with the cold-start problem in collaborative filtering (Vartak et al., 2017), and guiding policies by natural language (Co-Reyes et al., 2019). Meta-learning methods can be used to deal with the FSL problem. As will be shown in Sections 4 and 5, the meta-learner is taken as prior knowledge to guide each specific FSL task. A formal definition of meta-learning and how it is used for the FSL problem are provided in Appendix A.

3. Core Issue

In any machine learning problem, usually there are prediction errors and one cannot obtain perfect predictions. In this section, we illustrate the core issue of FSL based on error decomposition in supervised machine learning (Bottou and Bousquet, 2008; Bottou et al., 2018). This analysis applies to FSL supervised learning including classification and regression, and can also provide insights for understanding FSL reinforcement learning.

Given a hypothesis hh, we want to minimize its expected risk RR, which is the loss measured with respect to p(x,y)p(x,y). Specifically,

As p(x,y)p(x,y) is unknown, the empirical risk (which is the average of sample losses over the training set Dtrain{D}_{\text{train}} of II samples)

is usually used as a proxy for R(h)R(h), leading to empirical risk minimization (Vapnik, 1992; Mohri et al., 2018) (with possibly some regularizers). For illustration, let

h^=arg⁡min⁡hR(h)\hat{h}=\arg\min_{h}R(h) be the function that minimizes the expected risk;

h∗=arg⁡min⁡h∈HR(h)h^{*}=\arg\min_{h\in\mathcal{H}}R(h) be the function in H\mathcal{H} that minimizes the expected risk;

hI=arg⁡min⁡h∈HRI(h)h_{I}=\arg\min_{h\in\mathcal{H}}R_{I}(h) be the function in H\mathcal{H} that minimizes the empirical risk.

As h^\hat{h} is unknown, one has to approximate it by some h∈Hh\in\mathcal{H}. h∗h^{*} is the best approximation for h^\hat{h} in H\mathcal{H}, while hIh_{I} is the best hypothesis in H\mathcal{H} obtained by empirical risk minimization. For simplicity, we assume that h^,h∗\hat{h},h^{*} and hIh_{I} are unique. The total error can be decomposed as (Bottou and Bousquet, 2008; Bottou et al., 2018):

where the expectation is with respect to the random choice of Dtrain{D}_{\text{train}}. The approximation error Eapp(H)\mathcal{E}_{\text{app}}(\mathcal{H}) measures how close the functions in H\mathcal{H} can approximate the optimal hypothesis h^\hat{h}, and the estimation error Eest(H,I)\mathcal{E}_{\text{est}}(\mathcal{H},I) measures the effect of minimizing the empirical risk RI(h)R_{I}(h) instead of the expected risk R(h)R(h) within H\mathcal{H}.

As shown, the total error is affected by H\mathcal{H} (hypothesis space) and II (number of examples in Dtrain{D}_{\text{train}}). In other words, learning to reduce the total error can be attempted from the perspectives of (i) data, which provides Dtrain{D}_{\text{train}}; (ii) model, which determines H\mathcal{H}; and (iii) algorithm, which searches for the optimal hI∈Hh_{I}\in\mathcal{H} that fits Dtrain{D}_{\text{train}}.

3.2. Unreliable Empirical Risk Minimizer

In general, Eest(H,I)\mathcal{E}_{\text{est}}(\mathcal{H},I) can be reduced by having a larger number of examples (Friedman et al., 2001; Bottou and Bousquet, 2008; Bottou et al., 2018). Thus, when there is sufficient training data with supervised information (i.e., II is large), the empirical risk minimizer hIh_{I} can provide a good approximation R(hI)R(h_{I}) to the best possible R(h∗)R(h^{*}) for hh’s in H\mathcal{H}.

However, in FSL, the number of available examples II is small. The empirical risk RI(h)R_{I}(h) may then be far from being a good approximation of the expected risk R(h)R(h), and the resultant empirical risk minimizer hIh_{I} overfits. Indeed, this is the core issue of FSL supervised learning, i.e., the empirical risk minimizer hIh_{I} is no longer reliable. Therefore, FSL is much harder. A comparison of learning with sufficient and few training samples is shown in Figure 1.

4. Taxonomy

To alleviate the problem of having an unreliable empirical risk minimizer hIh_{I} in FSL supervised learning, prior knowledge must be used. Based on which aspect is enhanced using prior knowledge, existing FSL works can be categorized into the following perspectives (Figure 2).

Algorithm. These methods use prior knowledge to search for the θ\theta which parameterizes the best hypothesis h∗h^{*} in H\mathcal{H}. Prior knowledge alters the search strategy by providing a good initialization (gray triangle in Figure 2(c)), or guiding the search steps (the gray dotted lines in Figure 2(b)). For the latter, the resultant search steps are affected by both prior knowledge and empirical risk minimizer.

Accordingly, existing works can be categorized into a unified taxonomy as shown in Figure 3. We will detail each category in the following sections.

Data

FSL methods in this section use prior knowledge to augment data Dtrain{D}_{\text{train}}, such that the supervised information in EE is enriched. With the augmented sample set, the data is sufficient enough to obtain a reliable hIh_{I} (Figure 4).

Data augmentation via hand-crafted rules is usually used as pre-processing in FSL methods. They can introduce different kinds of invariance for the model to capture. For example, on images, one can use translation (Shyam et al., 2017; Lake et al., 2015; Santoro et al., 2016; Benaim and Wolf, 2018), flipping (Shyam et al., 2017; Qi et al., 2018), shearing (Shyam et al., 2017), scaling (Lake et al., 2015; Zhang et al., 2018b), reflection (Edwards and Storkey, 2017; Kozerawski and Turk, 2018), cropping (Qi et al., 2018; Zhang et al., 2018b) and rotation (Santoro et al., 2016; Vinyals et al., 2016). However, designing these rules depends heavily on domain knowledge and requires expensive labor cost. Moreover, the augmentation rules can be specific to the data set, making them hard to be applied to other data sets. Moreover, it is unlikely that human can enumerate all possible invariance. Therefore, manual data augmentation cannot solve the FSL problem completely (Shyam et al., 2017; Lake et al., 2015; Santoro et al., 2016; Benaim and Wolf, 2018; Edwards and Storkey, 2017; Kozerawski and Turk, 2018).

Besides these hand-crafted rules, we review in the following more advanced data augmentation methods. Depending on what samples are transformed and added to Dtrain{D}_{\text{train}}, we categorize these methods as shown in Table 3.

This strategy augments Dtrain{D}_{\text{train}} by transforming each (xi,yi)∈Dtrain(x_{i},y_{i})\in{D}_{\text{train}} into several samples with variations. The transformation procedure is included in experience EE as prior knowledge so as to generate additional samples. An early FSL paper (Miller et al., 2000) learns a set of geometric transformations from a similar class by iteratively aligning each sample with the other samples. The learned transformation is applied to each (xi,yi)(x_{i},y_{i}) to form a large data set, which can then be learned by standard machine learning methods. Similarly, a set of auto-encoders, each representing one intra-class variability, are learned from similar classes in (Schwartz et al., 2018). New samples are generated by adding the learned variations to xix_{i}. In (Hariharan and Girshick, 2017), by assuming that all categories share some transformable variability across samples, a single transformation function is learned to transfer variation between sample pairs learned from the other classes to (xi,yi)(x_{i},y_{i}). In (Kwitt et al., 2016), instead of enumerating the variabilities within pairs, it transforms each xix_{i} to several samples using a set of independent attribute strength regressors learned from a large set of scene images, and assigns the label of the original xix_{i} to these new samples. Improved upon (Kwitt et al., 2016), a continuous attribute subspace is used to add attribute variations to xx in (Liu et al., 2018).

2. Transforming Samples from a Weakly Labeled or Unlabeled Data Set

This strategy augments Dtrain{D}_{\text{train}} by selecting samples with the target label from a large data set which is weakly labeled or unlabeled. For example, in photos taken by a surveillance camera, there are people, cars and roads but none of them are labeled. Another example is a video for a long presentation. This contains a series of gestures of the speaker, but none of them are annotated explicitly. As such a data set contains large variations of samples, augmenting them to Dtrain{D}_{\text{train}} helps depict a clearer p(x,y)p(x,y). Moreover, collecting such a data set is easier as human effort is not needed for labeling. However, though the collection cost is low, a major issue is how to select samples with the target label to be augmented to Dtrain{D}_{\text{train}}. In (Pfister et al., 2014), an exemplar SVM is learned for each target label in Dtrain{D}_{\text{train}}, which is then used to predict labels for samples from a weakly labeled data set. Samples having the target labels are then added to Dtrain{D}_{\text{train}}. In (Douze et al., 2018), instead of learning a classifier, label propagation is directly used to label an unlabeled data set. In (Wu et al., 2018), a progressive strategy is used to select informative unlabeled samples. The selected samples are then assigned pseudo-labels and used to update the CNN.

3. Transforming Samples from Similar Data Sets

4. Discussion and Summary

The choice of which augmentation strategy to use depends on the application. Sometimes, a large number of weakly supervised or unlabeled samples exist for the target task (or class), but few-shot learning is preferred because of the high cost of gathering annotated data and/or computational cost (which corresponds to the third scenario introduced in Section 2.1). In this case, one can perform augmentation by transforming samples from a weakly labeled or unlabeled data set. When a large-scale unlabeled data set is hard to collect, but the few-shot class has some similar classes, one can transform samples from these similar classes. If only some learned transformers rather than raw samples are available, augmentation can be done by transforming the original samples from Dtrain{D}_{\text{train}}.

In general, solving a FSL problem by augmenting Dtrain{D}_{\text{train}} is straightforward and easy to understand. The data is augmented by taking advantage of the prior information for the target task. On the other hand, the weakness of solving the FSL problem by data augmentation is that the augmentation policy is often tailor-made for each data set in an adhoc manner, and cannot be used easily on other data sets (especially for data sets from other domains). Recently, AutoAugment (Cubuk et al., 2019), which automatically learns the augmentation policy for deep network training, is proposed to address this issue. Apart from that, existing methods are mainly designed for images, as the generated images can be visually evaluated by humans easily. In contrast, text and audio involve syntax and structures, and are harder to generate. A recent attempt on using data augmentation for text is reported in (Wei and Zou, 2019).

Model

In order to approximate the ground-truth hypothesis h^\hat{h}, the model has to determine a hypothesis space H\mathcal{H} containing a family of hypotheses hh’s, such that the distance between the optimal h∗∈Hh^{*}\in\mathcal{H} and h^\hat{h} is small.

In terms of what prior knowledge is used, methods belonging to this category can be further classified into four types (Table 4).

In the presence of multiple related tasks, multitask learning (Caruana, 1997; Zhang and Yang, 2017) learns these tasks simultaneously by exploiting both task-generic and task-specific information. Hence, they can be naturally used for FSL. Here, we present some instantiations of using multitask learning in FSL .

We are given CC related tasks T1,…,TCT_{1},\dots,T_{C}, in which some of them have very few samples while some have a larger number of samples. Each task TcT_{c} has a data set Dc={Dtrainc,Dtestc}{D}_{c}=\{{D}_{\text{train}}^{c},D_{\text{test}}^{c}\}, in which Dtrainc{D}_{\text{train}}^{c} is the training set and DtestcD_{\text{test}}^{c} is the test set. Among these CC tasks, we regard the few-shot tasks as target tasks, and the rest as source tasks. Multitask learning learns from Dtrainc{D}_{\text{train}}^{c}’s to obtain θc\theta_{c} for each TcT_{c}. As these tasks are jointly learned, the parameter θc\theta_{c} of hch_{c} learned for task TcT_{c} is constrained by the other tasks. According to how the task parameters are constrained, we divide methods in this strategy as (i) parameter sharing; and (ii) parameter tying (Goodfellow et al., 2016).

This strategy directly shares some parameters among tasks (Figure 5). In (Zhang et al., 2018b), the two task networks share the first few layers for the generic information, and learn different final layers to deal with different outputs. In (Hu et al., 2018), two natural language processing tasks on legal texts are solved together: charge prediction and legal attribute prediction. A single embedding function is used to encode the criminal case description, which is then fed to task-specific embedding functions and classifiers. In (Motiian et al., 2017), a variational auto-encoder is first pre-trained from the source tasks, and then cloned to the target task. Some layers in the two variational auto-encoders are shared in order to capture the generic information, while allowing both tasks to have some task-specific layers. The target task can only update its task-specific layers, while the source task can update both the shared and task-specific layers. In (Benaim and Wolf, 2018), both the original and generated samples are first mapped to a task-specific space by learning separate embedding functions for the source and target tasks, and are then embedded by a shared variational auto-encoder.

1.2. Parameter Tying

This strategy encourages parameters (θc\theta_{c}’s) of different tasks to be similar (Figure 6) (Goodfellow et al., 2016). A popular approach is by regularizing the θc\theta_{c}’s. In (Yan et al., 2015), all pairwise differences of θc\theta_{c}’s are penalized. In (Luo et al., 2017), there is a CNN for the source task, and another one for the target task. Layers of these two CNNs are aligned using some specially designed regularization terms.

2. Embedding Learning

Embedding learning has the following key components: (i) a function ff which embeds test sample xtest∈Dtestx_{\text{test}}\in D_{\text{test}} to Z\mathcal{Z}, (ii) a function gg which embeds training sample xi∈Dtrainx_{i}\in{D}_{\text{train}} to Z\mathcal{Z}, and (iii) a similarity function s(⋅,⋅)s(\cdot,\cdot) which measures the similarity between f(xtest)f(x_{\text{test}}) and g(xi)g(x_{i}) in Z\mathcal{Z}. The test sample xtestx_{\text{test}} is assigned to the class of xix_{i}, whose embedding g(xi)g(x_{i}) is most similar to f(xtest)f(x_{\text{test}}) in Z\mathcal{Z} according to ss. Although one can use a common embedding function for both xix_{i} and xtestx_{\text{test}}, using two separate embedding functions may obtain better accuracy (Bertinetto et al., 2016; Vinyals et al., 2016). A summary of existing embedding learning methods is shown in Table 5.

According to whether the parameters of embedding functions ff and gg vary across tasks, we classify these FSL methods as using a (i) task-specific embedding model; (ii) task-invariant (i.e., general) embedding model; and (iii) hybrid embedding model, which encodes both task-specific and task-invariant information.

Task-specific embedding methods learn an embedding function tailored for each task, by using only information from that task. For example, using the few-shot data Dtrainc{D}_{\text{train}}^{c} of task TcT_{c}, all pairwise rankings among samples in Dtrainc{D}_{\text{train}}^{c} are enumerated as sample pairs in (Triantafillou et al., 2017). The number of training samples is thus increased, and an embedding function can be learned even though only the task-specific information is used.

2.2. Task-Invariant Embedding Model

Task-invariant embedding methods learn a general embedding function from a large-scale data set containing sufficient samples with various outputs, and then directly use this on the new few-shot Dtrain{D}_{\text{train}} without retraining (Figure 7). The first FSL embedding model (Fink, 2005) embeds the samples using a kernel. Recently, more complicated embeddings are learned (Koch, 2015; Yan et al., 2018) by a convolutional siamese net (Bromley et al., 1994).

Matching Nets (Vinyals et al., 2016) and its variants (Altae-Tran et al., 2017; Bachman et al., 2017; Choi et al., 2018): Matching Nets (Vinyals et al., 2016) meta-learns different embedding functions (ff and gg) for the training sample xix_{i} and test sample xtestx_{\text{test}}. The residual LSTM (resLSTM) (Altae-Tran et al., 2017) proposes better designs for ff and gg. An active learning variant of Matching Nets (Bachman et al., 2017) adds a sample selection step, which labels the most beneficial unlabeled sample and uses it to augment Dtrain{D}_{\text{train}}. The Matching Nets is also extended to set-to-set matching (Choi et al., 2018), which is useful in labeling multiple parts of a sample.

Prototypical Networks (ProtoNet) (Snell et al., 2017) and its variants (Wang et al., 2018a; Oreshkin et al., 2018; Ren et al., 2018): Instead of comparing f(xtest)f(x_{\text{test}}) with each g(xi)g(x_{i}) where xi∈Dtrainx_{i}\in{D}_{\text{train}}, ProtoNet (Snell et al., 2017) only compares f(xtest)f(x_{\text{test}}) with the class prototypes in Dtrain{D}_{\text{train}}. For class nn, its prototype is simply cn=1K∑i=1Kg(xi)c_{n}=\frac{1}{K}\sum_{i=1}^{K}g(x_{i}), where the KK xix_{i}’s are from class nn. Empirically, this leads to more stable results and reduces the computation cost. The idea of using prototypes is introduced to the Matching Nets in (Wang et al., 2018a). A semi-supervised variant of ProtoNet assigns unlabeled samples to augment Dtrain{D}_{\text{train}} via soft-assignment during learning (Ren et al., 2018).

Other methods. Examples include Attentive Recurrent Comparators (ARC) (Shyam et al., 2017), which uses a LSTM with attention (Bahdanau D, 2015) to compare different regions of xtestx_{\text{test}} with prototype cnc_{n}, and then embeds the comparison results as an intermediate embedding. Additionally, it uses a bidirectional LSTM (biLSTM) to embed all comparisons as the final embedding. The Relation Net (Sung et al., 2018) uses a CNN to embed xtestx_{\text{test}} and xix_{i} to Z\mathcal{Z}, then concatenates them as the embedding, which is fed to another CNN to output a similarity score. The graph neural network (GNN) is used in (Satorras and Estrach, 2018; Liu et al., 2019a) to leverage information from local neighborhoods. In few-shot reinforcement learning applications (as in continuous control and visual navigation), temporal information is important. The Simple Neural AttentIve Learner (SNAIL) (Mishra et al., 2018) is an embedding network with interleaved temporal convolution layers and attention layers. The temporal convolution layer aggregates information from past time steps, while the attention layer selectively attends to specific time steps relevant to the current input.

2.3. Hybrid Embedding Model

Although task-invariant embedding methods can be applied to new tasks with a low computation cost, they do not leverage specific knowledge of the current task. When task specialty is the reason that Dtrain{D}_{\text{train}} has only a few examples (such as learning for rare cases), simply applying a task-invariant embedding function may not be suitable. To alleviate this problem, hybrid embedding models adapt the generic task-invariant embedding model learned from prior knowledge by the task-specific information in Dtrain{D}_{\text{train}} This is done by learning a function which takes information extracted from Dtrain{D}_{\text{train}} as input and returns an embedding which acts as the parameter for f(⋅)f(\cdot) (Figure 8).

Learnet (Bertinetto et al., 2016) improves the task-invariant convolutional siamese net (Koch, 2015) by incorporating the specific information of Dtrain{D}_{\text{train}}. It learns a meta-learner from multiple meta-training sets, and maps each training example xi∈Dtrainx_{i}\in{D}_{\text{train}} to the parameter of the learner (a convolutional siamese net). In this way, the parameter of f(⋅)f(\cdot) changes with the given xix_{i}, resulting in a hybrid embedding. Improved upon Learnet, the classification layer of the learner is replaced by ridge regression in (Bertinetto et al., 2019), such that parameters can be efficiently obtained in closed-form. The following two works (Zhao et al., 2018; Oreshkin et al., 2018) take Dtrain{D}_{\text{train}} as a whole to output the task-specific parameter for f(⋅)f(\cdot). Task dependent adaptive metric (TADAM) (Oreshkin et al., 2018) averages class prototypes into the task embedding, and uses a meta-learned function to map it to the ProtoNet parameters. Dynamic Conditional Convolutional Network (DCCN) (Zhao et al., 2018) uses a fixed set of filters, and learns the combination coefficients using Dtrain{D}_{\text{train}}.

3. Learning with External Memory

Learning with external memory (Graves et al., 2014; Weston et al., 2014; Sukhbaatar et al., 2015; Miller et al., 2016) extracts knowledge from Dtrain{D}_{\text{train}}, and stores it in an external memory (Figure 9). Each new sample xtestx_{\text{test}} is then represented by a weighted average of contents extracted from the memory. This limits xtestx_{\text{test}} to be represented by contents in the memory, and thus essentially reduces the size of H\mathcal{H}.

As each xtestx_{\text{test}} is represented as a weighted average of values extracted from the memory, the quality of key-value pairs in the memory is important. According to the functionality of the memory, FSL methods in this category can be subdivided into two types.

The following methods carefully put Dtrain{D}_{\text{train}} into the memory, such that the stored key-value pairs can represent xtestx_{\text{test}} more accurately. Memory-Augmented Neural Networks (MANN) (Santoro et al., 2016) meta-learns the embedding ff, and maps samples of the same class to the same value. Samples of the same class then refine their class representations in the memory together. This class representation can be viewed as a refined class prototype in ProtoNet (Snell et al., 2017). The surprise-based memory module (Ramalho and Garnelo, 2019) updates MM only when it cannot represent an xix_{i} well. Hence, updating MM using this xix_{i} makes MM more expressive, and also reduces the computation cost. The abstract memory (Xu et al., 2017) uses two memories. One extracts relevant key-value pairs from a fixed memory containing large-scale machine annotated data set, and the other refines the extracted values and abstracts out the most useful information for few-shot (image) classification. This idea is extended to few-shot video classification in (Zhu and Yang, 2018).

Along this line, some methods pay special attention to protecting the few-shot classes in the memory. Note that few-shot classes are small, and so have a lower chance of being kept in MM. Each few-shot sample in MM can also be easily replaced by samples from the more abundant classes. To alleviate this problem, lifelong memory (Kaiser et al., 2017) is proposed. Unlike previous memories (Santoro et al., 2016; Xu et al., 2017; Zhu and Yang, 2018; Ramalho and Garnelo, 2019) which wipe out the memory content across tasks, the lifelong memory erases the “oldest” memory value when the memory is full. The ages of all the memory slots are then reset to zero. For a new sample, when the returned Mvalue(i)M_{\text{value}}(i) value matches its ground-truth output, it is merged with the current Mkey(i)M_{\text{key}}(i) instead of being written to a new memory slot. Hence, it is more likely that all classes occupy an equal number of memory slots, and rare classes are protected. Recently, this lifelong memory is adapted to learn word representations in (Sun et al., 2018).

However, even with the use of a lifelong memory, rare samples can still be forgotten. After each update, the lifelong memory resets the age of the selected M(i)M(i) to zero, and increases the ages of the other non-empty memory slots by one. When the memory is full and the returned value is wrong, the oldest memory slot is replaced. As the rare class samples seldom update their M(i)M(i)’s, they have a higher chance of being erased.

3.2. Refining Parameters

Recall that the Learnet (Bertinetto et al., 2016) and its variants (Section 4.2.3) map information from Dtrain{D}_{\text{train}} to parameterize the embedding function g(⋅)g(\cdot) for a new xtestx_{\text{test}}. This parameter can be refined using a memory. Meta Networks (MetaNet) (Munkhdalai and Yu, 2017) parameterizes a classification model using a “slow” weight which is meta-learned from multiple data sets, and a “fast” weight which is a task-specific embedding of Dtrain{D}_{\text{train}}. As shown in (Munkhdalai et al., 2018), the computation cost of MetaNet can be reduced by learning to modify each neuron rather the complete parameter. MN-Net (Cai et al., 2018) uses a memory to refine the embedding learned in the Matching Nets, whose output is used to parameterize a CNN as in Learnet.

4. Generative Modeling

Generative modeling methods estimate the probability distribution p(x)p(x) from the observed xix_{i}’s with the help of prior knowledge (Figure 10). Estimation of p(x)p(x) usually involves estimations of p(x∣y)p(x|y) and p(y)p(y). Methods in this class can deal with many tasks, such as generation (Reed et al., 2018; Edwards and Storkey, 2017; Rezende et al., 2016; Lake et al., 2015), recognition (Lake et al., 2015; Fei-Fei et al., 2006; Salakhutdinov et al., 2012; Torralba et al., 2011; Edwards and Storkey, 2017; Gordon et al., 2019; Zhang et al., 2018a), reconstruction (Gordon et al., 2019), and image flipping (Reed et al., 2018).

According to what the latent variable zz represents, we group these FSL generative modeling methods into three types.

Although samples with supervised information are scarce in a FSL problem, they may share some smaller decomposable components with samples from the other tasks. For example, consider the recognition of a person using only a few face photos provided. Although similar faces may be hard to find, one can easily find photos with similar eyes, noses or mouths. With a larger number of samples, models for these decomposable components can be easily learned. One then only needs to find the correct combination of these decomposable components, and decides which target class this combination belongs to. As the decomposable components are chosen by human, this strategy is more interpretable. Bayesian One-Shot (Fei-Fei et al., 2006) uses a generative model to capture the interactions between decomposable components (i.e., shapes and appearances of objects) and target class (i.e., objects to be recognized). Bayesian Program Learning (BPL) (Lake et al., 2015) models characters by separating it into types, tokens and further templates, parts, primitives. To generate a new character, one needs to search a large combination space containing theses components. In (Lake et al., 2015), this inference cost is reduced by only considering the top possible combinations. In natural language processing, a recent work (Joshi et al., 2018) models spans instead of the complete parse tree, and adapts parsers between syntactically distant domains by training individual classifiers for spans.

4.2. Groupwise Shared Prior

Often, similar tasks have similar prior probabilities, and this can be utilized in FSL. For example, consider the three-class classification of “orange cat”, “leopard” and “Bengal tiger”. These three species are similar, but Bengal tiger is endangered, while orange cats and leopards are abundant. Hence, one can learn a prior probability from “orange cats” and “leopards”, and use this as the prior for the few-shot class “Bengal tiger”.

In (Salakhutdinov et al., 2012), a set of data sets {Dc}\{{D}_{c}\} are grouped into a hierarchy via unsupervised learning. Data sets in each group together learn the class prior probabilities. For a new few-shot class, one first finds the group this new class belongs to, and then models it by the class prior drawn from the groupwise shared prior probability. In (Torralba et al., 2011), the feature learning step in (Salakhutdinov et al., 2012) is further improved with the use of deep Boltzmann machines (Salakhutdinov and Hinton, 2009).

4.3. Parameters of Inference Networks

To find the best θ\theta, one has to maximize the posterior

Due to the integral in the denominator, it is intractable to solve (2). A variational distribution q(z;δ)q(z;\delta), which is learned from data, is often used to approximate p(z∣x;θ,γ)p(z|x;\theta,\gamma). Recently, this q(z;δ)q(z;\delta) is approximated via amortized variational inference with the inference network (Zhang et al., 2019). Although zz no longer has semantic meaning, the powerful representation learned by these deep models can lead to better performance. Once learned, the inference network can be applied to a new task directly, which is more efficient and requires less human knowledge. As the inference network has a large number of parameters, it is usually trained using some auxiliary large-scale data sets. Many classic inference networks are adapted to the FSL problem. For example, the variational auto-encoder (VAE) (Kingma and Welling, 2014) is used in (Rezende et al., 2016; Edwards and Storkey, 2017; Hewitt et al., 2018), autoregressive model (Van den Oord et al., 2016) is used in (Reed et al., 2018), generative adversarial networks (GAN) (Goodfellow et al., 2014) is used in (Zhang et al., 2018a), and a combination of VAE and GAN is proposed in (Gordon et al., 2019).

5. Discussion and Summary

When there exist similar tasks or auxiliary tasks, multitask learning can be used to constrain the H\mathcal{H} of the few-shot task. However, note that joint training of all the tasks together is required. Thus, when a new few-shot task arrives, the whole multitask model has to be trained again, which can be costly and slow. Moreover, the sizes of DD and Dc{D}_{c} should not comparable, otherwise, the few-shot task may be overwhelmed by tasks with many samples.

When a memory network is available, it can be readily used for FSL by training a simple model (e.g., classifier) on top of the memory. By using carefully-designed update rule, one can selectively protect memory slots. The weakness of this strategy is that it incurs additional space and computational costs, which increase with memory size. Therefore, current external memory has a limited size.

Algorithm

The algorithm is the strategy to search in the hypothesis space H\mathcal{H} for the parameter θ\theta of the best hypothesis h∗h^{*} (Bottou and Bousquet, 2008; Bottou et al., 2018). At the ttth iteration, θt=θt−1+Δθt−1\theta_{t}=\theta_{t-1}+\Delta\theta_{t-1}, where Δθt−1\Delta\theta_{t-1} is the update. For example, for the popular stochastic gradient descent (SGD) and its variants (Bottou and Bousquet, 2008; Bottou et al., 2018), θ\theta is updated as

where αt\alpha_{t} is the stepsize. With θ\theta initialized at θ0\theta_{0}, θt\theta_{t} can be written as

When supervised information is rich, there are enough training samples to update θ\theta, and to find an appropriate stepsize α\alpha by cross-validation. However, in FSL, the provided few-shot Dtrain{D}_{\text{train}} is not large enough, and the obtained empirical risk minimizer is unreliable.

Methods in this section use prior knowledge to influence how θ\theta is obtained, either by (i) providing a good initialized parameter θ0\theta_{0}, or (ii) directly learning an optimizer to output search steps. In terms of how the search strategy is affected by prior knowledge, we classify methods in this section into three groups (Table 7):

Refining existing parameters. An initial θ0\theta_{0} learned from other tasks, and is then refined using Dtrain{D}_{\text{train}}.

Refining meta-learned parameters. An initial θ0\theta_{0} is meta-learned from a set of tasks, which are drawn from the same task distribution as the few-shot task, and then further refined by the learner using Dtrain{D}_{\text{train}}.

Learning the optimizer. This strategy learns a meta-learner as optimizer to output search steps for each learner directly, such as changing the search direction or stepsize.

This strategy takes θ0\theta_{0} of a pre-trained model learned from related tasks as a good initialization, and adapts it to θ\theta by Dtrain{D}_{\text{train}}. The assumption is that θ0\theta_{0} captures some general structures of the large-scale data. Therefore, it can be adapted to D{D} with a few iterations.

This strategy fine-tunes the pre-trained θ0\theta_{0} for the few-shot task by regularization (Figure 11), and is popularly used in practice. In (Caelles et al., 2017), a CNN pre-trained on the ImageNet for image classification is tuned using a large data set for foreground segmentation, then further fine-tuned using a single shot of segmented object for object segmentation. Given the few-shot Dtrain{D}_{\text{train}}, simply fine-tuning θ0\theta_{0} by gradient descent may lead to overfitting. Hence, how to adapt θ0\theta_{0} without overfitting to Dtrain{D}_{\text{train}} is a key design issue.

In this section, methods fine-tune θ0\theta_{0} by regularization to prevent overfitting. They can be grouped as follows:

Early-stopping. It requires separating a validation set from Dtrain{D}_{\text{train}} to monitor the training procedure. Learning is stopped when there is no performance improvement on the validation set (Arik et al., 2018).

Selectively updating θ0\theta_{0}. Only a portion of θ0\theta_{0} is updated in order to avoid overfitting. For example, in (Keshari et al., 2018), given a set of pre-trained filters, it only learns a strength parameter that is multiplied with the filters.

Updating related parts of θ0\theta_{0} together. One can group elements of θ0\theta_{0} (such as the neurons in a deep neural network), and update each group jointly with the same update information. In (Yoo et al., 2018), the filters of a pre-trained CNN are clustered together according to some auxiliary information, and then fine-tuned by groupwise back-propagation using Dtrain{D}_{\text{train}}.

Using a model regression network. A model regression network (Wang and Hebert, 2016b) captures the task-agnostic transformation which maps the parameter values obtained by training on a few examples to the parameter values that will be obtained by training on a lot of samples. Similarly, in (Kozerawski and Turk, 2018), the transformation function that maps the embedding of xix_{i} to a classification decision boundary is learned.

1.2. Aggregating a Set of Parameters

Sometimes, we do not have a suitable θ0\theta_{0} to start with. Instead, we have many models that are learned from related tasks. For example, in face recognition, we may already have recognition models for the eye, nose, and ear. Therefore, one can aggregate these model parameters to a suitable model, which is then either directly used or refined by Dtrain{D}_{\text{train}} (Figure 12).

As discussed in Section 3, samples from unlabeled data sets (Section 3.2) and similar labeled data sets (Section 3.3) can be used to augment the few-shot Dtrain{D}_{\text{train}}. Instead of using the samples directly, the following methods use models (with parameters θ0\theta_{0}’s) pre-trained from these data sets. The problem is then how to adapt them efficiently to the new task using Dtrain{D}_{\text{train}}.

Unlabeled data set. Although there is no supervised information, similar samples can be grouped together. Therefore, one can pre-train functions from the unlabeled data to cluster and separate samples well. A neural network is then used to adapt them to the new task with the few-shot Dtrain{D}_{\text{train}} (Wang and Hebert, 2016b, a).

Similar data sets. In (Bart and Ullman, 2005), few-shot object classification is performed by leveraging samples and classifiers from similar classes. First, it replaces the features of samples from these similar classes by features from the new class. The learned classifier is then reused, and only the classification threshold is adjusted for the new class. In (Gidaris and Komodakis, 2018; Yu et al., 2018), they learn to combine existing parameters learned from similar data sets using Dtrain{D}_{\text{train}}.

1.3. Fine-Tuning Existing Parameter with New Parameters

The pre-trained θ0\theta_{0} may not be enough to encode the new FSL task completely. Hence, an additional parameter(s) δ\delta is used to take the specialty of Dtrain{D}_{\text{train}} into account (Figure 13). Specifically, this strategy expands the model parameter to become θ={θ0,δ}\theta=\{\theta_{0},\delta\}, and fine-tunes θ0\theta_{0} while learning δ\delta. In (Hoffman et al., 2013), it uses the lower layers of a pre-trained CNN for feature embedding, and learns a linear classifier on the embedded features using Dtrain{D}_{\text{train}}. In font style transfer (Azadi et al., 2018), a network is first pre-trained to capture the fonts in gray images. To generate stylish colored fonts, this is fine-tuned together with the training of an additional network.

2. Refining Meta-Learned Parameter

Methods in this section use meta-learning to refine the meta-learned parameter θ0\theta_{0} (Figure 14). The θ0\theta_{0} is continuously optimized by the meta-learner according to performance of the learner. This is different from Section 5.1 in which θ0\theta_{0} is fixed.

The meta-learned θ0\theta_{0} is often refined by gradient descent. A representative method is the Model-Agnostic Meta-Learning (MAML) (Finn et al., 2017). It meta-learns θ0\theta_{0}, which is then adjusted to obtain a good task-specific parameter ϕs\phi_{s} for some Ts∼P(T)T_{s}\sim P(T) via a few effective gradient descent steps, as: ϕs=θ0−α∇θ0Ltrains(θ0)\phi_{s}=\theta_{0}-\alpha\nabla_{\theta_{0}}\mathcal{L}_{\text{train}}^{s}(\theta_{0}). Here, Ltrains(θ0)\mathcal{L}_{\text{train}}^{s}(\theta_{0}) is the sum of losses over the training samples in Dtrain{D}_{\text{train}}, and α\alpha is the stepsize. Note that ϕs\phi_{s} is invariant to permutation of the samples. The meta-learned parameter θ0\theta_{0} is updated by feedbacks from multiple meta-training tasks as θ0←θ0−β∇θ0∑Ts∼P(T)Ltests(θ0)\theta_{0}\leftarrow\theta_{0}-\beta\nabla_{\theta_{0}}\sum_{T_{s}\sim P(T)}\mathcal{L}_{\text{test}}^{s}(\theta_{0}), where Ltests(θ0)\mathcal{L}_{\text{test}}^{s}(\theta_{0}) is the sum of losses over the test samples in DtestD_{\text{test}} and β\beta is another stepsize. By continuously refining θ0\theta_{0} using the few-shot samples in Dtrain{D}_{\text{train}}, the meta-learner improves its θ0\theta_{0} to quickly adapt to the few-shot training set.

Recently, many improvements have been proposed for MAML, mainly along the following three aspects:

Incorporating task-specific information. MAML provides the same initialization for all tasks. However, this neglects task-specific information, and is appropriate only when the set of tasks are all very similar. To address this problem, in (Lee and Choi, 2018), it learns to choose {θ0}\{\theta_{0}\} from a subset of a good initialization parameter for a new task.

Modeling the uncertainty of using a meta-learned θ0\theta_{0}. Learning with a few examples inevitably results in a model with higher uncertainty (Finn et al., 2018). Hence, the learned model may not be able to perform prediction on the new task with high confidence. The ability to measure this uncertainty provides hints for active learning and further data collection (Finn et al., 2018). There are works that consider uncertainty for the meta-learned θ0\theta_{0} (Yoon et al., 2018; Finn et al., 2018), uncertainty for the task-specific ϕs\phi_{s} (Ravi and Beatson, 2019; Grant et al., 2018), and uncertainty for class nn’s class-specific parameter ϕs,n\phi_{s,n} (Rusu et al., 2019).

Improving the refining procedure. Refinement by a few gradient descent steps may not be reliable. Regularization can be used to correct the descent direction. In (Gui et al., 2018), the model regression network (Wang and Hebert, 2016b) is used to regularize task TsT_{s}’s ϕs\phi_{s} to be close to the model trained with large-scale samples.

3. Learning the Optimizer

In Section 5.2, the meta-learner θ0\theta_{0} acts as a good initialization for T∼P(T)T\sim P(T) with data D{D}, and it is adjusted to a task-specific parameter ϕ\phi via a few effective gradient descent steps. In contrast, instead of using gradient descent, methods in this section learns an optimizer which can directly output the update (∑i=1tΔθi−1\sum_{i=1}^{t}\Delta\theta^{i-1} in (4)) (Figure 15). There is then no need to tune the stepsize α\alpha or find the search direction, as the learning algorithm does that automatically.

4. Discussion and Summary

Refining existing parameters can reduce the search effort in H\mathcal{H}. By using an existing θ0\theta_{0} as initialization, these methods usually need a lower computation cost to obtain a good hypothesis h∈Hh\in\mathcal{H}. Learning focuses on refining these existing parameters. However, as θ0\theta_{0} is learned from tasks different from the current task, this strategy may sacrifice precision for speed.

The other two strategies rely on meta-learning. By learning from a set of related tasks, the meta-learned θ0\theta_{0} can be closer to the task-specific parameter ϕt\phi_{t} for a new task TtT_{t}. Learning search steps by a meta-learner can directly guide the learning algorithm. In other words, the meta-learner acts as an optimizer. However, important issues such as how to meta-learn across different granularities (such as coarse-grained classifications of animals versus fine-grained classification of dog species) or different data sources (such as images versus texts) (Triantafillou et al., 2019) are still open. From this perspective, meta-learning and multi-tasks are similar, and so there is also a concern on how to avoid negative transfer (Deleu and Bengio, 2018)

Future Works

In this section, we discuss four key directions for the further development of FSL, namely, (i) problem setups, (ii) techniques, (iii) applications and (iv) theories.

Existing FSL methods often use prior knowledge from one single modality (such as images, texts, or videos). However, though Dtrain{D}_{\text{train}} has a few examples for the modality currently used, there may exist another modality in which supervised samples are abundant. An example is in the study of extinct animals. While this animal species may only have a limited number of visual examples, there might be a lot of information about it in the textual domain (such as textbooks or web pages), as people tend to pay special attention to the rare class. Therefore, prior knowledge from multiple modalities can provide prior knowledge for complementary views. In zero-shot learning (ZSL), multi-modality data has been frequently used. Example prior information are attributes (Hwang and Sigal, 2014; Akata et al., 2013), WordNet (Hwang and Sigal, 2014; Akata et al., 2013), word embeddings (Tsai and Salakhutdinov, 2017; Wang et al., 2017), co-occurrence statistics (Mensink et al., 2014), and knowledge graphs (Wang et al., 2018b).

Recently, there have been efforts in borrowing techniques from ZSL methods to FSL problems. For example, one can use the few-shot Dtrain{D}_{\text{train}} to fine-tune the parameters learned by ZSL methods (Hwang and Sigal, 2014; Akata et al., 2013). However, fine-tuning using a small number of samples may lead to overfitting. Another possibility is to force the embedding learned by multiple modalities to match in a shared space (Tsai and Salakhutdinov, 2017; Wang et al., 2017). A recent work (Rios and Kavuluru, 2018) exploits the structured relationships among labels and utilizes a GNN to align the embedding for FSL. As different modalities may contain different structures, this should be carefully handled. For example, texts need to obey syntactic structures while images do not. In the future, a promising direction is to consider the use of multi-modality information in designing FSL methods.

2. Techniques

In previous sections, according to how the prior knowledge in FSL is used, we categorize FSL methods from the perspectives of data (Section 3), model (Section 4), and algorithm (Section 5). Each of these components can be improved. For example, using state-of-the-art ResNet (He et al., 2016) as the embedding function can be better than using the VGG (Srivastava et al., 2015).

Meta-learning-based FSL methods, as reviewed in Sections 4 and 5, are particularly interesting. By learning across tasks, meta-learning can adapt to new tasks rapidly with a small inference cost. However, the tasks considered in meta-learning are often assumed to be drawn from a single task distribution p(T)p(T). In practice, we can have a large number of tasks whose task relatedness is unknown or expensive to determine. In this case, directly learning from all these tasks can lead to negative transfer (Deleu and Bengio, 2018). Besides, current FSL methods often consider a static and fixed P(T)P(T) (Finn et al., 2017; Ravi and Larochelle, 2017). However, in streaming applications, p(T)p(T) is dynamic (Finn and Levine, 2018) and new tasks are continually arriving. Hence, this should also be incorporated into p(T)p(T). An important issue is how to avoid catastrophic forgetting (Kirkpatrick et al., 2017) in a dynamic setting, which means that information on the old tasks should not be forgotten.

As discussed in previous sections, different FSL methods have pros and cons, and there is no absolute winner in all settings. Moreover, both the hypothesis space H\mathcal{H} and search strategies in H\mathcal{H} often rely on human design. Automated machine learning (AutoML) (Yao et al., 2018), by constructing task-aware machine learning models, has achieved state-of-the-art on many applications. Recently, AutoML has been used on data augmentation (Cubuk et al., 2019). Another direction is to extend the AutoML methods of automated feature engineering (Kanter and Veeramachaneni, 2015), model selection (Kotthoff et al., 2017) and neural architecture search (Zoph and Le, 2017) to FSL. One can then obtain better algorithm designs whose components are learned by AutoML in an economic, efficient and effective manner.

3. Applications

Recall that FSL is needed due to rareness of samples, endeavor to reduce data gathering effort and computational cost, or as a stepping stone to mimic human-like learning. Hence, many real-world applications involve FSL. Computer vision is one of very first testbed for FSL algorithms. FSL has also attracted a lot of recent attention in many other applications, such as robotics, natural language processing, and acoustic signal processing. In summary, there are many interesting fields and applications for FSL to explore.

Most existing works target FSL problems in computer vision. The two most popular applications are character recognition (Fink, 2005; Santoro et al., 2016; Vinyals et al., 2016; Munkhdalai and Yu, 2017; Finn et al., 2017; Woodward and Finn, 2017; Kaiser et al., 2017; Koch, 2015; Triantafillou et al., 2017; Bertinetto et al., 2016; Shyam et al., 2017; Salakhutdinov et al., 2012; Snell et al., 2017) and image classification (Ravi and Larochelle, 2017; Finn et al., 2017; Vinyals et al., 2016; Xu et al., 2017; Munkhdalai and Yu, 2017; Shyam et al., 2017; Tang et al., 2010; Triantafillou et al., 2017; Koch, 2015; Wang and Hebert, 2016a, b; Tsai et al., 2017; Snell et al., 2017). Very high accuracies have already been obtained on the standard benchmark data sets (such as Ominiglot and miniImageNet), leaving little space for further improvement (Triantafillou et al., 2019). Recently, a large and diverse benchmark data set, constructed from multiple image data sources, is presented in (Triantafillou et al., 2019). Besides character recognition and image classification, other image applications have also been considered. These include object recognition (Fink, 2005; Fei-Fei et al., 2006; Liu et al., 2018), font style transfer (Azadi et al., 2018), phrase grounding (Zhao et al., 2018), image retrieval (Triantafillou et al., 2017), object tracking (Bertinetto et al., 2016), specific object counting in images (Zhao et al., 2018), scene location recognition (Kwitt et al., 2016), gesture recognition (Pfister et al., 2014), part labeling (Choi et al., 2018), image generation (Lake et al., 2015; Reed et al., 2018; Rezende et al., 2016; Edwards and Storkey, 2017), image translation across domains (Benaim and Wolf, 2018), shape view reconstruction for 3D objects (Gordon et al., 2019), and image captioning and visual question answering (Dong et al., 2018).

FSL has also been successfully used in video applications, including motion prediction (Gui et al., 2018), video classification (Zhu and Yang, 2018), action localization (Yang et al., 2018), person re-identification (Wu et al., 2018), event detection (Yan et al., 2015), and object segmentation (Caelles et al., 2017).

3.2. Robotics

In order for robots to behave more like human, they should be able to generalize from a few demonstrations. Hence, FSL has played an important role in robotics. For example, learning of robot arm movement using imitating learning from a single demonstration (Wu and Demiris, 2010), and learning manipulation actions from a few demonstrations with the help of a teacher who corrects the false actions (Abdo et al., 2013).

Apart from imitating users, robots can improve their behavior through interacting with users. Recently, assistive strategies are learned from a few interactions through FSL reinforcement learning (Hamaya et al., 2016). Other examples of FSL in robotics include multi-armed bandits (Duan et al., 2017), visual navigation (Duan et al., 2017; Finn et al., 2017), and continuous control (Finn et al., 2017; Yoon et al., 2018; Mishra et al., 2018). Recently, these applications are further extended to dynamic environments (Al-Shedivat et al., 2018; Nagabandi et al., 2018).

3.3. Natural Language Processing

Recently, the use of FSL has drawn attention in natural language processing. Example applications include parsing (Joshi et al., 2018), translation (Kaiser et al., 2017), sentence completion (which fills in the blanks using a word chosen from a provided set) (Vinyals et al., 2016; Munkhdalai et al., 2018), sentiment classification from short reviews (Yu et al., 2018; Yan et al., 2018), user intent classification for dialog systems (Yu et al., 2018), criminal charge prediction (Hu et al., 2018), word similarity tasks such as nonce definition (Herbelot and Baroni, 2017; Sun et al., 2018), and multi-label text classification (Rios and Kavuluru, 2018). Recently, a new relation classification data set called FewRel (Han et al., 2018) is released. This compensates for the lack of benchmark data set for FSL tasks in natural language processing.

3.4. Acoustic Signal Processing

Apart from the early efforts on using FSL to recognize spoken words from one example (Lake et al., 2014), recent endeavors are on voice synthesis. A popular task is voice cloning from a few audio samples of the user (Arik et al., 2018). This can be useful in generating personal voice navigation in map applications, or mimicking the parents’ voice in story-telling to kids in a smart home toolkit. Recently, it is possible to perform voice conversion from one user to another using one-shot voice or text sample (Tjandra et al., 2018) or even across different languages (Mohammadi and Kim, 2018).

3.5. Others

For example, a recent attempt in the context of medical applications is few-shot drug discovery (Altae-Tran et al., 2017). For learning of deep networks, one-shot architecture search (OAS) is studied in (Brock et al., 2018; Liu et al., 2019b; Yao et al., 2020). Unlike random search and grid search which require multiple runs to find the best architecture, OAS methods can find good architectures by training the supernet once. FSL has also been used in curve fitting (Yoon et al., 2018; Finn et al., 2018; Grant et al., 2018; Santoro et al., 2016) and understanding number analogy by logic reasoning to perform calculations (Ramalho and Garnelo, 2019).

4. Theories

FSL uses prior knowledge to compensate for the lack of supervised information. This is related to the theoretical study of sample complexity, which is the number of training samples needed to obtain a model with small empirical risk RI(h)R_{I}(h) having high probability (Mitchell, 1997; Mohri et al., 2018). H\mathcal{H} needs to be less complicated to make the provided II samples enough. Recall that FSL methods use prior knowledge to augment more samples (i.e., increase II), constrain H\mathcal{H} (i.e., reduce the complexity of H\mathcal{H}) and alter the search strategy (i.e., increase the probability of finding a good hh). This suggests that FSL methods can reduce the required sample complexity using prior knowledge. A detailed analysis on this aspect will be useful.

Besides, recall that FSL is related to domain adaptation (Pfister et al., 2014; Motiian et al., 2017; Luo et al., 2017), and existing theoretical bounds on domain adaptation may be inspiring (Ben-David et al., 2007; Blitzer et al., 2008). For example, recent analysis shows that better risk bounds can be obtained by fine-tuning feedforward neural networks (McNamara and Balcan, 2017). By considering a specific meta-learning method, the risk of transferring a model trained on one task to another task is examined in (Denevi et al., 2018). However, only a small number of methods have been studied so far. There are still a lot of theoretical issues to explore.

Finally, convergence of the FSL algorithms is not fully understood. In particular, meta-learning methods optimize θ\theta over a task distribution instead of over a single task. Recent analysis in (Franceschi et al., 2018) provides sufficient conditions for convergence of one meta-learning method. The meta-learner learns the lower layers of a deep network, while the learner learns the last layer, all using gradient descent. A more general analysis on the convergence of meta-learning methods will be highly useful.

Conclusion

Few-Shot Learning (FSL) targets at bridging the gap between AI and human learning. It can learn new tasks containing only a few examples with supervised information by incorporating prior knowledge. FSL acts as a test-bed for AI, makes the learning of rare cases possible, or helps to relieve the burden of collecting large-scale supervised date in industrial applications. In this survey, we provide a comprehensive and systematic review of FSL. We first formally define FSL, and discuss the relatedness and differences of FSL with relevant learning problems such as weakly supervised learning, imbalanced learning, transfer learning and meta-learning. We then point out the core issue of FSL is the unreliable empirical risk minimizer that makes FSL hard to learn. Understanding the core issue helps categorize different works into data, model and algorithm according to how they solve the core issue using prior knowledge: data augments the supervised experience of FSL, model constrains the hypothesis space of FSL to be smaller, and algorithm alters the search strategy for the best hypothesis in the given hypothesis space. In each category, the pros and cons are thoroughly discussed and some summary and insights are presented. To inspire future research in FSL, we also provide possible directions on problem setups, techniques, applications and theories to explore.

Appendix A Appendix: Meta-Learning

Meta-learning (Hochreiter et al., 2001) improves PP of the new task TT by the provided data set and the meta-knowledge extracted across tasks by a meta-learner (Figure 16). Let p(T)p(T) be the distribution of task TT. In mete-training, it learns from a set of tasks Ts∼p(T)T_{s}\sim p(T). Each task TsT_{s} operates on data set Ds{D}_{s} of NN classes, where Ds={Dtrains,Dtests}{D}_{s}=\{{D}_{\text{train}}^{s},D_{\text{test}}^{s}\} consists of a training set Dtrains{D}_{\text{train}}^{s} and a test set DtestsD_{\text{test}}^{s}. Each learner learns from Dtrains{D}_{\text{train}}^{s} and measures the test error on DtestsD_{\text{test}}^{s}. The parameter θ0\theta_{0} of meta-learner is optimized to minimize the error across all learners, as:

In meta-testing, another disjoint set of tasks Tt∼p(T)T_{t}\sim p(T) is used to test the generalization ability of the meta-learner. Each TtT_{t} works on a data set Dt{D}_{t} of N′N^{\prime} classes, where Dt={Dtraint,Dtestt}{D}_{t}=\{{D}_{\text{train}}^{t},D_{\text{test}}^{t}\}. The learner learns from the training set Dtraint{D}_{\text{train}}^{t} and evaluates on the test set DtesttD_{\text{test}}^{t}. The loss averaged across TtT_{t}’s is taken as the meta-learning testing error.

References