Skip to main content
QUICK REVIEW

[Paper Review] Pruned Neural Networks are Surprisingly Modular

Daniel Filan, Shlomi Hod|arXiv (Cornell University)|Mar 10, 2020
Neural Networks and ApplicationsComputer Science11 references5 citations
TL;DR

This paper introduces a graph-theoretic measure of modularity in pruned neural networks, defining modules as neuron clusters with strong internal connectivity and weak external connections. It finds that trained and pruned MLPs exhibit significantly higher modularity than random sparse networks—especially when trained with dropout—and that modules show functional importance and dependency, suggesting learning via gradient descent and pruning favors modular structure.

ABSTRACT

The learned weights of a neural network are often considered devoid of scrutable internal structure. To discern structure in these weights, we introduce a measurable notion of modularity for multi-layer perceptrons (MLPs), and investigate the modular structure of MLPs trained on datasets of small images. Our notion of modularity comes from the graph clustering literature: a "module" is a set of neurons with strong internal connectivity but weak external connectivity. We find that training and weight pruning produces MLPs that are more modular than randomly initialized ones, and often significantly more modular than random MLPs with the same (sparse) distribution of weights. Interestingly, they are much more modular when trained with dropout. We also present exploratory analyses of the importance of different modules for performance and how modules depend on each other. Understanding the modular structure of neural networks, when such structure exists, will hopefully render their inner workings more interpretable to engineers. Note that this paper has been superceded by "Clusterability in Neural Networks", arxiv:2103.03386 and "Quantifying Local Specialization in Deep Neural Networks", arxiv:2110.08058!

Motivation & Objective

  • To develop a measurable, graph-theoretic notion of modularity in multi-layer perceptrons (MLPs) based on internal and external connectivity of neuron clusters.
  • To investigate whether trained and pruned neural networks exhibit modular structure in their learned weights, beyond random sparse networks.
  • To explore the functional importance and interdependencies of identified modules in pruned MLPs.
  • To assess how training regimes like dropout influence the emergence of modularity in neural networks.

Proposed method

  • Represent a neural network as a weighted, undirected graph where neurons are vertices and absolute weights between adjacent layers are edge weights.
  • Use the normalized cut metric to evaluate the quality of a partition into modules, with higher values indicating better modularity.
  • Apply spectral clustering to decompose the network into modules based on the graph's Laplacian matrix and eigenvectors.
  • Measure modularity by comparing the normalized cut of the learned partition to that of random partitions with the same sparsity.
  • Assess module importance via single-lesion experiments: zero out each module’s weights and measure accuracy drop.
  • Analyze module dependencies by measuring conditional accuracy damage when one module is lesioned while another is active or inactive.

Experimental results

Research questions

  • RQ1Do pruned neural networks trained on image datasets exhibit measurable modular structure in their learned weights?
  • RQ2How does the modularity of trained and pruned MLPs compare to that of random sparse networks with the same weight distribution?
  • RQ3Does the use of dropout during training enhance the emergence of modular structure in neural networks?
  • RQ4Which modules are functionally important, and how do they depend on one another in terms of performance?
  • RQ5Does modularity increase during training, and is it correlated with learning accuracy?

Key findings

  • Pruned neural networks trained on small image datasets are significantly more modular than random sparse networks with the same sparsity, with modularity exceeding approximately 99.7% of such random networks.
  • MLPs trained with dropout exhibit substantially higher modularity than those trained without dropout, indicating dropout promotes modular weight structure.
  • Modularity increases during training when accuracy improves, but remains low when training on random labels, suggesting modularity is linked to actual learning.
  • Certain modules are functionally important, with lesioning them causing significant accuracy drops (e.g., up to 16.6 percentage points in some cases), and these effects are often statistically significant.
  • Some modules show strong conditional dependencies: lesioning one module causes greater performance degradation when another is active, indicating interdependence.
  • The dependency structure between modules is asymmetric and non-trivial, with some modules being critical only when others are present, suggesting functional specialization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.