Lossy Image Compression with Conditional Diffusion Models

This paper outlines an end-to-end optimized lossy image compression framework using diffusion generative models. The approach relies on the transform coding paradigm, where an image is mapped into a latent space for entropy coding and, from there, mapped back to the data space for reconstruction. In contrast to VAE-based neural compression, where the (mean) decoder is a deterministic neural network, our decoder is a conditional diffusion model. Our approach thus introduces an additional ``content'' latent variable on which the reverse diffusion process is conditioned and uses this variable to store information about the image. The remaining ``texture'' variables characterizing the diffusion process are synthesized at decoding time. We show that the model's performance can be tuned toward perceptual metrics of interest. Our extensive experiments involving multiple datasets and image quality assessment metrics show that our approach yields stronger reported FID scores than the GAN-based model, while also yielding competitive performance with VAE-based models in several distortion metrics. Furthermore, training the diffusion with $\mathcal{X}$-parameterization enables high-quality reconstructions in only a handful of decoding steps, greatly affecting the model's practicality. Our code is available at: \url{https://github.com/buggyyang/CDC_compression}

Paper

References (85)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer 9a7p6/10 · confidence 3/52023-07-04

Summary

In this paper, the authors propose a novel architecture of lossy image compression using conditional diffusion models. They use an encoder to map images into contextual latent variables and train a conditional diffusion model under the guidance of these contextual latent variables as the decoder. Moreover, they add perceptual loss into the loss of diffusion model, so this approach can steer the tradeoff between distortion, rate and perceptual quality by changing the parameter of its loss and diffusion model. Finally, they conduct sufficient experiments to explore how the parameters influence the final performance and to compare with other approaches.

Strengths

1. The architecture based on the conditional diffusion model is interesting and creative, and as is shown from the experiments in 3.2, this architecture can also finish the reversed progress of the conditional diffusion model in a handful of steps. 2. Sufficient experiments have been conducted, including comparison with other methods in sixteen metrics, and exploration of how parameters like ρ, γ, and decoding steps influence the final performance. 2. Overall the results prove that this method can steer the tradeoff between distortion, rate and perceptual quality, and the final performance with specific parameters in the paper is also quite competitive in different metrics.

Weaknesses

1. Some implementation details are not illustrated clearly, including how to get the "17 steps" of the reversed progress in 4.1 which may be helpful to understand the schedule of the reversed progress, the cost of encoding and decoding time, and I think a picture including the image of every single step in 17 steps when predicting x0, may help to prove that the architecture can reconstruct the "texture" structure of the image in a handful of steps. 2. More qualitative and quantitative results may be helpful to prove the performance and practicability of the method. including images with different resolutions and different styles of images. 2. I think, when testing, the parameters of the diffusion model should be given more specifically, including the total number of steps, the true number of steps after resampling, and the type of schedule(cosine or linear), because these parameters can influence the decoding steps metioned in the paper. 3. In formula (7), I think it can only represent the situation of γ=0, that is the DDIM, but when γ>0, I think there should be an extra random noise according to the formula(predicting noise is changed to predicting x0) $$ \boldsymbol{x}_{t-1}=\sqrt{\alpha_{t-1}} \underbrace{\left(\frac{\boldsymbol{x}_t-\sqrt{1-\alpha_t} \epsilon_\theta^{(t)}\left(\boldsymbol{x}_t\right)}{\sqrt{\alpha_t}}\right)}_{\text {"predicted } \boldsymbol{x}_0 "}+\underbrace{\sqrt{1-\alpha_{t-1}-\sigma_t^2} \cdot \epsilon_\theta^{(t)}\left(\boldsymbol{x}_t\right)}_{\text {"direction pointing to } \boldsymbol{x}_t \text { " }}+\underbrace{\sigma_t \epsilon_t}_{\text {random noise }} $$

Questions

1. In section 4, I wonder why the images of the Kodak dataset are not resized while the others are resized, and how the diffusion model trained on an image size of 256×256 can be applied to images of different sizes when testing.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

Yes, the authors have considered the limitations and societal impact of neural compression, particularly when prioritizing perceptual quality, is the risk of misrepresenting data in the low bitrate regime.

Reviewer ys1i6/10 · confidence 3/52023-07-06

Summary

This paper presents a method of using conditional diffusion as a stochastic decoder for neural image compression. The approach learns a discrete latent representation of an image and conditions the diffusion process on this representation. Compression is achieved by learning a distribution over the latent representation and running an entropy coder/decoder as is commonly done in other neural image compression models. The main benefit of this approach is that diffusion (empirically) does a better job that perceptual metrics (like LPIPS) or adversarial losses in boosting the "realism" or "perceptual quality" of reconstructed images. The paper shows that with multiple metrics (Fig. 2) and images (Fig. 3). The paper also shows that relatively few diffusion steps are required to generate high-quality reconstructions (Fig. 4) due to the conditioning and the use of X-prediction instead of predicting epsilon (the noise for step t). I didn't see runtime numbers in the paper, but the reduction of diffusion steps should lead to "moderate" decode times (contrast with early diffusion methods that required hundreds or thousands of steps).

Strengths

The main strength of the paper is the effective use of a diffusion-based decoder for neural image compression that leads to high subjective/perceptual visual quality according to both quantitative metrics and the example reconstructions in the paper. In particular, the results appear better than those from similar, GAN-based models (like HiFiC), and the ability to adjust the stochasticity at inference time (by adjusting gamma, which controls the amount of noise used by the reverse-diffusion process) is quite interesting and potentially helpful reducing concerns about hallucinated details. The paper is also very well-written and easy to follow, and diffusion-based stochastic decoders are of high interest to the neural image/video compression community.

Weaknesses

The main weakness of the paper is low novelty since diffusion for image generation is well-known at this point so its use in a codec is a fairly obvious application (though it's not technically easy to achieve good results). The authors should cite this paper on the same topic, though as far as I know it has not been published in a peer-reviewed, archival venue so it doesn't block publication of submission 3900: Hoogeboom 2023. High-Fidelity Image Compression with Score-based Generative Models https://arxiv.org/abs/2305.18231 The authors should also compare, if possible, against more recent GAN-based models that outperform HiFiC: PO-ELIC: Perception-Oriented Efficient Learned Image Coding He 2022. https://arxiv.org/abs/2205.14501 Multi-Realism Image Compression with a Conditional Generator Agustsson 2023. https://arxiv.org/abs/2212.13824 The inclusion of runtime numbers and a rater study would also strengthen the paper, but I don't think a rater study should be required for publication for every compression paper.

Questions

If I understand the formulation properly, rho controls the weight on LPIPS loss used during training (Eq. 9). In Fig. 2, I'm surprised there's such a large gap between the "CDC \rho=0" (blue) and "CDC \rho=09" (orange) curves for FID. It makes sense that there's a large gap for LPIPS and DISTS since high values of rho mean you're using the test metric (or close to it in the case of DISTS) as part of the training process (to be clear: training with LPIPS is common so I'm not implying this is a problem). But I would have expected diffusion alone to improve FID scores. So is LPIPS doing the heavy lifting here, at least relative to the metrics? Is there a better metric for measuring the benefit of using diffusion vs. a GAN (plus LPIPS) loss as in HiFiC?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

adequately addressed

Reviewer wzSD5/10 · confidence 4/52023-07-07

Summary

This paper proposes a diffusion-based image codec. It has two major components: a VAE-based encoder and a diffusion-based decoder. The VAE-based encoder generates the image latents, which serve as the conditioning signal for the diffusion-based image reconstruction. Both components are trained end-to-end with an objective function that involves a rate and a distortion estimate. The rate estimate is from the hyerprior model while the distortion estimate is a weighted sum of the perceptual loss and the mean squared error between the denoised image and the original image.

Strengths

(1) The idea of combining a VAE-based encoder and a diffusion-based decoder for learned image compression in an end-to-end trainable framework is novel and new. (2) Experimental results look interesting and promising.

Weaknesses

(1) It is rarely seen that a diffusion model needs to be trained with a perceptual loss in order to achieve better subjective quality. From Fig. 2, without the perceptual loss (i.e. \rho=0), the proposed method does not really stand out among the competing methods in terms of perceptual metrics. More insights need to be provided. (2) It is unclear whether one could use more decoding steps without the perceptual loss to achieve the same perceptual quality as with the perceptual loss with fewer decoding steps. This may justify the use of the perceptual loss from the perspective of the decoding complexity. (3) When examining carefully the training objective, I notice that L_upper is weighted additionally by the noise schedule coefficient \alpha_n whereas the perceptual loss is not. Does this suggest that the perceptual loss may dominate the distortion estimation? I wonder what would happen if \rho is increased beyond 0.9. (4) Surprisingly, in this work, the x-prediction (17 steps) is able to achieve better performance than the \epsilon prediction (500 steps) with fewer decoding steps. This is a bit counterintuitive and is different from how the diffusion model is typically trained. Is there any explanation behind this observation? A more thorough comparison between these two design choices should be provided to justify the use of the x-prediction. (5) In Figure 4, the distortion curves are visualized with r=0 whereas the perceptual curves are with r=1. How about the other way around, r=1 for distortion and r=0 for perceptual? (6) In Appendix B, is there any reason for adding the z embedding to only the first four downsampling blocks instead of all the blocks?

Questions

Please see my points in the Weaknesses box.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

2 fair

Presentation

2 fair

Contribution

3 good

Limitations

The authors may like to comment on the reproducibility of the proposed method. For example, can experts in this field re-produce the results easily by following the training procedure given in this paper? Or the training may involve lots of "know-hows".

Reviewer QC9o5/10 · confidence 4/52023-07-08

Summary

In this paper, a conditioned diffusion model is proposed to improve the perceptual quality of learned image compression. Different from widely used VAE-like nonlinear transform coding frameworks, the proposed model adopts a diffusion process to synthesize most of the texture, conditioned on a learned hyperprior variable z. To further improve the perceptual quality, a mixed objective is proposed, combining the ELBO target of the diffusion model with a perceptual loss term. The proposed approaches show reasonable performance on most perceptual metrics, surpassing baselines like HiFiC.

Strengths

This is overall an interesting paper. The authors intend to borrow the very success of diffusion models to the LIC approach, to promote the perceptual quality due to the improved generation ability. The proposed approach of using DDPM/DDIM as a conditioned texture synthesizer is intuitive and easy to follow. The presented results are overall impressive and encouraging. They present a new diagram for this line of research, which tend to inspire many future studies.

Weaknesses

1. The approach seems somewhat empirical. We can explain many of L1-LPIPS-GAN joint losses i.e. the one adopted by HiFiC as it corresponds to an implicit likelihood distribution (discussed in Ball'e 2018 hyperprior paper, typically an energy-based model) or some divergence measure (see f-gan). Let I cannot connect a similar theoretical analysis with the objective described in eq.8 & eq.9. Though this perceptual loss term is intuitive, I suggest the authors provide some more theoretical analysis to convince. 2. I wonder why the LPIPS performance of CDC is worse than HiFiC, especially since the model is directly supervised under an LPIPS perceptual loss. A better FID (generation quality) with worse LPIPS (perceptual fidelity) is somewhat suspicious. Can we explain this because the diffusion models generate more 'hallucination' texture seems true but with lower fidelity to the ground truth? This may be true according to Figure 3(b), some artifact black-white textures near the eye not exiting in GT are generated in CDC, from my perspective. 3. It may be unfair to compare the proposed model directly with HiFiC, as the network architecture of HiFiC is relatively lighter with less parameter volume than the UNet. The authors should report the model size and discuss the influence of improved model capacity. It may be better to discuss some larger LIC baselines eg PO-ELIC or evaluate a smaller UNet synthesizer.

Questions

See above.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors have addressed the limitation.

Reviewer kiiX5/10 · confidence 5/52023-07-13

Summary

This paper proposes an end-to-end learned image compression method based on diffusion model, where it consists of a VAE for latent feature encoding and a conditional diffusion decoder. Concerning theoretical parts, the authors also derive the variational upper bound to the diffusion model’s negative data log likelihood. Apart from that, by training the diffusion model with X-parameterization, the model can enable high-quality reconstructions in only a handful of decoding steps. Experimental results on 4 test datasets with 16 different metrics show that the proposed method can achieve comparable results compared to existing methods.

Strengths

1. The paper is well and clearly written. The method part also includes some theoretical derivations. 2. The method achieve sgood performance with extensive and complete evaluations on 4 different datasets. 3. The introduction of X-parameterization significantly reduces the long decoding time, which makes the proposed diffusion-based method promising for applications.

Weaknesses

1. The method itself is reasonable but without a clear motivation. It would be nice if the authors could spend some words on discussing some key advantages of using diffusion model for generative-based LIC? E.g., it would be nice if there is a significant improvement in terms of perceptual quality compared to VAE-based generative LIC, or that diffusion-based LIC can have some other benefits that VAE-based cannot have. 2. Although with X-parameterization, the runtime is improved to be within a handful number of decoding steps, still as shown in the supplementary materials, the decoding time is still significantly longer than existing LIC methods. 3. It is also welcome to have as many as evaluation (e.g., 16 metrics) is good, however, without explanations or analysis, it can be hard for readers who are not familiar with some of the metrics to qualitatively interpret the results. Compared to more metrics, personally, i prefer reporting comparison results with more publicly available methods on only 2-3 representative or well-known evolution metrics in the main paper while putting the others in the supplementary materials.

Questions

1. I am confused about the theoretical analysis or rationale behind why using the X-parameterization rather than the $\sigma$ parameterization can significantly reduce the number of decoding steps. I think this should be addressed in the rebuttal and also in the paper. 2. I am also wonder if the authors are planing to release their code?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

4 excellent

Contribution

3 good

Limitations

NA

Reviewer kiiX2023-08-18

Thanks for the responses from the authors. Concerning the paper itself and the comments by other reviewers, I will stick to my original rating.

Reviewer QC9o2023-08-21

I appreciate the authors for their response to my concerns. While the rebuttal has addressed some of my points, I still have reservations regarding the FID/LPIPS gap between the proposed approach and existing VAE-like approaches such as HiFiC. When it comes to image generation tasks without ground truth, it becomes challenging to perform case-wise evaluations. In such cases, FID serves as a primary consideration since it provides a distribution-wise measurement, assessing whether the sampled textures align with the in-distribution data. This is why FID is typically calculated directly on a training set when evaluating generation tasks, as we expect the samples to adhere to the observed empirical data distribution. However, image compression is a task that has case-wise ground truth. FID is a coarser evaluation for this type of task. Since comparing FID between a pair of input/output images is meaningless, we cannot conduct case study to determine whether the quality of the compressed image is good or identify the specific shortcomings of an approach. It is unclear whether a good FID score on a decoded set indicates good consistency to inputs or an overemphasis on FID's preferences (ie the hallucination artifacts). On the other hand, LPIPS provides a finer-grained evaluation for paired assessments and has been shown to be highly correlated with human perception. An approach with a high LPIPS score is less likely to exhibit fake artifacts. Therefore, I still consider LPIPS as a primary reference for judging an image compression method. I acknowledge the value of exploring diffusion-based approaches for learned image compression and appreciate the authors' efforts in this regard. However, it is crucial to include both theoretical and experimental discussions since NIC is an empirical approach built on a solid foundation established by Ballé et al papers and VAE/ELBO theories. Given that this earlier exploration combining diffusion models with NIC challenges the existing framework and has the potential to significantly influence future studies, I maintain my rating score above the threshold but remain cautious. Overall, I appreciate the authors' response and encourage them to provide further clarification and evidence to support their proposed approach's superiority over existing VAE-like approaches.

Authorsrebuttal2023-08-21

About Metrics and HiFiC baseline

Thank you for taking the time to share your thoughts, but we still need to clarify some key points. 1. We would like to emphasize a key observation from the HiFiC paper's conclusion: "**By comparing our metrics with the outcome of the user study, we showed that no existing metric is perfect for ordering arbitrary models right now, but that using FID and KID can be a valuable tool in exploring architectures and other design choices.**" This assertion substantially reinforces the relevance of the evaluation metrics we employed. 2. Moreover, the aforementioned point reinforces our contention that relying solely on LPIPS for assessing perceptual image quality can introduce bias. While our LPIPS scores may appear less favorable than those of HiFiC, our superior performance across DIST, PieAPP, and FID metrics underscores our approach's broader effectiveness. 3. When calculating FID, it's crucial to recognize that we're essentially measuring the divergence between the **compressed test data distribution** and its corresponding **uncompressed test data distribution**. This underscores that the data remain paired at the distribution level, without resorting to the training data as a reference distribution. 4. Lastly, we must acknowledge that HiFiC, being a GAN-VAE hybrid method, is not exempt from the challenge of "fake artifacts," an issue they also candidly addressed in their Broader Impact section. As we mentioned in the paper, this rate-distortion-perception theory was sufficiently discussed by [Blau et al. 2019](https://arxiv.org/pdf/1901.07821.pdf) Once again, we appreciate your engagement and feedback, which allow for a more nuanced discussion of the intricacies involved.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC