Harmonic Unpaired Image-to-image Translation

Rui Zhang, Tomas Pfister, Jia Li

Introduction

Unpaired image-to-image (I2I) translation—the task of mapping images from a source domain to a target domain without direct training pairs—has been largely defined by the CycleGAN framework. CycleGAN relies on a "cycle-consistency" loss to ensure that an image translated to the target domain can be mapped back to its original state. However, this global constraint often lacks the local regularity needed to prevent "degenerated transformations."

In many cases, CycleGAN "hides" information in the background to satisfy the cycle constraint or, more critically, deletes or adds significant features. This is particularly dangerous in medical imaging, where models have been known to accidentally remove tumors or hallucinate them in incorrect locations. HarmonicGAN addresses this by introducing a "smoothness" constraint that ensures local structures are preserved across domains.

Figure 1: Comparison of CycleGAN and HarmonicGAN on medical (a) and natural (b) images. Note how CycleGAN fails to preserve the tumor in the MRI scans and creates artifacts in the natural backgrounds.

Methodology: The Smoothness Constraint

The core innovation of HarmonicGAN is the conceptualization of images as existing on a low-dimensional manifold. For a translation to be effective, it should act as a "harmonic function" that preserves the local structure of this manifold.

To achieve this, the authors introduce a smoothness term over a sample graph. The process involves:

  1. Patch Representation: Image patches are represented as nodes in a graph.
  2. Similarity-Consistency: If two patches ($i$ and $j$) in a source image are similar (e.g., two areas of healthy brain tissue), their translated counterparts in the target domain must also remain similar.
  3. Graph Laplacian: The model utilizes a smoothness loss that penalizes changes in the affinity (similarity) between patches after translation.
Figure 4: The HarmonicGAN architecture incorporating the smoothness constraint into both the forward (a) and backward (b) cycles to ensure local consistency.

To measure similarity, the authors employ two feature types: Soft RGB Histograms for low-level textures (ideal for medical imaging) and Semantic CNN (VGG) Features for complex, context-heavy scenes like urban photography.

Key Results and Insights

HarmonicGAN was evaluated across diverse benchmarks, including MRI scans (BRATS), urban scenes (Cityscapes), and object transfiguration (Horse ↔ Zebra).

Medical Imaging Breakthrough

In the BRATS dataset (Flair ↔ T1 synthesis), HarmonicGAN halved the Mean Squared Error (MSE) compared to CycleGAN. Most importantly, it solved the "tumor problem." While CycleGAN often "cheated" by removing tumors in the target domain and re-adding them during reverse translation, HarmonicGAN’s local consistency forced the network to respect the unique features of the tumor. In a blind study, radiologists preferred HarmonicGAN-generated images in 95% of cases.

Natural Image Performance

For the Horse ↔ Zebra task, HarmonicGAN significantly reduced background artifacts. CycleGAN frequently applies zebra stripes to the grass or background; HarmonicGAN prevents this because background patches are distinct from horse patches and must remain so after translation. A human perceptual study showed a 72% preference for HarmonicGAN over CycleGAN.

Quantitative Gains

On the Cityscapes dataset, HarmonicGAN improved Pixel Accuracy by approximately 3% over the baseline, achieving higher FCN scores, which indicates that the generated objects are more recognizable to pre-trained classifiers.

Conclusion and Future Work

HarmonicGAN demonstrates that local regularity is as vital as global consistency in unpaired I2I translation. By enforcing similarity-consistency, the model prevents the deletion of critical features and the hallucination of artifacts. While the current model relies on fixed features (like VGG or histograms) for the smoothness term, future iterations may involve learning these similarity metrics dynamically during training to better adapt to niche domains.

Summary updated

BibTeX
@inproceedings{zhang2019harmonic,
  author = {Rui Zhang and Tomas Pfister and Jia Li},
  title = {{Harmonic Unpaired Image-to-image Translation}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
}
Figure