Introduction
Image-to-image (I2I) translation tasks, such as super-resolution, colorization, and inpainting, are inherently ill-posed. A single input, like a grayscale image, can correspond to multiple plausible high-resolution or colorized outputs. While Generative Adversarial Networks (GANs) have achieved significant success in these domains, they often suffer from "mode collapse" and lack a principled way to evaluate the likelihood of generated samples. Normalizing flows offer an alternative by learning invertible mappings to simple distributions, enabling exact likelihood calculation. However, previous conditional flow models often relied on a restrictive "independence assumption" across different resolution scales, limiting their ability to capture complex global and local structures simultaneously.
CAFLOW (Conditional Autoregressive Flows) addresses these limitations by combining the exact likelihood estimation of normalizing flows with the expressive power of autoregressive modeling. By explicitly modeling dependencies across resolution scales, CAFLOW achieves state-of-the-art results in diverse I2I tasks.
Methodology: Bridging the Scale Gap
The core innovation of CAFLOW lies in its hierarchical, autoregressive approach to modeling the conditional distribution of target images.
Autoregressive Factorization
Unlike prior models that assume independence between latent variables at different scales, CAFLOW utilizes the chain rule of probability. It models the distribution of latent variables at a specific scale conditioned on both the source image and the latent variables generated at all previous (lower) scales. This allows the model to capture cross-scale correlations that are crucial for maintaining structural coherence.
Hierarchical Architecture
The model employs a dual multi-scale encoding scheme. Two separate normalizing flows transform the conditioning image and the target image into sequences of latent encodings across resolutions. Each step in the autoregressive chain is implemented as a conditional normalizing flow block ($g_i^i$). These blocks use specialized layers like Affine Injectors and Conditional Affine Coupling to fuse information from the conditioning image into the generation process.
Likelihood-Based Inference
A unique advantage of CAFLOW's flow-based nature is the ability to rank generated samples by their conditional log-likelihood. During inference, the model can generate multiple candidates and filter them to keep the "best N out of M" samples. This "likelihood filter" serves as an effective proxy for visual quality, allowing the system to automatically discard unrealistic outputs.
Key Insights
- Cross-Scale Correlations: Latent variables representing high-frequency details are not independent of the global structure captured at lower resolutions. CAFLOW's autoregressive structure explicitly models these relationships.
- Flexible Modeling Assumptions: By weakening the independence assumptions of previous flow models, CAFLOW gains significant expressivity without sacrificing computational tractability.
- Likelihood as a Quality Metric: The internal log-likelihood of the model provides a principled way to sample high-quality, diverse images, a feature missing in GAN-based approaches.
Experimental Results
CAFLOW was evaluated on standard benchmarks including FFHQ (super-resolution and colorization), LSUN Bedroom (diverse colorization), CelebA (inpainting), and Edges2shoes (sketch-to-image).
- Super-resolution (FFHQ): CAFLOW achieved an LPIPS score of 0.08 and an RMSE of 17.56, outperforming models like ESRGAN and SRFBN in terms of fidelity to the ground truth.
- Colorization (LSUN Bedroom): The model reached an FID of 18.15, a significant improvement over the conditional flow baseline CINN (26.48) and ColorGAN (28.31).
- Inpainting (CelebA): CAFLOW achieved a PSNR of 26.08, surpassing previous state-of-the-art conditional flow methods.
Conclusion and Future Work
CAFLOW demonstrates that incorporating autoregressive dependencies into conditional normalizing flows significantly enhances their performance in complex I2I translation tasks. While the autoregressive modeling of every scale increases computational complexity, potential solutions like weight sharing across levels show promise for scaling to even higher resolutions. Future work may explore incorporating stochastic blocks to further increase expressivity and refining weight-sharing schemes.
Summary updated