Leveraging Task Structures for Improved Identifiability in Neural Network Representations