YiyanXu / DiffRec

Diffusion Recommender Model
168 stars 23 forks source link

How to understand the linear noise schedule (Eq. 4) in paper? #6

Open BlueGhostZ opened 1 year ago

BlueGhostZ commented 1 year ago

Notice that the author uses a new linear noise schedule instead of the Linear or cosine schedules used in DDPM. The selection in the code is noise_ schedule='linear var', which corresponds to lines 303-309 in gaussian_diffusion. py, but I do not understand the correspondence between these codes and Eq. 4 in the paper. I hope the author can help me. Looking forward to your reply very much.

YiyanXu commented 9 months ago

The implementation of the linear noise schedule specified in Eq.(4) is represented by the np.linspace(...) operation found in line 53 of gaussian_diffusion.py. The function _betas_from_linearvariance, which can be found in lines 303-309 of the same file, is responsible for deriving $\beta_t$ from the linear $1-\bar{\alpha}_t$.