Diffusion Models And Representation Learning Algorithm