Learning latent variable structured prediction models with Gaussian perturbations