Compositional Zero-Shot Learning with Contextualized Cues and Adaptive Contrastive Training

Yun Li, Lina Yao, Zhe Liu

TL;DR

The ULAO framework improves Compositional Zero-Shot Learning (CZSL) by first predicting objects to provide "contextual hints" for attribute recognition, and then using an adaptive contrastive learning strategy with model-generated "hard negatives" to ensure attributes are correctly linked to their objects. This approach achieves state-of-the-art results across major benchmarks by overcoming the "bag-of-words" limitations inherent in standard CLIP-based models.

What Problem Does This Paper Address?

Compositional Zero-Shot Learning (CZSL) is the task of recognizing novel combinations of known primitives—for example, recognizing a "ruffled jacket" after only seeing "ruffled skirts" and "smooth jackets."

While Vision-Language Models (VLMs) like CLIP have revolutionized this field, they suffer from a fundamental flaw: they often treat images and text as a "bag of words." They might recognize that both "ruffled" and "jacket" are present in a scene but fail to understand that the jacket is the thing that is ruffled. This leads to two main failure modes:

  1. Primitive Misunderstanding: Confusing attributes with objects (e.g., seeing a "Draped Silk" dress and calling it "Bright Orange" because the color feature overwhelmed the material feature).
  2. Incorrect Linking: Misassociating an attribute with the wrong object in a complex scene (e.g., seeing a person in a ruffled jacket and black pants, but predicting "ruffled pants").

Methods

The authors propose the ULAO (Understanding and Linking Attributes and Objects) framework, which consists of two primary modules:

1. Understanding Attributes and Objects (UAO)

Instead of predicting attributes and objects simultaneously, UAO uses a sequential prediction strategy.

  • Object First: The model first focuses solely on identifying the object. This reduces interference from attribute-related visual features.
  • Contextual Hints: Once the most likely objects are identified, their embeddings are used as "contextual hints" to refine the attribute search. This acknowledges that attributes look different depending on the object (e.g., "old" looks different on a car than on a cat).

2. Linking Attributes and Objects (LAO)

To ensure the model correctly pairs attributes with their corresponding objects, the authors introduce a specialized contrastive learning branch.

  • Hard Negative Generation: Rather than using random negative samples, the model generates "hard negatives" by taking the ground truth and swapping one primitive with the model's own highest-probability misprediction (e.g., if the model confuses "jacket" with "pants," it generates "ruffled pants" as a hard negative for "ruffled jacket").
  • Adaptive Threshold: The contrastive loss uses a dynamic threshold that evolves during training. This acts as a form of curriculum learning, preventing the model from being penalized too harshly by difficult negatives early in the training process.

Datasets

The model was evaluated on three standard CZSL benchmarks:

  • MIT-States: 115 attributes and 245 objects; known for diverse natural objects and fine-grained attributes.
  • UT-Zappos: 16 attributes and 12 objects; focused specifically on footwear with highly similar primitives (e.g., "suede" vs. "leather").
  • C-GQA: A large-scale dataset with 413 attributes and 674 objects, providing a significant challenge for Open-World scenarios.

Key Insights and Ideas

  • Attributes are Context-Dependent: The "aha moment" here is that attributes shouldn't be learned in a vacuum. By feeding the predicted object back into the attribute classifier, the model learns a more nuanced, object-aware representation of descriptors.
  • Self-Correction through Hard Negatives: By specifically training the model to distinguish the correct label from its own most likely mistakes, the authors force the model to learn the "linkage" between primitives rather than just identifying their presence.
  • Gradient Detachment is Crucial: In the UAO module, gradients are detached from the object prediction when training the attribute branch. This prevents the attribute classification task from "corrupting" the object recognizer, maintaining the integrity of the sequential logic.

Key Results

ULAO achieved state-of-the-art (SOTA) performance across all three datasets in both Closed-World (where the set of unseen compositions is known) and Open-World (where any combination is possible) settings.

  • UT-Zappos: Saw the most significant gains, with a 4.8% improvement in AUC and 4.5% in Harmonic Mean (HM). This suggests the adaptive contrastive loss is particularly effective at distinguishing between very similar primitives (like different shoe materials).
  • C-GQA: In the challenging Open-World setting, the model showed a 19.6% relative improvement, demonstrating its robustness when the search space of potential compositions is massive.
  • Qualitative Success: The model successfully corrected "linkage" errors, such as correctly identifying "Draped-Fabric" on a table where previous models incorrectly predicted "Draped-Table."

Limitations and Future Work

  • Error Propagation: Because the UAO module relies on sequential prediction, an incorrect object prediction in the first step can lead to an incorrect attribute prediction in the second.
  • Specificity Bias: The authors noted that the adaptive thresholding sometimes causes the model to favor more specific labels (e.g., "Sliced-Apple") over more general, accurate ones (e.g., "Sliced-Fruit"), as general labels are penalized more frequently during training.
  • Future Directions: The authors suggest the model has the potential to be extended to recognize multiple objects within a single scene or to further refine generic labels into more precise, fine-grained categories.

Summary updated

BibTeX
@inproceedings{li2025compositional,
  author = {Yun Li and Lina Yao and Zhe Liu},
  title = {{Compositional Zero-Shot Learning with Contextualized Cues and Adaptive Contrastive Training}},
  booktitle = {ACM Multimedia},
  year = {2025},
  doi = {10.1145/3746027.3755492},
}
Figure