CAPÍTULO I GENERALIDADES
1.3.4. Marco Legal para el manejo de orquídeas en el Ecuador
In few-shot learning we generally distinguish between two phases of learning whose names are inspired by the meta-learning perspective (Ravi and Larochelle, 2017) but also apply to transfer learning: (i) meta-training and (ii) meta-testing.
6.2.1 The two phases of few-shot learning
In themeta-training phasewe receive a large dataset or repositoryDe={xei,eyi}Ne
i=1 meta-training of imagesexiand corresponding labelsyei ∈ {1, . . . ,Ce}that indicate which of the
e
Cclasses each image belongs to. Typically, the dataset contains many instances per class. In some cases, we might not access or have access to the entire large dataset at once but only subsampledtasksfrom it. We will elaborate on this below
when addressing episodic training particular to meta-learning. In themeta-testing phase, we receive a small datasetD={xi, yi}C·k
i=1 ofCnew meta-testing classes,yi∈ {Ce+ 1,Ce+C}, withkimages from each new class. Typically,kis
very small and on the order of1to20. We correspondingly refer to the few-shot learning task as aC-way-k-shot task, because we ultimately distinguish between Cclasses withklabelled example instances per class.
Regardless of perspective, our goal is to construct a model that can leverage the information inDeandDto predict well on unseen imagesx∗from the new classes; the performance is evaluated on prediction accuracy against ground truth labels y∗from the new classes.
In addition to this simple few-shot learning task there exist many possible extensions, such as online- or continual learning, where the set of new classes grows over time, both in terms of novel classes as well as examples per class, or we also include the repository classes in the evaluation.
The different transfer learning and meta-learning approaches to this task utilise the provided data in different ways. Broadly speaking, there are two main
strategies to incorporate the large datasetDethat are roughly aligned with the division between transfer and meta-learning.
6.2.2 The transfer learning perspective
Consider the problem from a transfer learning perspective and use the large datasetDeall at once, for example to pre-train a feature extractor and then transfer these features to the meta-testing classes inD, seeFigure 6.1. This approach still
requires a structure to actually perform the feature transfer. For example, a simple approach is to train a generalised logistic regression using the pre-trained features from the few-shot examplesDat meta-test time; when enough meta-test data is
available, the features can also be fine-tuned.
In Chapter 7 we utilise this perspective and develop a simple probabilistic model to perform the transfer of features. Because we use the large repository all at once, these approaches can typically contain powerful feature extractors, such as VGG (Simonyan and Zisserman,2015) or ResNet (He et al.,2016) for images.
dog
...
plane helicop. fox ???
Large datasetDe Small datasetD
Training data Test data
Figure 6.1:The few-shot learning task from a transfer-learning perspective. During meta- training we use the large datasetDeto train a learning system. At meta-test time we use the small datasetDto adapt the system and then test on the test data. Here we illustrate a 2-way-1-shot task. Images from the ImageNet dataset (Russakovsky et al.,2015).
6.2.3 The meta-learning perspective
Consider the problem from a meta-learning perspective and use the large dataset to performepisodic training, in which we simulate many small few-shot tasks by
episodic training
sub-sampling classes and training/testing images fromDe, seeFigure 6.2. In this approach we typically train a meta-algorithm that performs the adaptation to the new task at hand; still, part of the model architecture functions as a form of feature extractor, whose features are effectively transferred from the large dataset
e
our approaches to probabilistic few-shot learning 137
split into a train and a test set, giving rise to “meta-train train/test splits” and “meta-test train/test splits”.
Due to the nature of episodic training, it is often difficult to train powerful feature extractors in this setting. Moreover, as we discuss below, some approaches are architecturally constrained or only perform well on the sameC-way-k-shot task they have been trained on episodically.
InChapter 8we follow the meta-learning perspective and present an approach to meta-learn probabilistic inference for prediction.
dog cat pan
... plane bike Large repositoryDe dog pan ??? train test Task 1:D(1) cat plane ???
trainTask 2:D test
(2)
bike pan ???
trainTask 3:D test
(3) helic. fox ??? train test Meta-test task Meta-test phase Meta-training phase
Figure 6.2:The few-shot learning task from a meta-learning perspective. During the meta-training phase, we sample many small taskstwith datasetsD(t)from
the large repositoryDeto train the meta-learning system episodically. In the meta-test phase, we evaluate the system on a test task with new classes. Here we illustrate a 2-way-2-shot task. Images from the ImageNet dataset (Russakovsky et al.,2015).