Learning Attention as Disentangler for Compositional Zero-shot Learning

Shaozhe Hao, Kai Han, Kwan-Yee K. WongCVPR 2023

Abstract

Compositional zero-shot learning (CZSL) aims at learning visual concepts (i.e., attributes and objects) from seen compositions and combining concept knowledge into unseen compositions. The key to CZSL is learning the disentanglement of the attribute-object composition. To this end, we propose to exploit cross-attentions as compositional disentanglers to learn disentangled concept embeddings. For example, if we want to recognize an unseen composition “yellow flower”, we can learn the attribute concept “yellow” and object concept “flower” from different yellow objects and different flowers respectively. To further constrain the disentanglers to learn the concept of interest, we employ a regularization at the attention level. Specifically, we adapt the earth mover's distance (EMD) as a feature similarity metric in the cross-attention module. Moreover, benefiting from concept disentanglement, we improve the inference process and tune the prediction score by combining multiple concept probabilities. Comprehensive experiments on three CZSL benchmark datasets demonstrate that our method significantly outperforms previous works in both closed- and open-world settings, establishing a new state-of-the-art.

Introduction

Compositional Zero-Shot Learning (CZSL) is a fundamental challenge in computer vision that seeks to enable machines to recognize novel combinations of known concepts. For instance, if a model has been trained on "red apples" and "green cars," a successful CZSL system should be able to identify a "red car" upon first encounter.

The core concept of Compositional Zero-Shot Learning (CZSL): learning primitives from seen compositions to recognize unseen ones.

The primary hurdle in this field is disentanglement. In natural imagery, attributes (like color or texture) and objects are often physically inseparable. Previous methodologies frequently relied on spatial attention, which fails when attributes and objects overlap perfectly in 2D space—such as the yellow color of a lemon. Researchers from the University of Hong Kong have introduced ADE (Attention as DisEntangler), a framework that shifts the focus from spatial location to representational subspaces using the multi-head attention mechanism of Vision Transformers (ViT).

The ADE Framework

The ADE model is built upon a three-pronged strategy designed to isolate visual primitives through a Vision Transformer backbone:

  1. Cross-Attention Disentanglers: Unlike standard self-attention, ADE utilizes cross-attention between pairs of images that share a single common concept. To learn the "yellow" attribute, the model compares a "yellow bird" with a "yellow pear." This mechanism acts as a filter, extracting shared attributes while discarding divergent object features.
  2. Attention-Level EMD Regularization: To prevent the attribute disentangler from inadvertently learning object-specific information, the authors employ the Earth Mover’s Distance (EMD). By using EMD as a similarity metric at the attention map level, the model is forced to focus strictly on the specific concept of interest.
  3. Synthesized Inference: During prediction, the model employs a "late fusion" approach. Instead of relying solely on the probability of the full composition $p(c)$, it integrates the independent probabilities of the attribute $p(a)$ and the object $p(o)$. This allows for more robust calibration between seen and unseen combinations.
Overview of the ADE architecture, utilizing cross-attention modules to disentangle attribute and object features across visual and word embedding spaces.

Experimental Evaluation

The model was rigorously tested on four major CZSL benchmarks: Clothing16K (colors and styles), UT-Zappos50K (fine-grained shoe textures), C-GQA (large-scale real-world attributes), and Vaw-CZSL.

ADE established a new state-of-the-art across all datasets in both closed-world and open-world settings. Notably, on the C-GQA dataset, it achieved a relative improvement of approximately 37% in the Area Under Curve (AUC) metric. In the Clothing16K dataset, open-world AUC increased from 64.1 to 68.0, demonstrating superior generalization to entirely novel environments.

Key Insights and Conclusion

A critical realization of this work is that while attributes and objects may overlap spatially, they can be projected into distinct mathematical subspaces within a ViT. By using "auxiliary" images to triangulate features (e.g., using a "red wall" and "blue bus" to isolate the concepts for a "red bus"), the model effectively learns the essence of visual primitives.

While ADE represents a significant leap forward, challenges remain. Computational costs scale with the number of possible compositions, and semantic ambiguity (e.g., "open" looking different for a curtain vs. a computer) suggests that future work should incorporate deeper semantic knowledge. Nonetheless, ADE's ability to disentangle features through attention-level constraints marks a major milestone in achieving human-like compositional understanding in AI.

Summary updated

BibTeX
@inproceedings{hao2023learning,
  author = {Shaozhe Hao and Kai Han and Kwan-Yee K. Wong},
  title = {{Learning Attention as Disentangler for Compositional Zero-shot Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=HU7cTjzqSR},
}
Figure