phizaz / diffae

Official implementation of Diffusion Autoencoders
https://diff-ae.github.io/
MIT License
862 stars 130 forks source link

Deterministic Reconstruction Error #52

Open anthony-mendil opened 1 year ago

anthony-mendil commented 1 year ago

Upon reading the paper, specifically the part about the deterministic reconstruction with ddim, I can not seem to understand why the reconstruction is not exact. You talk about exact reconstruction and also mention reconstruction loss. Why, if the formulas are deterministic and the output of the network is also deterministic, is the reconstruction not exact? Thanks in advance, Anthony Mendil.

anthony-mendil commented 1 year ago

I found the reason. If somebody is interested, feel free to reach out to me.

DishuZ commented 4 months ago

Hello friend, I have the same doubts as you. Could you tell me the reason why it cannot be exact reconstruction? Thanks in advance.

anthony-mendil commented 4 months ago

Hello! To find out the reason why the reconstruction is not exact despite the deterministic diffusion process and neural network, I manually derived the deterministic reverse and diffusion processes. More precisely, I started at the formula for the deterministic reverse process and reversed it to obtain the deterministic diffusion process. When doing so, you find out that an approximation is required in order to make the resulting formula executable. Specifically, m(x_t, t) can not be computed and must be approximated by m(x_t-1, t-1), where m is the model that predicts x_0. This approximation is the reason why the reconstruction is not exact. As this calculation is not included in the paper, I provide my calculations below.

grafik