A Simple Approach for Zero-Shot Learning based on Triplet Distribution Embeddings

Vivek Chalumuri, Bac NguyenarXiv 2021

Abstract

Zero-Shot Learning (ZSL) addresses the challenge of recognizing objects from classes not seen during training by utilizing semantic descriptions. Conventional ZSL approaches typically map images and class attributes to single point vectors in a shared embedding space. However, this representation fails to capture the inherent intra-class variability and uncertainty of visual data. We propose DETC (Distribution Embeddings based on Triplet Constraints), a framework that represents both images and class attributes as multivariate Gaussian distributions. By employing a triplet loss function based on the 2-Wasserstein distance, DETC effectively models the diversity within classes. Our approach achieves state-of-the-art results on several benchmarks, including a significant improvement in fine-grained bird species recognition.

Introduction

The core challenge in Zero-Shot Learning (ZSL) is the transfer of knowledge from seen classes to unseen classes via semantic attributes (e.g., "stripes" for a Zebra). Most existing methods treat this as a point-to-point mapping problem. The authors argue that this is insufficient for fine-grained tasks where intra-class variability—differences in pose, lighting, or background—is significant. Forcing diverse images of a single class into a single point leads to a loss of discriminative information. By modeling classes as distributions rather than points, the model can better represent the natural variety and uncertainty present in real-world data.

Methods

The DETC framework maps visual features and semantic attributes into a shared latent space where they are represented as multivariate Gaussian distributions, defined by a mean $\mu$ and a diagonal covariance matrix $\Sigma$.

Overview of the DETC architecture mapping visual and semantic features into a shared latent space of distributions.

The architecture consists of several primary components:

  1. Dual Networks: Two separate Multi-Layer Perceptrons (MLPs), $f_\Theta$ and $f_\Phi$, are used. $f_\Theta$ transforms image features (extracted from a pre-trained ResNet) into the latent space, while $f_\Phi$ maps semantic attribute vectors into the same space.
  2. Wasserstein Distance: To quantify the similarity between distributions, the model utilizes the 2-Wasserstein distance (Earth Mover’s Distance). This metric is chosen for its stability and ability to provide informative gradients even when distributions have non-overlapping supports.
  3. Triplet Distribution Loss: The networks are trained using a triplet constraint. For a given anchor image distribution, the distance to its corresponding class distribution must be smaller than the distance to any other class distribution by a predefined margin.
  4. Synthetic Data Generation: A key advantage of learning distributions is the ability to sample synthetic features for unseen classes. These samples are used to train a standard classifier, improving performance in Generalized Zero-Shot Learning (GZSL) scenarios where both seen and unseen classes are present at test time.

Experimental Setup

The proposed method was evaluated on three standard ZSL benchmarks:

  • AWA2 (Animals with Attributes 2): 37,322 images across 50 animal categories.
  • CUB (Caltech-UCSD Birds 200): A fine-grained dataset containing 200 bird species.
  • SUN (Scene Recognition): 14,340 images from 717 scene categories.

Results and Discussion

DETC demonstrates superior performance across all tested datasets. On the CUB dataset, it achieved a top-1 accuracy of 74.6%, representing a 4.6% relative improvement over previous state-of-the-art methods. In the Generalized ZSL setting, the model maintained a high Harmonic Mean of 59.5% on CUB and 64.3% on AWA2, indicating a robust balance between seen and unseen class recognition.

The Impact of Distance Measures

A critical finding of this work is the effectiveness of the Wasserstein distance compared to other statistical divergences.

Comparison of ZSL accuracy using different distance measures (WD: Wasserstein, BD: Bhattacharyya, KD: Kullback-Leibler) across SUN, CUB, and AWA2 datasets.

As shown in the ablation studies, the Wasserstein distance (WD) consistently outperforms the Bhattacharyya distance (BD) and Kullback–Leibler (KD) divergence. This is likely due to the linear behavior of the Wasserstein metric, which provides more consistent feedback during the optimization of the triplet loss.

Conclusion

DETC offers a simple yet powerful alternative to complex generative models for Zero-Shot Learning. By representing classes as distributions and leveraging the Wasserstein distance within a triplet loss framework, the model effectively captures intra-class variability. While the current implementation uses diagonal covariance matrices for efficiency, future work could explore full covariance structures or the integration of higher-quality automated attributes to further reduce human annotation dependence.

Summary updated

BibTeX
@misc{chalumuri2021simple,
  author = {Vivek Chalumuri and Bac Nguyen},
  title = {{A Simple Approach for Zero-Shot Learning based on Triplet Distribution Embeddings}},
  year = {2021},
  eprint = {2103.15939},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.15939},
}
Figure