Learning Attention Propagation for Compositional Zero-Shot Learning

Muhammad Gul Zain Ali Khan, Muhammad Ferjad Naeem, Luc Van Gool, Alain Pagani, Didier Stricker, Muhammad Zeshan Afzal

Abstract

Compositional zero-shot learning aims to recognize unseen compositions of seen visual primitives of object classes and their states. While all primitives (states and objects) are observable during training in some combination, their complex interaction makes this task especially hard. For example, wet changes the visual appearance of a dog very differently from a bicycle. Furthermore, we argue that relationships between compositions go beyond shared states or objects. A cluttered office can contain a busy table; even though these compositions don’t share a state or object, the presence of a busy table can guide the presence of a cluttered office. We propose a novel method called Compositional Attention Propagated Embedding (CAPE) as a solution. The key intuition to our method is that a rich dependency structure exists between compositions arising from complex interactions of primitives in addition to other dependencies between compositions. CAPE learns to identify this structure and propagates knowledge between them to learn class embedding for all seen and unseen compositions. In the challenging generalized compositional zero-shot setting, we show that our method outperforms previous baselines to set a new state-of-the-art on three publicly available benchmarks.

Introduction

Compositional Zero-Shot Learning (CZSL) focuses on recognizing novel combinations of objects and states (e.g., "wet dog") after observing these primitives in different contexts during training (e.g., "wet car" and "brown dog"). This task presents two primary challenges. First, primitives exhibit complex interactions: the visual manifestation of a state like "wet" varies significantly depending on the object it modifies. Second, there are hidden dependencies between compositions. Traditional methods often assume compositions are only related if they share a primitive. However, contextually related pairs like "cluttered office" and "busy table" share semantic dependencies despite having no overlapping primitives.

Existing models frequently rely on Graph Convolutional Networks (GCNs) with fixed, manually defined links. CAPE moves away from these rigid structures, instead utilizing a data-driven approach to learn how knowledge should dynamically flow between concepts.

Methods: Compositional Attention Propagated Embedding (CAPE)

The proposed CAPE framework centers on the CAPE-Propagator, which treats the relationships between compositions as a self-attention problem.

Overview of the CAPE architecture showing the attention-based propagation of knowledge between compositions.

Self-Attention and Knowledge Propagation

Unlike GCNs that use a pre-defined adjacency matrix, CAPE employs Multi-Head Attention (MHA) to discover "propagation routes." The model calculates the relevance of one composition (the query) to others (the keys), allowing it to learn which compositions provide the most useful information for refining embeddings. This mechanism enables the model to discover semantic links beyond shared primitives—for instance, learning that "Cracked Mud" and "Shattered Window" share visual "cracked-ness" features.

Shared Semantic Space

The system projects image features, extracted via a ResNet-18 backbone, and the attention-refined compositional embeddings into a shared semantic space. Classification is then performed by identifying the composition embedding closest to the image embedding in this space. This end-to-end approach allows CAPE to discover beneficial structures directly from data without requiring prior knowledge of compositional relationships.

Experimental Results

CAPE was evaluated on three standard CZSL benchmarks: MIT-States (53k images, high label noise), CGQA (38k images, massive composition space), and UT-Zappos (fine-grained shoe dataset).

Quantitative Performance

CAPE achieved state-of-the-art (SOTA) results across all benchmarks, with notable gains on the complex CGQA dataset:

  • CGQA: SOTA AUC of 4.6% and a significant Unseen Accuracy of 16.4%.
  • MIT-States: SOTA AUC of 6.7%.
  • UT-Zappos: SOTA AUC of 35.2%.

The attention mechanism proved robust even against the high label noise present in the MIT-States dataset, likely by learning to discount irrelevant propagation routes.

Qualitative Analysis

Qualitative results on CGQA and MIT-States datasets, showcasing both optimal and semantically relevant sub-optimal predictions. Source, p. 7

Qualitative results on CGQA and MIT-States datasets, showcasing both optimal and semantically relevant sub-optimal predictions.

Qualitative results demonstrate the model's sophisticated understanding of visual and semantic similarities. In "sub-optimal" cases, the model often predicts highly relevant alternatives. For example, when presented with a "Gold Mirror," the model might predict "Round Mirror," indicating a correct identification of the object's geometry even if the specific material attribute was missed.

Conclusion

CAPE introduces a flexible, attention-based approach to knowledge propagation in CZSL, successfully capturing complex dependencies between compositions. While the model sets new performance standards, future work could address the multi-label nature of real-world images—where a single scene may contain multiple valid compositions—and further explore the impact of visual backbone fine-tuning.

Summary updated

BibTeX
@inproceedings{khan2023learning,
  author = {Muhammad Gul Zain Ali Khan and Muhammad Ferjad Naeem and Luc Van Gool and Alain Pagani and Didier Stricker and Muhammad Zeshan Afzal},
  title = {{Learning Attention Propagation for Compositional Zero-Shot Learning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=DeDo9RUvN4Y},
}
Figure