Are Neural Nets Modular? Inspecting Functional Modularity Through Differentiable Weight Masks
Róbert Csordás, Sjoerd van Steenkiste, Jürgen Schmidhuber
Abstract
Neural networks (NNs) whose subnetworks implement reusable functions are expected to offer numerous advantages, including compositionality through efficient recombination of functional building blocks, interpretability, preventing catastrophic interference, etc. Understanding if and how NNs are modular could provide insights into how to improve them. Current inspection methods, however, fail to link modules to their functionality. In this paper, we present a novel method based on learning binary weight masks to identify individual weights and subnets responsible for specific functions. Using this powerful tool, we contribute an extensive study of emerging modularity in NNs that covers several standard architectures and datasets. We demonstrate how common NNs fail to reuse submodules and offer new insights into the related issue of systematic generalization on language tasks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fd9cd453-65c0-4b67-b392-0f0c31fc704bCited by top-tier papers37
- Memory-Based Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Christopher D. Manning et al.ICML 2022 · 520 citations
- Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language ModelsPeter Hase, Mohit Bansal, Been Kim, Asma GhandehariounNeurIPS 2023 · 307 citations
- Can Subnetwork Structure Be the Key to Out-of-Distribution Generalization?Dinghuai Zhang, Kartik Ahuja, Yilun Xu, Yisen Wang et al.ICML 2021 · 109 citations
- Inducing Causal Structure for Interpretable Neural NetworksAtticus Geiger, Zhengxuan Wu, Hanson Lu, Josh Rozner et al.ICML 2022 · 104 citations
- Advancing Model Pruning via Bi-level OptimizationYihua Zhang, Yuguang Yao, Parikshit Ram, Pu Zhao et al.NeurIPS 2022 · 101 citations
Builds on5
- Recurrent Independent MechanismsAnirudh Goyal, Alex Lamb, Jordan Hoffmann, Shagun Sodhani et al.ICLR 2021 · 357 citations
- Task-Driven Modular Networks for Zero-Shot Compositional LearningSenthil Purushwalkam, Maximilian Nickel, Abhinav Gupta, Marc'Aurelio RanzatoICCV 2019 · 222 citations
- Environmental drivers of systematicity and generalization in a situated agentFelix Hill, Andrew K. Lampinen, Rosalia Schneider, Stephen Clark et al.ICLR 2020 · 109 citations
- Learning to Combine Top-Down and Bottom-Up Signals in Recurrent Neural Networks with Attention over ModulesSarthak Mittal, Alex Lamb, Anirudh Goyal, Vikram Voleti et al.ICML 2020 · 73 citations
- Factorizing Declarative and Procedural Knowledge in Structured, Dynamical EnvironmentsAnirudh Goyal, Alex Lamb, Phanideep Gampa, Philippe Beaudoin et al.ICLR 2021 · 14 citations
Related papers
- Break It Down: Evidence for Structural Compositionality in Neural NetworksMichael A. Lepori, Thomas Serre, Ellie PavlickNeurIPS 2023 · 66 citations
- Composable Sparse Subnetworks via Maximum-Entropy PrincipleFrancesco Caso, Samuele Fonio, Simone Monaco, Nicola Saccomanno et al.ICLR 2026
- Neural Sculpting: Uncovering hierarchically modular task structure in neural networks through pruning and network analysisShreyas Malakarjun Patil, Loizos Michael, Constantine DovrolisNeurIPS 2023
- Permutation Equivariant Neural FunctionalsAllan Zhou, Kaien Yang, Kaylee Burns, Adriano Cardace et al.NeurIPS 2023 · 84 citations
- Heads up! Large Language Models Can Perform Tasks Without Your Instruction via Selective Attention Head MaskingSenyu Han, Hongchuan Zeng, Kai Yu, Lu ChenICML 2025
