Neural networks are more modular than single neurons suggest
Organizations: Electrical and Computer Engineering, University of California, San Diego · Cognitive Science Department, University of California, San Diego · Computer Science and Engineering, University of California, San Diego
Abstract
Neural networks routinely develop representations in which individual neurons contribute to multiple distinct functions, leading to the widespread view that such networks lack modular organization. We challenge this conclusion by introducing a formally nested hierarchy of modularity: unit-level, which requires distinct computations to occupy disjoint neurons; orthogonal, which asks whether a rotation reveals functionally independent subspaces; and linear, which asks whether a bounded linear map can separate task-relevant computations into independent subspaces. We develop a unified framework for learning decompositions at each level and evaluating them causally through selective ablation. Across vision models, language models and multi-task Recurrent Neural Networks (RNNs), we find that networks which lack unit-level modularity nonetheless often exhibit clear functional modularity at the subspace level. In vision and language models, content versus style and syntax versus semantics respectively dissociate under subspace ablation despite sharing overlapping populations of neurons. These learned subspaces also align differentially with brain data, with content and style subspaces predicting higher and lower visual cortex respectively, and semantic subspaces outperforming syntactic ones in predicting language cortex activity. In RNNs trained on multiple cognitive tasks and previously shown to lack modular structure, our decomposition recovers sharp double dissociations between tasks. The absence of unit-level modularity frequently coexists with clear subspace-level modularity across domains, enabling targeted intervention on specific computations even in networks where no individual neuron is specialized, with broad implications for mechanistic interpretability and for understanding functional organization in both biological and artificial neural systems.
Figures & tables
| Transformation | Top-1 CM | Top-5 CM | Top-10 CM | Top-1 SM | Top-5 SM | Top-10 SM | ||
|---|---|---|---|---|---|---|---|---|
| Permutation | 0.0063 | 0.0080 | 0.0125 | 0.0738 | 0.0625 | 0.0546 | 1.1032 | 1.0216 |
| Orthogonal | 0.1381 | 0.1686 | 0.2435 | 0.7542 | 0.7550 | 0.7613 | 7.2348 | 2.5603 |
| Invertible | 0.3107 | 0.3675 | 0.4884 | 0.8632 | 0.8785 | 0.8940 | 16.0815 | 5.2594 |
| Transformation | Top-1 | Top-5 | Top-10 | Top-1 | Top-5 | Top-10 |
|---|---|---|---|---|---|---|
| Permutation | 0.3333 | 0.3953 | 0.3971 | 0.1564 | 0.1681 | 0.1368 |
| Orthogonal | 0.8485 | 0.9286 | 0.9417 | 0.6667 | 0.5504 | 0.4763 |
| Invertible | 0.9375 | 0.9439 | 0.9259 | 0.6556 | 0.5675 | 0.5152 |
| Motion context | Color context | |
|---|---|---|
| Accuracy |
| Yang task-pair category | Softplus: maximum DDI | Tanh: maximum DDI |
|---|---|---|
| Disjoint pair | 0.704 | 0.472 |
| Inclusive pair | 0.052 | 0.000 |
| Mixed pair | 0.048 | 0.002 |
| Mante decomposition | DDI (mean SD across 10 networks) |
|---|---|
| Learned map, true targets | |
| Spectrum-matched random maps | |
| Learned maps, shuffled targets |
| Transformation | Content Matching (CM) | Style Matching (SM) | ||||||
|---|---|---|---|---|---|---|---|---|
| Top 1 | Top 5 | Top 10 | Top 1 | Top 5 | Top 10 | |||
| Permutation | 0.0007 | 0.0023 | 0.0002 | 0.0096 | 0.0154 | 0.0108 | 1.0141 | 1.0011 |
| Orthogonal | 0.0034 | -0.0021 | 0.0014 | -0.0024 | -0.0080 | 0.0036 | 1.0275 | 1.0067 |
| Invertible | 0.0048 | 0.0065 | 0.0042 | 0.0148 | -0.0034 | 0.0165 | 0.9727 | 1.0286 |
| Content Matching (CM) | Style/Category Matching | |||||
|---|---|---|---|---|---|---|
| Dissociation | Top 1 | Top 5 | Top 10 | Top 1 | Top 5 | Top 10 |
| Content–Style | 0.8157 | 0.8725 | 0.9351 | 0.5741 | 0.6635 | 0.7978 |
| Content–Category | 0.8157 | 0.8725 | 0.9351 | -0.0800 | -0.1966 | -0.8368 |
| Content Units | Style/Category Units | |||||
|---|---|---|---|---|---|---|
| Dissociation | Top 1 | Top 5 | Top 10 | Top 1 | Top 5 | Top 10 |
| Content–Style | 0.8424 | 0.9042 | 0.9269 | 0.7558 | 0.8450 | 0.8734 |
| Content–Category | 0.8330 | 0.9021 | 0.9235 | 0.8186 | 0.8864 | 0.9105 |
| Dissociation | Content | Category | Residual | ||||||
|---|---|---|---|---|---|---|---|---|---|
| T1 | T5 | T10 | T1 | T5 | T10 | T1 | T5 | T10 | |
| Content–Category | 0.141 | 0.258 | 0.331 | 0.152 | 0.275 | 0.346 | 0.194 | 0.352 | 0.449 |
| Intervention | Motion Accuracy | Color Accuracy |
|---|---|---|
| Intact | ||
| Ablate motion subspace | ||
| Ablate color subspace | ||
| Ablate residual |
| Transformation | Top-1 CM | Top-5 CM | Top-10 CM | Top-1 SM | Top-5 SM | Top-10 SM | ||
|---|---|---|---|---|---|---|---|---|
| Swin Base | ||||||||
| Permutation | 0.0063 | 0.0080 | 0.0125 | 0.0738 | 0.0625 | 0.0546 | 1.1032 | 1.0216 |
| Orthogonal | 0.1381 | 0.1686 | 0.2435 | 0.7542 | 0.7550 | 0.7613 | 7.2348 | 2.5603 |
| Invertible | 0.3107 | 0.3675 | 0.4884 | 0.8632 | 0.8785 | 0.8940 | 16.0815 | 5.2594 |
| Swin Small | ||||||||
| Permutation | 0.0138 | 0.0141 | 0.0180 | 0.0667 | 0.0633 | 0.0723 | 1.1016 | 1.0777 |
| Transformation | Top-1 | Top-5 | Top-10 | Top-1 | Top-5 | Top-10 |
|---|---|---|---|---|---|---|
| Pythia 160M | ||||||
| Permutation | 0.1707 | 0.1418 | 0.1271 | 0.0357 | 0.0563 | 0.0861 |
| Orthogonal | 0.9540 | 0.9058 | 0.8580 | 0.5574 | 0.5460 | 0.5259 |
| Invertible | 0.9806 | 0.9565 | 0.9536 | 0.7970 | 0.7955 | 0.7500 |
| Pythia 410M | ||||||
| Permutation | 0.3333 | 0.3953 | 0.3971 | 0.1564 | 0.1681 | 0.1368 |
| Asset | Type | License / terms of use |
|---|---|---|
| ImageNet | Dataset | Official ImageNet access agreement / terms of use (not a standard open license). |
| THINGS | Dataset | Original THINGS images are for academic use only; the official site recommends using THINGSplus license-free images for publications. |
| MS-COCO | Dataset | Official COCO Terms of Use; images are subject to Flickr terms of use, and COCO annotations / website are distributed under CC BY 4.0. |
| Flickr8k-Expert | Dataset | Available for non-commercial academic research (images subject to original Flickr8k academic request terms). |
| NSD | Dataset | Access subject to the NSD Data Access Agreement. |
| Torchvision pretrained vision models | Model | BSD-3-Clause (official torchvision repository; includes standard pretrained models such as ResNet, VGG, AlexNet, and torchvision vision transformers where used). |
Modular Neural Networks
Modular neural networks organize computation into specialized, reusable components that can be routed, composed, or updated independently.
See all 74 papers