Bayesian representation learning with oracle constraints