A rank decomposition for the topological classification of neural representations