Boosting Latent Diffusion with Perceptual Objectives

## Abstract

Abstract Latent diffusion models (LDMs) power state-of-the-art high-resolution generative image models. LDMs learn the data distribution in the latent space of an autoencoder (AE) and produce images by mapping the generated latents into RGB image space using the AE decoder. While this approach allows for efficient model training and sampling, it induces a disconnect between the training of the diffusion model and the decoder, resulting in a loss of detail in the generated images. To remediate this disconnect, we propose to leverage the internal features of the decoder to define a latent perceptual loss (LPL). This loss encourages the models to create sharper and more realistic images. Our loss can be seamlessly integrated with common autoencoders used in latent diffusion models, and can be applied to different generative modeling paradigms such as DDPM with epsilon and velocity prediction, as well as flow matching. Extensive experiments with models trained on three datasets at 256 and 512 resolution show improved quantitative – with boosts between 6% and 20% in FID – and qualitative results when using our perceptual loss.

## 1 Introduction

Latent diffusion models (LDMs) (Rombach et al., ) have enabled considerable advances in image generation, and elevated the problem of generative image modeling to a level where it has become available as a technology to the public.
A critical part to this success is to define the generative model in the latent space of an autoencoder (AE), which reduces the resolution of the representation over which the model is defined, thereby making it possible to scale diffusion methods to larger datasets, resolutions, and architectures than original pixel-based diffusion models (Dhariwal and Nichol, ; Sohl-Dickstein et al., ).

To train an LDM, all images are first projected into a latent space with the encoder of a pre-trained autoencoder, and then, the diffusion model is optimized directly in the latent space.
Note that when learning the diffusion model the AE decoder is not used – the diffusion model does not receive any training feedback that would ensure that all latent values reachable by the diffusion process decode to a high quality image.
This training procedure leads to a disconnect between the diffusion model and the AE decoder, prompting the LDM to produce low quality images that oftentimes lack high frequency image components. Moreover, we note that the latent spaces of pre-trained LDM’s autoencoders tend to be highly irregular, in the sense that small changes in the latent space can lead to large changes in the generated images, further exacerbating the autoencoder-diffusion disconnect problem.

In this work, we propose to alleviate this autoencoder-diffusion disconnect and propose to include the AE decoder in the training objective of LDM.
In particular, we introduce latent perceptual loss
(LPL) that acts on the decoder’s intermediate features to enrich the training signal of LDM.
This is similar to the use of perceptual losses for image-to-image translation tasks (Johnson et al., ; Zhang et al., ), but we apply this idea in the context of generative modeling and use the feature space of the pre-trained AE decoder rather than that of an external pre-trained discriminative network.
Our latent perceptual loss results in sharper and more realistic images, and leads to better structural consistency than the baseline – see Figure 1.
We validate LPL on three datasets of different sizes – the commonly used datasets ImageNet-1k (1M data points) and CC12M (12M data points),
and additionally a private dataset S320M (320M data points) – as well as three generative models formulation – DDPM (Ho et al., ) with velocity and epsilon prediction, and conditional flow matching model (Lipman et al., ).
In our experiments, we report standard image generative model metrics – such as FID (Heusel et al., ), CLIPScore (Hessel et al., ), as well as Precision and Recall (Sajjadi et al., ; Kynkäänniemi et al., ). Our experiments show that the use of LPL leads to consistent performance boosts between 6% and 20% in terms of FID.
Our qualitative analysis further highlights the benefits of LPL, showing images that are sharp and contain high-frequency image details.

In summary, our contributions are:

- •
We propose the latent perceptual loss (LPL), a perceptual loss variant leveraging the intermediate feature representation of the autoencoder’s decoder.
- •
We present extensive experimental results on the ImageNet-1k, CC12M, and S320M datasets, demonstrating the benefits of LPL in boosting the model’s quality by 6% to 20% in terms of FID.
- •
We show that LPL is effective for a variety of generative model formulations including DDPM and conditional flow matching approaches.

## 2 Related work

Diffusion models.
The generative modeling landscape has been significantly impacted by diffusion models, surpassing previous state-of-the-art GAN-based methods (Brock et al., ; Karras et al., , , ). Diffusion models offer advantages such as more stable training and better scalability, and were successfully applied to a wide range of applications, including
image generation (Chen et al., ; Ho et al., ),
video generation (Ho et al., ; Singer et al., ),
music generation (Levy et al., ; San Roman et al., ), and
text generation (Wu et al., ).
Various improvements of the framework have been proposed, including different schedulers (Lin et al., ; Hang and Gu, ), loss weights (Choi et al., ; Hang et al., ), and more recently generalizations of the framework with flow matching (Lipman et al., ).
In our work we evaluate the use of our latent perceptual loss in three different training paradigms: DDPM under noise and velocity prediction, as well as flow-based training with the optimal transport path.

Latent diffusion.
Due to the iterative nature of the reverse diffusion process,
training and sampling diffusion models is computationally demanding, in particular at high resolution.
Different approaches have been explored to generate high-resolution content.
For example, Ho et al. () used a cascaded approach to progressively add high-resolution details, by conditioning on previously generated lower resolution images.
A more widely adopted approach is to define the generative model in the latent space induced by a pretrained autoencoder (Rombach et al., ), as previously explored for discrete autoregressive generative models (Esser et al., ).
Different architectures have been explored to implement diffusion models in the latent space, including convolutional UNet-based architectures (Rombach et al., ; Podell et al., ), and more recently transformer-based ones (Peebles and Xie, ; Chen et al., ; Gao et al., ; Esser et al., ) which show better scaling performance.
Working in a lower-resolution latent space accelerates training and inference, but training models using a loss defined in the latent space also deprives them from matching high-frequency details from the training data distribution.
Earlier approaches to address this problem include the use of a refiner model (Podell et al., ), which consists of a second diffusion model trained on high-resolution high-quality data that is used to noise and denoise the initial latents, similar to how SDEdit works for image editing (Meng et al., ).
Our latent perceptual loss addresses this issue in an orthogonal manner by introducing a loss defined across different layers of the AE decoder in the latter stages of the training process.
Our approach avoids the necessity of training on specialized curated data (Dai et al., ), and does not increase the computational cost of inference.

Perceptual losses.
The use of internal features of a fixed, pre-trained deep neural network to compare images or image distributions has become common practice as they have been found to correlate to some extent with human judgement of similarity (Johnson et al., ; Zhang et al., ).
An example of this is the widely used Fréchet Inception Distance (FID) to assess generative image models (Heusel et al., ).
Such “perceptual” distances have also been found to be effective as a loss to train networks for image-to-image tasks and boost image quality as compared to using simple $\ell_{1}$ or $\ell_{2}$ reconstruction losses.
They have been used to train autoencoders (Esser et al., ), models for semantic image synthesis (Isola et al., ; Berrada et al., ) and super-resolution (Suvorov et al., ; Jo et al., ), and to assess the sample diversity of generative image models (Schönfeld et al., ; Astolfi et al., ).
In addition, recent works propose variants that do not require pretrained image backbones (Amir and Weiss, ; Czolbe et al., ; Veeramacheneni et al., ).
An et al. (); Song et al. () employed LPIPS as metric function in pixel space to train cascaded diffusion models and consistency models, respectively. Most closely related to our work, Kang et al. () used a perceptual loss defined over latents to distill LDMs to conditional GANs, but used a separate image classification network trained over latents rather than the autoencoder’s decoder to obtain the features for this loss.
In summary, compared to prior work on perceptual losses, our work is different in that (i) LPL is defined over the features of the decoder – that maps from latent space to RGB pixel space, rather than using a network that takes RGB images as input – and (ii) we use LPL to train latent diffusion models.

## 3 Using the latent decoder to define a perceptual loss

In this section, we analyze the impact of the decoder-diffusion disconnect on the LDM training, and then, we follow with the definition of our latent perceptual loss.

### 3.1 Latent diffusion and the MSE objective

We use $F_{\beta}$ to refer to an autoencoder that consists of two modules.
The encoder, $F^{e}_{\beta}$, maps RGB images $x_{0}\in\mathbb{R}^{H\times W\times 3}$ to a latent representation $z_{0}\in\mathbb{R}^{H/d\times W/d\times C}$, where $d$ is the spatial downscaling factor, and $C$ the channel dimension of the autoencoder.
The decoder, $F^{d}_{\beta}$, maps from the latent space to the RGB image space.
In LDM, the diffusion model, $D_{\Theta}$, with parameters $\Theta$ is defined over the latent representation of the autoencoder.
We follow a typical setting, see *e.g*. (Peebles and Xie, ; Chen et al., ; Rombach et al., ), where we use a fixed pre-trained autoencoder with a downsampling factor of $d=8$ and a channel capacity of $C=4$.

Training Objective.
The diffusion formulation results in an objective function that is a lower-bound on the log-likelihood of the data.
In the DDPM paradigm (Ho et al., ), the variational lower bound can be expressed as a sum of denoising score matching losses (Vincent, ), and the objective function can be written as
$\mathcal{L}=\sum_{t}\mathcal{L}_{t}$, where $\mathcal{L}_{t}=\mathcal{D}_{\textrm{KL}}\left[q\left(x_{t-1}|x_{t},x_{0}
\right)||p_{\theta}\left(x_{t-1}|x_{t}\right)\right]=\mathbb{E}_{x_{0},
\epsilon,t}\left[\frac{\beta_{t}}{{(1-\beta_{t})(1-\alpha_{t})}}\cdot\lVert
\epsilon-\epsilon_{\theta}(x_{t},t)\rVert^{2}\right]$.
Ho et al. () observed that disregarding the time step specific weighting resulted in improved sample quality, and introduced a simplified noise reconstruction objective, known as epsilon prediction,
where the objective is the average of the MSE loss between the predicted noise and the noise vector added to the image,
$\mathcal{L}_{\text{simple}}=\sum_{t}\mathbb{E}_{x_{0},\epsilon,t}\left[\lVert
\epsilon-\epsilon_{\theta}(x_{t},t)\rVert^{2}\right]$.
The underlying idea is that the better the noise estimation, the better the final sample quality. An equivalent way to interpret this objective is through reparameterization of the target to the original latents,
$\mathcal{L}_{\text{simple}}=\sum_{t}\lambda_{t}\cdot\mathbb{E}_{x_{0},\epsilon
,t}\left[\lVert x_{0}-\hat{x}_{0}(x_{t},t;\theta)\rVert^{2}\right]$, where $\hat{x}_{0}(x_{t},t;\theta)=\sqrt{1+\sigma_{t}^{2}}x_{t}-\sigma_{t}\hat{
\epsilon}_{t}$ and $\lambda_{t}=1/\sigma_{t}^{2}$.

We note that the presence of $\ell_{2}$ in the LDM objective has some important implications. First, the $\ell_{2}$ norm treats all pixels in the latents as equally important and disregards the downstream structure induced by the decoder whose objective is to reconstruct the image from its latents. This is problematic because the autoencoder’s latent space has a highly irregular structure and is not equally influenced by the different pixels in the latent code. Thus, optimizing the $\ell_{2}$ distance in the diffusion model latent space could be different from optimizing the perceptual distance between images.
Second, while an $\ell_{2}$ objective is theoretically justified in the original DDPM formulation, generative models trained with an $\ell_{2}$ reconstruction objective have been observed to produce blurry images, as is the case *e.g*. for VAE models (Kingma and Welling, ).

The problem of blurry images due to $\ell_{2}$ reconstruction losses has been addressed through the use of perceptual losses such as LPIPS (Zhang et al., ), which provide a significant boost to the image quality in settings such as autoencoding (Esser et al., ), super-resolution Ledig et al. () and image-to-image generative models (Isola et al., ; Park et al., ).
However, in the case of LDM, a perceptual loss cannot be used directly on the predicted latents, instead the latents would need to be decoded to an RGB image and then entered into a feature-extraction network – introducing
significant overhead in terms of memory and computation. To avoid such overheads, we develop an alternative perceptual loss that operates directly on the feature space of the decoder.

### 3.2 Latent perceptual loss

Figure: Figure 2: Overview of our approach. (a) Latent diffusion models compare clean latents and the predicted latents. (b) Our LPL acts in the features of the autoencoder’s decoder effectively aligning the diffusion process with the decoder. $F_{\beta}^{e},F_{\beta}^{d}$: autoencoder encoder and decoder, $D_{\Theta}$: denoiser network, CN: cross normalization layer, OD: outlier detection.
Refer to caption: x1.png

We propose a perceptual loss that operates on the features of the latent-to-RGB decoder, $F^{d}_{\beta}$, extracted at different depths in the decoder.
Let $z_{t}=a_{t}z_{0}+b_{t}\epsilon_{t}$ be a noisy sample in the diffusion model latent space at time $t$,
and
$\hat{z}_{0}=(z_{t}-b_{t}D(z_{t},\sigma_{t};\Theta))/a_{t}$ the corresponding estimated noise-free latent at time $t=0$. We compute two sets of hierarchies of $L$ decoder features, $\{\phi_{l}\}_{l=1}^{L}$, and, $\{\hat{\phi}_{l}\}_{l=1}^{L}$, by decoding both the original, $z_{0}$, and estimated latents, $\hat{z}_{0}$ (where for brevity we drop the dependence of $\hat{z}_{0}$ on $t$):

$$ $\begin{cases}\phi_{1},...,\phi_{L}=\big{(}F_{\beta}^{d,l}(z_{0})\big{)}_{l\in[ \![1,L]\!]},\\ \hat{\phi}_{1},...,\hat{\phi}_{L}=\big{(}F_{\beta}^{d,l}(\hat{z}_{0})\big{)}_{ l\in[\![1,L]\!]}.\end{cases}$ (1) $$

Using these intermediate features, we can define our training objective. Our LPL, $\mathcal{L}_{\textit{LPL}}$, is a weighted sum of the quadratic distances between the feature representations at the different decoding scales, obtained after normalization:

$$ $\mathcal{L}_{\textrm{LPL}}=\mathbb{E}_{t\in\mathcal{T},\epsilon\sim\mathcal{N} (0,I),x_{0}\in D_{\mathcal{X}}}\left[\delta_{\sigma_{t}\leq\tau_{\sigma}}\sum_ {l=1}^{L}\frac{\omega_{l}}{C_{l}}\sum_{c=1}^{C_{l}}\big{\lVert}\rho_{l,c}(\hat {\phi}_{l,c})\odot\big{(}\phi^{\prime}_{l,c}-\hat{\phi}^{\prime}_{l,c}\big{)} \big{\rVert}_{2}^{2}\right].$ (2) $$

where $\phi^{\prime}_{l}$ is the standardized version of $\phi_{l}$ across the channel dimension, $\rho_{l,c}(\hat{\phi}_{l,c})$ is a binary mask masking the detected outliers in the feature map $\hat{\phi}_{l,c}$, $\omega_{l}$ is a depth-specific weighting and $C_{l}$ the channel dimensionality of the feature tensor. Note that we better explain these terms later in this section. Moreover, to reduce both the LPL computational complexity and memory overhead, we only apply our loss for high signal-to-noise ratios (SNR). In particular, we impose a hard threshold $\tau_{\sigma}$ and only apply the loss if the SNR is higher than it $\delta_{\sigma_{t}\leq\tau_{\sigma}}(\sigma_{t})$.
The LPL loss is applied in conjunction with the standard diffusion loss, resulting in the following training objective.

$$ $\mathcal{L}_{\textrm{tot}}=\mathcal{L}_{\textrm{Diff}}+w_{\textrm{LPL}}\cdot \mathcal{L}_{\textrm{LPL}}$ (3) $$

Depth-specific weighting. Empirically, we find the loss amplitude at different decoder layers to differ significantly – it grows with a factor of two when considering layers with a factor two increase resolution. To balance the contributions from different decoder layers, we therefore weight them by the inverse of the upscaling factor *w.r.t*. the first layer, *i.e*. $\omega_{l}=2^{-r_{l}/{r_{1}}}$ where $r_{l}$ is the resolution of the $l$-th layer.

Figure: Figure 3: Example of feature maps from the autoencoder’s decoder. The presence of outliers makes the underlying feature representation difficult to exploit. $l$ refers to the block index, while $c$ is the channel index within the block. Top row: $l=4,c=2$, bottom row: $l=4,c=8$.
Refer to caption: x2.png

Outlier detection.
When inspecting the decoder features we find artefacts at decoder’s deeper layers. Particularly, in some cases a small number of decoder activations have very high absolute values, see Figure 3.
This is undesirable, as such outliers can dominate the perceptual loss, reducing its effectiveness.
To prevent this, we use a simple outlier detection algorithm to mask them when computing the perceptual loss.
See the supplementary material for details.

Normalization.
Since the features in the decoder can have significantly varying statistics from each other, we follow Zhang et al. () and normalize them per channel so that the features in every channel in every layer are zero mean and have unit variance.
However, normalizing the feature maps corresponding to the original and denoised latents with different statistics can induce nonzero gradients even when the absolute value has been correctly predicted.
To obtain a coherent normalization, we use the feature statistics from the denoised latents to normalize both tensors.

**Table 1: Summary of the formula for the estimate of the clean image corresponding to the different formulations. Using the following parameterization, $\forall t,x_{t}=a_{t}x_{0}+b_{t}\epsilon_{t}$.**
| Framework | $a_{t}$ | $b_{t}$ | $\hat{x}_{0}$ |
| --- | --- | --- | --- |
| DDPM-$\epsilon_{t}$ | $1/\sqrt{1+\sigma_{t}^{2}}$ | $\sigma_{t}/\sqrt{1+\sigma_{t}^{2}}$ | $\sqrt{1+\sigma_{t}^{2}}x_{t}-\sigma_{t}D(x_{t},t;\Theta)$ |
| DDPM-$v_{\theta}$ | $1/\sqrt{1+\sigma_{t}^{2}}$ | $\sigma_{t}/\sqrt{1+\sigma_{t}^{2}}$ | $\frac{1}{\sqrt{\sigma_{t}^{2}+1}}\big{(}x_{t}-\sigma_{t}D(x_{t},t;\Theta)\big{)}$ |
| Flow-OT | $1-t$ | $t$ | $\big{(}x_{t}-tD(x_{t},t;\Theta)\big{)}/(1-t)$ |

### 3.3 Generalization for Latent Generative Modeling

While the bulk of our experiments have been conducted on models trained under DDPM (Ho et al., ) for noise prediction, we can generalize our method to different frameworks such as diffusion with velocity prediction (Salimans and Ho, ) and flow matching (Lipman et al., ).
To do this, the only requirement is to be able to estimate the original latents from the model predictions.
Under general frameworks such as DDPM and flows, we can write the forward equation in the form $\forall t,x_{t}=a_{t}x_{0}+b_{t}\epsilon_{t}$, where the different paradigms only differ in terms of the parameterization of $a_{t}$ and $b_{t}$.
In Table 1, we provide a summary for these different formulations.

## 4 Experimental evaluation

In this section, we first present our experimental setup, and then go on to present our main results, as well as qualitative results and a number of ablation studies.

### 4.1 Experimental setup

Datasets.
We conduct an extensive evaluation on three datasets of different scales and distributions:
ImageNet-1k (Deng et al., ),
CC12M (Changpinyo et al., ),
and S320M: a large internal dataset of 320M stock images.
We note that for both ImageNet-1k and CC12M, human faces were blurred to avoid training models on identifiable personal data.
For both CC12M and S320M, we recaption the images using Florence-2 (Xiao et al., ) to obtain captions that more accurately describe the image content.
For each of these datasets, we conduct evaluations at both $256\!\times\!256$ and $512\!\times\!512$ image resolution.

Architectures.
All experiments are performed using the Multi-modal DiT architecture from Esser et al. ().
We downscale the model size to be similar to Pixart-$\alpha$ (Chen et al., ) and DiT-XL/2 (Peebles and Xie, ), which corresponds to $28$ blocks with a hidden size of 1,536, amounting to a total of $796$M parameters.
For ImageNet-1k models we condition on class labels, while for the other datasets we condition on text prompts.
For our main results, we perform our experiments using the asymetric autoencoder from Zhu et al. ().
For ablation studies, we revert to the lighter autoencoder from SDXL (Podell et al., ).

Training and sampling.
Our training and sampling methodologies are largely based on Berrada et al. ().
Unless specified otherwise, we follow the DDPM-$\epsilon$ training paradigm (Ho et al., ), using the DDIM (Song et al., ) algorithm with $50$ steps for sampling and a classifier-free guidance scale of $\lambda=2.0$ (Ho and Salimans, ).
Following Podell et al. (), we use a quadratic scheduler with $\beta_{\text{start}}=0.00085$ and $\beta_{\text{end}}=0.012$.
For the flow experiments, we use the conditional OT probability path (Lipman et al., ) with the mode sampling with heavy tails paradigm from Esser et al. ().
Under this paradigm, the model is trained for velocity prediction and evaluated using DDIM sampler.

Similar to Chen et al. (), we pre-train all models at $256$ resolution on the dataset of interest for 600k iterations.
We then enter a second phase of training, in which we optionally apply our perceptual loss, which lasts for 200k iterations for $256$ resolution models and for 120k iterations for models at $512$ resolution.

When changing the resolution of the images, the resolution of the latents changes by the same factor, keeping the same noise threshold $\tau_{\sigma}$ yields inconsistent results across resolutions.
To ensure consistent behavior, we follow Esser et al. (), and scale the noise threshold similarly to how the noise schedule is scaled in order to keep the same uncertainty per patch.
In practice, this amounts to scaling the threshold by the upscaling factor.
The kernel sizes for the morphological operations in the outlier detection algorithm are also scaled to cover the same proportion of the image.

Metrics.
To evaluate our models, we report results in terms of FID (Heusel et al., ) to assess image quality and to what extent the generated images match the distribution of training images, and CLIPScore (Hessel et al., ) to assess the alignment between the prompt and the generated image for text-conditioned models.
In addition, we report distributional metrics precision and recall (Sajjadi et al., ) as well as density
and coverage (Naeem et al., ) to better understand effects on image quality (precision/density) and diversity (recall/coverage).
We evaluate metrics with respect to ImageNet-1k and, for models trained on CC12M and S320M, the validation set of CC12M. For FID and other distributional metrics, we use the evaluation datasets as the reference datasets and compare an equal number of synthetic samples. For CLIPScore, we use the prompts of the evaluation datasets and the corresponding synthetic samples.
Following previous works (Rombach et al., ; Peebles and Xie, ), we use a guidance scale of $1.5$ for resolutions of $256$ and $2.0$ for resolutions of $512$, which we also found to be optimal for our baseline models trained without LPL.

### 4.2 Main results

LPL applied across different datasets.
In Table 2 we consider the impact of the LPL on the FID and CLIPScore for models trained on the three datasets and two resolutions.
We observe that the LPL loss consistently improves both metrics across all three datasets.
Most notably, FID is improved by $0.91$ points on ImageNet-1k at $512$ resolution and by $1.52$ points on CC12M at 512 resolution.
The CLIPScore is also improved for both resolutions on CC12M, by $0.06$ and $0.24$ points respectively.
Similarly, for the S320M dataset, we observe that FID is improved by $0.51$ points while CLIP score improves (marginally) by $0.02$ points.
Samples of models trained with and without LPL on CC12M and S320M are shown in Figure 1 and Figure 4, respectively.

Figure: Figure 4: Samples from models trained with and without our latent perceptual loss on S320M. Samples from the model with perceptual loss (bottom row) show more realistic textures and details.
Refer to caption: extracted/5982490/figures/sstk_512/v0/no_lpl/000762.png

**Table 2: Impact of our perceptual loss for models trained on different datasets and resolutions for DDPM-$\epsilon$ model. Using LPL boosts FID and CLIP score for all datasets and resolutions considered.**
|  | Pre-training | Post-training | Results |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  | Res. | Iters | Res. | Iters | LPL | FID $(\downarrow)$ | CLIP $(\uparrow)$ |
| ImageNet-1k | 256 | 600k | 256 | 200k | ✗ | $2.98$ | — |
| ✓ | 2.72 | — |  |  |  |  |  |
| 512 | 120k | ✗ | $4.88$ | — |  |  |  |
| ✓ | ${\bf 3.79}$ | — |  |  |  |  |  |
| CC12M | 256 | 600k | 256 | 200k | ✗ | $7.81$ | $25.06$ |
| ✓ | ${\bf 6.22}$ | ${\bf 25.12}$ |  |  |  |  |  |
| 512 | 120k | ✗ | $8.79$ | $24.88$ |  |  |  |
| ✓ | ${\bf 7.27}$ | ${\bf 25.12}$ |  |  |  |  |  |
| S320M | 256 | 600k | 512 | 120k | ✗ | $8.81$ | $24.39$ |
| ✓ | ${\bf 8.30}$ | ${\bf 24.41}$ |  |  |  |  |  |

Generalization to other frameworks.
We showcase the generality of the LPL by applying it to different generative models, experimenting with DDPM for both epsilon and velocity prediction, and flow matching with optimal-transport (OT) path similar to Esser et al. ().
In Table 3 we report experimental results for models trained on ImageNet-1k at 512 resolution.
The DDPM-based models perform very similar (except perhaps for FID, where they differ by 0.16 points), and we we find significant improvements across all metrics other than density when using LPL.
Density remains similar to the baseline for DDPM models, but improves from 1.14 to 1.29 for the Flow-OT model, where all metrics are improved relative to the DDPM trained ones.
We posit that this is due to the mode sampling scheme in (Esser et al., ), which emphasizes middle timesteps that could better control the trajectories of the flow path towards having more diversity and not improving the quality (precision/density). Hence, applying LPL to Flow-OT solve this by considerably boosting quality.
Notably, considering DDPM baselines, LPL provides a boost as significant as the one provided by using flow matching (scores of DDPM w/ LPL in 2nd and 4th columns are on par or better than Flow-OT w/o LPL in 5th column). Moreover, the provided boost is orthogonal to the training paradigm, leading to overall best results when using LPL with the flow model.

**Table 3: Effect of the LPL on ImageNet-1k models at 512 resolution trained with different methods. We observe consistent improvements on all metrics when incorporating the LPL, except for density metric for which we observe a very slight degradation when using DDPM training.**
| Paradigm | DDPM-$\epsilon$ | DDPM-$v_{\Theta}$ | Flow-OT |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| LPL | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ |
| FID $(\downarrow)$ | $4.88$ | ${\bf 3.79}$ | $4.72$ | ${\bf 3.84}$ | $4.54$ | ${\bf 3.61}$ |
| Coverage $(\uparrow)$ | $0.80$ | ${\bf 0.82}$ | $0.80$ | ${\bf 0.83}$ | $0.82$ | ${\bf 0.85}$ |
| Density $(\uparrow)$ | ${\bf 1.14}$ | $1.13$ | ${\bf 1.15}$ | $1.14$ | $1.14$ | ${\bf 1.29}$ |
| Precision $(\uparrow)$ | $0.74$ | ${\bf 0.77}$ | $0.73$ | ${\bf 0.78}$ | $0.75$ | ${\bf 0.79}$ |
| Recall $(\uparrow)$ | $0.49$ | ${\bf 0.51}$ | $0.49$ | ${\bf 0.50}$ | $0.52$ | ${\bf 0.54}$ |

Figure: (a) $\mathcal{F}(D_{\text{LPL}})-\mathcal{F}(D_{\text{base}})$
Refer to caption: extracted/5982490/figures/lpl_nolpl.png

Frequency analysis.
While the metrics above provide useful information on model performance, they do not specifically provide insights in terms of frequencies at which using LPL is more effective at modeling data than the baseline.
To provide insight on the effect of our perceptual loss *w.r.t*. the frequency content of the generated images, we compare the power spectrum profile of images generated with a model trained with and without LPL on CC12M at 512 resolution as well as a set of real images from the validation set.

Figure: Figure 6: Frequency comparison. We compare the power spectrum of the images obtained with or without LPL with real reference images from the validation set of CC12M.
Refer to caption: x3.png

In Figure 5, we plot the difference between log-power spectra between the three image sets.
The left-most panel clearly shows the presence of more high frequency signal in the generated images when using LPL to train the model, confirming what has been observed in the qualitative examples of Figure 1 and Figure 4.
Moreover, the very lowest frequencies are also strengthened in the samples of the model with LPL.
We posit that using the LPL makes it easier to match very low frequencies as they tend be encoded separately in certain channels of the decoder.
In Figure 6, we report the error when comparing the power-spectrum of synthetic images and real images, averaged across the validation set of CC12M.
For this, we compute the average of the power spectrum across a set of 10k synthetic images from each model and the reference images for the validation set of CC12M.
Our experiments indicate that the model trained with LPL is consistently more accurate in modeling high frequencies ($f>150$), at the expense of a somewhat larger error at middle frequencies ($75<f<150$).

### 4.3 Ablation results

LPL depth.
Using decoder layers to compute our perceptual loss comes with increased computational and memory costs.
We therefore study the effect of computing our perceptual loss using only a subset of the decoder layers, as well as a baseline using the RGB pixel output of the decoder.
We progressively add more decoder features, so the model with five blocks contains features from the first up to the fifth block.
From the results in Figure 10, we find that earlier blocks do not significantly improve FID - and can even negatively impact performance. Deeper layers, on the other hand, significantly improve the performance.
The most significant gains are obtained when incorporating the third and fourth decoder layers which both improve the FID by more than one point *w.r.t*. the model incorporating one block less.
Finally, the last decoder layer improves the FID only marginally and could be omitted to reduce resource consumption.
We perform an additional ablation where the loss operates directly on the RGB image space (without using internal decoder features), which results in degraded performance compared to the baseline while inducing a considerable memory overhead.

Feature normalization.
Before computing our perceptual loss, we normalize the decoder features.
We compared normalizing the features of the original latent and the predicted one separately, or normalizing both using the statistics from the predicted latent. Our experiment is conducted on ImageNet-1k at 512 resolution.
While the model trained with separately normalized latents results in a slight boost of FID ($4.79$ *vs*. $4.88$ for the baseline w/o LPL), the model trained with shared normalization statistics leads to a much more significant improvement and obtains an FID of $3.79$.

SNR threshold value.
We conduct an experiment on the influence of the SNR threshold which determines at which time steps our perceptual loss is used for training.
Lower threshold values correspond to using LPL for fewer iterations that are closest to the noise-free targets.
We report results across several metrics in Figure 7 and illustrated with qualitative examples in the supplementary material in Figure 13.
We find improved performance over the baseline without LPL for all metrics and that the best values for each metric are obtained for a threshold between three and six, except for the recall which is very stable (and better than the baseline) for all threshold values under 20.

Figure: Figure 7: Ablation study on the impact of the noise threshold $\tau_{\sigma}$. We report FID, coverage, density, precision and recall. The dashed line corresponds to the baseline without LPL, note the logarithmic scaling of the noise threshold on the horizontal axis.
Refer to caption: x4.png

Reweighting strategy.
We compare the performance when using uniform or depth-specific weights to combine the contributions from different decoder layers in the LPL.
We find that using depth-specific weights results in significant improvements in terms of image quality *w.r.t*. using uniform weights. While the depth-specific weights achieve an FID of $3.79$, the FID obtained using uniform weights is $4.38$.
Hence, while both strategies improve image quality over the baseline (which achieves an FID of $4.88$), reweighting the layer contributions to be approximately similar further boosts performance and improves FID by $0.59$ points.

Figure: Figure 8: Exploration of LPL depth. Influence of decoder blocks used in LPL on FID, zero corresponds to not using LPL. Disk radius shows GPU memory usage: w/o LPL=64.9 GB, LPL 5 blocks=83.4 GB.
Refer to caption: x5.png

LPL and convergence.
As the LPL loss adds a non-negligible memory overhead, by having to evaluate and backpropagate through the latent decoder, it is interesting to explore at which point in training it should be introduced.
We train models on ImageNet-1k at 512 resolution with different durations of the post-training stage.
We use an initial post-training phase — of zero, 50k, or 400k iterations — in which LPL is not used, followed by another 120k iterations in which we either apply LPL or not.

The results in Table 4 indicate that in each case LPL improves all metrics and that the improvements are larger when the model has been trained longer and is closer to convergence (except for the coverage metric where we see the largest improvement when post-training for only 120k iterations).
This suggests that better models (ones trained for longer) benefit more from our perceptual loss.

**Table 4: Effect of our perceptual loss on models pre-trained without LPL for a set number of iterations. In each column, we report the difference in metrics after post-training for 120k iterations with or without LPL. All metrics improve when adding LPL in the post-training phase.**
| Initial post-train iters | 0 | 50k | 400k |
| --- | --- | --- | --- |
| $\Delta$ FID $(\downarrow)$ | $-0.58$ | $-0.78$ | $-0.97$ |
| $\Delta$ coverage $(\uparrow)$ | $+4.29$ | $+3.51$ | $+3.99$ |
| $\Delta$ density $(\uparrow)$ | $+0.14$ | $+0.12$ | $+0.21$ |
| $\Delta$ precision $(\uparrow)$ | $+4.01$ | $+4.55$ | $+5.89$ |
| $\Delta$ recall $(\uparrow)$ | $+1.99$ | $+2.32$ | $+4.22$ |

Influence on sampling efficiency.
We conduct an experiment to assess the influence of the perceptual loss on the sampling efficiency.
To this end, we sample the ImageNet@512 model with different numbers of function evaluations (NFE) then check the trends for the baseline and the model trained with our method.
For this experiment, we use DDIM algorithm.
Results are reported on Figure 10, where we find that for very low numbers of function evaluations, both models perform similarly.
The improvement gains from the LPL loss start becoming considerable after $25$ NFEs, where we observe a steady increase in performance gains with respect to the number of function evaluations up to $100$, afterwards both models stabilize at a point where the model trained using LPL achieves an improvement of approximately $1.1$ points over the baseline.

Figure: Figure 11: Impact of EMA decay rate. Training with LPL is more stable, and allows for a smaller decay parameter.
Refer to caption: x8.png

Impact on EMA.
Since the LPL has the effect of increasing the accuracy of the estimated latent during every timestep, it reduces fluctuations between successive iterations of the model during training.
Consequently, when training with LPL the EMA momentum can be reduced to obtain optimal performance.
In Figure 11 we report the results of a grid search over the momentum parameter $\gamma_{\textrm{EMA}}$.
We find that the model trained with LPL achieves better results when using a slightly lower momentum than the baseline.
From the graph, it’s clear that better FID is obtained closer to $\gamma_{\text{EMA}}=0.99975$ for the LPL model, which corresponds to a half-life of approximately $2750$ iterations, while the non-LPL model achieves its optimal score at $\gamma_{\text{EMA}}=0.9999$ corresponding to a half life of $6930$ iterations, more than twice as much as the LPL model, thereby validating our hypothesis.

Relative weight.
We conduct a grid search over different values for the weight of the LPL loss $w_{\text{LPL}}$. We report FID after training for 120k iterations at $512$ resolution, all models are initialized from the same $256$ pretrained checkpoint.
Our results are reported in Figure 10.
Introducing LPL sharply decreases FID for lower weights before going back up at higher weights.
We find the model to achieve the best FID for $w_{LPL}\approx 3.0$ which roughly corresponds to a fifth of the relative contribution to the total loss.

## 5 Conclusion

In this work, we identified a disconnect between the decoder and the training of latent diffusion models,
where the diffusion model loss does not receive any feedback from the decoder resulting in perceptually non-optimal generations that oftentimes lack high frequency details.
To alleviate this disconnect we introduced a latent perceptual loss (LPL) that provides perceptual feedback from the autoencoder’s decoder when training the generative model. Our quantitative results showed that the LPL is generalizable and improves performance for models trained on a variety of datasets, image resolutions, as well as generative model formulations.
We observe that our loss leads to improvements from 6% up to 20% in terms of FID.
Our qualitative analysis show that the introduction of LPL leads to models that produce images with better structural consistency and sharper details compared to the baseline training.
Given its generality, we hope that our work will play an important role in improving the quality of future latent generative models.

## 6 Relevance of the LPL loss

Interpreting LPL.
Under the DDPM paradigm, for latent diffusion, a neural network is trained to model the reverse process $q(z_{t-1}|z_{t})$.
Under this setting, training is conducted by optimizing the KL divergence between the true reverse process and the predictor that is modeled using a neural network:

$$ $\mathcal{L}_{t-1}=\mathbb{E}_{q}\left[D_{\text{KL}}\left(q(z_{t-1}|z_{t},z_{0} )\parallel p_{\Theta}(z_{t-1}|z_{t})\right)\right].$ (4) $$

After simplification Ho et al. (), the training loss resembles the denoising score matching objective Song and Ermon () over multiple noise scales indexed by timestep $t$:

$$ $\mathbb{E}_{x_{0},\epsilon,t}\left[\gamma_{t}\left\lVert D(z_{t},\sigma_{t}; \Theta)-z_{0}\right\rVert^{2}\right],$ (5) $$

where $\gamma_{t}$ is a time-dependent weighting factor.
Taking into account the global objective which is image generation means putting more emphasis on obtaining $\ell_{2}$-optimal reconstructions in image space rather than in latent space.
Such a constraint can be imposed in the form of a penalty term that is added to the training objective:

$$ $\mathcal{L}^{\text{pen}}_{t-1}=\mathbb{E}_{q}\left[D_{\text{KL}}\left(p_{F}(q( x_{t-1}|x_{t},x_{0}))\parallel p_{F}(F_{\beta}^{d}(p_{\Theta}(z_{t-1}|z_{t}))) \right)\right],$ (6) $$

where $p_{F}$ is a projector that maps from image space to a suitable embedding space in which to compare the images.
We can assume that both $p_{F}\left(q\left(z_{t-1}|z_{t},z_{0}\right)\right)$ and $p_{F}\left(F_{\beta}^{d}\left(p_{\Theta}\left(z_{t-1}|z_{t}\right)\right)\right)$ map to Gaussian distributions with constant variance
— such an approximation can be considered reasonable when considering small enough time discretization, assuming that the projector is locally linear around $z_{t}$ (the local linearity assumption has been studied previously in the litterature Jacot et al. (); Chizat and Bach ()) —
Under these conditions, we can approximate the divergence term in the penalty as
$\propto\mathbb{E}_{x_{0},t,\epsilon}\left[\left\lVert F_{\beta}^{d+}\circ D(z_
{t},\sigma_{t};\Theta)-F_{\beta}^{d+}\circ F_{\beta}^{e}(x_{0})\right\rVert^{2
}\right]$
where $F_{\beta}^{d+}$ is the feature projector of the decoder which outputs the intermediate features from each block of the autoencoder’s decoder.
This shows that under certain conditions, taking into account the structure of the latent space is akin to matching intermediate feature representations in the process of image decoding.

## 7 Latent Structure

Because of the underlying structure of the latent space, certain errors can have much more detrimental effects to the quality of the decoded image than others.
We illustrate this in Figure 12 by comparing the generated image after interpolating the encoded latents to different resolutions then back to its original resolution before decoding them.
While these different transformations yield similar errors in terms of MSE, especially in RGB space, the interpolation algorithm becomes crucial when working in the latent space.

Figure: Figure 12: Influence of interpolation artefacts on latent reconstruction. We downscale the image by a factor of $1/s$ before upscaling back to recover the original resolution. From top to bottom: bilinear interpolation in pixel space, nearest in latent space, bilinear in latent space and bicubic interpolation in latent space.
Refer to caption: x9.png

An illustration of this effect is presented in Figure 12 where we degrade the quality of the latents by performing an interpolation operation to downsize the latents (when $s<1$) followed by the reverse operation to recover latents at the original size, such a transformation can be seen as a form of lossy compression where different interpolation methods induce different biases in the information lost.

By examining the reconstructions from the latents, we cannot conclude that there is a direct relationship between the MSE with respect to the original latent and the decoded image quality.
While nearest interpolation results in the highest MSE, the reconstructed images are more perceptually similar to the target than the ones obtained with bilinear interpolation.
Similarly, while the bicubic interpolation with $s=1.3$ achieves an MSE of $2.38$, it still results in better reconstruction than the bilinear interpolation where $s=2.0$ which achieves a lower MSE error of $1.88$.

From this analysis, we see that certain kinds of errors can have more or less detrimental effects on the image generation, which go beyond simple MSE in the latent space.

## 8 Outlier Detection

At deeper layers of the autoencoder, some layers have aretfacts where small patches in the feature maps have a norm orders of magnitude higher than the rest of the feature map.
These aretefacts have been detected consistently when testing the different opensource autoencoders available online, which include the ones used in our experiments(^1^11 [https://huggingface.co/stabilityai/sdxl-vae](https://huggingface.co/stabilityai/sdxl-vae), and [https://huggingface.co/cross-attention/asymmetric-autoencoder-kl-x-1-5](https://huggingface.co/cross-attention/asymmetric-autoencoder-kl-x-1-5)),
as well as others.(^2^22 [https://huggingface.co/CompVis/stable-diffusion-v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4), and [https://huggingface.co/cross-attention/asymmetric-autoencoder-kl-x-2](https://huggingface.co/cross-attention/asymmetric-autoencoder-kl-x-2).)

To ensure easy adaptability to different models, we propose a simple detection algorithm for these patches and mask them when computing the loss and normalizing the feature maps.
Our algorithm is based on simple heuristics and is not meant to provide a state-of-the-art solution for outlier detection.
Rather, it is proposed as a temporary patch for the observed issues, while the long-term solution would be to train better autoencoders that do not suffer from these outliers.

Detection algorithm.
We empirically observe that the activations for every feature map approximately follow a normal distribution, while the outliers can be identified as a small subset of out-of-distribution points.
To identify them, we threshold the points with the corresponding percentile at $\delta_{o}$ and $1-\delta_{o}$ percentiles. Since computing the quantiles can be computationally expensive during training, we do it using nearest interpolation, which amounts to finding the $k$-th largest value in every feature map where $k=\delta_{o}\times H_{f}\times W_{f}$ (or $k=(1-\delta_{o})\times H_{f}\times W_{f}$ for the maximal values).
To remove small false positives that persist in the outlier mask, we apply a morphological opening, which can be seen as an erosion followed by a dilation of the feature map.
Pseudo-code for the outlier detection algorithm is provided in Alg. LABEL:lst:outlier_det.

Figure: Algorithm 1: Outlier detection algorithm. The algorithm works by setting a threshold according to the upper $0.02$ quantile of the activations in the feature map. Because the outliers are orders of magnitude away from the rest, we shift the threshold by an offset $m$ that guarantees that only the outliers are thresholded while no activations are masked when no outliers are present. Subsequently, we smooth out the predicted mask using a dilation operation that eliminates small noise in the mask.

## 9 Additional qualitative results

Noise threshold.
In Figure 13, we illustrate the impact of using a higher noise threshold (which amounts to using LPL for longer in the diffusion chain) on the image quality.
A higher noise threshold yields better structures in the images and exacerbates semantic features that distinguish objects.

Figure: Figure 13: Influence of noise threshold. Higher thresholds allow for more detailed and coherent images. Samples obtained from a model trained on ImageNet@256.
Refer to caption: x10.png

Vanilla diffusion.
In Figure 14, we qualitatively investigate the influence of LPL on a baseline model, without classifier-free guidance and without EMA.
We can see that LPL significantly improves the structure of objects as compared to the model that was trained without it.

Figure: Figure 14: Qualitative comparison of the effect of the latent peceptual loss. Models trained on ImageNet-1k at 256 resolution with (bottom) and without (top) our perceptual loss. Without the perceptual loss, the model frequently fails to generate coherent structures, using the perceptual loss, the model generates more plausible objects with sharper details. The models are finteuned for 100k iterations from a checkpoint that was trained for 200k iterations. The samples are generated without classifier-free guidance or EMA, using 50 DDIM steps.
Refer to caption: extracted/5982490/figures/imagenet_256_base/baseline/baseline-1.png

Samples of ImageNet-1k models.[h]
In Figure 15 we show samples of models trained with or without LPL on ImageNet-1k at 512 resolution.
At higher resolutions, we also observe that the model trained with LPL generates images that are sharper and present more fine-grained details compared to the baseline.

Figure: Figure 15: Influence of finetuning a class-conditional model of ImageNet-1k at 512 resolution using our perceptual loss. Our perceptual loss (bottom row) leads to more realistic textures and more detailed images.
Refer to caption: extracted/5982490/figures/imagenet_512/nolpl_image/nolpl_image-2.png

Samples on T2I models.[h]
We provide additional qualitative comparisons regarding our LPL loss.
Figure 17 showcases results on a model trained on CC12M at $512$ resolution, Figure 16 showcases results on a model trained on S320M at $256$ resolution.

Figure: Figure 16: Qualitative comparison. of samples from models trained with and without our LPL on S320M at $256$ resolution.
Refer to caption: extracted/5982490/figures/images_t2i_256/baseline/image/image-1.png

Figure: Figure 17: Qualitative comparison. Comparison of samples from models trained with and without our perceptual loss on CC12M at $512$ resolution (The differences are better viewed by zooming in).
Refer to caption: extracted/5982490/figures/CC12M_512/no_lpl/000006.png

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: See weaknesses.
soundness: 3
strengths: 1. The motivation is clear and straightforward. And the proposed method is simple and can be easily applied to the training of other diffusion models.
2. Under the same training iterations during the post-training stage, the method can improve the FID over the baseline method which only adopts the MSE loss.
summary: The paper studies the perceptual loss function in the training of diffusion models and proposes to compare the features between $z_0$ and $\hat{z}_0$ by sending them into the latent autoencoder's decoder model. The loss is only applied during the post-training stage and only applied in the time steps that have a SNR higher than the preset threshold. The results on CC3M, ImageNet-1k and S320M show that the introduction of this training strategy could help improve the generation quality of the model.
weaknesses: 1. The paper only shows the performance increase over the baseline model. I feel like it's better to clearly demonstrate the effectiveness and performance gain over the previous state-of-the-art methods, to show that the perceptual loss can achieve what the widely used MSE loss cannot achieve.
2. The introduction of the perceptual loss would increase the computation cost during the training stage. Could the authors provide a clear comparison on this? 
3. Following the last one, what would be the performance comparison for the same training time instead of the same training iterations?
4. The authors mention the outliers in the features of the autoencoder's decoder which is not ideal for the computation of the perceptual loss. I'm wondering if the authors have tried other ways instead of simply masking those features out as this might cause information lost. Or has the authors tried using some other models to compute the perceptual loss to avoid those outliers?

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: In addition to the addressing the weaknesses, I'd appreciate the authors answering the following questions:

What is the difference in training FLOPS per step of using LPL vs. just the normal objective? I assume it is a minor difference, but if it is not, just comparing to normal objectives at the same step count would not be fair. Similarly, the effect of the substantial increase in VRAM usage on the training speed (via the maximum achievable local batch size) should be quantified properly.

Why do you use a CFG scale of 2? Standard choices for latent diffusion are typically much lower for ImageNet class-conditional generation and much higher for text-to-image.

Why is the frequency cut off at 360 in Fig. 6?

Suggestion: while not technically required according to ICLR's rules, as it hasn't been published yet (and therefore also not taking an influence on my rating of this paper), I think a discussion of the almost one year old seminal work [https://arxiv.org/abs/2401.00110] in the area of applying perceptual losses to diffusion models would help improve the paper, especially if this work had any influence on the submitted paper.
soundness: 3
strengths: The comparisons with baselines are extensive and clearly show that the proposed latent perceptual loss objective improves metrics across different diffusion formulations and datasets. I really appreciate the authors demonstrating the improvements for both eps-pred diffusion and flow matching, demonstrating that the proposed loss potentially has a general significance.

The paper ablates over/explores a large number of parameters and their influence.

The paper is generally reasonably well-written and accessible.
summary: The paper proposes applying perceptual losses to latent diffusion models during training to improve the quality of generated images. Their proposed perceptual loss uses features from the VAE decoder, with additional contributions such as outlier filtering being proposed to enable this setup to work. The authors extensively validate the benefits of their approach over standard training of MMDiTs in different diffusion formulations and datasets.
weaknesses: I think framing the proposed loss as a perceptual loss is likely incorrect. Perceptual losses typically try to incorporate human perception-based invariances into the loss, such as weighting the presence of the correct texture (e.g., grass) as more important than getting every detail of the instance of the texture (e.g., the exact positions of individual blades of grass) right. This is directly opposed to losses such as the MSE in pixel space. This is typically accomplished by taking features of a deep pre-trained discriminative model. In this case, you use features of the VAE latent decoder, which, potentially even puts the features at a lower abstraction level than the original latents. As far as I could see, there was no investigation of whether these features have the qualities of a perceptual loss. In the end, optimizing this loss seems to result in improved FIDs, which makes it a valuable contribution. Still, I think calling it a perceptual loss without further investigation goes against what people expect "perceptual losses" to refer to, which could lead to confusion. Could it be that the improvement actually doesn't come from perceptual qualities of the loss but rather from other qualities, such as a different implicit weighting of timesteps, which has previously been shown to substantially improve FIDs as well [https://openaccess.thecvf.com/content/ICCV2023/papers/Hang_Efficient_Diffusion_Training_via_Min-SNR_Weighting_Strategy_ICCV_2023_paper.pdf].

You also claim that "the autoencoder’s latent space has a highly irregular structure and is not equally influenced by the different pixels in the latent code" as an important part of your motivation. However, it has been shown [e.g., in https://discuss.huggingface.co/t/decoding-latents-to-rgb-without-upscaling/23204] that, at least for the very commonly used SD VAEs, the autoencoder latents effectively correspond to downsampled colors, differing fundamentally from that statement. Similarly, noisy latents from intermediate steps of the sampling process often already show a good approximation of the image being generated. A.2 shows an investigation of the effect of spatial interpolation for some (unspecified) AE, but is inherently very limited in its scope. It would be nice to see better backing up of this central claim that goes against common assumptions using standard methods, such as introducing small (random) deviations and showing how their effect on the decoded image is disproportionally large compared to larger ones. General claims should also be verified with standard VAEs.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: - Line 179, Many SOTA T2I diffusion models use a basic L2 training objective. Since only a VAE citation is given to explain blurriness, could you add citations or evidence that diffusion training leads to blurriness? Typically, adversarial losses are used in diffusion distillation, not in standard diffusion training.
- Line 185, "a perceptual loss cannot be used directly on the predicted latents", there is already accepted literature [2] that train another model which efficiently compute LPIPS losses in the latent space. It would be interesting to compare and contrast to the LatentLPIPS method.
- Line 193, it would be better if the authors could stick to the canonical DDPM/EDM [3] notations to avoid confusion.
- Line 289, do you enforce zero-terminal SNR here? It is known that the SD diffusion schedules are flawed [4].
---
[2] Kang, M., Zhang, R., Barnes, C., Paris, S., Kwak, S., Park, J., ... & Park, T. (2024). Distilling Diffusion Models into Conditional GANs. In ECCV 2024

[3] Karras, T., Aittala, M., Aila, T., & Laine, S. (2022). Elucidating the design space of diffusion-based generative models. Advances in neural information processing systems, 35, 26565-26577.

[4] Lin, S., Liu, B., Li, J., & Yang, X. (2024). Common diffusion noise schedules and sample steps are flawed. In Proceedings of the IEEE/CVF winter conference on applications of computer vision (pp. 5404-5411).
soundness: 2
strengths: - The author proposed latent perceptual loss (LPL) which shows the efficacy over various tasks datasets.
- The qualitative results and the quantitative metrics seem promising
- The frequency analysis showcases that the methods works
- The ablations are carried out in a systematic way
summary: The author introduces latent perceptual loss which acts on the decoder's intermediate features to enrich the training signal of LDM. The experiments showcased the effect of the added perceptual loss.
weaknesses: - The paper seems unpolished and rushed towards the deadline
- Sometimes the notation is a bit confusing, see the third point in the questions section
- Applying perceptual loss in T2I generation isn’t novel; Lin and Yang [1] calculates the perceptual loss in middle blocks to reduce computation which bypasses the computational constraint, whereas this paper requires passing results to the decoder for intermediate features. If the authors can provide evidence that the method proposed is better and distant themselves to the literature then I would consider raising my score.

---
[1] Lin, S., & Yang, X. (2023). Diffusion Model with Perceptual Loss. arXiv preprint arXiv:2401.00110.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: **1. Efficiency**

- How does the result compare when using FLOPS as the x-axis? Comparing by iteration seems somewhat unfair. If the performance improvement looks promising when compared in terms of FLOPS, I'm considering raising the score.

**2. Novelty**

- Is there a specific reason why LPL was only used in post-training? I feel that LPL might provide a good gradient signal early in training, but it seems that experiment wasn't conducted, which is unfortunate. I'm curious about the performance changes if LPL is applied from the start of the pretraining.
soundness: 3
strengths: **1. Extensive analysis**

This work provides extensive analysis to demonstrate the validity of LPL. For instance, the major performance gain from LPL arises from generating more precise high-frequency components, albeit at the expense of some low-frequency details.

**2. Ablation study**

It gives us various ablation study to provide the motivation behind design choices. The ablation study includes various components including feature depth for LPL, SNR threshold value, Reweighting strategy, or etc. This level of extensive ablation study is rare.
summary: This work introduces "latent perceptual loss" (LPL) to improve the training of diffusion models. According to the paper, LPL enhances diffusion models performance across various datasets (Table 2) and methods (Table 3). Additionally, extensive analyses, e.g., comparing the generation quality with and without LPL loss, and ablation studies, deepen our understanding of LPL.
weaknesses: **1. Efficiency**

In the paper, it is mentioned several times that utilizing the VAE decoder features to compute the LPL loss is costly. This is why recent research has explored alternative perceptual losses, such as latent LPIPS [1]. While the paper claims that LPL incurs minimal computation since it’s only used post-training, this claim is far from acceptable, as the post-training phase in this paper involves iterations amounting to as much as one-third, or at minimum one-fifth, of the pretraining iterations.

[1]: Distilling Diffusion Models into Conditional GANs ([ECCV24](https://mingukkang.github.io/Diffusion2GAN/))

**2. Novelty**

Although subjective, I believe the novelty of LPL is somewhat lacking. This loss trick slightly enhances quality during training but seems more heuristic than principled. Additionally, it doesn’t contribute much new knowledge about diffusion models, which weaken the paper's novelty. Furthermore, it does not appear that any non-trivial trick was devised in the process of introducing the perceptual loss to the diffusion models.

Meta-review: Summary: Proposed a perceptual loss in the context of latent diffusion models to improve image sharpness. It uses features extracted from the latent decoder to calculate the distance between z0 and the predicted z0_hat at the pyramid levels of the decoder. Demonstrates improved image quality compared to standard baselines, as shown on different models and dataset settings.   

Strength: The paper is motivated well. The proposed approach is easy to understand. The technique is simple to implement and incorporate into existing LDM training loops. The paper shows clear improvements in image quality over the baseline. Similarly, the ablations are strong, for instance visualizing the presence of more high frequency signals when the proposed perceptual loss is employed.
Acceptance Reason: The paper identified an important problem in LDM models, where their generations could be blurry. It’s a simple and easy to implement solution that is proven to enhance image quality, and I believe this is a good contribution to the community.

Decision: Accept (Poster)