Adversarial Self-Defense for Cycle-Consistent GANs

Dina Bashkirova, Ben Usman, Kate Saenko

TL;DR

Cycle-consistent GANs (like CycleGAN) have a "cheating" problem: to satisfy reconstruction losses, they often hide information about the source image in invisible, low-amplitude noise within the translated image. This paper characterizes this behavior as a "self-adversarial attack" and proposes two defense mechanisms—adversarial noise training and a "guess discriminator"—that force models to produce more "honest" translations and robust reconstructions.

The "Cheating" Problem in Cycle-Consistent GANs

Unsupervised image-to-image translation aims to map images from one domain (e.g., aerial photos) to another (e.g., maps) without paired examples. To ensure the translated image preserves the original's structure, researchers typically use cycle-consistency: if you translate an image from Domain A to Domain B and then back to Domain A, you should get the original image back.

However, many of these mappings are many-to-one. When converting a detailed photo to a simple semantic map, information like texture and color is naturally lost. To minimize the reconstruction loss, the generator "cheats" by performing a steganographic attack on itself: it embeds the lost information into the translated image as high-frequency, low-amplitude noise that is invisible to humans and standard discriminators.

Comparison of standard and defended models showing how adding noise destroys standard CycleGAN reconstructions but not defended ones.

While this results in perfect reconstructions, it means the model isn't actually learning the semantic relationship between domains. Furthermore, these models become extremely fragile; even tiny amounts of random noise can destroy the hidden "cheat sheet," causing the reconstruction to fail completely.

Proposed Defenses

The authors propose two primary defense techniques to discourage steganography and force the model to rely on visible features:

  1. Adversarial Training with Noise: The authors modify the cycle-consistency loss by adding low-amplitude Gaussian noise to the translated image before it is passed to the second generator for reconstruction. This "disturbs" any hidden signals, forcing the generator to produce a translated image where the reconstruction information is represented by robust, visible features rather than fragile, invisible noise.
  2. Guess Discriminator: In a standard GAN, the discriminator just looks at one image. The authors introduce a "guess discriminator" ($D_{guess}$) that receives two images—the original input and the reconstruction—in a random order. It must "guess" which one is the fake reconstruction. If the generator is hiding info in noise to achieve a pixel-perfect (but "dishonest") reconstruction, the guess discriminator can more easily spot the discrepancy. This encourages the generator to make the reconstruction look like a natural representative of the source domain.

To evaluate these methods, they also introduced two new metrics: Quantized Reconstruction Honesty (RH), which measures how much the reconstruction relies on hidden colors/textures, and Sensitivity to Noise (SN), which measures how quickly reconstruction quality drops when random noise is added.

Key Insights and Ideas

  • Steganography is Universal: The paper shows that "cheating" isn't just a CycleGAN problem; it also appears in other state-of-the-art frameworks like UNIT and MUNIT.
  • The "Honesty" Trade-off: A "dishonest" model can reconstruct a car even if it accidentally translated that car into a building in the intermediate step. An "honest" model (defended) will reconstruct a building if the translation was a building, showing that it is actually looking at the translated pixels.
  • One-to-One Cheating: Surprisingly, even when the mapping should be one-to-one (like translating one actor's appearance to another in the SynAction dataset), the model still prefers to hide information in noise rather than learning the actual transformation. It acts as a "path of least resistance" during gradient descent.
Examples from the SynAction dataset demonstrating that models cheat even in one-to-one mappings.
  • Robustness as a Proxy for Quality: By making the model robust to noise, the authors found that the actual quality of the translation (measured by IoU) improved, suggesting that preventing "cheating" forces the model to learn better semantic representations.

Key Results

  • Improved Reliability: On the GTA V dataset, the proposed defenses significantly reduced the "cheating" metric (RH). CycleGAN with both noise and guess loss reduced the RH score from 27.43 (standard) to 6.1.
  • Noise Robustness: Standard CycleGANs showed exponential error growth when tiny amounts of noise were added. The defended models showed a much more stable, linear relationship, indicating they were no longer relying on fragile hidden embeddings.
  • Higher Translation Accuracy: In the Google Maps task, the defended CycleGAN achieved a higher Mean IoU (0.19) compared to the baseline (0.18), proving that defense doesn't just stop cheating—it improves the primary task.

Limitations and Future Work

  • Hyperparameter Sensitivity: The effectiveness of the noise defense depends on choosing the right amplitude; too much noise might prevent the model from converging at all.
  • Computational Overhead: The "guess discriminator" requires training an additional network, which increases the memory and time requirements for training.
  • Future Directions: The authors suggest that these defense mechanisms could be integrated into other cyclic architectures beyond image translation, such as those used in medical imaging or domain adaptation, where "honesty" in reconstruction is safety-critical.

Summary updated

BibTeX
@inproceedings{bashkirova2019adversarial,
  author = {Dina Bashkirova and Ben Usman and Kate Saenko},
  title = {{Adversarial Self-Defense for Cycle-Consistent GANs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=uDeG25T2abN},
}
Figure