Predictive learning as a network mechanism for extracting low-dimensional latent space representations