Learning the Dependency Structure of Latent Factors