Generative Dual Adversarial Network for Generalized Zero-shot Learning

11/12/2018 ∙ by He Huang, et al. ∙ ByteDance Inc. University of Illinois at Chicago 0

This paper studies the problem of generalized zero-shot learning which requires the model to train on image-label pairs from some seen classes and test on the task of classifying new images from both seen and unseen classes. Most previous models try to learn a fixed one-directional mapping between visual and semantic space, while some recently proposed generative methods try to generate image features for unseen classes so that the zero-shot learning problem becomes a traditional fully-supervised classification problem. In this paper, we propose a novel model that provides a unified framework for three different approaches: visual-> semantic mapping, semantic->visual mapping, and metric learning. Specifically, our proposed model consists of a feature generator that can generate various visual features given class embeddings as input, a regressor that maps each visual feature back to its corresponding class embedding, and a discriminator that learns to evaluate the closeness of an image feature and a class embedding. All three components are trained under the combination of cyclic consistency loss and dual adversarial loss. Experimental results show that our model not only preserves higher accuracy in classifying images from seen classes, but also performs better than existing state-of-the-art models in in classifying images from unseen classes.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 8

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Deep learning models have achieved great success in image classification tasks [28], and these models are so effective that they are comparable with humans. However, humans are much better at recognizing novel objects that they only saw a few times before or heard of but never saw. This is because deep learning models for image classification rely heavily on fully supervised training, and thus they require a lot of labeled data. As there are too many classes in the real world, it is almost impossible to collect enough labeled data for each class. In this case, these models are challenged by the task of recognizing images from classes that are unseen during training, which is also called the zero-shot learning (ZSL) problem [1, 18]. In conventional zero-shot learning, the goal is to train an image classifier on a set of images from seen classes, and then test the trained model using images from unseen classes, where the sets of seen and unseen classes are totally disjoint, and that during testing the label space only contains unseen classes. However, this conventional setting is based on a strong assumption that in testing phrase the model knows whether an image is from the set of seen or unseen classes, which is not realistic and thus not applicable in the real world. When the model receives a new image, it does not know whether it comes from seen or unseen classes, and thus it needs the ability to classify images from the combination of seen and unseen classes, which is called generalized zero-shot learning (GZSL) [34, 6]. The main difference between zero-shot learning and generalized zero-shot learning is the label space during testing, which means that models designed for conventional zero-shot learning can still be applied in the generalized zero-shot learning setting.

A common strategy for tackling zero-shot learning is to map images and classes into the same latent space and then perform nearest neighbor search. Most existing methods project visual features to the semantic space spanned by class attributes, such as [11, 33, 1, 27, 2, 17], as is illustrated in Figure 1(a). However, as pointed out by [29, 9, 38]

, using semantic space as shared latent space will suffer from the hubness problem, which means projecting high-dimensional visual features to low-dimensional space will further reduce the variance of features and the results may become more clustered as a hub. In order to mitigate this problem,

[29, 9, 38] propose to project semantic features into the visual space, as illustrated in the left part of Figure 1(b). However, using a deterministic approach to map a class’s semantic embedding to the visual space is still problematic, since one class label has numerous corresponding visual features. In contrast, some recent works [23, 35, 31]

propose to use generative methods that can generate various visual features conditioned on a semantic feature vector, as illustrated in the right part of Figure 

1(b). Despite their effectiveness, their performance is limited by lacking either the ability to learn a bi-directional mapping between visual and semantic space, or an adversarial loss that acts as a more flexible metric to evaluate the similarity of features. Instead of manually choosing a common latent space, RelationNet [36] proposes to learn a deep metric network which takes a pair of visual and semantic features as input and output their similarity, as illustrated in Figure 1(c). However, RelationNet [36]

fails to learn latent features of images and classes, nor does it support semi-supervised learning, and thus it is outperformed by some recent works 

[23, 35, 31].

As the three different approaches have their different merits and limitations, in this paper, we study the generalized zero-shot learning problem and propose a novel model named Generative Dual Adversarial Network (GDAN) that combines mapping, mapping as well as metric learning methods in a unified framework, as illustrated in Figure 1(d). More specifically, our model contains a generator network which is able to generate image features conditioned on class embedding, a regressor network that takes image features and output their class embedding (i.e. semantic features), and a discriminator network that takes as input an image feature and a semantic feature and output a score indicating how well they match with each other. The generator and regressor learn from each other through a cyclic consistency loss, while both of them also interact with the discriminator through a dual adversarial loss.

Our main contributions are summarized as follows:

  • [leftmargin=*,noitemsep,topsep=0pt]

  • We propose a novel Generative Dual Adversarial Network (GDAN) that unifies , methods as well as metric learning for generalized zero-shot learning.

  • In contrast to previous works in zero-shot learning, we design a novel dual adversarial loss so that the Regressor and Discriminator can also learn from each other to improve the model’s performance.

  • We conduct extensive experiments that demonstrate the ability of our proposed GDAN  model in effectively classifying images from unseen classes as well as preserving high accuracy for seen classes on four widely used benchmark datasets.

  • We conduct component analysis to show that the combination of three components in our model actually helps each of them in achieving better performance than individual ones. Visualization of synthetic samples from unseen classes also demonstrate the effective generation power of our model. Our code will also be available online.

Figure 1: Four categories of zero-shot learning methods. (a) Embedding models that map visual features of the same class to the same feature in semantic space. (b) Models that map each class’s semantic feature to features in the visual space. (c) Metric learning models that directly learn to evaluate the closeness of a pair of visual and semantic features. (d) Our proposed model that unifies the three methods using generative adversarial network and dual learning.

2 Related Work

Generative Adversarial Network  Generative Adversarial Network (GAN) [12] was originally proposed as a method for image synthesis [12, 25] and has achieved state-of-the-art results. However, GAN is also known for its instability in training and suffers the mode collapse problem [4, 13]. In order to mitigate these problems and improve the quality of synthetic samples, many methods have been proposed. WGAN [4] and WGAN-GP [13] propose to optimize GAN on an approximate Wasserstein distance by enforcing 1-Lipschitz smoothness. LS-GAN [22] offers a simple but effective solution by replacing the cross-entropy loss of GAN with a least square loss that push the scores of real and fake samples to different decision boundaries so that the gradient never vanishes even when two distributions are totally disjoint. Our model also includes a GAN, which is realized by combining a feature generator and a discrminator. One major difference between our model and traditional GAN is that our model contains a non-generative component, i.e. a regressor network, that interacts with the discriminator through an extra adversarial loss.

Dual Learning

  Dual learning has been shown to be effective in neural machine translation (NMT) 

[14] by training a prime task and a dual task together, where the dual task is the inverse task of the prime task. For example, in neural machine translation, the prime task may be , and then the dual task is

. Dual learning has also been applied to other computer vision tasks like semantic segmentation 

[19]

and image-to-image translation 

[42, 37]. Our work is related to CycleGAN [42] and DualGAN [37] in that we borrow the cyclic consistency loss from them. However, those two models require two generative networks which make them unable to be directly applied in generalized zero-shot learning, since one image can only be assign to a single class in zero-shot learning, which means generative network is not applicable for mapping. Thus we need a novel architecture to incorporate cyclic consistency in zero-shot learning.

(Generalized) Zero-shot Learning  There are a few recent works that tackles the (generalized) zero-shot learning problem, which are closely related to our work. CVAE-ZSL [23]

proposes to use conditional variational autoencoder (CVAE) 

[30] to generate samples for unseen classes, but it uses the vanilla version of CVAE which suffers from the prior collapse problem [41]. SE-GZSL [31] is another recent work that utilize variational autoencoder in generalized zero-shot learning. Although SE-GZSL [31] also has a regressor that is similar to our model, it lacks the dual adversarial loss we have. In contrast, the discriminator of our model can learn a flexible metric to evaluate the relation between an image feature and a class embedding, and the regressor of our model can also learn from the discriminator through the adversarial loss. f-CLSWGAN [35] applies GAN to generate image features conditioned on class attributes, but it does not have the ability to map image features back to class attributes. RelationNet [36] tries to learn a deep metric to evaluate the compatibility between an image feature and an semantic feature, which is similar to the discriminator in our model, while our model also has the ability to generate samples for unseen classes and infer semantic embedding from visual features.

3 Proposed Model

In this section, we first formally define the generalized zero-shot learning problem, give an overview of our proposed model, and then introduce each part of our model in details.

3.1 Problem Definition and Notations

In this paper, we study the generalized zero-shot learning problem. Specifically, let the training data (including validation) be defined as , where

is an image’s feature produced by a pre-trained neural network,

is the set of image features from seen classes, is the label of image feature , is the set of labels for seen classes, is the attribute vector (semantic embedding) for class . Similarly, we can define the test set as , where represent the set of image features from unseen classes, represents the set of labels for unseen classes, and that . The goal of generalized zero-shot learning is to learn a classifier , where is the visual feature of an image from either seen or unseen classes.

3.2 Model Overview

The overall framework of our proposed Generative Dual Adversarial Network (GDAN) is illustrated in Figure 2. There are three components in our model, a Generator, a Regressor and a Discriminator. The core component of GDAN  is the Generator network that can generate various visual features conditioned on certain class labels. Along with the Generator, we have a Regressor network that acts as a deep embedding function, which tries to map each visual feature back to its corresponding class’s semantic feature. The Generator and the Regressor network together form a dual learning framework, so that they can learn from each other through a cyclic consistency loss. In addition, we have an extra Discriminator network that measures the similarity of a visual-textual feature pair, and it interacts with the other two networks through a dual adversarial loss. It should be noted that any of the three components is able to perform generalized zero-shot learning, where the Generator represents the methods (e.g. [23, 31, 35]), the Regressor represents the methods (e.g. [3, 7]), and the Discrminator represents metric learning approach such as RelationNet [36]. Our model provides a unified framework of all three different approaches so as to make use of their respective advantages and achieves better results for zero-shot image classification.

Figure 2: Overall framework of the proposed GDAN model, where black arrows indicate data flow.
Figure 3: Detailed illustration of our proposed GDAN model. and are the encoder and decoder/generator of the CVAE, represents the Regressor network, and represents the Discriminator for adversarial training. The CVAE and the Regressor interact with each other through a cyclic consistency loss, while they both learn from the Discriminator through a dual adversarial loss. The CVAE loss is not illustrated in the figure for clarity, and the Regressor has an additional supervised reconstruction loss.

3.3 Feature Generation Network

Our model’s framework is very flexible, which means we can choose any generative model as the Generator. The simplest one can be a feed-forward neural network that takes as input the concatenation of a class embedding as well as a noise vector randomly sampled from normal Gaussian distribution, which is widely used in Generative Adversarial Nets (GANs) 

[12]. However, this naive model lacks the ability to infer noise vectors from image features. Thus, here we resort to Conditional Variational Autoencoder (CVAE) [30], which was proposed as a generative method that maps a random noise vector drawn from to a data point in the data distribution. A CVAE consists of two parts, an encoder that maps a data point to its latent vector , and a decoder/generator

that maps a latent vector to a data point. The training objective of CVAE is to minimize the following loss function:

(1)

where

represents the Kullback-Leibler divergence between two distributions

and , and is treated as a unit Gaussian distribution.

However, as pointed out in [41, 40, 8, 21], CVAE is hard to train due to the posterior collapse problem. In order to mitigate this problem, we follow [31] to disentangle from , so that the encoder only depends on (i.e. ), as illustrated in the top left of Figure 3. Also, as in [21], we add an adversarial loss to help learning better CVAE, which we will discuss later. The loss of the conditional variational autoencoder (CVAE) used in our model is defined as follows:

(2)

where is an image’s visual feature and is the class embedding of .

Although generative models like VAE [16] and GAN [12] have been proved to be effective in generating images, the output images of generative models are still blurry for images with complex objects, and the synthetic images often lack the sharpness to reveal the detailed attributes of objects, which are important for zero-shot learning [7]. Hence, instead of generating raw images, we train CVAE to generate visual feature

, where the ground truth visual features are provided by image classification models pretrained on ImageNet 

[28].

3.4 Regressor Network

While the CVAE learns to generate visual features from semantic features, our model also has a Regressor network that performs the reverse task of mapping visual features back to their corresponding semantic features. The CVAE and Regressor together form a dual learning framework so that they can learn from each other. In our case, the prime task is generating image features conditioned on class embedding, while the dual task is to transform image features back to their corresponding class embedding.

As illustrated in the down left of Figure 3, the Regressor network takes two kinds of image features as input, where the first kind is the real image features sampled from training data, and the second kind is the fake features generated by the CVAE. With the paired training data , we can train the Regressor with a supervised loss:

(3)

In addition, the Regressor interacts with the CVAE with the following cyclic-consistency loss:

(4)

where is the decoder/generator of CVAE and is implemented by the encoder in Figure 3.

3.5 Discriminator Network

So far, the Generator and Regressor already combines and methods, but it still lack the ability to learn from a flexible metric which can better evaluate the similarity of features. In order to incorporate metric learning, the third component of our model is a Discriminator network (as shown in the right of Figure 3) that takes as input a visual-semantic feature pair and output a compatibility score indicating the extent to which belongs to the class characterized by

. The Discriminator network learns how to evaluate the closeness of an image feature to a class, instead of using a predefined metric like L1/L2 distance or cosine similarity.

In order to train the Discrimiantor to distinguish different types of fake data, inspired by Text-to-Image-GAN [26], we also train the Discriminator with two kinds of fake input, i.e. and , where is a randomly sampled class’s embedding and . In addition, we add a novel third type of fake input generated by the Regressor, i.e. . In this way, not only the CVAE but also the Regressor can learn from the Discriminator through adversarial training.

Since GANs are notoriously hard to train, there are many methods that try to stabilize the training process of GAN [12, 22, 4, 13]. In our model, we apply LS-GAN [22] as the training method for adversarial loss for its simplicity and effectiveness. Thus the adversarial loss for the Discriminator of our model can be defined as:

(5)

where the first term is the loss for real samples , the second term stands for the scores of features generated by the Generator, the third term stands for the scores of class embedding generated by the Regressor, and the last term is the control loss which trains the Discriminator to discriminate pairs of real image features and real negative class embedding. The negative sample is randomly sampled from the set of training classes . Here the discriminator tries to push the scores of real samples to and push the scores for generated samples to , while the generator tries to push the scores of its synthetic samples to .

Also, the adversarial loss for CVAE and Regressor can be defined as:

(6)
(7)

3.6 Full Objective and Training Procedure

In adversarial training, the discriminator is training separately from the other two networks, while we train the CVAE and Regressor using an overall loss defined as:

(8)

where , and are hyper-parameters that assign weight on different parts of the overall loss.

The training procedure of our GDAN  model is as follows: we first pretrain CVAE using Equation 2, and then train the whole model in an adversarial way using Equation 5 and Equation 3.6. The implementation details will be provided in the experiment section.

3.7 Evaluation Protocol

Once the model has been trained, in order to predict the label for unseen classes, we can first generate new samples for each unseen class, and then combine those synthetic samples with other samples in the training data, after which we can train any new classifier based on this new dataset that contains samples for both seen and unseen classes. For fair comparison with other baselines, we just apply a simple 1-NN classifier for testing, which is used in most baselines.

Dataset #attributes
#seen classes
(train+val)
#unseen
classes
#images
(total)
#images
(train+val)
#images
(test unseen/seen)
aPY [10] 64 15+5 12 15339 5932 7924/1483
AwA2 [34] 85 27+13 10 37332 23527 7913/5882
CUB [32] 312 100+50 50 11788 7057 2679/1764
SUN [24] 102 580+65 72 14340 10320 1440/2580
Table 1: Statistics of datasets.
Dataset SUN CUB AwA2 aPY
Methods U S H U S H U S H U S H
SSE [39] 2.1 36.4 4.0 8.5 46.9 14.4 8.1 82.6 14.8 0.2 78.9 0.4
LATEM [33] 14.7 28.8 19.5 15.2 57.3 24.0 11.5 77.3 20.0 0.1 73.0 0.2
ALE [1] 21.8 33.1 26.3 27.3 62.8 34.4 14.0 81.8 23.9 4.6 73.7 8.7
DEVISE [11] 16.9 27.4 20.9 23.8 53.0 32.8 17.1 74.7 27.8 4.9 76.9 9.2
SJE [2] 14.7 30.5 19.8 23.5 52.9 33.6 8.0 73.9 14.4 3.7 55.7 6.9
ESZSL [27] 11.0 27.9 15.8 12.6 63.8 21.0 5.9 77.8 11.0 2.4 70.1 4.6
SYNC [5] 7.9 43.3 13.4 11.5 70.9 19.8 10.0 90.5 18.0 7.4 66.3 13.3
SAE [17] 8.8 18.0 11.8 7.8 54.0 13.6 1.1 82.2 2.2 0.4 80.9 0.9
DEM [38] 34.3 20.5 25.6 19.6 57.9 29.2 30.5 86.4 45.1 11.1 79.4 19.4
RelationNet [36] - - - 38.1 61.1 47.0 30 93.4 45.3 - - -
PSR-ZSL [3] 20.8 37.2 26.7 24.6 54.3 33.9 20.7 73.8 32.3 13.5 51.4 21.4
SP-AEN [7] 24.9 38.2 30.3 34.7 70.6 46.6 23.3 90.9 31.1 13.7 63.4 22.6
CVAE-ZSL [23] - - 26.7 - - 34.5 - - 51.2 - - -
GDAN 38.1 89.9 53.4 39.3 66.7 49.5 33.2 67.5 44.6 30.4 75.0 43.4
SE-GZSL* [31] 40.9 30.5 34.9 41.5 53.3 46.7 58.3 68.1 62.8 - - -
f-CLSWGAN* [35] 42.6 36.6 39.4 43.7 57.7 49.7 - - - - - -
Table 2: Results of generalized zero-shot learning evaluated on four benchmark datasets. *Note that SE-GZSL [31] trains an additional LinearSVC for testing, and that f-CLSWGAN [35] trains additional embedding models for testing, so their results may not be directly comparable with others.

4 Experiments

In this section, we conduct extensive experiments on four public benchmark datasets under the generalized zero-shot learning setting.

4.1 Datasets and Settings

We compare our GDAN  model with several baselines on SUN [24], CUB [32], aPY [10] and AWA2 [34]. Among these datasets, aPY [10] and AWA2 [34] are coarse-grained and of small and medium size respectively, while SUN [24] and CUB [32] are both medium fine-grained datasets. We follow the training/validation/testing split as well as the image and class features provided by [34]. The statistics of these datasets is summarized in Table 1.

For image features and class embedding, we use publicly available features provided by [34]. We also adopt the widely used average per-class top-1 accuracy to evaluate the performance of each model, which is defined as follows:

(9)

In generalized zero-shot learning setting, during test phrase we use images from both seen and unseen classes, and the label space is also the combination of seen and unseen classes . We want the accuracy of both seen and unseen classes to be as high as possible, thus we need a metric that can reflect the overall performance of a model. Since arithmetic mean can be significantly biased by extreme values, we follow [34]

and use harmonic mean instead. Let

and denote the accuracy of images from seen and unseen classes respectively, the harmonic mean of seen and unseen accuracy is thus defined as:

(10)

4.2 Implementation Details

We implement the CVAE, Regressor and Discriminator of our model as feed-forward neural networks. The Encoder of CVAE has two hidden layers of 1200 and 600 units respectively, while the Generator of CVAE and the Discriminator is implemented with one hidden layer of 800 hidden units. The Regressor has only one hidden layer of 600 units. The dimension of noise vector is set to 100 for all datasets. We use and find that they generally work well. We choose Adam [15] as our optimizer, and the momentum is set to .The learning rate of Discriminator is set to , while the learning rate for CVAE and Regressor is . and

are set to 1, which means all the modules of our model train with the same number of batches. We train on each dataset for 500 epochs, save the model checkpoints every 10 epochs, and then evaluate on the validation set to find the best one for testing. Our code will be publically available online

111xxx.xxxxx.xxx/xxx/GDAN after this paper being published.

4.3 Results

We compare our model with recent state-of-the-art methods on generalized zero-shot learning, and the results are shown in Table 2. Although f-CLSWGAN [35] also uses GAN for zero-shot learning, it trains additional embedding methods such as  [1, 2, 11, 33], while most baselines only use 1-NN for testing, thus its results may not be directly comparable with others. SE-GZSL [31] is also closely related to our model, but it trains an additional LinearSVC for testing, so it is not directly comparable with other methods. For f-CLSWGAN [35] and SE-GZSL [31], we just copy and paste their results from the original papers [35, 31] in Table 2 for reference.

As can be seen from Table 2, our model achieves a significant performance gain in SUN [24]. For both seen and unseen classes, our method achieves the highest accuracy among all baselines, and with a significant improvement in classifying images from seen classes, our method also outperform deep embedding models [38, 3, 7] and generative model such as [23] as well as metric learning model [36] by a large margin. This shows the benefits of putting , and metric learning into one framework.

For CUB [32] dataset, our model achieves the highest accuracy for unseen classes, while our accuracy for seen classes is slightly lower than SP-AEN [7]. Still, we achieve the highest harmonic mean of 49.5%, which is 2.5% higher than the second place RelationNet [36]. This again shows that our model maintains a good balance of predicting image from both seen and unseen classes, while previous method may not manage the trade-off as well as ours.

For AwA2 [34], our GDAN  outperforms some recent methods like SP-AEN [7] and PSR-ZSL [3] in both unseen class accuracy and harmonic mean accuracy. Although DEM [38] and RelationNet [36] slightly outperforms our GDAN  in harmonic mean accuracy by less than 1%, GDAN  achieves a higher unseen class accuracy than them with a noticeable margin of 2.7%.

According to [7], aPY [10] has a much smaller cosine similarity (0.58) between the attribute variances of the disjoint train and test images than the other datasets (0.98 for SUN, 0.95 for CUB, 0.74 for AwA2), which means it is harder to synthesize and classify images of unseen classes. Although previous methods have relatively low accuracy for unseen classes, our performance gain is even higher with such a difficult dataset. Compared to all previous models, our GDAN  achieves a higher accuracy for unseen classes by a large margin of 16%, and still our model maintains a high accuracy for seen classes. From the results of previous models we can see that although they generally achieves very high accuracy for seen classes, they perform very poorly when predicting images from unseen classes, while our model achieves a good balance between seen and unseen classes, which give us the highest harmonic mean accuracy on aPY [10].

4.4 Component Analysis

In this section, we study the problem of whether the three components actually help each other in training, so we train them independently to see how well they perform when they are alone. We train the CVAE component using Equation 2 and evaluate using the same protocol as GDAN. For the Discriminator, we train it using Equation 5 but with only two kinds of input, i.e. and . During evaluation, for each image feature, we use the Discrimiantor to calculate its matching score with all class embedding and assign it to the class which has the largest score. As for the Regressor, we train it with Equation 3 and evaluate using 1-NN. We can also use the Discriminator and Regressor of our trained GDAN  model and test their performance in generalized zero-shot learning, and we denote them as Discriminator-GDAN  and Regressor-GDAN. We also train our GDAN  without Discriminator (GDAN w/o Disc) and without Regressor (GDAN w/o Reg) respectively.

Datasets SUN CUB AwA2 aPY
CVAE 30.1 33.7 28.5 28.1
Discriminator 0.07 1.43 4.2 1.2
Regressor 0.1 3.4 3.8 10.1
Discriminator-GDAN 1.0 3.3 11.2 11.1
Regressor-GDAN 5.8 4.3 7.1 11.5
GDAN w/o Disc 37.3 38.2 31.4 29.6
GDAN w/o Reg 37.4 38.1 30.9 29.3
GDAN 38.1 39.3 32.1 30.4
Table 3: Unseen class accuracy for component analysis.

The results of unseen class accuracy evaluated on four dataset are shown in Table 3. As we can see, the CVAE component alone is comparable to many baselines like PSR-ZSL [3] and SP-AEN [7], while the Regressor and Discrimiantor are very weak on their own, which is reasonable since they are implemented as neural networks with only one hidden layer. If we train with only two of the components, as we can see from the second and third last row of Table 3, our model still have a major performance gain compared to other baselines, and the Regressor or Discriminator have similar effect on improving the performance of CVAE. In addition, if we train all three components together, we find out that not only the CVAE component generates better samples for unseen classes, but also the Discriminator and Regressor have a performance boost, which demonstrates the effectiveness of putting three components under a unified framework.

Figure 4: Test accuracy for unseen classes with respect to the number of synthetic samples.
Figure 5: t-SNE visualization of synthetic () and real () image features for unseen classes in (a) AwA2 and (b) aPY datasets.

4.5 Effect of the Number of Synthetic Samples

We also analyze how the number of synthetic samples affects test accuracy, as shown in Figure 4. As we can see, for AwA2 [34], increasing the number of synthesized examples does not help much in increasing the prediction accuracy on unseen classes, while for the other classes, the accuracy increases as the number of synthesized samples increases, and saturates when the number of synthetic samples is about 400. Also, CUB [32] and SUN [24] have a larger improvement in performance as the number of synthetic samples increases than the other two datasets, which may be because of there are much more unseen classes in CUB [32] (50) and SUN [24] (72) than that of aPY [10] (12) and AwA2 [34] (10), and thus more synthetic samples can better help distinguishing images among those classes.

4.6 Visualization of Synthetic Image Features

In order to provide a qualitative evaluation on our proposed GDAN  model, we visualize some synthetic image features along with some real image features, and the results are illustrated in Figure 5. Since the numbers of unseen classes for CUB [32] and SUN [24] are relatively large and thus hard to visualize, we only visualize the results of AwA2 [34] and aPY [10]. For each unseen class we synthesize 200 image features, and we also randomly sample 200 real image features for each unseen class as well, and then we use t-SNE [20] to reduce the dimension to two for visualization.

From the real samples in Figure 5 we can see that some classes overlap with each other by a large degree, such as blue whale and walrus, rat and bat. This overlapping is reasonable since bat and rat are biologically similar to each other, and thus it make sense for the synthetic samples of bat to be close to rat as well. For most classes like bobcat, horse, dolphin, the synthetic image features are very close to the true samples, where some even overlap with true samples quite well, such as blue whale, sheep and giraffe. One failure case is the rat class, where we can see that the synthetic samples are far from the true samples. Except for this, as we can see from Figure 5, 1-NN can predict the label of test images quite well for most classes.

Similar conclusions can be drawn for aPY [10] as well, as shown in Figure 5. It should be noted that the real samples of aPY [10] are densely cluttered and that many classes overlap with each other by a large degree, especially in the down-right part of Figure 5, where there are at least 4 classes almost completely overlap together. From the visualization of other classes that are put closer to the boundary of the figure, we can see that our model generates very good visual features that matches the real ones quite well, such as the sheep, motorbike and person classes. Even for the densely cluttered area, the synthetic features still totally lie within that clutter, which means our model can still generate very good examples of those cluttered classes. Just as the AwA2 [34] dataset, however, there are still some failure cases here, for example, the synthetic features of the statue class are not very close to the real features.

5 Conclusion

In this paper, we study the generalized zero-shot learning problem and propose GDAN, a model that unifies three different approaches: mapping, mapping, and metric learning. Our model has three major components, a conditional generator (realized by a conditional variational autoencoder) that is able to synthesize visual features conditioned on class embeddings, a regressor that learns to map visual features back to their corresponding class embeddings, and an discriminator that learns to evaluate the similarity between an image feature and a class embeddiing. The generator and the regressor learn from each other in a dual learning fashion, while they both learn from the discriminator through a dual adversarial loss. In this way, our model provides a unified framework to bridge the gap between visual and semantic space in a generative dual adversarial framework. Extensive experiments on four benchmark datasets demonstrate the effectiveness of our model in balancing accuracy between seen and unseen classes. Component analysis also show that each of the three components can benefit from jointly training together and thus demonstrate the effectiveness of our proposed model. We also visualize the synthetic visual features of unseen classes to show that our model is able to generate high quality visual features.

References