StEP: Style-based Encoder Pre-training for Multi-modal Image Synthesis

Moustafa Meshry, Yixuan Ren, Larry S. Davis, Abhinav Shrivastava · DOI

Abstract

We propose a novel approach for multi-modal Image-to-image (I2I) translation. To tackle the one-to-many relationship between input and output domains, previous works use complex training objectives to learn a latent embedding, jointly with the generator, that models the variability of the output domain. In contrast, we directly model the style variability of images, independent of the image synthesis task. Specifically, we pre-train a generic style encoder using a novel proxy task to learn an embedding of images, from arbitrary domains, into a low-dimensional style latent space. The learned latent space introduces several advantages over previous traditional approaches to multi-modal I2I translation. First, it is not dependent on the target dataset, and generalizes well across multiple domains. Second, it learns a more powerful and expressive latent space, which improves the fidelity of style capture and transfer. The proposed style pre-training also simplifies the training objective and speeds up the training significantly. Furthermore, we provide a detailed study of the contribution of different loss terms to the task of multi-modal I2I translation, and propose a simple alternative to VAEs to enable sampling from unconstrained latent spaces. Finally, we achieve state-of-the-art results on six challenging benchmarks with a simple training objective that includes only a GAN loss and a reconstruction loss.

Introduction

Image-to-image (I2I) translation tasks—such as converting sketches to photographs or day scenes to night—are inherently "one-to-many." A single input can correspond to a wide variety of valid outputs characterized by different styles, colors, and textures. Traditional approaches like BicycleGAN or MUNIT attempt to learn a latent style space jointly with the image generator. However, this joint optimization often leads to training instabilities, mode collapse, or the need for complex, highly-tuned loss functions. We propose StEP (Style-based Encoder Pre-training), a method that decouples style discovery from the synthesis task to achieve higher fidelity and faster convergence.

Methodology: Decoupling Style from Synthesis

The core innovation of StEP is the separation of style encoding from the generation process. The training is divided into three distinct stages:

  1. Style Pre-training: A generic style encoder ($E$) is pre-trained on a proxy task using a triplet loss. By utilizing Gram matrices as a distance metric, the encoder learns to map images into a low-dimensional latent space where visually similar styles are clustered together, independent of the specific translation task.
  2. Generator Training: With the style encoder fixed, the generator ($G$) is trained to reconstruct images using the learned latent codes. This provides a clear signal to the generator to utilize the style information.
  3. Joint Fine-tuning: Both components are fine-tuned together to optimize performance for the target domain.
Overview of the StEP framework, illustrating the decoupled style pre-training and generator training stages.

Unlike many multi-modal models that rely on Variational Auto-Encoders (VAEs), StEP avoids the "VAE tax"—the loss of detail caused by forcing the latent space to be noise-robust. Instead, we use a separate mapper network, trained via Implicit Maximum Likelihood Estimation, to enable random sampling from the learned style distribution.

Experimental Results

StEP was evaluated on six challenging benchmarks, including edges2shoes, edges2handbags, and a custom Space Needle timelapse dataset.

Qualitative and Quantitative Performance

StEP consistently outperforms baselines like BicycleGAN and MUNIT in both reconstruction accuracy (PSNR) and perceptual similarity (LPIPS). Qualitatively, StEP captures more nuanced textures and lighting conditions, as shown in the comparison below. In user studies, participants consistently preferred StEP’s style transfers, noting its ability to capture subtle textures that baselines missed.

Qualitative comparison of StEP against state-of-the-art baselines across multiple datasets. StEP better matches the ground truth (GT) style and produces more diverse results.

Key Insights

  • Generalization: A style encoder pre-trained on one category (e.g., shoes) generalizes effectively to others (e.g., handbags), suggesting that "style" is a universal visual property that does not need to be re-learned for every new task.
  • Efficiency: The pre-organized latent space significantly simplifies the training objective, requiring only a standard GAN loss and a reconstruction loss, which leads to faster convergence and significant speedups in training time.

Conclusion

By pre-training a style encoder on a task-agnostic proxy objective, StEP provides a more expressive and robust latent space for multi-modal I2I translation. This approach simplifies training, improves output fidelity, and demonstrates that decoupling style from content is a powerful paradigm for image synthesis. Future work will explore alternative proxy tasks for capturing structural or high-level semantic attributes.

Summary updated

BibTeX
@inproceedings{meshry2021step,
  author = {Moustafa Meshry and Yixuan Ren and Larry S. Davis and Abhinav Shrivastava},
  title = {{StEP: Style-based Encoder Pre-training for Multi-modal Image Synthesis}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00371},
}
Figure