probml / pml2-book

Probabilistic Machine Learning: Advanced Topics
MIT License
1.39k stars 119 forks source link

Typo in Denoising Score Matching equations #253

Closed smethnani closed 1 year ago

smethnani commented 1 year ago

On page 847, equations 24.31-24.34 use the gradient wrt to x. Should they be wrt to \tilde x?

zjowowen commented 1 year ago

It seems that in the origin paper (https://www.iro.umontreal.ca/~vincentp/Publications/smdae_techreport.pdf), they are calculated with respect to \tilde{x}. I guess that's the origin purpose is to do the gradient just right at where x are. (Since both \tilde{x} and x are actually the same variable at two different location, it's actually ok to use x rather than \tilde{x} just for simplicity, something like df(\tilde{x})/dx, or df(\tilde{x})/d(\tilde{x}), both is fine.)

However, the equation 24.34 seems to have a real error, the negative sign is missed: \nabla_x log(q(\tilde{x}|x))=-\frac{\tilde{x}-x}{\sigma^2}

zjowowen commented 1 year ago

One more little thing, "+\mathrm{constant}" should also be added in 24.33.

murphyk commented 1 year ago

fixed