Modular Growth of Hierarchical Networks: Efficient, General, and Robust Curriculum Learning

Mani Hamidi, Sina Khajehabdollahi, Emmanouil Giannakakis, Tim Schäfer, Anna Levina, Charley M. Wu

TL;DR

This paper demonstrates that training recurrent neural networks (RNNs) via a biologically inspired strategy of modular growth and curriculum learning drastically outperforms standard, fixed-size networks. By sequentially adding small neural modules and freezing past connections as task complexity scales, the network achieves superior training speed, generalization, and robustness while remaining highly parameter-efficient.

What Problem Does This Paper Address?

Modern deep learning typically pursues performance by scaling up model size at all costs. In contrast, biological brains achieve incredible computational efficiency through structural modularity and gradual growth (e.g., gene duplication events over evolutionary timescales).

Standard artificial RNNs struggle to learn long temporal timescales and suffer from catastrophic forgetting when introduced to increasingly complex tasks. While researchers have tried giving individual neurons trainable time constants to help them remember things longer, it remains unclear how network topology and growth strategies can be coordinated to build scalable, robust, and memory-efficient networks. This paper bridges that gap by exploring how module-level growth interacts with curriculum learning.

Methods

The authors compare standard, fixed-size RNNs against a novel growing modular RNN architecture using a curriculum learning framework.

Figure 1: Network Structures. Non-modular networks con- sist of a fixed number of neurons (M = 20, 54, 91, 128), with connections that are retrained at each curriculum step. After a given accuracy is reached for a task of length N, a new readout head (consisting of 2 neurons) for N + 1 is added and the network is retrained for all previous N. In contrast, the modular network adds a much smaller RNN module (Mm = 5, 10, 15, 20) for every readout head that is added in the curriculum. Thus, each readout head is attached to a separate RNN module, rather than one large reservoir as in non-modular networks.

Key aspects of the methodology include:

  • Modular Growth Curriculum: The network starts as a single small module (5–20 neurons) trained on a simple task. When it masters that level, a new module of the same size is appended to receive feedforward inputs from the previous module.
  • Weight Freezing: To prevent catastrophic forgetting, all connections in older modules are frozen. Only the recurrent connections of the newest module and the feedforward connections connecting it to the previous module are trained.
  • Ablation Studies: The authors test the effects of completely freezing or duplicating (copying) recurrent vs. feedforward weights across modules to determine which connections drive the network's capabilities.

Datasets

The networks are evaluated on the synthetic $N$-parity task, a classic benchmark for testing memory and temporal representation in RNNs. The network receives a continuous stream of random binary digits and must output the modulo 2 sum (XOR) of the last $N$ digits. The difficulty is precisely controlled by increasing $N$, which forces the network to store both the values and the exact order of the sequence over longer periods.

Key Insights and Ideas

  • Effective vs. Trained Timescales: Neurons do not need slow intrinsic time constants to remember things long-term. Instead, the modular network's topology naturally amplifies the "effective" timescale of the system through recurrent wiring, allowing it to pass complex temporal representations down the chain.
  • Feedforward Bottlenecks: The feedforward connections between modules act as critical information bottlenecks. They are highly sensitive to perturbations and require precise fine-tuning to specialize the network for new tasks.
  • Recurrent Conservation: Internal recurrent weights within modules are highly stable and generic. They can actually be frozen or duplicated across modules (resembling deep reservoir computing) with minimal impact on performance, meaning the network excels at recycling its internal dynamics.

Key Results

  • Linear Scaling vs. Plateaus: Modular networks maintain a steady, linear progression through the curriculum, easily solving tasks up to $N=60$ within 60 epochs, and even reaching $N=200$ in extreme tests. Non-modular networks completely plateau at much lower difficulties ($N \approx 10\text{–}15$).
Figure 2: Performance comparison of modular and non-modular architectures with different numbers of neurons (color bars) allocated to their recurrent processing unit. For modular networks, the number of neurons is reported per module. For non- modular networks, the number indicates the total number of neurons in the single recurrent core. These numbers were chosen to allow for a comparable total number of learnable parameters for a given task difficulty N. (a) Learning curves show that modular architectures with sufficient (> 5) neurons can solve a new task at every epoch while the non-modular networks plateau in their learning ability. (b) Pareto frontier of performance after 60 training epochs, shows that the modular architecture always achieves better performance for the same number of parameters. Note that the saturation of performance at Nsolved = 60 for the modular architecture is due to the choice of training epochs. (c) Generalization performance of networks trained on a task difficulty of N and then tested on tasks of N + K. Accuracy is measured as the percentage of correct trials and error bars indicate the standard deviation. Results are averages over 4 non-modular and 3 modular networks, and errorbars show STD.
  • Pareto Efficiency: The modular architecture consistently sits on a superior Pareto frontier, achieving higher task accuracy with significantly fewer parameters than its non-modular counterparts.
  • Generalization and Robustness: Modular networks show significantly better generalization when tested on harder, unseen task complexities ($N+K$) and exhibit much higher robustness against weight perturbations.

Limitations and Future Work

  • The Cost of Neurons: While this architecture is highly parameter-efficient (sparse connectivity), the total number of neurons scales linearly with task complexity. The authors acknowledge that future work must address the biological and computational costs of maintaining these extra processing units.
  • Strict Selection Pressure: In the current setup, every newly duplicated module is immediately forced to solve a harder task. The authors suggest that relaxing this constraint by introducing redundancy (allowing modules to explore the weight space before facing strict task pressure, akin to biological "relaxed selection") could amplify the benefits of modular growth.

Summary updated

BibTeX
@misc{hamidi2024modular,
  author = {Mani Hamidi and Sina Khajehabdollahi and Emmanouil Giannakakis and Tim Schäfer and Anna Levina and Charley M. Wu},
  title = {{Modular Growth of Hierarchical Networks: Efficient, General, and Robust Curriculum Learning}},
  year = {2024},
  eprint = {2406.06262},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.06262},
}
Figure