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

Zero-Shot Learning by Harnessing Adversarial Samples

Zhi Chen, Peng-Fei Zhang, Jingjing Li, Sen Wang, Zi Huang

Abstract

Zero-Shot Learning (ZSL) relies on the transfer of knowledge from seen to unseen classes via shared semantic attributes. While data augmentation is a staple in deep learning for improving generalization, traditional techniques often introduce "semantic distortion" in ZSL by inadvertently removing or altering critical visual attributes. This paper introduces Harnessing Adversarial Samples (HAS), a novel framework that utilizes adversarial training to generate semantically consistent yet visually challenging image augmentations. By perturbing images and attention maps, HAS forces the model to learn robust, localized features without the noise associated with random cropping or color jittering. Our experiments demonstrate that HAS achieves state-of-the-art performance on major ZSL benchmarks, including CUB and AwA2.

Introduction

Zero-Shot Learning (ZSL) addresses the challenge of recognizing objects from classes that were not present during the training phase. This is achieved by leveraging auxiliary information, such as attribute descriptions (e.g., "has wings," "yellow belly") or word embeddings, to bridge the gap between seen and unseen categories.

In standard supervised learning, data augmentation techniques like random cropping, flipping, and color jittering are essential for preventing overfitting. However, in the context of ZSL, these methods can be counterproductive. The authors identify a phenomenon termed semantic distortion: when a random crop removes a bird's beak or a color jitter changes a distinctive plumage color, the semantic label (which still describes the beak or the original color) no longer matches the visual data. This mismatch introduces noise into the training process, hindering the model's ability to associate specific pixels with their corresponding semantic attributes.

The HAS Framework

To mitigate semantic distortion, the proposed Harnessing Adversarial Samples (HAS) framework treats adversarial perturbations not as attacks to be defended against, but as a sophisticated form of data augmentation. HAS generates "smart" samples that are visually difficult for the model to classify but remain semantically intact.

Three Pillars of Generation

The HAS approach is built upon three core objectives designed to improve the quality of the learned visual-semantic embeddings:

  1. Robust Generation: The framework generates adversarial samples that mimic "negative classes" (classes other than the ground truth). By maximizing the entropy of the classification probability, the model is forced to refine its decision boundaries, learning to distinguish between visually similar species that share many attributes.
  2. Reliable Generation: To ensure that the adversarial samples do not "drift" too far from the original image's identity, a constraint is applied to keep the visual features of the perturbed sample close to the original in the latent space. This ensures the image remains recognizable and the semantic attributes remain valid.
  3. Diverse Generation: ZSL models often over-rely on a few highly discriminative patches (e.g., only looking at the head of a bird). HAS explicitly perturbs the model's attention maps, forcing the system to search for attributes across the entire image. This encourages the discovery of secondary and tertiary features, leading to a more holistic understanding of the object.

Training Cycle

The training process follows a two-step iterative cycle. First, the model undergoes standard ZSL training on original images. Second, an adversarial phase occurs where the images themselves are updated via gradient descent to maximize the model's loss. The model is then retrained on these newly generated, "harder" samples, creating a feedback loop that continuously sharpens the model's feature extraction capabilities.

Experimental Results

The authors evaluated HAS on three primary ZSL benchmarks: Caltech-UCSD Birds-200-2011 (CUB), Animals with Attributes 2 (AwA2), and Scene UNderstanding (SUN).

Quantitative Performance

HAS demonstrated superior performance, particularly in the Generalized Zero-Shot Learning (GZSL) setting, where the model must identify both seen and unseen classes at test time:

  • CUB: HAS achieved a Harmonic Mean (H-score) of 71.8%, outperforming previous embedding-based methods.
  • AwA2: The model reached an H-score of 73.3%, a significant improvement over the baseline Attribute Prototype Network (APN) which scored 71.0%.
  • SUN: While HAS remained competitive, its lead was less pronounced on this dataset. The authors attribute this to the high number of classes (717) in SUN, where generative models that synthesize synthetic feature vectors still maintain a slight advantage.

The Failure of Traditional Augmentation

A key finding of the paper is the quantitative evidence showing that common augmentation techniques—such as MixUp, CutOut, and ColorJitter—frequently decrease ZSL performance. This confirms the authors' hypothesis that ZSL is uniquely sensitive to pixel-level semantic integrity, making the "surgical" precision of adversarial samples far more effective than random pixel manipulations.

Conclusion

By repurposing adversarial attacks as a form of semantic-preserving augmentation, HAS provides a powerful solution to the problem of semantic distortion in Zero-Shot Learning. The method's ability to force models to localize attributes and find subtle class boundaries leads to significant gains in recognition accuracy. Future research may explore the integration of HAS with generative ZSL models to combine the benefits of realistic image perturbations with the diversity of synthetic feature generation.

Summary updated

BibTeX
@inproceedings{chen2023zero,
  author = {Zhi Chen and Peng-Fei Zhang and Jingjing Li and Sen Wang and Zi Huang},
  title = {{Zero-Shot Learning by Harnessing Adversarial Samples}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3611823},
}
Figure