Factoring out prior knowledge from low-dimensional embeddings