A data augmentation perspective on diffusion models and retrieval