Connectivity-Optimized Representation Learning via Persistent Homology