Year: 2021

Abstract:
Semantic concepts are frequently defined by combinations of underlying attributes. As mappings from attributes to classes are often simple, attribute-based representations facilitate novel concept learning with zero or few examples. A significant limitation of existing attribute-based learning paradigms, such as zeroshot learning, is that the attributes are assumed to be known and fixed. In this work we study the rapid learning of attributes that were not previously labeled. Compared to standard few-shot learning of semantic classes, in which novel classes may be defined by attributes that were relevant at training time, learning new attributes imposes a stiffer challenge. We found that supervised learning with training attributes does not generalize well to new test attributes, whereas selfsupervised pre-training brings significant improvement. We further experimented with random splits of the attribute space and found that predictability of test attributes provides an informative estimate of a model’s generalization ability.

text: Semantic concepts are frequently defined by combinations of underlying attributes. As mappings from attributes to classes are often simple, attribute-based representations facilitate novel concept learning with zero or few examples. A significant limitation of existing attribute-based learning paradigms, such as zeroshot learning, is that the attributes are assumed to be known and fixed. In this work we study the rapid learning of attributes that were not previously labeled. Compared to standard few-shot learning of semantic classes, in which novel classes may be defined by attributes that were relevant at training time, learning new attributes imposes a stiffer challenge. We found that supervised learning with training attributes does not generalize well to new test attributes, whereas selfsupervised pre-training brings significant improvement. We further experimented with random splits of the attribute space and found that predictability of test attributes provides an informative estimate of a model’s generalization ability.

heading: 1 INTRODUCTION
text: Formation of class concepts is one of the most fundamental processes in machine perception. Although class concepts are often defined based on their attribute information, e.g., birds are warmblooded vertebrates that lay eggs and have feathers, attributes are rarely considered in a typical machine perception system that directly maps from input signals to output classes. Humans also leverage similarity in the attribute space to recognize classes, which are “information-rich bundles of attributes that form natural discontinuities” (Rosch & Mervis, 1975). The acquisition of attribute knowledge therefore helps us build a more compact and efficient representation that is useful for the perception of classes.
Another distinct advantage of using attribute information is that it facilitates learning new classes with few or even zero examples, which has been leveraged in studies of zero-shot learning (ZSL) (Palatucci et al., 2009; Lampert et al., 2014; Misra et al., 2017). Other models use attributes as direct outputs before the classes for improved modularity and interpretability (Farhadi et al., 2009; Koh et al., 2020). However, all of these attribute-based models rely on a pre-defined set of attributes, that are shared among all classes. Consider a learning agent deployed in the wild. Although the agent may learn new classes by composing some of the existing attributes, its learning capability would be greatly improved if it can expand its attribute vocabulary.
Motivated by this learning scenario, we are interested in the problem of learning new attributes that are previously not labeled in the dataset. This is a step towards continual learning (Van de Ven & Tolias, 2019), where the reward function evolves and the system must adapt if the reward becomes dependent on previously irrelevant input attributes. In particular, we focus on a few-shot learning (FSL) setup (Lake et al., 2011; Vinyals et al., 2016), where only a few positive and negative examples of the target attributes are available, to model the rapid adaptation task.
Considering few-shot attribute learning has an extra benefit, in that it can provide manipulable factors to study generalization. In standard few-shot learning, object semantic classes are split into training and test; however, there is still a lack of understanding of when models transfer their knowledge from training classes to test ones. Since semantic classes can often be defined with a set of attributes, a split in the attribute space therefore provides us a finer control on the degree to which training classes are related to test ones. By studying the transfer performance on novel attributes, we expect our work can generate insight into the generalization performance on semantic classes in standard few-shot learning.
To study this challenging task of few-shot attribute learning (FSAL), we contribute new benchmark datasets consisting of images of faces (Celeb-A) (Liu et al., 2015), shoes (Zappos50K) (Yu & Grauman, 2014), and general objects (ImageNet-with-Attributes) (Deng et al., 2009). Unlike in standard few-shot learning where supervised pre-training generally helps learning, surprisingly we found that directly supervising the model with a set of training attributes does not generalize well on the test attributes, whereas self-supervised pre-training brings significant improvement. We further ran experiments with random splits of the attribute space and discovered that the predictability of attributes provides an informative estimate of a model’s ability to generalize. The few-shot attribute learning paradigm proposed in this paper will facilitate more efficient and flexible continual learning and shed a light on the practical understanding on generalization of novel concepts.

heading: 2 FEW-SHOT ATTRIBUTE LEARNING
text: In this section, we define our few-shot attribute learning (FSAL) paradigm and highlight the additional challenges of FSAL compared to the standard few-shot learning of semantic classes.
Similar to standard few-shot learning, at test time, the learner is presented with an episode of data. The support set consists of N positive and negative examples of the target attributes
S = {(xS+1 , 1), . . . , (x S+ N , 1), (x S− 1 , 0), . . . , (x S− N , 0)}, (1)
where the + or − superscript suffix denotes whether the input is a positive or negative example. After rapid learning on the support set, the model is then evaluated on the binary classification performance of the query set:
Q = {(xQ+1 , 1), . . . , (x Q+ M , 1), (x Q− 1 , 0), . . . , (x Q− M , 0)}. (2)
At test time, the target binary label may concern a novel attribute that was previously unlabeled in the training set. For example, in one test episode, a smiling face with eyeglasses is positively labeled alongside other faces with eyeglasses. The task here is to learn the attribute of “wearing eyeglasses”. However, while the learner might have seen training images with eyeglasses, it was never a relevant feature for the purpose of predicting the positively labeled instances.
Furthermore, suppose that in another test episode, the same smiling face is positively labeled alongside other smiling faces. The target attribute here has now changed from “wearing eyeglasses” to “smiling.” This highlights a critical difference between few-shot attribute learning and standard few-shot learning of semantic classes: in standard FSL, each instance can belong to only one class regardless of the episode. In FSAL, due to the multi-label nature of the attribute space, one instance could have different labels depending on the context of the support set examples. Furthermore, there may be a large amount of ambiguity when the support set is small. Figure 1 shows a few examples of our attribute learning episodes. Note that in order to create task diversity, we allow both unary and binary attributes, where binary attributes are conjunctions of two unary attributes.
In order to solve the FSAL task, the learner must correctly determine the context. Just like in zero-shot learning, one natural way to solve this problem would be to learn to predict the underlying attributes of each image. Given the attributes, you could then estimate the context in each episode (Lampert et al., 2014). However, methods that accurately predict attributes relevant to training episodes may not generalize well, since at test time FSAL introduces novel attributes. Instead, we explore methods that allow more general representations to be learned.

heading: 3 METHODOLOGY
text: In this section, we present our proposed approach to tackle the problem of few-shot attribute learning. Two classes of approaches are frequently considered in standard few-shot learning. First,
episodic approaches train methods directly from a set of few-shot episodes. This class of methods can be naturally applied to our learning setting. Second, pre-training approaches train a network to directly classify a set of training classes, and at test time, the embedding network is transferred to solve the test task by training another classifier on top. If absolute attribute IDs are provided to the learner, then one natural approach is to instead train an attribute classifier. After the attribute classifier network is learned, we can then transfer the representations to recognize test attributes.
We explored both of these approaches in our experiments, but we found that they tend to learn good representations only for the training attributes but not for test ones. To address the generalization issues of these standard approaches, we propose a new algorithm that preserves more general features.
Our proposed method follows the pre-training paradigm and contains three stages. The first stage is pre-training the representation network using an unsupervised (contrastive) learning objective. The second stage is fine-tuning using supervision based either on attribute or episode information. Lastly, we learn a sparse linear classifier at test-time to solve a new episode. We describe each stage of learning below.

heading: 3.1 STAGE I: UNSUPERVISED REPRESENTATION PRE-TRAINING
text: Our proposed few-shot attribute learning tasks require a strongly generalizable learner. We hypothesized that learning general-purpose features that capture varying aspects of objects would be helpful to enable this desired capability. We therefore considered unsupervised representation learning, and we hypothesize that it can learn general semantic features. We chose SimCLR (Chen et al., 2020) as a representative from this category due to its empirical success. In general, contrastive learning approaches aim to build invariant representations between a pair of inputs {x,x′} that are produced by applying random data augmentations (e.g. cropping) to an input image. It is likely to preserve more general semantic features since all image attributes are useful towards identifying another random crop of the same image.
We first obtain the embedding output h from the CNN, and then following SimCLR, we project h to z using a multi-layered perceptron (MLP): h = CNN(x), z = MLP1(h). With a batch of image pairs denoted by {xi}, {x′i}, we can obtain their features {zi}, {z′i}, and the contrastive loss function is defined similar to the cross entropy function:
L1 = − ∑ i log exp(zi · z′i/τ)∑ j exp(zi · z′j/τ) , (3)
where τ is an extra temperature hyperparameter.

heading: 3.2 STAGE II: REPRESENTATION FINE-TUNING
text: In the second stage, we aim to utilize some labels from the training set to supervise the network. We consider using two different modes of supervision: 1) the FSAL binary episodic labels, or 2) the underlying binary attribute IDs. To prevent overwriting the representations and making them overly sensitive to training attributes, we add another projection MLP that learns more specific representations for finetuning on training attributes: g = MLP2(h). The fine-tuning objectives we consider are as follows.
• Unsupervised-then-FineTune-on-Episodes (UFTE). We adopt the Prototypical Networks (Snell et al., 2017) formulation, where the network solves a learning episode of N positive and negative support examples by using prototypes p: p+ = 1N ∑ i g + i ;p − = 1N ∑ i g − i . With query example
gq , we can make a binary prediction:
ŷq = exp(−d(gq,p+))
exp(−d(gq,p+)) + exp(−d(gq,p−)) , (4)
where d is some dissimilarity score, e.g. Euclidean distance or cosine dissimilarity, and the training objective is to minimize the classification loss between the prediction ŷq and the label yq:
L2E = ∑ j −yj log ŷqj − (1− y q j ) log(1− ŷ q j ), (5)
where j is the index of query examples.
• Unsupervised-then-FineTune-on-Attributes (UFTA). With persistent attribute information, we can train a linear classifier with sigmoid activation to directly predict the absolute attribute labels a: â =WAg + bA, with the loss being
L2A = ∑ k −ak log âk − (1− ak) log(1− âk), (6)
where k is the index of attributes.

heading: 3.3 STAGE III: FEW-SHOT LEARNING
text: Once representations are learned, it remains to be decided how to use the small support set of each given test episode in order to make predictions for the associated query set. We consider three alternative approaches. MatchingNet (Vinyals et al., 2016) uses a nearest neighbor (NN) classifier, whereas ProtoNet (Snell et al., 2017) uses the nearest centroid (NC). Following Chen et al. (2019), we propose to directly learn a logistic regression (LR) on top of the representation. This approach learns a weight coefficient for each feature dimension, thus performing some level of feature selection, unlike the NC or NN variants. Still, the weights need to be properly regularized to encourage high-fidelity selection. This is important since each episode only focuses on a new classification criteria using a subset of features. For this, we apply an L1 regularizer on the weights to encourage sparsity. In this way, the learning of a classifier is essentially done at the same time as the selection of feature dimensions. The overall objective of the classifier is:
argmin w,b
−y log(ŷ)− (1− y) log(1− ŷ) + λ‖w‖1, (7)
where ŷ = σ(w>h+ b), and h is the representation vector extracted from the CNN backbone. Note that in this stage we discard the projection MLPs that are defined in previous stages since they are trained towards training attributes and we found that they do not transfer well to novel attributes.

heading: 4 RELATED WORK
text: Few-shot learning: Few-shot learning (FSL) (Fei-Fei et al., 2006; Lake et al., 2011; Vinyals et al., 2016) entails learning new tasks with only a few examples. With an abundance of training data, FSL is closely related to the general meta-learning or learning to learn paradigm (Thrun, 1998), as a few-shot learning algorithm can be developed on training tasks and run on novel tasks at test time. In standard few-shot classification, each image only has a single unambiguous class label, whereas in our few-shot attribute learning, the target attributes can vary depending on how the support set is presented. We show in this paper that this is a more challenging problem as it requires the model to be more flexible and generalizable. In early benchmarks, a set of semantic classes was randomly split into a training and test set. We hypothesize that this often leads to a common set of attributes that span (most of) the training and test classes, thus causing high transferability between these two sets, which allows simple solutions based on feature re-use (Chen et al., 2019; Raghu et al., 2020) to work well. Later benchmarks explicitly attempt to vary the separation between train and test classes, based on varying the distances in the underlying WordNet classes (tiered-ImageNet (Ren et al., 2018)), or in different image domains (Meta-Dataset (Triantafillou et al., 2020)). However, we argue that reasoning about the underlying attributes directly offers a more systematic framework to measure the relatedness and transferability between the train and test set. We expect our analysis to open the door to such studies in the future. Few-shot attribute learning is also related to multilabel few-shot learning (Alfassy et al., 2019; Li et al., 2021). These prior works emphasize on the compositional aspect, whereas we propose models that address the transferability of the learned representations. Additionally, Xiang et al. (2019) explored combining incremental few-shot learning and attribute learning for pedestrian images.
Attribute learning: In the past, there have been a number of works that aim to predict attribute information from raw inputs Ferrari & Zisserman (2007); Farhadi et al. (2009; 2010); Wang &
Mori (2010). A related model is later proposed by Koh et al. (2020) to achieve better causal interpretability. There have also been a number of datasets that have been collected with visual attributes annotated (Liu et al., 2015; Yu & Grauman, 2014; Welinder et al., 2010; Patterson & Hays, 2016; Pham et al., 2021). One key difference between our work and these attribute learning approaches is that at test time we aim to learn a classifier on novel attributes that are previously not labeled in the training set, and this brings additional challenges of transfer learning and learning with limited labeled data.
Zero-shot learning: In zero-shot learning (ZSL) (Farhadi et al., 2009; Akata et al., 2013; Xian et al., 2019; Lampert et al., 2014; Romera-Paredes & Torr, 2015; Akata et al., 2015), a model is asked to recognize classes not present in the training set, supervised only by some auxiliary description (Ba et al., 2015) or attribute values (Farhadi et al., 2009) (see Wang et al. (2019a) for a survey). Lampert et al. (2014) studied the direct attribute prediction method, similar to the Supervised Attribute baseline described in Section 5.2. Compositional ZSL aims at learning classes (Misra et al., 2017; Purushwalkam et al., 2019; Wang et al., 2019b; Yang et al., 2020) defined by a novel composition of labeled attributes and object classes. An important distinction between ZSL and our few-shot attribute learning task is that ZSL uses the same set of attributes for both training and testing; by contrast, our task asks the model to learn attributes for which there are no labels during training, and they may not be relevant to any of the training attributes or episodes. We summarize the relationships between ZSL, FSL and our task in Table 1.
Generalization to novel tasks: One key component of our work is an attempt to understand the generalization behavior of learning novel concepts at test time. Relevant theoretical studies consider novel task generalization, casting it in a transfer learning and learning to learn framework (Baxter, 2000; Ben-David & Borbely, 2008; Ben-David et al., 2010; Pentina & Lampert, 2014; Amit & Meir, 2018; Lucas et al., 2021). A common theme in these studies is in characterizing task relatedness, and the role that it plays in generalization to novel tasks. Arnold & Sha (2021) studied task clustering for few-shot learning in the embedding space and found class splits that are of different difficulty levels. Sariyildiz et al. (2021) use the WordNet hierarchy to compute semantic distances. In our paper, we instead split the data in the attribute space, and if we assume that semantic classes are combinations of attributes, then a disjoint attribute split will imply further semantic distances. In our work, we investigate the role of task relatedness empirically by investigating generalization performance under different splits of the attribute space.

heading: 5 EXPERIMENTS
text: In this section, we evaluate our proposed UFTE and UFTA approaches on several FSAL tasks.

heading: 5.1 DATASETS
text: We consider the following three datasets: • Celeb-A (Liu et al., 2015) contains over 200K images of celebrities’ faces. Each image is anno-
tated with binary attributes, detailing hair color, facial expressions, and other descriptors. We split 14 attributes for training and 13 for test.
• Zappos-50K (Yu & Grauman, 2014) contains just under 50K images of shoes annotated with attribute values. We split these into 40 attribute values for training, and 39 for testing. • ImageNet-with-Attributes is a small subset of the ImageNet dataset (Deng et al., 2009) with attribute annotations. It has 9.6K images. We used 11 attributes for training and 10 for testing.
In all of the datasets above, there is no overlap between training and test attributes. Additional split details can be found in the supplementary materials.
Episode construction: For each episode, we randomly select one or two attributes and look for positive examples belonging to these attributes simultaneously. We also sample an equal number of negative examples that don’t match the selected attributes. This will construct a support set of positive and negative samples, and then we repeat the same process for the corresponding query set as well. Sample episodes are shown in Figure 1.

heading: 5.2 METHODS FOR COMPARISON
text: We first consider a set of classic few-shot learning methods for comparison. These methods are directly trained on FSAL episodes of training attributes.
• MatchingNet (Vinyals et al., 2016) is a soft version of 1-nearest-neighbor. At test time, it will retrieve the label of the support example that is the closest in the feature space. • MAML (Finn et al., 2017) performs several gradient descent steps in an episode and learns the parameter initialization. For simplicity, we used the ANIL variant (Raghu et al., 2020) that only learns the last layer in the inner loop. • ProtoNet (Snell et al., 2017) computes an average “prototype” for each class and retrieves the closest one. • TAFENet (Wang et al., 2019c) learns a meta-network that can output task-conditioned classifier parameters. • TADAM (Oreshkin et al., 2018) predicts the batch normalization parameters by using the average features of the episode. For our task we found that conditioning on the positive examples only works the best.
In addition to the approaches above, we consider the following representation learning baselines for comparison.
• ID trains a network to perform the auxiliary task of face identity classification (Celeb-A only). • SA, or supervised attribute, resembles the “Baseline” approach in the FSL literature (Chen et al.,
2019). The network learns representations by predicting the training attributes associated with each image. • U denotes unsupervised representation learning (SimCLR). We train separate models on the Celeb-A and Zappos datasets. For ImageNet, we utilize the off-the-shelf model checkpoint trained on the full ImageNet-1K. Compared to our approach, this baseline skips the finetuning stage (Stage II).
We also provide two oracle approaches to study the upper bound to generalization to novel attributes.
• Oracle SA* learns its representations by predicting all binary attributes including both training and test ones.
• Oracle GT directly uses the ground-truth binary attribute values as input features, and the readout is performed by training a logistic regression. It still needs to select the active attributes that are used in each episode.
For representation learning baselines, we mainly use logistic regression (LR) in few-shot episodes, but we also report results using the nearest neighbor (NN) and nearest centroid (NC) classifiers.
Implementation details: For Celeb-A and Zappos, images were cropped and resized to 84×84. We used ResNet-12 (He et al., 2016; Oreshkin et al., 2018) as the CNN backbone. The projection MLPs have 512-512-128 units. We train SimCLR entirely on Celeb-A/Zappos images, i.e. not using pre-trained ImageNet checkpoints for fair comparison. For ImageNet-with-Attributes, we utilize the off-the-self SimCLR model from ImageNet-1k, which has access to more unlabeled images. The image dimensions are 224×224. We include additional experimental details in the Appendix.

heading: 5.3 MAIN RESULTS
text: Table 2 shows our main results on Celeb-A and Zappos-50K with 5- and 20-shot episodes. Table 3 explores different combinations of representations and few-shot learners. Overall, the standard episodic meta-learners performed relatively poorly. Also, supervised attribute (SA) learning and learning via the auxiliary task of class facial identification (ID) were not helpful for representation learning either. Interestingly, U attained relatively better test performance, suggesting that the training objective in contrastive learning indeed preserves more general features—not just for semantic classification tasks as shown in prior work, but also for the flexibly-defined attribute classes in our FSAL paradigm.
Our proposed UFTA and UFTE approaches obtained significant gains in performance, suggesting that a combination of unsupervised features with some supervised information is indeed beneficial for this task. Lastly, our methods are able to reduce the generalization gap between SA and the oracle SA*, in fact almost closing it entirely on Zappos-50K.
Results on ImageNet-with-Attributes are reported separately for clarity, because U, UFTE, and UFTA had access to additional unlabeled examples. As shown in Table 6, both UFTE and UFTA outperformed other methods substantially. Because of the additional unlabeled data available in this setting, even U achieved a substantially better accuracy than SA and MAML. Results in Table 7 show that UFTE and UFTA work well when combined with different few-shot learners.
Visualizing few-shot classifiers: To understand and interpret the decision made by few-shot linear classifiers, we visualize the classifier weights by using CAM (Zhou et al., 2016), and plot the heatmap over the 11×11 spatial feature map in Figure 2. SA sometimes shows incorrect localization as it is not trained to classify those novel test attributes. SA* shows bigger but less precise heatmaps since the training objective encourages the propagation of attribute information spatially. In contrast, our proposed method produces surprisingly accurate and localized heatmaps that pinpoint the location of the attributes (e.g. mustache or cheekbone); this is impressive since no labeled information concerning these attributes was available during representation learning. This result supports the hypothesis that local features can be good descriptors that match different views of the same instance during contrastive learning, and finetuning further establishes a positive transfer between training and test attributes.
Number of shots and task ambiguity: Since we have a flexible target attribute class in each episode, it could be the case that the support examples are ambiguous. For example, by presenting only a smiling face with eyeglasses in the support set, it is unclear whether the positive set is determined by “smiling” or “wearing eyeglasses”. Figure 3a show several approaches evaluated using LR with varying numbers of support examples per class in Celeb-A and Zappos-50K episodes, respectively. The oracle GT gradually approached 100% accuracy as the number of shots approached 20. This demonstrates that FSAL tasks potentially require more support examples than standard FSL to resolve ambiguity. Again here, UFTA and UFTE consistently outperformed U, SA, and ID baselines across different number of shots. Figure 3b shows the correlation between readout performance of attributes and few-shot learning accuracy, using UFTA. With a larger number of shots, there is a higher correlation between the two, but there is still a large amount of variance that is due to the ambiguity of the task itself. More details are included in the Appendix.
Ablation studies: Table 5 studies the effect of the projection MLP for attribute classification finetuning. Adding MLP projection layers was found to be beneficial for unsupervised learning in prior work (Chen et al., 2020). Here we found that adding MLP layers is also critical in our representation finetuning stage as well. Finetuning directly on the backbone (depth=0), and keeping the MLP during test (Discard=no) both led to significant drop in performance. In the Appendix, we also report on studies of the effect of adding the L1 regularizer on LR.

heading: 5.4 ANALYSIS ON FEW-SHOT GENERALIZATION
text: In Tables 4 and 8, we study the performance gap between training attributes and test attributes. Notably, SA performs very well on test episodes defined using training attributes, but there is a large generalization gap between training and test attributes. Our methods show significant improvements in terms of reducing the generalization gap between training and test attributes. Moreover, we find that self-supervised pre-training generally preserves informative features and is more general than supervised pre-training.
Investigating the cause of generalization issues: We hypothesize that the weak performance of episodic learners and SA on our benchmarks is because their training objectives essentially encourage ignoring attributes that are not useful at training time, but may still be useful at test time. In Appendix G, we study a synthetic problem to further analyze these generalization issues. We explore training a ProtoNet model on data from a linear generative model, where each FSAL episode presents ambiguity in identifying the relevant attributes. In this setting, the network is forced to discard information that is useful for test tasks in order to solve the training tasks effectively, and thus fails to generalize.
Transferability score: Up to this point, we have only studied one particular split of training/test attributes. We would like to examine whether our conclusions generalize over different splits. More
importantly, we aim to predict the transferability between training and test splits by analyzing the training vs. test attributes. Each image has a complete attribute vector, describing the values of each attribute in the image. Some of these attributes are in the training set, and others in the test set. To quantify the transferability, we leverage the idea of mutual information. More concretely, we learn a logistic regression model that takes the training attribute vector in a particular image as input and predicts the value of one of the test attributes in that image. Each logistic regression model will generate an AUC score on held-out images, and we average them across the relevant test attributes in each episode, and we define this AUC score as the “transferability score.” Our hypothesis is that more mutual information between the attribute label distributions will translate to higher transfer performance when the model is supervised on the training attributes and tested on the test attributes.
In Figure 4, we ran experiments using 100 random splits of training and test attributes. The results verify our hypothesis. We see positive correlation between the transfer performance and our transferability score: When subtracting U as a baseline, both UFTA and UFTE models get better when there is higher transferability (subtraction reduces the effect of per-episode variability). The same conclusion can be drawn when we subtract SA* from SA. By plotting the relation between U and SA, we show that supervised learning is more helpful when there is higher transferability in the label space whereas self-supervised learning is more flexible at adapting to novel target tasks.

heading: 6 CONCLUSION
text: Acquiring knowledge of new attributes is one of the most basic learning skills of an intelligent agent. In this paper, we propose few-shot attribute learning to enable this core functionality. We developed benchmarks using the Celeb-A, Zappos-50K, and ImageNet datasets to create learning episodes using existing attribute labels. This setting presents a strong generalization challenge, since the split in attribute space can make the training and test tasks less similar. Consequently standard supervised representation learning performs poorly on the test set, unlike recent benchmark results in few-shot learning of semantic classes. We found that unsupervised contrastive learning preserved more general features, and further finetuning yielded strong performance. We also discovered that the similarity in the attribute label space can roughly predict the gain obtained by supervised training and finetuning, which could provide some insight into the generalization behavior of representation learning algorithms when dealing with novel tasks at test time.

heading: A ATTRIBUTE READOUT
text: In Tab. 9 and 11, we provide attribute readout performance with different learned representations. This is a similar task that measures the generalizability, but it does not evaluate the rapid learning aspect brought by few-shot learning.

heading: B ABLATION STUDIES
text: Table 10 studies the effect of the L1 regularization. The benefit is especially noticeable on SA* and GT, since it allows the few-shot learner to have a sparse selection of disentangled feature dimensions.

heading: C ADDITIONAL HEATMAP VISUALIZATION
text: We provide additional visualization results in Figure 5, 6, and 7, and we plot the heat map to visualize the LR classifier weights. Figure 5 includes SA*, U, and UFTE which are omitted in the main paper due to space limitations. Figure 6 and 7 visualize more information including both support and query examples in the episode, and some of the episodes are challenging to solve given just a few examples.

heading: D ATTRIBUTE SPLITS OF CELEB-A
text: We include the attribute split for Celeb-A in Table 12. There are 14 attributes in training and 13 attributes in val/test. We discarded the rest of the 13 attributes in the original datasets since they are either hard to classify with the oracle classifier (e.g. big lips, oval face) or simply ambiguous (e.g. young, attractive).

heading: E ATTRIBUTE SPLITS OF ZAPPOS-50K
text: The Zappos-50K dataset annotates images with different values relating to the following aspects of shoes: ‘Category’, ‘Subcategory’, ‘HeelHeight’, ‘Insole’, ‘Closure’, ‘Gender’, ‘Material’ and ‘Toestyle’.
We discarded the ‘Insole’ values, since those refer to the inside part of the shoe which isn’t visible in the images. We also discarded some ‘Material’ values that we deemed hard to recognize visually. We also modified the values of ‘HeelHeight’ which originally was different ranges of cm of the height of the heel of each shoe. Instead, we divided those values into only two groups: ‘short heel’ and ‘high heel’, to avoid having to perform very fine-grained heel height recognition which we deemed was too difficult.
These modifications leave us with a total of 79 values (across all higher-level categories). Not all images are tagged with a value from each category, while some are even tagged with more than one value from the same category (e.g. two different materials used in different parts of the shoe). We split these values into 40 ‘training attributes’ and 39 ‘val/test attributes’.
We include the complete list of attributes in Table 13. The format we use is ‘X-Y’ where X stands for the category (e.g. ‘Material’) and Y stands for the value of that category (e.g. ‘Wool’). We do this to avoid ambiguity, since it may happen that different categories have some value names in common, e.g. ‘Short Heel’ is a value of both ‘SubCategory’ and ‘HeelHeight’.

heading: F ATTRIBUTE SPLITS OF IMAGENET-WITH-ATTRIBUTES
text: We include the attribute split for ImageNet-with-Attributes in Table 14. There are 11 attributes in training and 10 attributes in val/test. We discarded the rest of the 4 attributes in the “shape” category (long, round, rectangular and square), since they are difficult to predict from the images.

heading: G FEW-SHOT ATTRIBUTE LEARNING TOY PROBLEM
text: In this section, we present a toy problem that illustrates the challenges introduced by the FSAL setting and the failures of existing approaches on this task. This simple problem captures the core elements of our FSAL tasks, including ambiguity, introducing novel attributes at test time, and the role of learning good representations. The primary limitation of this model is the fact that it is fully linear and the attribute values are independent—in a more realistic FSAL task recovering a good representation from the data is significantly more challenging, and the data points will have a more complex relationship with the attributes as in our benchmark datasets.
Problem setup We define a FSAL problem where the data points x ∈ Rm are generated from binary attribute strings, z ∈ {0, 1}d, with x = Az+ ζ for some matrix A ∈ Rm×d with full column rank and noise source ζ. Thus, each data point x is a sum of columns ofA with some additive noise.
In each episode, examples are labelled as positive when two designated entries of the attribute strings are both 1-valued, and negative otherwise. For the training episodes, the labels depend only on the first d1 < d entries of z. At test time, the labels depend on the remaining d − d1 attributes. The training and test episodes are generated by choosing two of the attributes in the respective sets. Then k data points are sampled with positive labels (the two attributes are 1-valued) and k with negative labels (at least one of the attributes is 0-valued).
Linear prototypical network Now, consider training a prototypical network on this data with a linear embedding network, g(x) = Wx. Within each episode, the prototypical network computes the prototypes for the positive and negative examples,
cj = 1
k ∑ xi∈Sj g(xi) = 1 k ∑ xi∈Sj d∑ l=1 zilWal, for j ∈ {0, 1},
where Sj is the set of data points in the episode with label j, and al is the lth column of the matrix A. Further, the prototypical network likelihood is given by,
p(y = 0|x) = exp
{ −‖Wx− c0‖22 } exp {−‖Wx− c0‖22}+ exp {−‖Wx− c1‖22} .
The goal of the prototypical network is thus to learn weights W that lead to small distances between data points in the same class and large distances otherwise. In the FSAL tasks, there is an addi-
tional challenge in that class boundaries shift between episodes. The context (the choice of attribute entries) defining the boundary is unknown and must be inferred from the episode. However, with few shots (small k) there is ambiguity in the correct context — with a high probability that several possible contexts provide valid explanations for the observed data.
Fitting the prototypical network Notice that under our generative model, with x =Wz+ ζ and for j ∈ {0, 1} we have,
Wx− cj =WA(z− 1
k ∑ zi∈Sj zi) + 1 k ∑ i Wζi +Wζ.
Notice that if vj(z) = A(z− 1k ∑
zi∈Sj zi) ∈ Ker(W ), the kernel of W , then the entire first term is zero. Further, if z ∈ Sj (the same class as the prototype) then there is no contribution from the positive attribute features in this term. Otherwise, this term is guaranteed to have some contribution from the positive attribute features.
Therefore, if W projects to the linear space spanned by the positive attribute features then Wvj(z) is zero when z ∈ Sj and non-zero otherwise. This means that the model will be able to solve the episode without contextual ambiguity. Then the optimal weights are those that project to the set of features used in the training set—destroying all information about the test attributes which would otherwise introduce ambiguity.
We observed this effect empirically in Figure 8, where we have plotted the matrix abs(WA). Each column of these plots represents a column of A mapped to the prototypical network’s embedding space. The first 5 columns correspond to attributes used at training time, and the remaining 5 to those used at test time.
In the FSAL task described above, as our analysis suggests, the learned prototypical feature weights project out the features used at test time (the last 5 columns). As a result, the model achieved 100% training accuracy but only 51% test accuracy (chance is 50%).
We also compared against an equivalent problem set up that resembles the standard few-shot learning setting. In the FSL problem, the binary attribute strings may have only a single non-zero entry and each episode is a binary classification problem where the learner must distinguish between two classes. Now the vector z is a one-hot encoding and the comparison to the prototypes occurs only over a single feature column of A, thus there is no benefit to projecting out the test features. As
expected, the model we learned (Figure 8 B) is not forced to throw away test-time information and achieves 100% training accuracy and 99% test accuracy.
Settings for Figure 8 We use 10 attributes, 5 of which are used for training and 5 for testing. We use a uniformly random sampled A ∈ R30×10 and the prototypical network learns W ∈ R10×30. We use additive Gaussian noise when sampling data points with a standard deviation of 0.1. The models are trained with the Adam optimizer using default settings over a total of 30000 random episodes, and evaluated on an additional 1000 test episodes. We used k = 20 to produce these plots, but found that the result was consistent over different shot counts.

Review summaries:
The article proposes to address attribute detection with a small data constraint in the training phase (few-shot approach). The experimental protocol is divided in a series of episodes, each defined by a support set that specifies the attributes to be predicted and a query set used to evaluate the prediction. The generic algorithmic structure to solve this problem is divided in two steps: a common pre-training phase that combines self-supervised representation learning and supervised fine-tuning, followed by a supervised learning phase to solve each episode task. A training dataset containing image samples with attributes is used to learn the pre-trained representation space. The pre-training phase is compared to other approaches on three benchmarks implementing few-shot attribute prediction episodes. An indicator computed from a logistic regression between attribute values is proposed as a way to predict transferability between the learning dataset and the few-shot problem. 

This paper proposes the problem of few-shot attribute learning (FSAL) that follows the standard few-shot/meta-learning paradigm but focuses on attributes instead of object classes. The authors argue in Section 2 that the multi-label nature of attributes (smiling & wearing eyeglasses can be present simultaneously) makes this problem different; the context of each positive example in each episode can drastically change what the model is asked to learn.   This paper also proposes three benchmark datasets to study this problem, based on Celeb-A, Zappos50K, and ImageNet-with-Attributes. The paper evaluates multiple existing approaches on these benchmarks as well as improves upon them further. 

The authors consider the problem of few-shot attribute learning. Contrary to most past approaches on learning with attributes, including classical zero-shot learning, the authors deal with the case where the attributes seen at test-time are previously unseen. As a result, few samples must be used to quickly adapt the learning algorithm to new attributes. The approach works in 3 stages. The first uses a classical representation learning algorithm to learn a visual representation, SimCLR. Following this, the network is given supervised training to fine-tune the representation. In the last step, the authors adapt a previously devised few-shot learning strategy that consists in training a linear classifier. 

This paper investigates a new and interesting topic, few-shot attribute learning (FSAL), where the model is trained with base attributes with abundant samples and tested with novel attributes with only a few samples. Experiments were performed on three benchmark datasets with attribute annotation. The paper found that self-supervised learning helps to train a backbone that generalizes well to novel attributes, compared to training the backbone with only base attributes. The author also compares several few-shot learning models, e.g., MatchingNEt, MAML, ProtoNet, in this FSAL setting and found that the logistic regression layer works the best.