Contextual Interaction via Primitive-based Adversarial Training for Compositional Zero-shot Learning

Suyi Li, Chenyi Jiang, Shidong Wang, Yang Long, Zheng Zhang, Haofeng Zhang

TL;DR

This paper introduces PBadv, a novel training framework that uses adversarial perturbations to simulate how the visual appearance of attributes (like "wet") changes across different objects (like "cat" vs. "floor"). By combining this with a semantic-aware oversampling strategy (OS-OSP), the authors achieve state-of-the-art performance in recognizing never-before-seen attribute-object combinations.

What Problem Does This Paper Address?

The core challenge in Compositional Zero-shot Learning (CZSL) is "contextual interaction." Humans can easily imagine a "purple tiger" even if they’ve only seen "purple grapes" and "orange tigers." However, for a machine, the visual "primitive" of an attribute often changes based on the object it's attached to. A "melted" candle looks very different from "melted" chocolate.

Previous research focused on "disentangling"—trying to separate the attribute from the object entirely. The authors argue this is insufficient because it ignores the mechanism of how these primitives interact. Furthermore, real-world datasets are "long-tailed," meaning some compositions are extremely rare, making it hard for models to generalize to unseen pairs.

Methods

The authors propose two main components to bridge the gap between seen and unseen compositions:

  1. Primitive-Based Adversarial Training (PBadv): Instead of just training on clean images, the model generates "virtual" perturbed features. Inspired by adversarial attacks like the Fast Gradient Sign Method (FGSM), PBadv applies a one-step gradient-based attack to the decomposed attribute and object features. By treating contextual variation as a form of "semantic noise," the model learns to be robust to the visual shifts that occur when an attribute is paired with a new object.
  2. Object-Similarity-Based OverSampling (OS-OSP): To handle data imbalance, the authors don't just duplicate rare samples. Instead, they use semantic word embeddings (from GloVe) to find similar objects. If the model needs more "cute dog" samples, it might look at "cute cat" features to synthesize a more realistic "virtual" compositional feature. This ensures the augmented data is diverse and grounded in semantic reality.

The architecture uses a Vision Transformer (ViT-B) backbone and an ensemble learning strategy that aggregates predictions from multiple branches (attribute, object, and composed pair) to make a final decision.

Datasets

The model was evaluated on three benchmark datasets:

  • UT-Zappos50K: A fine-grained dataset of shoes (e.g., "leather sandals").
  • MIT-States: A noisy, mid-scale dataset of various objects and states (e.g., "damp towel").
  • C-GQA: A large-scale, challenging dataset with over 9,500 compositional labels, providing a more rigorous test of real-world applicability.

Key Insights and Ideas

  • Adversarial Noise as Context: The most striking "aha moment" is the realization that the visual variance caused by context can be modeled as a random perturbation process. By intentionally "attacking" the features during training, the model builds a "defense" that manifests as better generalization to unseen contexts.
  • Language-Guided Vision: The OS-OSP method highlights that linguistic relationships (knowing a dog is like a cat) can be directly used to improve visual feature synthesis, helping the model "hallucinate" rare compositions more effectively.
  • Robustness over Disentanglement: While many models try to perfectly separate attributes from objects, this paper suggests that acknowledging and modeling the interaction between them is more effective for zero-shot tasks.

Key Results

The proposed method achieved State-of-the-Art (SOTA) results across all three datasets:

  • UT-Zappos50K: Reached an Area Under the Curve (AUC) of 40.0%, a significant jump over previous methods like ADE (35.1%).
  • MIT-States: Achieved an AUC of 8.6%, outperforming the previous best of 7.8%.
  • C-GQA: On this massive dataset, the model hit a 5.3% AUC, proving its scalability.
  • Open-World Performance: In "open-world" scenarios (where the model doesn't know which compositions are even possible), PBadv maintained a strong lead, showing it doesn't just rely on narrow search spaces.

Limitations and Future Work

The authors note that while they use a powerful ViT-B backbone, they primarily focus on the final "class token" ([CLS]) and do not fully exploit intra-layer information or multi-scale features, which could potentially capture even finer contextual details.

Additionally, qualitative results showed that some "failures" were actually due to noisy ground-truth labels in the datasets (e.g., the model identifying a "cracked" window as "broken"). This suggests that future work might need to address label ambiguity or move toward "soft" labels that acknowledge the overlapping nature of many visual attributes.

Summary updated

BibTeX
@article{li2025contextual,
  author = {Suyi Li and Chenyi Jiang and Shidong Wang and Yang Long and Zheng Zhang and Haofeng Zhang},
  title = {{Contextual Interaction via Primitive-based Adversarial Training for Compositional Zero-shot Learning}},
  journal = {ACM Trans. Multim. Comput. Commun. Appl.},
  year = {2025},
  doi = {10.1145/3712596},
}
Figure