Skip to main content
. Author manuscript; available in PMC: 2024 Sep 12.
Published in final edited form as: Proc Mach Learn Res. 2024 May;238:4195–4203.

Algorithm 1.

Training of SADI

Input: distribution qkx0 and the corresponding weight ck for k[K], target selection strategy, training epochs N, maximum number of diffusion steps S, noise level βss=1S
Output: Trained denoising function ϵθ
 1: for i{1,,N} do
 2:  Sample k𝒞c1,c2,,cK
 3:  Sample sUnif{1,,S}, and x0qkx0
 4:  Separate observed values x0 into target part x0ta and conditional part x0co by the target selection strategy
 5:  Sample ϵ𝒩(0,I) where the dimension of ϵ corresponds to x0ta
 6:  Calculate noisy targets xsta=αsx0ta+1-αsϵ
 7:  Take gradient step on ϵ-ϵθxsta,sx0co22
 8: end for