NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Growing Brains: Co-emergence of Anatomical and Functional Modularity in Recurrent Neural Networks

Ziming Liu, Mikail Khona, Ila R. Fiete, Max Tegmark

TL;DR

This paper demonstrates how to "grow" artificial neural networks that mimic the anatomical organization of biological brains. By applying Brain-Inspired Modular Training (BIMT)—which penalizes long-distance connections and allows neurons to "swap" positions—Recurrent Neural Networks (RNNs) naturally develop spatial clusters of neurons that are both functionally specialized and physically localized, leading to superior efficiency and interpretability.

What Problem Does This Paper Address?

In neuroscience, we know that brains are highly modular: specific regions handle specific tasks (like the visual cortex for seeing or motor areas for moving). This anatomical modularity is efficient and helps with learning new things by recombining old skills.

In contrast, standard Recurrent Neural Networks (RNNs) are often "black boxes." While they can develop functional modularity (groups of neurons that activate for similar tasks), these neurons are usually scattered randomly throughout the network. This lack of spatial organization makes them harder to interpret, less efficient in terms of "wiring cost," and potentially less robust for continual learning. The authors set out to see if they could force RNNs to develop brain-like spatial organization without sacrificing performance.

Methods

The researchers utilized a technique called Brain-Inspired Modular Training (BIMT). The core idea is to treat the network as a physical object in space.

  1. Spatial Embedding: They arranged the hidden neurons of an RNN on a 2D grid (mimicking the flat sheet of the neocortex) or a 1D line.
  2. Distance-Aware Regularization: They modified the standard loss function. Instead of just penalizing the magnitude of weights (standard $L_1$ regularization), they added a penalty proportional to the length of the connection. Long-distance connections are "expensive," encouraging the network to solve problems using local clusters.
  3. Neuron Swapping: To prevent the network from getting stuck in a poor spatial layout, BIMT periodically allows neurons to swap positions if doing so reduces the total wiring cost.

They compared this approach against standard training (no regularization) and vanilla $L_1$ regularization (which encourages sparsity but ignores distance).

Datasets

The authors tested their approach on two sets of compositional cognitive tasks:

  • 20-Cog-tasks: A suite of 20 simple tasks (like "pro-anti" response or delayed matching) inspired by experimental psychology and neuroscience. These tasks share "computational primitives," meaning they can be solved by combining sub-components.
  • 84 Mod-Cog-tasks: A more complex expansion of the first set, designed to require more intricate recurrent connectivity within the hidden layers.

Key Insights and Ideas

  • Co-emergence of Form and Function: The most striking finding is that functional and anatomical modularity emerge together. When you penalize distance, neurons that perform similar sub-tasks naturally migrate toward each other and form dense local interconnections.
  • The Pareto Frontier: BIMT doesn't just make networks "prettier"; it makes them better. The authors found that BIMT provides a superior trade-off between task error and network sparsity (both in terms of active neurons and total wiring length) compared to standard $L_1$ regularization.
  • Interpretability through Geometry: Because the modules are spatially localized, the resulting network is much easier to "read." You can literally see the functional clusters in the hidden layer, as shown in the visualization below.
Figure 1: Training an RNN with BIMT on cognitive tasks. a: Visualization of the network. Each line represents a weight; blue/red means positive/negative weights; thickness corresponds to magni- tudes. b: The hidden neurons are clustered into functional modules. c: These functional modules (distinguished by colors) are also clustered in space, visually resembling a brain. By contrast, L1 regularization leads to no anatomical modules. The network has (d) good performance, (e) high sparsity and good locality (f). g and h: Trade-off between performance (error) and sparsity. g uses the number of active neurons as the sparsity measure, while h uses the wiring length as the sparsity measure. In both cases, the Pareto frontier of BIMT is better than that of L1 regularization and no regularization.

Key Results

  • Spatial Localization: In BIMT-trained networks, neurons in the same functional cluster were significantly more likely to be neighbors. This was quantified using a "fraction of isolated neurons" metric, where BIMT performed far better than random chance or $L_1$ baselines.
  • Sparsity: The networks learned to solve all 20 tasks using only about 100 "important" neurons out of a 400-neuron grid.
  • Wiring Efficiency: As seen in Figure 1h, for any given error rate, BIMT achieved a total wiring length orders of magnitude smaller than standard $L_1$ regularization.
  • Statistical Significance: The authors used random shuffling as a control. They showed that the modularity found in BIMT networks is a deliberate result of the training, not a statistical fluke, as the BIMT results were "significantly out-of-distribution" compared to shuffled versions.
Figure 2: (a) The myriad ways anatomical and functional modularity can present itself in trained RNNs. (b) We test anatomical modularity for neural networks with BIMT (left), L1 regularization (middle) or no regularization (right). We propose two metrics, fraction of isolated neurons (top) and average (functional) cluster size (bottom) to measure anatomical modularity. For both metrics, smaller is better. We compare the trained network with networks whose useful hidden neurons are randomly shuffled. No regularization and L1 regularization are in the distributions of randomly shuffled networks, while BIMT is significantly out of distribution (smaller) than random ones, indicating anatomical modularity.

Limitations and Future Work

While the results are promising for creating "brain-like" AI, the paper notes a few areas for further exploration:

  • Task Complexity: The cognitive tasks used, while standard in neuroscience, are relatively simple compared to modern LLMs or computer vision benchmarks. The authors suggest testing BIMT on more complex, real-world datasets.
  • Hardware Applications: The authors highlight that this spatial modularity is ideal for neuromorphic computing, where physical distance between components directly impacts energy consumption and heat.
  • Functional Modularity Limits: While anatomical modularity was high, the authors hope to further improve the functional distinctness of the "brain" modules in future iterations.

Summary updated

BibTeX
@inproceedings{liu2023growing,
  author = {Ziming Liu and Mikail Khona and Ila R. Fiete and Max Tegmark},
  title = {{Growing Brains: Co-emergence of Anatomical and Functional Modularity in Recurrent Neural Networks}},
  booktitle = {UniReps @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=hWzWk0TSZ3},
}
Figure