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

Theoretical Insights into the Use of Structural Similarity Index In Generative Models and Inferential Autoencoders

Benyamin Ghojogh, Fakhri Karray, Mark Crowley · DOI

Abstract

Generative models and inferential autoencoders mostly make use of the $\ell_2$ norm in their optimization objectives. In order to generate perceptually better images, this paper theoretically discusses the integration of the Structural Similarity Index (SSIM) into these frameworks. We review SSIM, SSIM distance metrics, and the SSIM kernel, demonstrating that the SSIM kernel is a universal kernel suitable for unconditional and conditional generative moment matching networks (GMMNs). Furthermore, we detail the application of SSIM distance in variational and adversarial autoencoders, as well as Generative Adversarial Networks (GANs), specifically proposing its use in Least Squares GAN (LSGAN) as a superior alternative to the standard $\ell_2$ norm.

Introduction

A persistent challenge in training generative models, particularly Variational Autoencoders (VAEs), is the production of "blurry" or "soft" synthetic images. This phenomenon is largely attributed to the reliance on the $\ell_2$ norm (Mean Squared Error) as a reconstruction loss. While mathematically convenient, MSE is a pixel-wise metric that fails to align with human visual perception. For instance, a slight spatial shift in an image can result in a high MSE despite being perceptually identical to the original, while significant structural distortions might yield a low MSE.

To address this, researchers have looked toward the Structural Similarity Index (SSIM), the gold standard for perceptual quality assessment. However, moving SSIM from an evaluation metric to an optimization objective requires rigorous theoretical justification. This paper provides a mathematical roadmap for integrating SSIM into modern deep generative architectures.

Theoretical Framework

SSIM Distance Metrics

The paper defines a distance metric derived from SSIM. A critical finding is that for zero-mean image patches, the SSIM distance simplifies into a form that is more computationally tractable for optimization. Crucially, the authors highlight that the SSIM distance is quasi-convex. This property is vital for stable training in neural networks, as it ensures that gradient-based optimization can effectively navigate the loss landscape.

The SSIM Kernel and Universality

For models utilizing kernel methods, such as Generative Moment Matching Networks (GMMNs), the choice of kernel is paramount. The authors introduce the "SSIM kernel" and provide a theoretical proof of its universality. By demonstrating that the SSIM kernel can be expanded via a Taylor series—mirroring the properties of the widely used Radial Basis Function (RBF) kernel—the paper establishes that SSIM can be used to match distributions in high-dimensional spaces effectively.

Applications in Generative Architectures

Variational and Adversarial Autoencoders

In standard VAEs and Adversarial Autoencoders (AAEs), the reconstruction term is typically the $\ell_2$ norm. The authors propose replacing this term with the SSIM distance. This shift forces the model to prioritize the preservation of structural patterns and luminance over pixel-perfect matching, theoretically leading to sharper reconstructions.

Generative Adversarial Networks (GANs)

While GANs naturally produce sharper images due to the learned perceptual loss of the discriminator, the authors argue for the explicit inclusion of SSIM in the GAN objective.

  1. Standard GANs: SSIM distance can be integrated into the discriminator's objective to better quantify the structural divergence between real and synthetic data.
  2. Least Squares GAN (LSGAN): The paper specifically proposes substituting the standard $\ell_2$ norm in the LSGAN loss function with the SSIM distance. This modification aims to leverage the stability of the least-squares approach while benefiting from the perceptual sensitivity of SSIM.

Discussion and Insights

The primary contribution of this work is the mathematical validation of SSIM as a loss function. By proving the universality of the SSIM kernel and the quasi-convexity of the SSIM distance, the authors move SSIM from a post-hoc evaluation tool to a foundational component of the training process.

In the context of GMMNs, the universality of the kernel is a significant insight; it ensures that the model can theoretically represent any distribution, provided enough data and capacity. Furthermore, the integration into GANs suggests a "hybrid" approach where structural constraints complement the adversarial game, potentially reducing artifacts and improving training stability.

Limitations and Future Work

As a theoretical study, this paper does not provide empirical benchmarks or quantitative results (e.g., FID or Inception Scores). The practical performance of these proposed objectives remains to be validated through extensive experimentation on standard datasets like MNIST, CIFAR-10, or CelebA.

Additionally, the computational cost of SSIM must be considered. Unlike the pixel-wise $\ell_2$ norm, SSIM is calculated over local patches. Implementing this across large batches in high-resolution image generation may introduce significant overhead. Future research should explore efficient implementations or multi-scale SSIM (MS-SSIM) variants to balance perceptual quality with training efficiency.

Conclusion

This paper provides the necessary theoretical groundwork to move beyond the limitations of the $\ell_2$ norm in generative modeling. By establishing the mathematical properties of SSIM-based distances and kernels, it offers a robust framework for developing models that are better aligned with human visual perception.

Summary updated

BibTeX
@inproceedings{ghojogh2020theoretical,
  author = {Benyamin Ghojogh and Fakhri Karray and Mark Crowley},
  title = {{Theoretical Insights into the Use of Structural Similarity Index In Generative Models and Inferential Autoencoders}},
  booktitle = {ICIAR},
  year = {2020},
  url = {https://openreview.net/forum?id=Ie_fj3DXjW},
}
Figure