Abstract
We present a deep generative model for learning to predict classes not seen at training time. Unlike most existing methods for this problem, that represent each class as a point (via a semantic embedding), we represent each seen/unseen class using a class-specific latent-space distribution, conditioned on class attributes. We use these latent-space distributions as a prior for a supervised variational autoencoder (VAE), which also facilitates learning highly discriminative feature representations for the inputs. The entire framework is learned end-to-end using only the seen-class training data. The model infers corresponding attributes of a test image by maximizing the VAE lower bound; the inferred attributes may be linked to labels not seen when training. We further extend our model to a (1) semi-supervised/transductive setting by leveraging unlabeled unseen-class data via an unsupervised learning module, and (2) few-shot learning where we also have a small number of labeled inputs from the unseen classes. We compare our model with several state-of-the-art methods through a comprehensive set of experiments on a variety of benchmark data sets.
Introduction
Zero-Shot Learning (ZSL) aims to recognize objects from classes that were never seen during training by leveraging "side information," such as human-annotated attributes (e.g., "has wings," "is yellow"). Traditional ZSL methods often suffer from two major limitations. First, they typically employ point-based embeddings, mapping images and class attributes to a single point in a shared space. This approach ignores intra-class variability—the visual diversity within a single species or category. Second, many models lack generative power, being purely discriminative and unable to "imagine" the visual characteristics of unseen classes, which complicates the integration of unlabeled data.
The VZSL Framework
To address these issues, we introduce VZSL, a deep generative framework based on a Class-Conditioned Variational Autoencoder (VAE).
Generative Modeling with Class Priors
Instead of a standard VAE with a simple Gaussian prior, VZSL utilizes a prior $p_\psi(z|a)$ conditioned on the class attribute vector $a$. This allows each class to be represented as a distribution in the latent space. By modeling classes as Gaussians, the framework naturally accounts for the "spread" of a class, making it more robust than prototype-based methods.
Enhancing Discriminative Power
To ensure the latent distributions remain distinct, we incorporate a margin regularizer. This maximum-margin loss explicitly pushes the latent distributions of different classes apart. Furthermore, because the VAE must reconstruct the input image, it is forced to learn highly expressive and structured feature representations that are beneficial for the ZSL task.
Transductive and Few-Shot Extensions
In transductive settings, where unlabeled images from unseen classes are available during training, we employ a "sharpening" regularizer. This forces the model to become more confident in its predictions on unlabeled data, effectively mitigating the "domain shift" problem. The model also generalizes to few-shot learning, where a small number of labeled examples from unseen classes are provided to further refine the latent distributions.
Experimental Evaluation
We evaluated VZSL on four standard benchmarks: Animals with Attributes (AwA), Caltech-UCSD Birds (CUB), SUN Attribute, and a large-scale ImageNet test.
Key Results
- Inductive ZSL: VZSL consistently outperformed baselines. On the large-scale ImageNet dataset (360 unseen classes), it achieved a top-5 accuracy of 23.08%, a significant relative improvement over the previous state-of-the-art (SS-Voc at 16.8%).
- Transductive ZSL: Incorporating unlabeled data provided a substantial boost, improving accuracy by approximately 8% on average compared to the inductive setting.
- Few-Shot Learning: The model proved highly effective with as few as 2–5 labeled examples, significantly outperforming standard multiclass SVMs.
Conclusion
By moving from point-based embeddings to class-conditioned latent distributions, VZSL effectively captures intra-class variability and achieves state-of-the-art performance across various ZSL scenarios. Future work may explore more complex latent distributions beyond isotropic Gaussians and end-to-end training with raw image data to further enhance representation learning.
Summary updated