LSC-GAN: Latent Style Code Modeling for Continuous Image-to-image Translation

Qiusheng Huang, Xueqi Hu, Li Sun, Qingli LiarXiv 2021

Introduction

Image-to-image (I2I) translation has seen significant progress with models like CycleGAN and StarGAN. However, these frameworks typically treat image domains as discrete, categorical entities (e.g., "summer" vs. "winter"). In reality, many physical attributes—such as age, lighting, or camera perspective—are continuous. Existing methods often resort to "binning," which discretizes these continuous ranges into fixed intervals, leading to abrupt transitions and a lack of fine-grained control. LSC-GAN (Latent Style Code GAN) addresses these challenges by explicitly modeling latent style codes for domain centers and employing recursive editing modules to navigate the continuous space.

Methodology

LSC-GAN extends the StarGAN-v2 architecture by introducing a mechanism for continuous domain navigation. The framework relies on several key components:

Latent Style Code Modeling

Rather than mapping directly to a target label, the model utilizes a mapping network ($F$) to learn representative "center codes" ($c_t$) for specific intervals within the continuous domain. This provides a structured latent space where the relationship between different points on the attribute axis is preserved.

Recursive Editing Modules

The core innovation of LSC-GAN is the introduction of two editing modules: Y (for decreasing values, e.g., "Younger") and O (for increasing values, e.g., "Older"). These modules are trained to transform a style code from one domain center to its adjacent neighbor. Because these modules are recursive, they can be applied multiple times to traverse the attribute axis smoothly or even extrapolate beyond the range of the training data.

Continuous age translation across defined domains using LSC-GAN.

Optimization Objectives

To ensure high-quality and diverse synthesis, the model employs specialized loss functions:

  • Continuous Domain Constraint ($L_{cdc}$): Aligns edited codes with target domain centers.
  • Triplet Loss with Adaptive Margin ($L_{tam}$): Enhances discriminative power by pulling codes toward correct centers and pushing them away from others.
  • Cycle Continuous Consistency ($L_{ccc}$): Ensures the reversibility of transformations (e.g., moving "older" then "younger" returns to the original state).

Experimental Setup

The model was evaluated on two challenging continuous translation tasks:

  1. FFHQ-Aging: A high-resolution dataset of 70,000 face images categorized into six age domains (0-6, 7-14, 15-19, 20-39, 40-69, and 70+).
  2. Multi-PIE: A dataset of 130,000 images focused on multi-view face synthesis across five specific angles (0° to 90°).

Results and Discussion

LSC-GAN demonstrates superior performance in both visual quality and identity preservation.

Quantitative Performance

On the FFHQ-Aging benchmark, LSC-GAN achieved a Fréchet Inception Distance (FID) of 42.54, significantly lower than StarGAN-v2's 47.92, indicating higher realism. It also maintained a high Learned Perceptual Image Patch Similarity (LPIPS) score of 17.5%, confirming that the model preserves stylistic diversity without falling into mode collapse.

Identity Preservation and Extrapolation

A key strength of the recursive editing approach is its ability to maintain the subject's identity across large attribute shifts. In the Multi-PIE dataset, LSC-GAN achieved an identity (ID) accuracy of 71.8%, compared to a mere 0.4% for StarGAN-v2. Furthermore, the model can extrapolate styles; for instance, it can simulate aging beyond the 70+ training domain by repeatedly applying the "Older" module.

Conclusion

LSC-GAN provides a robust framework for continuous image-to-image translation by shifting from discrete label mapping to latent style code editing. While the model involves a complex set of loss functions, its ability to produce smooth, diverse, and identity-preserving transitions marks a significant advancement over traditional binning-based approaches. Future work may explore applying this recursive editing paradigm to other continuous domains, such as environmental lighting or weather conditions.

Summary updated

BibTeX
@misc{huang2021lsc,
  author = {Qiusheng Huang and Xueqi Hu and Li Sun and Qingli Li},
  title = {{LSC-GAN: Latent Style Code Modeling for Continuous Image-to-image Translation}},
  year = {2021},
  eprint = {2110.05052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.05052},
}
Figure