Representation Learning With Diffusion Models For Machine