DiffEnc: Variational Diffusion with a Learned Encoder

Beatrix M. G. Nielsen, Anders Christensen, Andrea Dittadi, Ole Winther
2/12/2026

No official code found. Best implementation: bemigini/DiffEnc (13 stars, Apache-2.0, last commit 2024-04-22).

Abstract

Diffusion models may be viewed as hierarchical variational autoencoders (VAEs) with two improvements: parameter sharing for the conditional distributions in the generative process and efficient computation of the loss as independent terms over the hierarchy. We consider two changes to the diffusion model that retain these advantages while adding flexibility to the model. Firstly, we introduce a data- and depth-dependent mean function in the diffusion process, which leads to a modified diffusion loss. Our proposed framework, DiffEnc, achieves a statistically significant improvement in likelihood on CIFAR-10. Secondly, we let the ratio of the noise variance of the reverse encoder process and the generative process be a free weight parameter rather than being fixed to 1. This leads to theoretical insights: For a finite depth hierarchy, the evidence lower bound (ELBO) can be used as an objective for a weighted diffusion loss approach and for optimizing the noise schedule specifically for inference. For the infinite-depth hierarchy, on the other hand, the weight parameter has to be 1 to have a well-defined ELBO.

View on arXivView PDF

Code Implementations(1)

bemigini/DiffEncCommunity58%
Apache-2.0

Code for the article: "DiffEnc: Variational Diffusion with a Learned Encoder"

131Shell, PythonFeb 8, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{nielsen2026diffenc,
  title  = {DiffEnc: Variational Diffusion with a Learned Encoder},
  author = {Beatrix M. G. Nielsen and Anders Christensen and Andrea Dittadi and Ole Winther},
  year   = {2026},
  eprint = {2310.19789},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2310.19789},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.19789.svg)](https://codeofpaper.com/paper/2310.19789)

Discussion