Target-Aware Generative Augmentations for Single-Shot Adaptation

Kowshik Thopalli, Rakshith Subramanyam, Pavan K. Turaga, Jayaraman J. Thiagarajan

TL;DR

SiSTA (Single-Shot Target Augmentations) is a novel framework that adapts deep learning models to new, unseen domains using just a single target image. By fine-tuning a source-trained generative model (StyleGAN) on that one image and employing clever "activation pruning" strategies, SiSTA creates a rich, synthetic dataset that allows a classifier to bridge massive distribution shifts far more effectively than generic data augmentation.

The Challenge of Single-Shot Adaptation

Deep neural networks are notoriously "brittle"—a model trained on high-quality photos often fails when deployed on sketches, cartoons, or even images with heavy fog. Source-Free Domain Adaptation (SFDA) aims to fix this by adapting a pre-trained model to a new "target" domain without needing the original training data (which might be private or too bulky).

The ultimate challenge in this field is single-shot adaptation: what if you only have one example from the new domain? Current methods usually rely on "toolbox" augmentations (like rotating or blurring the image) to create more data. However, these generic tweaks often fail to capture the complex "style" of a new domain. This paper asks: Can we use generative AI to "imagine" a whole dataset based on just one target image?

The SiSTA Framework

The authors introduce SiSTA, which operates in two main stages to synthesize target data and adapt the model:

1. SiSTA-G: Generative Fine-Tuning

The researchers start with a StyleGAN pre-trained on the source domain. They take the single target image, "invert" it into the GAN’s latent space, and then fine-tune the GAN for a few hundred iterations. The goal isn't just to reconstruct that one image perfectly, but to nudge the GAN so that any random latent code it generates now carries the "flavor" or style of the target domain.

Single-shot StyleGAN finetuning

2. SiSTA-S: Target-Aware Sampling

Once they have a target-aware GAN, they don't just sample randomly. They introduce two novel activation pruning strategies to create diverse augmentations:

  • Prune-zero: They identify the weakest activations in the GAN's style layers and set them to zero. This strips away specific style details, creating a more "generic" version of the target domain.
  • Prune-rewind: They replace those weak activations with the original activations from the source GAN. This effectively "mixes" the source and target domains, creating a smooth interpolation that helps the classifier learn domain-invariant features.

Finally, they use this curated synthetic dataset to train the original classifier using a standard adaptation algorithm (like NRC).

Synthetic data generation and Source-free UDA

Datasets and Evaluation

The authors evaluated SiSTA across several diverse benchmarks:

  • CelebA-HQ: Face attribute detection (19 different attributes).
  • AFHQ: Multi-class animal face recognition (Cat, Dog, Wildlife).
  • DomainNet & CIFAR-10: Standard object recognition and massive domain shift benchmarks (Clipart, Painting, Sketch, etc.).
  • Custom Shifts: They introduced specific shifts like "PencilSketch," "Stylization," and various natural corruptions (fog, frost, snow) to test the limits of the system.

Key Insights and Results

  • Generative Models as Data Priors: Instead of seeing a GAN as just an image creator, SiSTA treats it as a repository of "source knowledge" that can be surgically updated with a single target example.
  • Style vs. Content Disentanglement: By focusing pruning on specific "style layers" of the StyleGAN, the authors ensure that the content (e.g., "this is a dog") remains stable while the style (e.g., "this is a charcoal sketch of a dog") varies.
  • Massive Gains on Hard Shifts: In "Domain C" (a complex grayscale/inverted shift), SiSTA improved accuracy by 17.7% over the source-only baseline.
  • Attribute Mastery: For challenging face attributes like "bangs" or "blond hair," SiSTA saw improvements of nearly 30% compared to non-adapted models.
  • Competitive with "Full" Data: Remarkably, in several tests, SiSTA (using only one image) performed nearly as well as models adapted using the entire target dataset. On AFHQ, SiSTA achieved 94.5% accuracy, beating the baseline by over 14% and matching the performance of models that had access to thousands of target images.

Limitations and Future Work

While powerful, SiSTA has a few hurdles. The method requires a high-quality pre-trained GAN for the source domain. If you don't have a StyleGAN for your specific data type, SiSTA can't run. Additionally, fine-tuning a GAN, even for a few hundred iterations, is more computationally expensive than simple image rotations. Finally, the authors noted that for certain attributes (like "5 o'clock shadow"), the pruning strategy can sometimes be too aggressive, leading to near-random performance.

Future Directions: The authors suggest exploring more theoretically grounded ways to choose pruning ratios and extending the framework beyond classification to tasks like object detection or segmentation.

Summary updated

BibTeX
@inproceedings{thopalli2023target,
  author = {Kowshik Thopalli and Rakshith Subramanyam and Pavan K. Turaga and Jayaraman J. Thiagarajan},
  title = {{Target-Aware Generative Augmentations for Single-Shot Adaptation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=K26zQKvXiR},
}
Figure