Original: F EW -S HOT F EW -S HOT L EARNING AND THE ROLE OF S PATIAL A TTENTION
Revised: F EW -S HOT F EW -S HOT L EARNING AND THE ROLE OF S PATIAL A TTENTION

Original: Anonymous authors
Revised: Anonymous authors

Original: Paper under double-blind review
Revised: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: Few-shot learning is often motivated by the ability of humans to learn new tasks from few examples.
Revised: Few-shot learning is often motivated by the ability of humans to learn new tasks from few examples.

Original: However, standard few-shot classiﬁcation benchmarks assume that the representation is learned on a limited amount of base class data, ignoring the amount of prior knowledge that a human may have accumulated before learning new tasks.
Revised: However, standard few-shot classiﬁcation benchmarks assume that the representation is learned on a limited amount of base class data, ignoring the amount of prior knowledge that a human may have accumulated before learning new tasks.

Original: At the same time, even if a powerful representation is available, it may happen in some domain that base class data are limited or non-existent.
Revised: At the same time, even if a powerful representation is available, it may happen in some domain that base class data are limited or non-existent.

Original: This motivates us to study a problem where the representation is obtained from a classiﬁer pre-trained on a large-scale dataset of a different domain, assuming no access to its training process, while the base class data are limited to few examples per class and their role is to adapt the representation to the domain at hand rather than learn from scratch.
Revised: This motivates us to study a problem where the representation is obtained from a classiﬁer pre-trained on a large-scale dataset of a different domain, assuming no access to its training process, while the base class data are limited to few examples per class and their role is to adapt the representation to the domain at hand rather than learn from scratch.

Original: We adapt the representation in two stages, namely on the few base class data if available and on the even fewer data of new tasks.
Revised: We adapt the representation in two stages, namely on the few base class data if available and on the even fewer data of new tasks.

Original: In doing so, we obtain from the pre-trained classiﬁer a spatial attention map that allows focusing on objects and suppressing background clutter.
Revised: In doing so, we obtain from the pre-trained classiﬁer a spatial attention map that allows focusing on objects and suppressing background clutter.

Original: This is important in the new problem, because when base class data are few, the network cannot learn where to focus implicitly.
Revised: This is important in the new problem, because when base class data are few, the network cannot learn where to focus implicitly.

Original: We also show that a pre-trained network may be easily adapted to novel classes, without meta-learning.
Revised: We also show that a pre-trained network may be easily adapted to novel classes, without meta-learning.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: The ever improving performance of deep learning models, apart from technical progress, is largely due to the existence of large-scale datasets, fully or weakly labeled by humans (Russakovsky et al., 2015; Kuznetsova et al., 2018; Mahajan et al., 2018).
Revised: The ever improving performance of deep learning models, apart from technical progress, is largely due to the existence of large-scale datasets, fully or weakly labeled by humans (Russakovsky et al., 2015; Kuznetsova et al., 2018; Mahajan et al., 2018).

Original: At the same time, reducing the need for supervision is becoming increasingly important, e.g . by taking advantage of prior learning (Bengio et al., 2011; Mallya et al., 2018; Li & Hoiem, 2018) or exploiting unlabeled data (Caron et al., 2018;
Revised: At the same time, reducing the need for supervision is becoming increasingly important, e.g . by taking advantage of prior learning (Bengio et al., 2011; Mallya et al., 2018; Li & Hoiem, 2018) or exploiting unlabeled data (Caron et al., 2018;

Original: Radosavovic et al., 2018).
Revised: Radosavovic et al., 2018).

Original: An extreme situation is few-shot learning (Koch et al., 2015; Vinyals et al., 2016;
Revised: An extreme situation is few-shot learning (Koch et al., 2015; Vinyals et al., 2016;

Original: Snell et al., 2017;
Revised: Snell et al., 2017;

Original: Hariharan & Girshick, 2017), where the problem is to learn novel (previously unseen) classes using only a very small labeled training set, typically not more than 10 examples per class.
Revised: Hariharan & Girshick, 2017), where the problem is to learn novel (previously unseen) classes using only a very small labeled training set, typically not more than 10 examples per class.

Original: Here not only the annotation but even the raw data are not available.
Revised: Here not only the annotation but even the raw data are not available.

Original: This problem is often motivated by the ability of humans to learn new tasks from few examples (Lake et al., 2011; 2015), which has given rise to meta-learning (Santoro et al., 2016;
Revised: This problem is often motivated by the ability of humans to learn new tasks from few examples (Lake et al., 2011; 2015), which has given rise to meta-learning (Santoro et al., 2016;

Original: Mishra et al., 2017; Ravi & Larochelle, 2017; Bertinetto et al., 2018; Han et al., 2018), or learning to learn.
Revised: Mishra et al., 2017; Ravi & Larochelle, 2017; Bertinetto et al., 2018; Han et al., 2018), or learning to learn.

Original: In this scenario, a training set is treated as a collection of smaller sets where every class has few labeled examples.
Revised: In this scenario, a training set is treated as a collection of smaller sets where every class has few labeled examples.

Original: However, there is a huge gap between the motivating example of humans learning new tasks and how the few-shot classiﬁcation task is set up.
Revised: However, there is a huge gap between the motivating example of humans learning new tasks and how the few-shot classiﬁcation task is set up.

Original: On one hand, for the sake of simplicity in experiments, the base class datasets where the representation is learned from scratch, contain a few dozen or hundred classes with a few hundred examples each.
Revised: On one hand, for the sake of simplicity in experiments, the base class datasets where the representation is learned from scratch, contain a few dozen or hundred classes with a few hundred examples each.

Original: This is by no means comparable to datasets available to date (Kuznetsova et al., 2018; Mahajan et al., 2018), let alone the amount of prior knowledge that a human may have accumulated before learning a new task.
Revised: This is by no means comparable to datasets available to date (Kuznetsova et al., 2018; Mahajan et al., 2018), let alone the amount of prior knowledge that a human may have accumulated before learning a new task.

Original: On the other hand, for a given domain of novel classes, e.g . bird species (Welinder et al., 2010), base class data of such size in the same domain may not exist.
Revised: On the other hand, for a given domain of novel classes, e.g . bird species (Welinder et al., 2010), base class data of such size in the same domain may not exist.

Original: In this work, we depart from the standard few-shot classiﬁcation scenario in two directions.
Revised: In this work, we depart from the standard few-shot classiﬁcation scenario in two directions.

Original: First, we allow the representation to be learned from a large-scale dataset in a domain different than the base and novel class domain.
Revised: First, we allow the representation to be learned from a large-scale dataset in a domain different than the base and novel class domain.

Original: In particular, we model prior knowledge by a classiﬁer that is pre-trained on such a dataset, having no access to its training process.
Revised: In particular, we model prior knowledge by a classiﬁer that is pre-trained on such a dataset, having no access to its training process.

Original: We thus maintain the difﬁculty of domain gap and the simplicity of experiments (by not training from scratch), while allowing a powerful representation.
Revised: We thus maintain the difﬁculty of domain gap and the simplicity of experiments (by not training from scratch), while allowing a powerful representation.

Original: Second, we assume only few or zero examples per base class.
Revised: Second, we assume only few or zero examples per base class.

Original: Hence, the role of base classes is to adapt the representation to the domain at hand rather than learn from scratch.
Revised: Hence, the role of base classes is to adapt the representation to the domain at hand rather than learn from scratch.

Original: This scenario can be seen as few-shot version of few-shot learning.
Revised: This scenario can be seen as few-shot version of few-shot learning.

Original: We treat this problem as a two-stage adaptation process, ﬁrst on the few base class examples if available and second on the even fewer novel class examples.
Revised: We treat this problem as a two-stage adaptation process, ﬁrst on the few base class examples if available and second on the even fewer novel class examples.

Original: Because of the limited amount of data, it is not appropriate to apply e.g . transfer learning (Bengio et al., 2011) or domain adaptation (Ganin & Lempitsky, 2014), in either of the two stages.
Revised: Because of the limited amount of data, it is not appropriate to apply e.g . transfer learning (Bengio et al., 2011) or domain adaptation (Ganin & Lempitsky, 2014), in either of the two stages.

Original: Because the network is pre-trained, and we do not have access to its training process or data, meta-learning is not an option either.
Revised: Because the network is pre-trained, and we do not have access to its training process or data, meta-learning is not an option either.

Original: We thus resort to few steps of ﬁne-tuning as in the meta-testing stage of Finn et al.
Revised: We thus resort to few steps of ﬁne-tuning as in the meta-testing stage of Finn et al.

Original: (2017) and Ravi & Larochelle (2017).
Revised: (2017) and Ravi & Larochelle (2017).

Original: Focusing on image classiﬁcation, we then investigate the role of spatial attention in the new problem.
Revised: Focusing on image classiﬁcation, we then investigate the role of spatial attention in the new problem.

Original: With large base class datasets, the network can implicitly learn the relevant parts of the images where to focus.
Revised: With large base class datasets, the network can implicitly learn the relevant parts of the images where to focus.

Original: In our setup, base class data are few, so our motivation is that a spatial attention mechanism may help the classiﬁer in focusing on objects, suppressing background clutter.
Revised: In our setup, base class data are few, so our motivation is that a spatial attention mechanism may help the classiﬁer in focusing on objects, suppressing background clutter.

Original: We observe that although the prior classes of the pre-trained classiﬁer may be irrelevant to a new task, uncertainty over a large number of such classes may express anything unknown like background.
Revised: We observe that although the prior classes of the pre-trained classiﬁer may be irrelevant to a new task, uncertainty over a large number of such classes may express anything unknown like background.

Original: This is a class-agnostic property and can apply to new tasks.
Revised: This is a class-agnostic property and can apply to new tasks.

Original: In particular, given an input image, we measure the entropy-based certainty of the pre-trained classiﬁer in its prediction on the prior classes at every spatial location and we use it to construct a spatial attention map.
Revised: In particular, given an input image, we measure the entropy-based certainty of the pre-trained classiﬁer in its prediction on the prior classes at every spatial location and we use it to construct a spatial attention map.

Original: This map can be utilized in a variety of ways, for instance weighted spatial pooling or weighted loss per location; and at different situations like the two adaptation stages or at inference.
Revised: This map can be utilized in a variety of ways, for instance weighted spatial pooling or weighted loss per location; and at different situations like the two adaptation stages or at inference.

Original: By exploring different alternatives, we show that a pre-trained network may be easily adapted to novel classes, without meta-learning.
Revised: By exploring different alternatives, we show that a pre-trained network may be easily adapted to novel classes, without meta-learning.

Original: In the following, we provide a detailed problem formulation and related background in section 2, then we describe our spatial attention mechanism in section 3 and its use in few-shot classiﬁcation in section 4.
Revised: In the following, we provide a detailed problem formulation and related background in section 2, then we describe our spatial attention mechanism in section 3 and its use in few-shot classiﬁcation in section 4.

Original: We provide experimental results in section 5, and we conclude in section 6.
Revised: We provide experimental results in section 5, and we conclude in section 6.

Original:  P ROBLEM , BACKGROUND , RELATED WORK AND CONTRIBUTION
Revised:  P ROBLEM , BACKGROUND , RELATED WORK AND CONTRIBUTION

Original: Few-shot classiﬁcation.
Revised: Few-shot classiﬁcation.

Original: We are given a set of training examples X :=
Revised: We are given a set of training examples X :=

Original: { x i } ni =1 ⊂ X , and corresponding labels y :
Revised: { x i } ni =1 ⊂ X , and corresponding labels y :

Original: = ( y i ) ni
Revised: = ( y i ) ni

Original: =1 ⊂ C n where C :=
Revised: =1 ⊂ C n where C :=

Original: [ c ] := { 1 , . .
Revised: [ c ] := { 1 , . .

Original: . , c } is a set of base classes .
Revised: . , c } is a set of base classes .

Original: The objective is to learn a representation on these data, a process that we call base training , such that we can solve new tasks.
Revised: The objective is to learn a representation on these data, a process that we call base training , such that we can solve new tasks.

Original: A new task comprises a set of support examples X (cid:48) :
Revised: A new task comprises a set of support examples X (cid:48) :

Original: = { x (cid:48) i } n (cid:48) i =1 ⊂ X and labels y (cid:48) :
Revised: = { x (cid:48) i } n (cid:48) i =1 ⊂ X and labels y (cid:48) :

Original: = ( y (cid:48) i ) n (cid:48)
Revised: = ( y (cid:48) i ) n (cid:48)

Original: i =1 ⊂ ( C (cid:48) ) n (cid:48) , where n (cid:48) (cid:28) n and C (cid:48) :
Revised: i =1 ⊂ ( C (cid:48) ) n (cid:48) , where n (cid:48) (cid:28) n and C (cid:48) :

Original: =
Revised: =

Original: [ c (cid:48) ] is a set of novel classes disjoint from C .
Revised: [ c (cid:48) ] is a set of novel classes disjoint from C .

Original: The most common setting is k (cid:48) examples per novel class, so that n (cid:48) =
Revised: The most common setting is k (cid:48) examples per novel class, so that n (cid:48) =

Original: k (cid:48) c (cid:48) , referred to as c (cid:48)
Revised: k (cid:48) c (cid:48) , referred to as c (cid:48)

Original: -way , k (cid:48) -shot
Revised: -way , k (cid:48) -shot

Original: classiﬁcation.
Revised: classiﬁcation.

Original: The objective now is to learn a classiﬁer on these support data, a process that we call adaptation .
Revised: The objective now is to learn a classiﬁer on these support data, a process that we call adaptation .

Original: This classiﬁer should map a new query example from X to a prediction in C (cid:48) .
Revised: This classiﬁer should map a new query example from X to a prediction in C (cid:48) .

Original: Few-shot few-shot classiﬁcation.
Revised: Few-shot few-shot classiﬁcation.

Original: Few-shot classiﬁcation assumes there is more data in base than novel classes, and a domain shift between the two, in the sense of no class overlap.
Revised: Few-shot classiﬁcation assumes there is more data in base than novel classes, and a domain shift between the two, in the sense of no class overlap.

Original: Here we consider a modiﬁed problem where n can be small or zero , but there is another set C ◦ =
Revised: Here we consider a modiﬁed problem where n can be small or zero , but there is another set C ◦ =

Original: [ c ◦ ] of prior classes with even more data X ◦ and labels y ◦ with n (cid:28) n ◦ :=
Revised: [ c ◦ ] of prior classes with even more data X ◦ and labels y ◦ with n (cid:28) n ◦ :=

Original: | X ◦ | and a greater domain shift to C, C (cid:48) .
Revised: | X ◦ | and a greater domain shift to C, C (cid:48) .

Original: Again, the most common setting is k examples per base class, so that n = kc .
Revised: Again, the most common setting is k examples per base class, so that n = kc .

Original: We are using a classiﬁer that is pre-trained on this data but we do not have direct access to either X ◦ , y ◦ , or its learning process.
Revised: We are using a classiﬁer that is pre-trained on this data but we do not have direct access to either X ◦ , y ◦ , or its learning process.

Original: The objective of base training is now to adapt the representation to the domain of
Revised: The objective of base training is now to adapt the representation to the domain of

Original: C, C (cid:48) rather than learn it from scratch; but we still call it base training .
Revised: C, C (cid:48) rather than learn it from scratch; but we still call it base training .

Original: In the remaining of this section we present general background on few-shot classiﬁcation that typically applies to base classes C or novel classes C (cid:48) , but may also apply to both, in which case the symbols c, C and c (cid:48) , C (cid:48) may be used interchangeably.
Revised: In the remaining of this section we present general background on few-shot classiﬁcation that typically applies to base classes C or novel classes C (cid:48) , but may also apply to both, in which case the symbols c, C and c (cid:48) , C (cid:48) may be used interchangeably.

Original: Prior classes and the pre-trained network are only considered in the following sections.
Revised: Prior classes and the pre-trained network are only considered in the following sections.

Original: Classiﬁer.
Revised: Classiﬁer.

Original: The classiﬁer is a function f θ,W : X → R c (resp.
Revised: The classiﬁer is a function f θ,W : X → R c (resp.

Original: R c (cid:48) ) with learnable parameters θ, W , mapping a new example x ∈ X to a vector of probabilities p :=
Revised: R c (cid:48) ) with learnable parameters θ, W , mapping a new example x ∈ X to a vector of probabilities p :=

Original: f θ,W ( x ) over c (resp.
Revised: f θ,W ( x ) over c (resp.

Original: c (cid:48) ) base (resp.
Revised: c (cid:48) ) base (resp.

Original: novel) classes.
Revised: novel) classes.

Original: The classiﬁer prediction is the class of maximum probability
Revised: The classiﬁer prediction is the class of maximum probability

Original: [Equation]
Revised: [Equation]

Original: where p j is the j -th element of p .
Revised: where p j is the j -th element of p .

Original: The classiﬁer is built on top of an embedding function φ θ : X →
Revised: The classiﬁer is built on top of an embedding function φ θ : X →

Original: R r × d .
Revised: R r × d .

Original: Given an example x ∈ X , this function yields a r × d feature tensor φ θ ( x ) , where r represents the spatial dimensions and d the feature dimensions.
Revised: Given an example x ∈ X , this function yields a r × d feature tensor φ θ ( x ) , where r represents the spatial dimensions and d the feature dimensions.

Original: For X comprising 2d images for instance, the feature is a w × h × d tensor that is the activation of the last convolutional layer, where r = w × h is the spatial resolution.
Revised: For X comprising 2d images for instance, the feature is a w × h × d tensor that is the activation of the last convolutional layer, where r = w × h is the spatial resolution.

Original: The embedding is a vector in R d in the special case r = 1 .
Revised: The embedding is a vector in R d in the special case r = 1 .

Original: The embedding parameters θ may be updated into θ (cid:48) in the adaptation process, in which case we have an embedding function φ θ (cid:48) and classiﬁer f θ (cid:48) ,W .
Revised: The embedding parameters θ may be updated into θ (cid:48) in the adaptation process, in which case we have an embedding function φ θ (cid:48) and classiﬁer f θ (cid:48) ,W .

Original: Again θ, θ (cid:48) may be used interchangeably.
Revised: Again θ, θ (cid:48) may be used interchangeably.

Original: Cosine classiﬁer.
Revised: Cosine classiﬁer.

Original: A simple form of classiﬁer that was introduced in few-shot learning independently by Qi et al.
Revised: A simple form of classiﬁer that was introduced in few-shot learning independently by Qi et al.

Original: and Gidaris & Komodakis (2018) is a parametric linear classiﬁer that consists of a fully-connected layer without bias on top of the embedding function φ θ followed by softmax.
Revised: and Gidaris & Komodakis (2018) is a parametric linear classiﬁer that consists of a fully-connected layer without bias on top of the embedding function φ θ followed by softmax.

Original: If
Revised: If

Original: W :=
Revised: W :=

Original: ( w j ) cj =1 is the collection of class weights with w j ∈ R r × d , the classiﬁer is deﬁned by
Revised: ( w j ) cj =1 is the collection of class weights with w j ∈ R r × d , the classiﬁer is deﬁned by

Original: [Equation]
Revised: [Equation]

Original: for x ∈ X , where σ : R m → R m is the softmax function σ ( u ) :
Revised: for x ∈ X , where σ : R m → R m is the softmax function σ ( u ) :

Original: = ( e u
Revised: = ( e u

Original: [Equation] [Equation]
Revised: [Equation] [Equation]

Original: e uc
Revised: e uc

Original: [Equation]
Revised: [Equation]

Original: for u ∈ R c , τ ∈ R
Revised: for u ∈ R c , τ ∈ R

Original: + is a trainable scale parameter and s is cosine similarity 1 .
Revised: + is a trainable scale parameter and s is cosine similarity 1 .

Original: We minimize the cost function
Revised: We minimize the cost function

Original: [Equation]
Revised: [Equation]

Original: over θ, W at base training, where (cid:96) ( p , y ) :
Revised: over θ, W at base training, where (cid:96) ( p , y ) :

Original: = − log p y for p ∈ R c + , y ∈ C is the cross-entropy loss.
Revised: = − log p y for p ∈ R c + , y ∈ C is the cross-entropy loss.

Original: Prototypes.
Revised: Prototypes.

Original: An alternative classiﬁer that is more appropriate during few-shot adaptation or at testing is a prototype classiﬁer proposed by Snell et al.
Revised: An alternative classiﬁer that is more appropriate during few-shot adaptation or at testing is a prototype classiﬁer proposed by Snell et al.

Original: (2017) and followed by Qi et al.
Revised: (2017) and followed by Qi et al.

Original: and Gidaris &
Revised: and Gidaris &

Original: Komodakis (2018) too.
Revised: Komodakis (2018) too.

Original: If S j :=
Revised: If S j :=

Original: { i ∈ [ n (cid:48) ] : y (cid:48)
Revised: { i ∈ [ n (cid:48) ] : y (cid:48)

Original: i =
Revised: i =

Original: j } denotes the indices of support examples labeled in class j , then the prototype of this class j is given by the average features
Revised: j } denotes the indices of support examples labeled in class j , then the prototype of this class j is given by the average features

Original: [Equation]
Revised: [Equation]

Original: of those examples for j ∈ C (cid:48) .
Revised: of those examples for j ∈ C (cid:48) .

Original: Then, denoting by P :=
Revised: Then, denoting by P :=

Original: ( p j ) c (cid:48)
Revised: ( p j ) c (cid:48)

Original: j =1 the collection of prototypes, a query x ∈ X is classiﬁed as f θ (cid:48) ,P ( x ) , as deﬁned by (2).
Revised: j =1 the collection of prototypes, a query x ∈ X is classiﬁed as f θ (cid:48) ,P ( x ) , as deﬁned by (2).

Original: Dense classiﬁer.
Revised: Dense classiﬁer.

Original: This is a classiﬁer where the loss function applies densely at each spatial location of the feature tensor rather than by global pooling or ﬂattening as implied by (2) .
Revised: This is a classiﬁer where the loss function applies densely at each spatial location of the feature tensor rather than by global pooling or ﬂattening as implied by (2) .

Original: The classiﬁer can be of any form but a cosine classiﬁer (Qi et al., 2018; Gidaris & Komodakis, 2018) is studied by Lifchitz et al.
Revised: The classiﬁer can be of any form but a cosine classiﬁer (Qi et al., 2018; Gidaris & Komodakis, 2018) is studied by Lifchitz et al.

Original: In particular, the embedding φ θ ( x ) is seen as a collection of vectors [ φ ( q ) ( x )] rq =1 , where φ ( q ) ( x ) ∈ R d is an embedding of spatial location q ∈ [ r ] .
Revised: In particular, the embedding φ θ ( x ) is seen as a collection of vectors [ φ ( q ) ( x )] rq =1 , where φ ( q ) ( x ) ∈ R d is an embedding of spatial location q ∈ [ r ] .

Original: The classiﬁer (2) is then generalized to f θ,W : X → R r × c , now mapping an example to a vector of probabilities per location, deﬁned by f θ,W (
Revised: The classiﬁer (2) is then generalized to f θ,W : X → R r × c , now mapping an example to a vector of probabilities per location, deﬁned by f θ,W (

Original: [Equation]
Revised: [Equation]

Original: for x ∈ X , while the class weights W are shared over locations with w j ∈ R d .
Revised: for x ∈ X , while the class weights W are shared over locations with w j ∈ R d .

Original: Cross-entropy applies using the same label
Revised: Cross-entropy applies using the same label

Original: y i for each location of example x i , generalizing the cost function (3) to
Revised: y i for each location of example x i , generalizing the cost function (3) to

Original: [Equation]
Revised: [Equation]

Original: Related work.
Revised: Related work.

Original: Prototypical networks (Snell et al., 2017) use a prototype classiﬁer.
Revised: Prototypical networks (Snell et al., 2017) use a prototype classiﬁer.

Original: At testing, a query is classiﬁed to the nearest prototype, while at adaptation, computing a prototype per class (4) is the only learning to be done.
Revised: At testing, a query is classiﬁed to the nearest prototype, while at adaptation, computing a prototype per class (4) is the only learning to be done.

Original: Base training is based on meta-learning : a number of ﬁctitious tasks called episodes are generated by randomly sampling a number of classes from C and then a number of examples in each class from X with their labels from y .
Revised: Base training is based on meta-learning : a number of ﬁctitious tasks called episodes are generated by randomly sampling a number of classes from C and then a number of examples in each class from X with their labels from y .

Original: These data are assumed to be support examples and queries of novel classes C (cid:48) .
Revised: These data are assumed to be support examples and queries of novel classes C (cid:48) .

Original: Labels are now available for the queries and the objective is that they are classiﬁed correctly.
Revised: Labels are now available for the queries and the objective is that they are classiﬁed correctly.

Original: In imprinting (Qi et al., 2018), a cosine classiﬁer (2) and standard cross-entropy (3) are used instead at base training.
Revised: In imprinting (Qi et al., 2018), a cosine classiﬁer (2) and standard cross-entropy (3) are used instead at base training.

Original: At adaptation, class prototypes
Revised: At adaptation, class prototypes

Original: P are computed (4) and imprinted in the classiﬁer, that is, W is replaced by W (cid:48) :
Revised: P are computed (4) and imprinted in the classiﬁer, that is, W is replaced by W (cid:48) :

Original: = ( W, P ) .
Revised: = ( W, P ) .

Original: The entire embedding function is then ﬁne-tuned based again on (3) to make predictions on n + n (cid:48) base and novel classes, which requires the entire training data ( X, y ) .
Revised: The entire embedding function is then ﬁne-tuned based again on (3) to make predictions on n + n (cid:48) base and novel classes, which requires the entire training data ( X, y ) .

Original: Few-shot learning without forgetting (Gidaris & Komodakis, 2018) uses model similar to imprinting , the main difference being that only the weight parameters W of the base classes are stored and not the entire training data.
Revised: Few-shot learning without forgetting (Gidaris & Komodakis, 2018) uses model similar to imprinting , the main difference being that only the weight parameters W of the base classes are stored and not the entire training data.

Original: At base training, a cosine classiﬁer is trained by (3) followed by episodes.
Revised: At base training, a cosine classiﬁer is trained by (3) followed by episodes.

Original: At adaptation, prototypes are adapted to W by a class attention mechanism.
Revised: At adaptation, prototypes are adapted to W by a class attention mechanism.

Original: Model agnostic meta-learning (MAML)
Revised: Model agnostic meta-learning (MAML)

Original: (Finn et al., 2017) uses a fully-connected layer as classiﬁer.
Revised: (Finn et al., 2017) uses a fully-connected layer as classiﬁer.

Original: At adaptation, the entire embedding function is ﬁne-tuned on each new task using (3) only on the novel class data, but for few steps such that the classiﬁer does not overﬁt.
Revised: At adaptation, the entire embedding function is ﬁne-tuned on each new task using (3) only on the novel class data, but for few steps such that the classiﬁer does not overﬁt.

Original: At base training, episodes are used where the loss function mimics the iterative optimization that normally takes place at adaptation.
Revised: At base training, episodes are used where the loss function mimics the iterative optimization that normally takes place at adaptation.

Original: In implanting (Lifchitz et al., 2019), a prototype classiﬁer is trained in episodes, keeping the base embedding function ﬁxed but attaching a parallel implant stream of convolutional layers that learns features useful for each new task.
Revised: In implanting (Lifchitz et al., 2019), a prototype classiﬁer is trained in episodes, keeping the base embedding function ﬁxed but attaching a parallel implant stream of convolutional layers that learns features useful for each new task.

Original: Contribution.
Revised: Contribution.

Original: The problem we consider is a variant of few-shot learning that has not been studied before.
Revised: The problem we consider is a variant of few-shot learning that has not been studied before.

Original: It involves sequential adaptation of a given network in two stages, each comprising a limited amount of data.
Revised: It involves sequential adaptation of a given network in two stages, each comprising a limited amount of data.

Original: There are many ways of exploiting prior learning to reduce the required amount data and supervision like transfer learning (Bengio et al., 2011; Yosinski et al., 2014), domain adaptation (Ganin & Lempitsky, 2014; Rebufﬁ et al., 2017; Mallya et al., 2018), or incremental learning (Li & Hoiem, 2018; Rebufﬁ et al., 2016; Yoon et al., 2018).
Revised: There are many ways of exploiting prior learning to reduce the required amount data and supervision like transfer learning (Bengio et al., 2011; Yosinski et al., 2014), domain adaptation (Ganin & Lempitsky, 2014; Rebufﬁ et al., 2017; Mallya et al., 2018), or incremental learning (Li & Hoiem, 2018; Rebufﬁ et al., 2016; Yoon et al., 2018).

Original: However, none applies to the few-shot domain where just a handful of examples are given.
Revised: However, none applies to the few-shot domain where just a handful of examples are given.

Original: Attention has been studied as a core component of several few-shot learning and meta-learning approaches (Vinyals et al., 2016;
Revised: Attention has been studied as a core component of several few-shot learning and meta-learning approaches (Vinyals et al., 2016;

Original: Mishra et al., 2018; Ren et al., 2018; Gidaris & Komodakis, 2018), but it always refers to examples ( e.g . images) as a unit.
Revised: Mishra et al., 2018; Ren et al., 2018; Gidaris & Komodakis, 2018), but it always refers to examples ( e.g . images) as a unit.

Original: Spatial attention on the other hand refers to neurons at different spatial locations.
Revised: Spatial attention on the other hand refers to neurons at different spatial locations.

Original: It is ubiquitous in several problems, for instance weakly supervised object detection (Zhou et al., 2016;
Revised: It is ubiquitous in several problems, for instance weakly supervised object detection (Zhou et al., 2016;

Original: Hou et al., 2018; Zhu et al., 2017) and non-local convolution (Hu et al., 2018; Wang et al., 2018; Chen et al., 2018)
Revised: Hou et al., 2018; Zhu et al., 2017) and non-local convolution (Hu et al., 2018; Wang et al., 2018; Chen et al., 2018)

Original: but has not been applied to few-shot learning until recently (Lifchitz et al., 2019; Wertheimer & Hariharan, 2019; Li et al., 2019b).
Revised: but has not been applied to few-shot learning until recently (Lifchitz et al., 2019; Wertheimer & Hariharan, 2019; Li et al., 2019b; Liu et al., 2019).

Original: By breaking up one example ( e.g . image) to several, one at each spatial location, the supervision becomes weak , as in multiple-instance learning (Andrews et al., 2003), typical e.g .
Revised: By breaking up one example ( e.g . image) to several, one at each spatial location, the supervision becomes weak , as in multiple-instance learning (Andrews et al., 2003), typical e.g .

Original: in weakly-supervised image segmentation (Jetley et al., 2018).
Revised: in weakly-supervised image segmentation (Jetley et al., 2018).

Original: Our spatial attention mechanism is extremely simple, based on the pre-trained network, without training on the base or novel class data.
Revised: Our spatial attention mechanism is extremely simple, based on the pre-trained network, without training on the base or novel class data.

Original:  S PATIAL ATTENTION FROM PRE - TRAINING
Revised:  S PATIAL ATTENTION FROM PRE - TRAINING

Original: We assume a pre-trained network with an embedding function φ θ ◦ : X → R r × d followed by global average pooling (GAP) and a classiﬁer that is a fully connected layer with weights W ◦ :=
Revised: We assume a pre-trained network with an embedding function φ θ ◦ : X → R r × d followed by global average pooling (GAP) and a classiﬁer that is a fully connected layer with weights W ◦ :=

Original: ( w ◦ j ) c ◦ j =1 ∈
Revised: ( w ◦ j ) c ◦ j =1 ∈

Original: R d × c ◦ and biases b ◦ ∈ R c ◦ , denoted jointly by U ◦ :
Revised: R d × c ◦ and biases b ◦ ∈ R c ◦ , denoted jointly by U ◦ :

Original: = ( W ◦ , b ◦ ) .
Revised: = ( W ◦ , b ◦ ) .

Original: Without re-training, we remove the last pooling layer and apply the classiﬁer densely as in 1 × 1 convolution, followed by softmax with temperature T .
Revised: Without re-training, we remove the last pooling layer and apply the classiﬁer densely as in 1 × 1 convolution, followed by softmax with temperature T .

Original: Then, similarly to (5), the classiﬁer f θ ◦ ,U ◦ : X → R r × c ◦ maps an example to a vector of probabilities per location, where classiﬁer parameters U ◦ are shared over locations:
Revised: Then, similarly to (5), the classiﬁer f θ ◦ ,U ◦ : X → R r × c ◦ maps an example to a vector of probabilities per location, where classiﬁer parameters U ◦ are shared over locations:

Original: [Equation]
Revised: [Equation]

Original: We now want to apply this classiﬁer to examples in set X (resp.
Revised: We now want to apply this classiﬁer to examples in set X (resp.

Original: X (cid:48) ) of base (resp.
Revised: X (cid:48) ) of base (resp.

Original: novel) classes C (resp.
Revised: novel) classes C (resp.

Original: C (cid:48) )
Revised: C (cid:48) )

Original: in order to provide a spatial attention mechanism to embeddings obtained by parameters θ (resp.
Revised: in order to provide a spatial attention mechanism to embeddings obtained by parameters θ (resp.

Original: θ (cid:48) ).
Revised: θ (cid:48) ).

Original: We formulate the idea on X, C, θ in this section but it applies equally to X (cid:48) , C (cid:48) , θ (cid:48) .
Revised: We formulate the idea on X, C, θ in this section but it applies equally to X (cid:48) , C (cid:48) , θ (cid:48) .

Original: In particular, given an example x ∈ X , we use the vector of probabilities p ( q ) :
Revised: In particular, given an example x ∈ X , we use the vector of probabilities p ( q ) :

Original: = f ( q ) θ ◦ ,U ◦ ( x ) corresponding to spatial location q ∈ [ r ] to compute a scalar weight w ( q ) ( x ) , expressing the discriminative power of the particular location q of example x .
Revised: = f ( q ) θ ◦ ,U ◦ ( x ) corresponding to spatial location q ∈ [ r ] to compute a scalar weight w ( q ) ( x ) , expressing the discriminative power of the particular location q of example x .

Original: Since x belongs to a set of classes C different than C ◦ , there is no ground truth to be applied to the output of the pre-trained classiﬁer
Revised: Since x belongs to a set of classes C different than C ◦ , there is no ground truth to be applied to the output of the pre-trained classiﬁer

Original: f θ ◦ ,U ◦ .
Revised: f θ ◦ ,U ◦ .

Original: However, the distribution p ( q ) can still be used to evaluate how discriminative the input is.
Revised: However, the distribution p ( q ) can still be used to evaluate how discriminative the input is.

Original: We use the entropy function for this purpose, H ( p ) :
Revised: We use the entropy function for this purpose, H ( p ) :

Original: = − (cid:80) j p j log( p j ) .
Revised: = − (cid:80) j p j log( p j ) .

Original: We map the entropy to [0 , 1] , measuring the certainty of the pre-trained classiﬁer in its prediction on the prior classes C ◦ :
Revised: We map the entropy to [0 , 1] , measuring the certainty of the pre-trained classiﬁer in its prediction on the prior classes C ◦ :

Original: [Equation]
Revised: [Equation]

Original: for q ∈ [ r ] , where we ignore dependence on parameters θ ◦ , U ◦ to simplify notation, since they remain ﬁxed.
Revised: for q ∈ [ r ] , where we ignore dependence on parameters θ ◦ , U ◦ to simplify notation, since they remain ﬁxed.

Original: We use this as a weight for location q assuming that uncertainty over a large number of prior classes expresses anything unknown like background, which can apply to a new set of classes.
Revised: We use this as a weight for location q assuming that uncertainty over a large number of prior classes expresses anything unknown like background, which can apply to a new set of classes.

Original: We then (cid:96) 1 -normalize the weights w ( x ) :=
Revised: We then (cid:96) 1 -normalize the weights w ( x ) :=

Original: [ w ( q ) ( x )] rq =1 ∈ R r as ˆ w ( x ) :
Revised: [ w ( q ) ( x )] rq =1 ∈ R r as ˆ w ( x ) :

Original: = w ( x ) / (cid:107) w ( x ) (cid:107) 1 .
Revised: = w ( x ) / (cid:107) w ( x ) (cid:107) 1 .

Original: We call ˆ w ( x ) the spatial attention weights of x .
Revised: We call ˆ w ( x ) the spatial attention weights of x .

Original: The weights are applied in different ways depending on the problem.
Revised: The weights are applied in different ways depending on the problem.

Original: If the embedding φ θ ( x ) is normally a vector in R d obtained by GAP on a feature tensor Φ θ ( x ) ∈ R r × d as 1 r (cid:80) q ∈
Revised: If the embedding φ θ ( x ) is normally a vector in R d obtained by GAP on a feature tensor Φ θ ( x ) ∈ R r × d as 1 r (cid:80) q ∈

Original: [ r ] Φ ( q ) θ ( x ) for x ∈ X , then GAP is replaced by global global weighted average pooling (GwAP):
Revised: [ r ] Φ ( q ) θ ( x ) for x ∈ X , then GAP is replaced by global global weighted average pooling (GwAP):

Original: [Equation]
Revised: [Equation]

Original: for x ∈ X .
Revised: for x ∈ X .

Original: We recall that this applies equally to θ (cid:48) in the case of novel classes.
Revised: We recall that this applies equally to θ (cid:48) in the case of novel classes.

Original: Figure 1 shows examples of images with spatial attention maps.
Revised: Figure 1 shows examples of images with spatial attention maps.

Original: Despite the fact that there has been no training involved for the estimation of attention on the particular datasets, the result can still be useful in suppressing background clutter.
Revised: Despite the fact that there has been no training involved for the estimation of attention on the particular datasets, the result can still be useful in suppressing background clutter.

Original:  S PATIAL ATTENTION IN FEW - SHOT CLASSIFICATION
Revised:  S PATIAL ATTENTION IN FEW - SHOT CLASSIFICATION

Original: Here we discuss the use of attention maps at inference on novel classes, as well as learning on novel classes.
Revised: Here we discuss the use of attention maps at inference on novel classes, as well as learning on novel classes.

Original: In the latter case, the weights are pre-computed for all training examples since the pre-trained network remains ﬁxed in this process.
Revised: In the latter case, the weights are pre-computed for all training examples since the pre-trained network remains ﬁxed in this process.

Original: In summary, we either replace GAP by GwAP (9) in all inputs to the embedding network, or use dense classiﬁcation (5).
Revised: In summary, we either replace GAP by GwAP (9) in all inputs to the embedding network, or use dense classiﬁcation (5).

Original: 4. B ASE CLASS TRAINING
Revised: 4. B ASE CLASS TRAINING

Original: Starting from a pre-trained embedding network φ θ ◦ , we can either solve new tasks on novel classes
Revised: Starting from a pre-trained embedding network φ θ ◦ , we can either solve new tasks on novel classes

Original: C (cid:48) directly, in which case θ = θ ◦ , or perform base class training, ﬁne-tuning θ from θ ◦ .
Revised: C (cid:48) directly, in which case θ = θ ◦ , or perform base class training, ﬁne-tuning θ from θ ◦ .

Original: Adaptation may involve for instance ﬁne-tuning the last layers or the entire network, applying a spatial attention mechanism or not.
Revised: Adaptation may involve for instance ﬁne-tuning the last layers or the entire network, applying a spatial attention mechanism or not.

Original: Recalling that φ θ ◦ is still needed for weight estimation (8), the most practical setting is to ﬁne-tune the last layers, in which case φ θ shares the same backbone network with φ θ ◦ .
Revised: Recalling that φ θ ◦ is still needed for weight estimation (8), the most practical setting is to ﬁne-tune the last layers, in which case φ θ shares the same backbone network with φ θ ◦ .

Original: Following MAML (Finn et al., 2017), we perform few gradient descent steps with low learning rate.
Revised: Following MAML (Finn et al., 2017), we perform few gradient descent steps with low learning rate.

Original: We use a dense classiﬁer f θ,W : X → R r × c (5) with class weights W .
Revised: We use a dense classiﬁer f θ,W : X → R r × c (5) with class weights W .

Original: Given the few base class examples X and labels y , we learn W at the same time as ﬁne-tuning θ by minimizing (6).
Revised: Given the few base class examples X and labels y , we learn W at the same time as ﬁne-tuning θ by minimizing (6).

Original: 4. N OVEL CLASS ADAPTATION
Revised: 4. N OVEL CLASS ADAPTATION

Original: Optionally, given the few novel class support examples X (cid:48) and labels y (cid:48) , we can further adapt the embedding network, while applying our attention mechanism to the loss function.
Revised: Optionally, given the few novel class support examples X (cid:48) and labels y (cid:48) , we can further adapt the embedding network, while applying our attention mechanism to the loss function.

Original: As in section 4.1, φ θ (cid:48) shares the same backbone with φ θ , being derived from it by ﬁne-tuning the last layers.
Revised: As in section 4.1, φ θ (cid:48) shares the same backbone with φ θ , being derived from it by ﬁne-tuning the last layers.

Original: We perform even fewer gradient descent steps with lower learning rate
Revised: We perform even fewer gradient descent steps with lower learning rate

Original: We use a prototypical classiﬁer where vector embeddings φ θ (cid:48)
Revised: We use a prototype classiﬁer where vector embeddings φ θ (cid:48)

Original: ( x (cid:48) ) of support examples x (cid:48) ∈ X (cid:48) are obtained by GwAP with φ θ (cid:48) deﬁned as in (9) and class prototypes P :=
Revised: ( x (cid:48) ) of support examples x (cid:48) ∈ X (cid:48) are obtained by GwAP with φ θ (cid:48) deﬁned as in (9) and class prototypes P :=

Original: ( p j ) c (cid:48)
Revised: ( p j ) c (cid:48)

Original: j =1 are obtained per class by averaging embeddings of support examples as deﬁned by (4) and updated whenever θ (cid:48) is updated.
Revised: j =1 are obtained per class by averaging embeddings of support examples as deﬁned by (4) and updated whenever θ (cid:48) is updated.

Original: The classiﬁer f θ (cid:48) ,P : X → R c (cid:48) is a standard cosine classiﬁer (2) and the loss function is standard cross-entropy J ( X, y ; θ, P ) (3) with embedding φ θ (cid:48) obtained by GwAP (9).
Revised: The classiﬁer f θ (cid:48) ,P : X → R c (cid:48) is a standard cosine classiﬁer (2) and the loss function is standard cross-entropy J ( X, y ; θ, P ) (3) with embedding φ θ (cid:48) obtained by GwAP (9).

Original: Attention weights apply to embeddings of all inputs to the network, each time focusing on most discriminative parts.
Revised: Attention weights apply to embeddings of all inputs to the network, each time focusing on most discriminative parts.

Original: In case of no adaptation to the embedding network, we ﬁx θ (cid:48)
Revised: In case of no adaptation to the embedding network, we ﬁx θ (cid:48)

Original: = θ .
Revised: = θ .

Original: Computing the prototypes
Revised: Computing the prototypes

Original: P (4) is then the only learning to be done and we can proceed to inference directly.
Revised: P (4) is then the only learning to be done and we can proceed to inference directly.

Original: 4. N OVEL CLASS INFERENCE
Revised: 4. N OVEL CLASS INFERENCE

Original: At inference, as in section 4.2, we adopt a prototypical classiﬁer where vector embeddings φ θ (cid:48)
Revised: At inference, as in section 4.2, we adopt a prototype classiﬁer where vector embeddings φ θ (cid:48)

Original: ( x (cid:48) ) of support examples x (cid:48) ∈ X (cid:48) are obtained by GwAP with φ θ (cid:48) deﬁned as in (9) and class prototypes
Revised: ( x (cid:48) ) of support examples x (cid:48) ∈ X (cid:48) are obtained by GwAP with φ θ (cid:48) deﬁned as in (9) and class prototypes

Original: P :=
Revised: P :=

Original: ( p j ) c (cid:48)
Revised: ( p j ) c (cid:48)

Original: j =1 are obtained per class by averaging embeddings of support examples as deﬁned by (4).
Revised: j =1 are obtained per class by averaging embeddings of support examples as deﬁned by (4).

Original: Then, given a query x ∈ X , we similarly obtain a vector embedding φ θ (cid:48)
Revised: Then, given a query x ∈ X , we similarly obtain a vector embedding φ θ (cid:48)

Original: ( x ) by GwAP (9) and predict the class π ( f θ (cid:48) ,P ( x )) of the nearest prototype according to cosine similarity where π is given by (1) and f θ (cid:48) ,P by (2).
Revised: ( x ) by GwAP (9) and predict the class π ( f θ (cid:48) ,P ( x )) of the nearest prototype according to cosine similarity where π is given by (1) and f θ (cid:48) ,P by (2).

Original: We thus focus on discriminative parts of both support and query examples, suppressing background clutter.
Revised: We thus focus on discriminative parts of both support and query examples, suppressing background clutter.

Original:  E XPERIMENTS 5. E XPERIMENTAL SETUP
Revised:  E XPERIMENTS 5. E XPERIMENTAL SETUP

Original: Pretrained Network.
Revised: Pretrained Network.

Original: We assume that we have gathered prior knowledge on unrelated visual tasks.
Revised: We assume that we have gathered prior knowledge on unrelated visual tasks.

Original: This knowledge is modeled by a deep convolutional network, trained on a large-scale dataset.
Revised: This knowledge is modeled by a deep convolutional network, trained on a large-scale dataset.

Original: In our experiments, we choose to use a ResNet-18 (He et al., 2016) pre-trained on the Places365-Standard subset of Places365 (Zhou et al., 2017).
Revised: In our experiments, we choose to use a ResNet-18 (He et al., 2016) pre-trained on the Places365-Standard subset of Places365 (Zhou et al., 2017).

Original: We refer to this subset as Places.
Revised: We refer to this subset as Places.

Original: This subset contains around 1.8 million images across 365 classes.
Revised: This subset contains around 1.8 million images across 365 classes.

Original: The classes are outdoor and indoor scenes.
Revised: The classes are outdoor and indoor scenes.

Original: We select this dataset for its large scale, diversity of content and different nature than other popular datasets like CUB-200-2011 (see below).
Revised: We select this dataset for its large scale, diversity of content and different nature than other popular datasets like CUB-200-2011 (see below).

Original: Images are resampled to 224 × 224 pixels for training.
Revised: Images are resampled to 224 × 224 pixels for training.

Original: We choose
Revised: We choose

Original: ResNet-18 as the architecture of the pre-trained model as it is a powerful network that is also used in other few-shot learning studies (Chen et al., 2019; Dvornik et al., 2015), which helps in comparisons.
Revised: ResNet-18 as the architecture of the pre-trained model as it is a powerful network that is also used in other few-shot learning studies (Chen et al., 2019; Dvornik et al., 2019), which helps in comparisons.

Original: We make no assumption on the pre-training of the network.
Revised: We make no assumption on the pre-training of the network.

Original: We do not access either the pre-training process or the dataset.
Revised: We do not access either the pre-training process or the dataset.

Original: We rather use a publicly available converged model that has been trained with a fully-connected layer as a classiﬁer, as assumed in section 3.
Revised: We rather use a publicly available converged model that has been trained with a fully-connected layer as a classiﬁer, as assumed in section 3.

Original: Datasets.
Revised: Datasets.

Original: We apply our method to two standard datasets in few-shot learning.
Revised: We apply our method to two standard datasets in few-shot learning.

Original: The ﬁrst is CUB-2002011 (Wah et al., 2011), referred to as CUB, originally meant for ﬁne-grained classiﬁcation, and subsequently introduced to few-shot learning by Hilliard et al.
Revised: The ﬁrst is CUB-2002011 (Wah et al., 2011), referred to as CUB, originally meant for ﬁne-grained classiﬁcation, and subsequently introduced to few-shot learning by Hilliard et al.

Original: This dataset contains 11, images of birds across 200 classes corresponding to different species.
Revised: This dataset contains 11, images of birds across 200 classes corresponding to different species.

Original: We use the split proposed by Ye et al.
Revised: We use the split proposed by Ye et al.

Original: (2018), where 100 classes are used as base classes and the remaining 100 as novel, out of which 50 for validation and 50 for testing.
Revised: (2018), where 100 classes are used as base classes and the remaining 100 as novel, out of which 50 for validation and 50 for testing.

Original: CUB images are cropped using bounding box annotations and resampled to 224 × 224.
Revised: CUB images are cropped using bounding box annotations and resampled to 224 × 224.

Original: [Table]
Revised: [Table]

Original: et
Revised: et

Original: ILSVRC12 ( et al
Revised: ILSVRC12 ( et al

Original: Contrary to CUB mini ImageNet has some non-negligible overlap with Places.
Revised: Contrary to CUB mini ImageNet has some non-negligible overlap with Places.

Original: Some classes or even objects appear in both datasets.
Revised: Some classes or even objects appear in both datasets.

Original: To better satisfy our assumption of domain gap we remove the most problematic overlapping classes from mini ImageNet.
Revised: To better satisfy our assumption of domain gap we remove the most problematic overlapping classes from mini ImageNet.

Original: As detailed in Appendix A we remove 3 base classes, 1 validation class and 2 novel classes.
Revised: As detailed in Appendix A we remove 3 base classes, 1 validation class and 2 novel classes.

Original: We refer to this pruned dataset as modiﬁed mini ImageNet .
Revised: We refer to this pruned dataset as modiﬁed mini ImageNet .

Original: For the sake of comparison and because this overlap can happen in practice, we also experiment on the original mini ImageNet, as reported in Appendix B.
Revised: For the sake of comparison and because this overlap can happen in practice, we also experiment on the original mini ImageNet, as reported in Appendix B.

Original: Evaluation protocol.
Revised: Evaluation protocol.

Original: To adapt to our few-shot version of few-shot learning, we randomly keep only k images per base class.
Revised: To adapt to our few-shot version of few-shot learning, we randomly keep only k images per base class.

Original: We experiment with k ∈ { 0 , 1 , 5 } and k ∈ { 0 , 20 , 50 } respectively for the
Revised: We experiment with k ∈ { 0 , 1 , 5 } and k ∈ { 0 , 20 , 50 } respectively for the

Original: CUB and mini ImageNet.
Revised: CUB and mini ImageNet.

Original: For novel classes, we use the standard setting k (cid:48) ∈ { 1 , 5 } .
Revised: For novel classes, we use the standard setting k (cid:48) ∈ { 1 , 5 } .

Original: We generate a few-shot task on novel classes by selecting a support set X (cid:48) .
Revised: We generate a few-shot task on novel classes by selecting a support set X (cid:48) .

Original: In particular, we sample c (cid:48) classes from the validation or test set and from each class we sample k (cid:48) images.
Revised: In particular, we sample c (cid:48) classes from the validation or test set and from each class we sample k (cid:48) images.

Original: In all experiments, c (cid:48)
Revised: In all experiments, c (cid:48)

Original: = 5 , i.e .
Revised: = 5 , i.e .

Original: 5 -way classiﬁcation.
Revised: 5 -way classiﬁcation.

Original: For each task we additionally sample 30 novel class images per class, to use as queries for evaluation.
Revised: For each task we additionally sample 30 novel class images per class, to use as queries for evaluation.

Original: We report average accuracy and 95% conﬁdence interval over 5,000 tasks for each experiment.
Revised: We report average accuracy and 95% conﬁdence interval over 5,000 tasks for each experiment.

Original: The base class training set X contains k examples per class for each base class in
Revised: The base class training set X contains k examples per class for each base class in

Original: C .
Revised: C .

Original: Each experiment can be seen as a few-shot classiﬁcation task on few base class examples.
Revised: Each experiment can be seen as a few-shot classiﬁcation task on few base class examples.

Original: Baselines.
Revised: Baselines.

Original: We evaluate experiments with the network being either pre-trained on Places or randomly initialized.
Revised: We evaluate experiments with the network being either pre-trained on Places or randomly initialized.

Original: In both cases, we report measurements for different number k of examples per base class, as well as all examples in X .
Revised: In both cases, we report measurements for different number k of examples per base class, as well as all examples in X .

Original: In the latter case (randomly initialized), we do not use the option k
Revised: In the latter case (randomly initialized), we do not use the option k

Original: =because then there would be no reasonable representation to adapt or to perform inference on, given a few-shot task on novel classes.
Revised: =because then there would be no reasonable representation to adapt or to perform inference on, given a few-shot task on novel classes.

Original: In all cases, we compare to the baselines of using no adaptation and no spatial attention.
Revised: In all cases, we compare to the baselines of using no adaptation and no spatial attention.

Original: When learning from scratch, spatial attention is not applied as we do not have access to the pre-trained classiﬁer.
Revised: When learning from scratch, spatial attention is not applied as we do not have access to the pre-trained classiﬁer.

Original: In the case of random initialization, and using all examples in X , we compare to Baseline++ (Chen et al., 2019) and prototypical networks (Snell et al., 2017), as reported in the benchmark by ChenChen et al.
Revised: In the case of random initialization, and using all examples in X , we compare to Baseline++ (Chen et al., 2019) and prototypical networks (Snell et al., 2017), as reported in the benchmark by Chen et al.

Original: (2019), as well as category traversal (CTM) (Li et al., 2019a) and ensembles (Dvornik et al., 2015), all using ResNet-18.
Revised: (2019), as well as category traversal (CTM) (Li et al., 2019a) and ensembles (Dvornik et al., 2019), all using ResNet-18.

Original: They can only be compared to our randomly initialized baseline when using base training on all data.
Revised: They can only be compared to our randomly initialized baseline when using base training on all data.

Original: Implementation details.
Revised: Implementation details.

Original: At base training, we use stochastic gradient descent with Nesterov momentum with mini-batches of size 200.
Revised: At base training, we use stochastic gradient descent with Nesterov momentum with mini-batches of size 200.

Original: At adaptation, we perform a maximum of 60 iterations over the support examples using Adam optimizer with ﬁxed learning rate.
Revised: At adaptation, we perform a maximum of 60 iterations over the support examples using Adam optimizer with ﬁxed learning rate.

Original: In both cases, the learning rate,
Revised: In both cases, the learning rate,

Original: [Table]
Revised: [Table]

Original: either pre-trained on Places or we train it from scratch on k base class examples.
Revised: either pre-trained on Places or we train it from scratch on k base class examples.

Original: Baselines only shown in Appendix B on the original mini ImageNet.
Revised: Baselines only shown in Appendix B on the original mini ImageNet.

Original: schedule if any and number of iterations are determined on the validation set.
Revised: schedule if any and number of iterations are determined on the validation set.

Original: The temperature used by (7) for the computation of the entropy is ﬁxed per dataset, again on the validation set.
Revised: The temperature used by (7) for the computation of the entropy is ﬁxed per dataset, again on the validation set.

Original: In particular, we use T = 100 and T = 2 . 6 respectively for CUB and modiﬁed mini ImageNet.
Revised: In particular, we use T = 100 and T = 2 . 6 respectively for CUB and modiﬁed mini ImageNet.

Original: 5. R ESULTS
Revised: 5. R ESULTS

Original: We present results in Tables 1 and 2 respectively for CUB and modiﬁed mini ImageNet.
Revised: We present results in Tables 1 and 2 respectively for CUB and modiﬁed mini ImageNet.

Original: Effect of base training.
Revised: Effect of base training.

Original: For ﬁne-grained few-shot classiﬁcation (CUB), base training is extremely important in adapting to the new domain, improving the baseline 1-shot accuracy by more than 40% with no adaptation and no spatial attention.
Revised: For ﬁne-grained few-shot classiﬁcation (CUB), base training is extremely important in adapting to the new domain, improving the baseline 1-shot accuracy by more than 40% with no adaptation and no spatial attention.

Original: On object classiﬁcation in general (modiﬁed mini ImageNet), it is less important, improving by 4.5%.
Revised: On object classiﬁcation in general (modiﬁed mini ImageNet), it is less important, improving by 4.5%.

Original: It is the ﬁrst time that experiments are conducted on just a small subset of the base class training set.
Revised: It is the ﬁrst time that experiments are conducted on just a small subset of the base class training set.

Original: It is interesting that 50 examples per class are bringing nearly the same improvement as all examples, i.e . hundreds per class.
Revised: It is interesting that 50 examples per class are bringing nearly the same improvement as all examples, i.e . hundreds per class.

Original: Effect of (novel class) adaptation.
Revised: Effect of (novel class) adaptation.

Original: Fine-tuning the network on k (cid:48) novel class examples per class, even fewer than k in the case of base classes, comes with the risk of over-ﬁtting.
Revised: Fine-tuning the network on k (cid:48) novel class examples per class, even fewer than k in the case of base classes, comes with the risk of over-ﬁtting.

Original: We still show that a small further improvement is possible with a small learning rate.
Revised: We still show that a small further improvement is possible with a small learning rate.

Original: The improvement is more signiﬁcant when k is low, when more adaptation of the embedding network to the novel class domain is needed.
Revised: The improvement is more signiﬁcant when k is low, in which case, more adaptation of the embedding network to the novel class domain is needed.

Original: In the extreme case of CUB dataset without base training, adaptation only on  the 25 images of the 5-way 5-shot tasks brings an improvement of 8.20%.
Revised: In the extreme case of CUB dataset without base training, adaptating on only the 25 images of the 5-way 5-shot tasks brings an improvement of 8.20%.

Original: Effect of spatial attention.
Revised: Effect of spatial attention.

Original: Spatial attention allows focusing on the most discriminative parts of the input, which is more beneﬁcial when fewer examples are available.
Revised: Spatial attention allows focusing on the most discriminative parts of the input, which is more beneﬁcial when fewer examples are available.

Original: The extreme case is  no base class images and only one image per novel class.
Revised: The extreme case is having no base class images and only one image per novel class.

Original: In this case, most improvement comes on modiﬁed mini ImageNet without base training, where spatial attention improves 5-way 5-shot classiﬁcation accuracy by 1.5% after adaptation.
Revised: In this case, most improvement comes on modiﬁed mini ImageNet without base training, where spatial attention improves 5-way 5-shot classiﬁcation accuracy by 1.5% after adaptation.

Original: The attention maps appear to be domain independent as they improve CUB accuracy even when no images from the bird domain have been seen ( k = 0 ).
Revised: The attention maps appear to be domain independent as they improve CUB accuracy even when no images from the bird domain have been seen ( k = 0 ).

Original:  C ONCLUSION
Revised:  C ONCLUSION

Original: In this paper we address the problem of few-shot learning when even base classes  are limited in number.
Revised: In this paper we address the problem of few-shot learning when even base classes images are limited in number.

Original: To address it, we use a pre-trained network on a large-scale dataset and a very simple spatial attention mechanism that does not require any training on the base or novel classes.
Revised: To address it, we use a pre-trained network on a large-scale dataset and a very simple spatial attention mechanism that does not require any training on the base or novel classes.

Original: We consider two few-shot learning datasets: CUB and mini ImageNet, with different domain gaps to our prior dataset Places.
Revised: We consider two few-shot learning datasets: CUB and mini ImageNet, with different domain gaps to our prior dataset Places.

Original: Our ﬁndings indicate that even when the domain gap is large between the dataset used for pre-training and the base/novel class domain, it is still possible to get signiﬁcant beneﬁt from base class training even with a few examples, which is very important as it reduces the need for supervision.
Revised: Our ﬁndings indicate that even when the domain gap is large between the dataset used for pre-training and the base/novel class domains, it is still possible to get signiﬁcant beneﬁt from base class training even with a few examples, which is very important as it reduces the need for supervision.

Original: The gain from spatial attention is more pronounced in this case.
Revised: The gain from spatial attention is more pronounced in this case.

Original: A D ETAILS ON REMOVING DATASET OVERLAPS
Revised: A D ETAILS ON REMOVING DATASET OVERLAPS

Original: We study the overlap between Places and mini ImageNet by measuring, for each mini ImageNet class, what is the most frequent prediction among Places classes by the pre-trained Resnet-18 classiﬁer and what proportion of examples are classiﬁed in this class.
Revised: We study the overlap between Places and mini ImageNet by measuring, for each mini ImageNet class, what is the most frequent prediction among Places classes by the pre-trained Resnet-18 classiﬁer and what proportion of examples are classiﬁed in this class.

Original: Ranking mini ImageNet classes by that proportion, we check class names on both datasets and manually inspect examples in the top-ranking classes.
Revised: Ranking mini ImageNet classes by that proportion, we check class names on both datasets and manually inspect examples in the top-ranking classes.

Original: We chose to remove only the most clearly overlapping classes, that is, identical classes and classes of objects contained in images of a Places class.
Revised: We chose to remove only the most clearly overlapping classes, that is, identical classes and classes of objects contained in images of a Places class.

Original: For instance, most images from the bus station - indoor class of Places contain a bus, so we chose to remove the school bus class from mini ImageNet.
Revised: For instance, most images from the bus station - indoor class of Places contain a bus, so we chose to remove the school bus class from mini ImageNet.

Original: Table A lists the classes removed from mini ImageNet in this way.
Revised: Table A lists the classes removed from mini ImageNet in this way.

Original: [Figure]
Revised: [Figure]

Original: [Table]
Revised: [Table]

Original: [Figure]
Revised: [Figure]

Original: [Table]
Revised: [Table]

Original: [Figure]
Revised: [Figure]

Original: [Table]
Revised: [Table]

Original: [Figure]
Revised: [Figure]

Original: [Table]
Revised: [Table]

Original: B O RIGINAL mini I MAGE N ET RESULTS
Revised: B O RIGINAL mini I MAGE N ET RESULTS

Original: We also run our experiments on the original mini ImageNet dataset which partially overlaps our pre-training dataset Places.
Revised: We also run our experiments on the original mini ImageNet dataset which partially overlaps our pre-training dataset Places.

Original: We use T = 2 .
Revised: We use T = 2 .

Original: 4 for the temperature in (7).
Revised: 4 for the temperature in (7).

Original: The remaining setup as for modiﬁed mini ImageNet.
Revised: The remaining setup as for modiﬁed mini ImageNet.

Original: Results are shown in Table 4.
Revised: Results are shown in Table 4.

Original: [Table]
Revised: [Table]

Original: Li et al.
Revised: Li et al.

Original: (2019a).
Revised: (2019a).

Original: For ensemble (Dvornik et al., 2015), we use the distilled model from an ensemble of 20.
Revised: For ensemble (Dvornik et al., 2019), we use the distilled model from an ensemble of 20.

Original: Baselines to be compared only to randomly initialized with k
Revised: Baselines to be compared only to randomly initialized with k

Original: = ALL .
Revised: = ALL .

Original: Compared to the results of modiﬁed mini ImageNet (Table 2), performances are nearly uniformly increased by 3-4% and conclusions remain the same.
Revised: Compared to the results of modiﬁed mini ImageNet (Table 2), performances are nearly uniformly increased by 3-4% and conclusions remain the same.

Original: The increase in performance is due to having more training data, as well asremoving putting back easily classiﬁed classes in the test dataset.
Revised: The increase in performance is due to having more training data, as well as putting back easily classiﬁed classes in the test dataset.

Original: Observe that, unlike CUB ( cf .
Revised: Observe that, unlike CUB ( cf .

Original: Table 1), CTM (Li et al., 2019a) and ensembles (Dvornik et al., 2015) perform better than our randomly initialized baseline .
Revised: Table 1), CTM (Li et al., 2019a) and ensembles (Dvornik et al., 2019) perform better than our randomly initialized baseline .

Original: Our objective is not to improve the state of the art of the standard few-shot setup , but rather to study the new problem using a network pre-trained on a large-scale dataset.
Revised: Our objective is not to improve the state of the art of the standard few-shot setup , but rather to study the new problem using a network pre-trained on a large-scale dataset.

Original: In this respect, our simple baseline better facilitates future research.
Revised: In this respect, our simple baseline better facilitates future research.