Identifying Sub-networks in Neural Networks via Functionally Similar Representations
Tian Gao, Amit Dhurandhar, Karthikeyan Natesan Ramamurthy, Dennis Wei
TL;DR
Identifies functionally distinct subnetworks by comparing intermediate representations with the Gromov-Wasserstein distance. The method is task-agnostic and does not rely on predefined targets, enabling automated discovery of layer groupings that correspond to different abstractions. Empirical results across algebraic, NLP, and vision tasks show clear block structures and demonstrate utility for model compression and targeted fine-tuning, while requiring minimal human effort. The approach is permutation-invariant and scalable to differing layer shapes, distributions, and dimensions, addressing fundamental representational mismatches across layers.
Abstract
Providing human-understandable insights into the inner workings of neural networks is an important step toward achieving more explainable and trustworthy AI. Existing approaches to such mechanistic interpretability typically require substantial prior knowledge and manual effort, with strategies tailored to specific tasks. In this work, we take a step toward automating the understanding of the network by investigating the existence of distinct sub-networks. Specifically, we explore a novel automated and task-agnostic approach based on the notion of functionally similar representations within neural networks to identify similar and dissimilar layers, revealing potential sub-networks. We achieve this by proposing, for the first time to our knowledge, the use of Gromov-Wasserstein distance, which overcomes challenges posed by varying distributions and dimensionalities across intermediate representations, issues that complicate direct layer to layer comparisons. On algebraic, language, and vision tasks, we observe the emergence of sub-groups within neural network layers corresponding to functional abstractions. Through downstream applications of model compression and fine-tuning, we show the proposed approach offers meaningful insights into the behavior of neural networks with minimal human and computational cost.
