Attention Based Simple Primitives for Open World Compositional Zero-Shot Learning

Ans Munir, Faisal Z. Qureshi, Muhammad Haris Khan, Mohsen AliDICTA 2024

Abstract

Compositional Zero-Shot Learning (CZSL) aims to recognize novel combinations of known attributes and objects. Traditional "Closed World" settings limit the test space to a predefined set of unseen pairs, whereas the "Open World" (OW-CZSL) setting considers all possible combinations, introducing significant challenges in contextuality and feasibility. This paper introduces the Attention-based Simple Primitives (ASP) model, which utilizes a self-attention mechanism to capture the interdependence between attributes and objects. By leveraging external knowledge from ConceptNet to prune unfeasible combinations, ASP achieves state-of-the-art performance on complex benchmarks like CGQA and MIT-States.

Introduction

The core challenge of CZSL is teaching models to generalize from seen primitives (e.g., "red car," "white cake") to unseen compositions (e.g., "red cake"). In the Open World setting, the search space expands to include every possible combination of attributes and objects in the dataset. This leads to two primary difficulties:

  1. Contextuality: The visual appearance of an attribute changes based on the object it describes. For instance, "old" looks very different on an elephant than it does on a car.
  2. Feasibility: Unrestricted pairing leads to a massive search space containing semantically nonsensical combinations like "rusty cake" or "hot ice."
The difference between Closed World and Open World settings.

Methodology: Attention-based Simple Primitives (ASP)

The proposed ASP model addresses these challenges through a multi-pronged architectural approach designed to model the interaction between semantic concepts before mapping them to visual features.

Dual-Stream Encoding and Attention

Images are processed via a standard ResNet18 backbone, while text labels are converted into word embeddings using Word2Vec. The core innovation is the Self-Attention block. Instead of treating attributes and objects as independent vectors, ASP passes concatenated embeddings through a multi-headed self-attention mechanism. This allows the "attribute" features to be modified by the "object" context (and vice versa) before they are compared to the image.

Visual-Semantic Alignment

The model projects image features into two separate spaces: an Attribute Space (AS) and an Object Space (OS). It then calculates the cosine similarity between these visual projections and the contextualized textual embeddings generated by the attention block.

Knowledge-Guided Feasibility

To manage the massive search space of the Open World, ASP incorporates ConceptNet, an external common-sense knowledge graph. This is used to calculate feasibility scores for combinations, effectively pruning the search space to only include realistic pairs and preventing the model from being confused by "distractor" combinations.

The overall architecture of the ASP model, highlighting the self-attention block and the separate Attribute and Object spaces.

Experiments and Results

The authors evaluated ASP on three standard benchmarks: MIT-States, UT-Zappos, and the highly complex CGQA dataset.

  • CGQA: On this challenging dataset featuring over 278,000 possible combinations, ASP achieved state-of-the-art results, outperforming the previous leading model (KG-SP) with a Harmonic Mean of 5.0 and an AUC of 0.80.
  • MIT-States: Despite the inherent noise in this dataset, ASP showed superior performance in unseen accuracy (8.4%) and AUC (1.4).
  • Ablation Studies: Results indicated that a configuration of two attention heads and two-layer MLPs provided the optimal balance between learning capacity and generalization without overfitting.

Conclusion

The ASP model demonstrates that modeling the interaction between semantic primitives is crucial for effective zero-shot learning. By combining self-attention for contextuality with external knowledge for feasibility pruning, ASP sets a new benchmark for Open World CZSL. While performance on specialized datasets like UT-Zappos suggests room for improvement in fine-grained differentiation, the approach provides a robust framework for large-scale compositional recognition.

Summary updated

BibTeX
@inproceedings{munir2024attention,
  author = {Ans Munir and Faisal Z. Qureshi and Muhammad Haris Khan and Mohsen Ali},
  title = {{Attention Based Simple Primitives for Open World Compositional Zero-Shot Learning}},
  booktitle = {DICTA},
  year = {2024},
  url = {https://openreview.net/forum?id=HjtQzjiYTo},
}
Figure