Learning the geometry of common latent variables using alternating-diffusion