Introduction
Unpaired image-to-image (I2I) translation involves mapping an image from a source domain to a target domain (e.g., horse to zebra) without having direct pairs of images for training. The current state-of-the-art method, Contrastive Unpaired Translation (CUT), utilizes contrastive learning to maintain content consistency. It treats a patch in the output as a "query," its corresponding patch in the input as a "positive," and other random patches from the input as "negatives."
However, a significant limitation of CUT is its reliance on random sampling for negative examples. These random patches are often "easy" for the model to distinguish (e.g., a patch of grass vs. a zebra's ear), which prevents the model from learning the fine-grained textures and structural details necessary for high-quality translation.
The NEGCUT Framework
To overcome the bottleneck of easy negatives, we introduce NEGCUT, which replaces random sampling with a dedicated Negative Generator ($N$). This generator is trained adversarially to produce "hard" negatives—synthetic features that are highly similar to the positive patch but technically incorrect.
Key Methodological Components
- Adversarial Contrastive Learning: The framework operates as a min-max game. While the Image Generator ($G$) and Representation Network ($H$) work to minimize contrastive loss, the Negative Generator ($N$) attempts to maximize it by creating increasingly challenging examples.
- Instance-wise Generation: Unlike static negative banks, NEGCUT generates negatives conditioned on the specific features of the input image. This ensures that the "hardness" of the negatives is tailored to the unique textures of each instance.
- Diversity Loss: To prevent the negative generator from collapsing into a single "hardest" point (mode collapse), a diversity loss is implemented, forcing the production of varied challenging negatives.
- Multi-layer Integration: NEGCUT applies this adversarial logic across multiple layers of the encoder, capturing both high-level semantic structures and low-level textures.
Experimental Results
NEGCUT was benchmarked against leading methods on three standard datasets: Cityscapes (segmentation to real scenes), Cat $\to$ Dog (AFHQ), and Horse $\to$ Zebra.
Performance Metrics
- FID (Frechet Inception Distance): NEGCUT achieved significant improvements in image realism, reducing FID by 14.0% on Cityscapes, 26.6% on Cat $\to$ Dog, and 13.0% on Horse $\to$ Zebra compared to CUT.
- Semantic Consistency: On the Cityscapes dataset, NEGCUT reached a 27.6 mAP, outperforming CUT's 24.7. This demonstrates superior preservation of the original semantic content during translation.
- Efficiency: Although training requires additional computational resources for the negative generator, the inference time remains identical to CUT, as the negative generator is only used during the training phase.
Conclusion and Future Work
NEGCUT demonstrates that the quality of negative examples is a critical factor in the success of contrastive learning for I2I translation. By forcing the model to distinguish between positive patches and sophisticated adversarial negatives, NEGCUT learns a more descriptive embedding space. While the additional generator increases training complexity, the gains in visual quality and semantic accuracy are substantial. Future research may explore applying instance-wise hard negative generation to broader unsupervised representation learning tasks.
Summary updated