Latent Embeddings for Zero-Shot Classification

Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh Nguyen, Matthias Hein, Bernt Schiele

Introduction

Zero-shot classification (ZSC) represents a significant challenge in computer vision: the ability to recognize objects that the model has never encountered during its training phase. To achieve this, models typically map visual features from an image space and semantic descriptions (such as human-annotated attributes or word embeddings from Wikipedia) into a shared embedding space.

Existing state-of-the-art methods, such as Structured Joint Embedding (SJE) or DeViSE, generally rely on a single linear compatibility function to link images to labels. However, the relationship between an object's visual appearance and its semantic description is often non-linear. For instance, a "duck" exhibits vastly different visual characteristics when swimming compared to when it is flying. A single linear matrix struggles to map these diverse visual states to the same semantic point in the label space. This lack of flexibility is particularly problematic in fine-grained classification tasks, such as distinguishing between hundreds of similar bird species.

The Latent Embedding (LatEm) Model

The core contribution of this research is the Latent Embedding (LatEm) model, which replaces the rigid linear mapping with a more flexible, piecewise linear approach. Instead of learning a single weight matrix $W$, LatEm learns a set of $K$ latent matrices $\{W_1, W_2, \dots, W_K\}$.

Overview of the LatEm framework: multiple latent matrices ($W_i$) map distinct visual clusters to semantic labels.

Piecewise Linear Compatibility

The compatibility between an image $x$ and a class $y$ is defined as the maximum score produced by any of the $K$ matrices:

$$F(x, y) = \max_{1 \le i \le K} x^T W_i y$$

This "mixture of experts" formulation allows the model to function as a collection of specialized mappings, where different matrices focus on capturing specific visual variations or attributes. For example, one matrix might focus on beak shape while another specializes in plumage color.

Training and Optimization

The model is trained using a ranking-based loss objective, which encourages the "true" class to be ranked higher than all other classes by a specific margin. Optimization is performed using Stochastic Gradient Descent (SGD). To manage model complexity, the authors propose a "pruning" strategy: they start with a large number of matrices and, during training, eliminate those that are rarely selected by the data (e.g., used by less than 5% of training examples).

Experimental Evaluation

LatEm was evaluated on three standard ZSC benchmarks: the Caltech-UCSD Birds (CUB) dataset (200 species), Stanford Dogs (113 breeds), and Animals with Attributes (AWA) (50 classes). The authors tested the model using various sources of "side information," including human-annotated attributes and unsupervised text embeddings like word2vec and GloVe.

Key Results and Insights

LatEm consistently outperformed the linear SJE baseline across nearly all experimental settings:

  • Accuracy Improvements: On the AWA dataset using word2vec, accuracy increased from 51.2% (SJE) to 61.1% (LatEm). On CUB using GloVe, accuracy rose from 24.2% to 32.5%. When combining multiple types of embeddings, the model reached a state-of-the-art 76.1% on AWA.
  • Handling Noisy Data: The most significant performance gains occurred when using unsupervised text embeddings. These embeddings are often noisier than human-curated attributes; LatEm’s added flexibility allows it to navigate this noise more effectively than rigid linear models.
  • Visual Interpretability: Visualization of image assignments to specific matrices revealed clear clusters. One matrix might consistently identify "completely black birds," while another focuses on "small birds with yellow plumage," confirming that the latent variables capture meaningful visual archetypes.

Conclusion

LatEm demonstrates that moving from a linear to a piecewise linear compatibility function provides a substantial boost in zero-shot learning performance. While the gains are more modest when using extremely precise human-annotated attributes, the model's ability to handle noisy, unsupervised embeddings makes it a powerful tool for large-scale classification. Future work may explore deeper, fully non-linear neural architectures to further enhance the compatibility function between visual and semantic spaces.

Summary updated

BibTeX
@inproceedings{xian2016latent,
  author = {Yongqin Xian and Zeynep Akata and Gaurav Sharma and Quynh Nguyen and Matthias Hein and Bernt Schiele},
  title = {{Latent Embeddings for Zero-Shot Classification}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  doi = {10.1109/cvpr.2016.15},
}
Figure