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

The Spatially-Correlative Loss for Various Image Translation Tasks

Chuanxia Zheng, Tat-Jen Cham, Jianfei Cai

Introduction

Unpaired Image-to-Image (I2I) translation aims to transform the visual style of an image—such as converting a daytime scene to night or a horse into a zebra—without requiring direct pairs of training data. A persistent challenge in this field is structure preservation: ensuring the translated image maintains the exact pose and geometry of the original subject.

The Challenge of Structure Preservation

Traditional approaches like CycleGAN rely on "cycle-consistency," requiring the model to translate an image and then successfully translate it back to the original. While effective, this necessitates training two separate generators and discriminators, leading to high computational costs and memory usage. Other methods utilize "perceptual losses" from pre-trained networks like VGG, but these often inadvertently transfer appearance details (colors and textures) from the source domain, resulting in artifacts or "ghosting" when the domain gap is significant.

Proposed Method: Spatially-Correlative Loss

To address these issues, researchers introduced the Spatially-Correlative Loss. This approach shifts the focus from raw pixel values to internal "self-similarity" patterns. By analyzing how different parts of an image relate to one another spatially, the model can capture the underlying geometry while remaining indifferent to global color or texture changes.

Input horse and output zebra with corresponding structure maps showing how geometry is preserved through self-similarity.

The authors propose two variants of this loss:

  1. FSeSim (Fixed Self-Similarity): This variant uses a pre-trained VGG16 network to extract features. Instead of comparing features directly, it calculates how each point in a patch relates to its neighbors, creating a "self-similarity map" that captures geometry while ignoring specific colors.
  2. LSeSim (Learned Self-Similarity): This version employs contrastive learning (InfoNCE) to learn a task-specific representation of structure. It trains the model to recognize that corresponding patches in the source and target images should share the same self-similarity structure, even if their appearance differs wildly.

Key Results and Efficiency

The Spatially-Correlative Loss was evaluated across several benchmarks, including Cityscapes and Horse $\rightarrow$ Zebra. On the Horse $\rightarrow$ Zebra task, LSeSim achieved a state-of-the-art FID (Fréchet Inception Distance) of 38.0, significantly outperforming CycleGAN (77.2) and CUT (45.5). Qualitative results demonstrate cleaner translations, with the model successfully rendering zebra stripes without the "ghost" artifacts of the original horse's color often seen in other frameworks.

Beyond visual quality, the method is highly efficient. Because it is a "one-sided" loss—requiring only a single pass from source to target—it reduces the memory footprint by up to 40% compared to two-sided frameworks like CycleGAN or MUNIT, making it more accessible for researchers with limited hardware resources.

Conclusion

The core insight of this work is that structure is relative. By decoupling appearance from geometry through self-similarity maps, the Spatially-Correlative Loss provides a robust and efficient solution for complex image translation tasks. While currently limited to tasks where geometry remains fixed, it sets a new standard for high-fidelity, structure-preserving image synthesis.

Summary updated

BibTeX
@inproceedings{zheng2021spatially,
  author = {Chuanxia Zheng and Tat-Jen Cham and Jianfei Cai},
  title = {{The Spatially-Correlative Loss for Various Image Translation Tasks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01614},
}
Figure