Abstract
In the study of neural network interpretability, the concept of "modularity"—the idea that networks decompose complex tasks into independent sub-tasks—remains a central but poorly defined goal. This research investigates the internal organization of fully connected networks by formalizing module detection as a clustering problem. By comparing eight distinct measures of functional similarity, the study reveals a fundamental misalignment: units that cluster together based on their response to inputs (upstream information) rarely align with those that cluster based on their influence on the final output (downstream information). Furthermore, the findings suggest that common regularization techniques like dropout do not merely prevent overfitting but act as powerful drivers of modularity by creating redundant functional replicas within the network.
Introduction
As neural networks grow in complexity, understanding their internal logic becomes increasingly difficult. We often assume that these "black boxes" develop a modular structure, where specific groups of neurons specialize in particular features or tasks. However, defining a "module" is non-trivial. Is a module defined by the features it detects (e.g., an edge detector) or by its functional contribution to the final decision (e.g., identifying a specific digit)?
This paper addresses this ambiguity by examining whether different definitions of functional similarity lead to the same modular structures. If input-driven and output-driven groupings diverge, it suggests that the goals of disentanglement (organizing by input features) and compositionality (organizing by output components) may be fundamentally at odds within standard architectures.
Methodology
Defining Functional Similarity
The researchers developed a pipeline to detect modules in trained Multi-Layer Perceptrons (MLPs). They proposed eight similarity measures categorized into two families:
- Upstream Similarity: Based on neuron activations and sensitivity to changes in the input. This captures what a neuron "sees."
- Downstream Similarity: Based on how perturbations in a neuron’s activity affect the final output or the loss function. This captures what a neuron "does."
Clustering and Optimization
Neurons were treated as nodes in a graph, with similarity scores serving as edge weights. To identify modules, the researchers utilized the Girvan-Newman modularity score ($Q$), a metric from network science that quantifies the strength of a network's division into clusters. Because maximizing $Q$ is an NP-complete problem, the study employed a two-step optimization process: a fast spectral initialization followed by a Monte Carlo refinement to reach the optimal modularity score ($Q^*$).
Experimental Setup
The analysis was conducted using the MNIST dataset. The researchers trained 270 different models, systematically varying hyperparameters—such as dropout rates and regularization types (L1 and L2)—to observe how these factors influence internal organization.
Key Findings
The Upstream-Downstream Divide
The most significant discovery is the persistent "misalignment" between upstream and downstream clusters. While there is high consistency within the upstream family and within the downstream family, there is almost no agreement between them. A group of neurons might respond to the identical visual stimulus, yet each neuron in that group may serve a completely different purpose in the subsequent layers. This suggests that the "features" a network learns are not neatly mapped to the "actions" it takes.
Dropout as a Modularity Driver
Contrary to the intuition that dropout might "smear" functions across the network to ensure robustness, it actually significantly increased modularity. Dropout forces the network to develop redundancy. By randomly deactivating units during training, the network is incentivized to create "functional replicas"—clusters of units that can substitute for one another. If one unit is dropped, its replica in the same cluster ensures the signal persists.
Learned vs. Innate Structure
The study observed that upstream modularity (feature detection) is a learned property that emerges over the course of training. In contrast, a significant portion of downstream modularity (how units affect the output) is present even in randomly initialized, untrained networks, suggesting that the architecture's initial connectivity strongly biases its functional potential.
The Role of Regularization
Weight decay (L2 regularization) was found to increase modularity more effectively than expected. Conversely, L1 regularization, which encourages weight sparsity, had a surprisingly minimal effect on the functional grouping of units, indicating that sparse weights do not necessarily lead to a more modular functional organization.
Discussion and Future Directions
The high modularity scores observed in modern networks may be less a sign of a clean "division of labor" and more a sign of strategic redundancy. While this redundancy provides robustness, it complicates the task of interpretability, as a single "function" may be distributed across multiple redundant clusters.
Limitations
This study focused on simple feedforward networks (MLPs) and the MNIST dataset. It remains an open question whether these findings—particularly the upstream-downstream misalignment—persist in more complex architectures like Convolutional Neural Networks (CNNs) or Transformers, or when trained on more sophisticated datasets.
Future Work
Future research could explore explicitly incorporating the modularity score ($Q$) into the loss function to encourage more interpretable structures. Additionally, moving from "hard" cluster assignments to "soft" assignments—where a neuron can belong to multiple modules—may better reflect the multi-functional nature of biological and artificial neurons.
Summary updated