Structured Latent Embeddings for Recognizing Unseen Classes in Unseen Domains

Shivam Chandhok, Sanath Narayan, Hisham Cholakkal, Rao Muhammad Anwer, Vineeth N. Balasubramanian, Fahad Shahbaz Khan, Ling ShaoBMVC 2021

Abstract

The need to address the scarcity of task-specific annotated data has resulted in concerted efforts in recent years for specific settings such as zero-shot learning (ZSL) and domain generalization (DG), to separately address the issues of semantic shift and domain shift, respectively. However, real-world applications often do not have constrained settings and necessitate handling unseen classes in unseen domains -- a setting called Zero-shot Domain Generalization (ZSLDG), which presents the issues of domain and semantic shifts simultaneously. In this work, we propose a novel approach that learns domain-agnostic structured latent embeddings by projecting images from different domains as well as class-specific semantic text-based representations to a common latent space. Our method jointly strives for aligning multimodal cues, partitioning the latent space according to semantic concepts, and learning domain invariance for the visual-semantic joint distribution. Experiments on DomainNet benchmarks show significant gains, particularly on difficult domains like quickdraw and sketch.

Introduction

In computer vision, models are typically challenged by two distinct types of shifts. Zero-Shot Learning (ZSL) addresses semantic shifts, where a model must recognize categories it has never seen during training (e.g., training on cats and dogs but testing on elephants). Domain Generalization (DG) addresses domain shifts, where a model must recognize familiar categories in new visual styles (e.g., training on real photos but testing on sketches).

However, real-world scenarios often present both challenges simultaneously, a setting known as Zero-Shot Domain Generalization (ZSLDG). For instance, an autonomous system might need to identify a "camel" in a "clipart" style having only encountered "giraffes" in "real" photos. Previous approaches to ZSLDG often suffer from "hubness"—where embeddings cluster into uninformative blobs—or overfit to training styles. This work proposes a framework to create a domain-agnostic yet class-discriminative representation.

Conceptual overview of Zero-Shot Domain Generalization (ZSLDG) and the concept partitioning approach.

Methodology

The proposed framework constructs a structured latent space ($\mathcal{Z}$) through three primary components:

1. Multimodal Alignment

The model utilizes a visual encoder for images and a semantic encoder for text-based word embeddings. To align these disparate modalities, a Wasserstein GAN (WGAN) loss is employed, ensuring that visual and semantic features share a common distributional space.

2. Structured Partitioning

To prevent disorganized embeddings, a Center Loss function is applied. This forces the model to cluster embeddings of the same class together, regardless of their source domain. This partitioning ensures that the latent space is organized by domain-agnostic semantic concepts (e.g., "long neck," "has spots").

3. Joint Invariance Module

Unlike standard DG methods that focus on marginal image distributions, this framework targets the joint distribution of images and their semantic labels. A triple adversarial loss is used to ensure that the visual-semantic relationship remains invariant across domains, facilitating better generalization to unseen classes in unseen styles.

The proposed framework architecture featuring multimodal alignment, structured partitioning, and joint invariance modules.

Experiments and Results

The approach was evaluated on two major benchmarks: DomainNet (345 categories across 6 domains) and DomainNet-LS (Limited Source, training only on "Real" and "Painting").

Performance on DomainNet

The proposed method achieved a state-of-the-art average accuracy of 21.9% on DomainNet, surpassing the previous best method, CuMix (20.7%). Notably, the model showed significant improvements in highly abstract domains such as Quickdraw, reaching 11.5% accuracy—a 1.6% absolute gain over prior work.

Ablation Studies

Ablation experiments confirmed the necessity of each component. Adding "Structured Partitioning" and "Joint Invariance" consistently improved performance over baseline multimodal alignment. This demonstrates that a structured, concept-partitioned latent space is critical for effective generalization in ZSLDG tasks.

Conclusion

While Zero-Shot Domain Generalization remains a formidable challenge with absolute accuracies around 22%, this work demonstrates that learning domain-agnostic structured latent embeddings is a significant step forward. By focusing on joint distribution invariance and semantic partitioning, the model effectively bridges the gap between unseen classes and unseen domains. Future research may explore self-supervised learning to leverage unlabeled data and dynamic label spaces for open-world recognition.

Summary updated

BibTeX
@inproceedings{chandhok2021structured,
  author = {Shivam Chandhok and Sanath Narayan and Hisham Cholakkal and Rao Muhammad Anwer and Vineeth N. Balasubramanian and Fahad Shahbaz Khan and Ling Shao},
  title = {{Structured Latent Embeddings for Recognizing Unseen Classes in Unseen Domains}},
  booktitle = {BMVC},
  year = {2021},
  url = {https://openreview.net/forum?id=-NX3TUFiDQ3},
}
Figure