NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hierarchical Visual Primitive Experts for Compositional Zero-Shot Learning

Hanjae Kim, Jiyoung Lee, Seongheon Park, Kwanghoon SohnICCV 2023

Abstract

Compositional zero-shot learning (CZSL) aims to recognize unseen compositions with prior knowledge of known primitives (attribute and object). Previous works for CZSL often suffer from grasping the contextuality between attribute and object, as well as the discriminability of visual features, and the long-tailed distribution of real-world compositional data. We propose a simple and scalable framework called Composition Transformer (CoT) to address these issues. CoT employs object and attribute experts in distinctive manners to generate representative embeddings, using the visual network hierarchically. The object expert extracts representative object embeddings from the final layer in a bottom-up manner, while the attribute expert makes attribute embeddings in a top-down manner with a proposed object-guided attention module that models contextuality explicitly. To remedy biased prediction caused by imbalanced data distribution, we develop a simple minority attribute augmentation (MAA) that synthesizes virtual samples by mixing two images and oversampling minority attribute classes. Our method achieves SoTA performance on several benchmarks, including MIT-States, C-GQA, and VAW-CZSL. We also demonstrate the effectiveness of CoT in improving visual discrimination and addressing the model bias from the imbalanced data distribution.

Introduction

Compositional Zero-Shot Learning (CZSL) is the challenge of teaching machines to recognize novel combinations of known primitives—specifically attributes (e.g., "wet," "old") and objects (e.g., "dog," "car"). While a model may be trained on "wet grass" and "brown dog," CZSL evaluates its ability to generalize this knowledge to recognize "wet dog" or "brown grass" without having seen those specific pairs during training.

Existing CZSL methods face three primary hurdles:

  1. Contextuality: The visual appearance of an attribute is heavily dependent on the object it modifies. "Old" manifests differently on a car than it does on a person.
  2. Discriminability: Standard neural backbones often prioritize high-level object semantics in their final layers, potentially discarding the fine-grained local details (texture, color) essential for attribute identification.
  3. The Long-Tail Problem: Real-world datasets are inherently imbalanced. Models often develop a bias toward common pairs (e.g., "green grass"), leading to the "hubness problem" where rare combinations are ignored.

The Composition Transformer (CoT) Framework

To address these challenges, we introduce the Composition Transformer (CoT), a framework that leverages the hierarchical nature of modern backbones like Vision Transformers (ViT) or ResNets to process attributes and objects through specialized "experts."

Hierarchical Visual Experts

CoT diverges from traditional single-vector feature extraction by splitting the recognition task into two distinct pathways:

  • Object Expert: This module operates in a bottom-up manner. It utilizes the high-level semantic information found in the final layers of the backbone to identify the core object.
  • Attribute Expert: This module operates in a top-down manner. It accesses intermediate layers of the network, which retain primitive visual information like texture and local patterns, to extract attribute-specific features.

Object-Guided Attention Module

To model contextuality explicitly, the Attribute Expert does not operate in isolation. It employs an Object-guided Attention Module that uses the output of the Object Expert as a semantic filter. By conditioning attribute recognition on the identified object, the model can look for "wetness" in the context of a street (e.g., puddles) rather than "wetness" in the context of a dog (e.g., fur texture). This mechanism ensures that the attribute features are relevant to the specific object being analyzed.

Minority Attribute Augmentation (MAA)

To mitigate the bias caused by imbalanced data, we propose Minority Attribute Augmentation (MAA). Inspired by "Mixup" techniques, MAA synthesizes virtual training samples by blending images and oversampling minority attribute classes. By performing these mixes in the word vector space, the model is forced to regularize its understanding of rare attributes, preventing dominant labels from overwhelming the embedding space.

Experimental Evaluation

We evaluated CoT on three major CZSL benchmarks:

  • MIT-States: A classic dataset containing 115 attributes and 245 objects.
  • C-GQA: A large-scale dataset based on the GQA benchmark, featuring diverse "in-the-wild" compositions.
  • VAW-CZSL: A challenging benchmark with nearly 10,000 composition labels, designed to test attribute recognition in complex scenes.

Key Results

CoT achieved state-of-the-art (SoTA) performance across all benchmarks, significantly outperforming previous methods like CGE and OADis. Notably, on the complex VAW-CZSL dataset, CoT reached a 7.2% Top-1 accuracy, a substantial improvement over existing models. Qualitative analysis via heatmaps confirmed that CoT successfully localizes different regions for the same attribute depending on the object context. Furthermore, the model remains computationally efficient, with GFLOPs comparable to previous SoTA models due to the parameter-efficient design of the attention modules.

Conclusion

The CoT framework demonstrates that treating attributes and objects as hierarchical primitives—rather than flat labels—is essential for effective CZSL. By combining object-guided context with targeted data augmentation for rare classes, CoT effectively addresses the issues of contextuality, discriminability, and data imbalance. Future work will focus on scaling this approach to multi-label scenes where multiple objects and attributes interact simultaneously.

Summary updated

BibTeX
@inproceedings{kim2023hierarchical,
  author = {Hanjae Kim and Jiyoung Lee and Seongheon Park and Kwanghoon Sohn},
  title = {{Hierarchical Visual Primitive Experts for Compositional Zero-Shot Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=blv5FbbHOL},
}
Figure