Is Independence all you need? On the Generalization of Representations Learned from Correlated Data