TL;DR
This paper introduces "Locality Masked RNNs" (LM-RNNs), a new architecture that mimics biological neural connectivity by constraining connections based on physical distance. These LM-RNNs learn cognitive tasks significantly faster and more efficiently than traditional fully-connected RNNs, especially on complex multitask learning benchmarks.
What Problem Does This Paper Address?
Biological neural networks, particularly the neocortex, are characterized by extremely sparse connectivity, where connections are largely dictated by physical proximity between neurons. This is in stark contrast to the fully-connected recurrent neural networks (RNNs) commonly used in machine learning, which are computationally expensive and may not accurately reflect biological constraints. The authors aim to bridge this gap by developing RNNs that incorporate biologically-inspired sparsity through spatial constraints, investigating whether this leads to improved learning efficiency and performance on cognitive tasks. They also question the adequacy of existing benchmarks in revealing complex neural dynamics.
Methods
The core innovation is the Locality Masked RNN (LM-RNN). This architecture imposes a fixed, task-agnostic sparsity pattern on the recurrent connections of an RNN. Specifically, neurons are arranged on a 2D grid, and connections are only allowed between neurons within a certain Euclidean distance d. This spatial constraint is implemented by multiplying the weight matrix W with a static adjacency matrix G derived from the spatial graph. This "locality masking" ensures that only connections within the defined radius are trained. The authors also introduce a new, more complex benchmark called Mod-Cog to better challenge these sparse architectures.
Datasets
- 20-Cog-tasks: A benchmark dataset commonly used in cognitive neuroscience for evaluating RNNs on 20 distinct cognitive tasks.
- Mod-Cog: A newly introduced, more challenging benchmark consisting of up to 132 tasks. Mod-Cog expands on the 20-Cog-tasks by incorporating more complex elements like interval estimation and sequence generation, requiring richer neural dynamics.
Key Insights and Ideas
- Biological Sparsity is Beneficial: Mimicking the spatially constrained connectivity of biological brains leads to significant improvements in learning speed and data efficiency for RNNs.
- "Winning Lottery Tickets" in Biology: The spatially constrained sparse graphs in LM-RNNs act like "winning lottery tickets," allowing for efficient learning without the need for complex pruning or dynamic graph construction.
- Limitations of Existing Benchmarks: The 20-Cog-tasks are too simple, solvable even by a network of disconnected "autapses" (neurons connected only to themselves), highlighting the need for more complex benchmarks to reveal true recurrent dynamics.
- Modularity vs. Correlation: The apparent modularity observed in the 20-Cog-tasks when analyzed with nodal task variance metrics might be an artifact of shared inputs and weights, rather than true modular neural structures.
- Optimal Sparsity: For complex tasks, there's an optimal level of sparsity (defined by the locality radius
d) that maximizes learning speed and performance, suggesting that neither extreme (fully connected nor excessively sparse) is ideal.
Key Results
- Faster Learning: LM-RNNs train significantly faster than fully-connected RNNs with comparable numbers of nodes or synapses, especially on the Mod-Cog benchmark.
- Improved Data Efficiency: LM-RNNs require less data to reach high performance levels compared to their fully-connected counterparts.
- Comparable/Better Performance: LM-RNNs achieve performance levels comparable to or better than fully-connected networks, even with drastically fewer parameters.
- Autapses Solve Simple Tasks: A network of disconnected autapses (LM-RNN with
d=0) can solve the 20-Cog-tasks, demonstrating their simplicity. - Mod-Cog Requires Richer Dynamics: The more complex Mod-Cog tasks cannot be solved by autapses alone, necessitating more sophisticated recurrent dynamics, which LM-RNNs with appropriate sparsity can provide.
- Table 1 Summary: LM-RNNs (N=50x50, d=6) achieve higher performance at 10k gradient steps (0.799) than fully-connected RNNs (N=676, 0.69; N=2500, 0.71) and L1-regularized RNNs, with significantly fewer trainable parameters.
Limitations and Future Work
- Task Complexity: The authors acknowledge that the 20-Cog-tasks were too simplistic and did not necessitate communication between neurons.
- Metric Development: The study highlights the need for better metrics to assess functional modularity in RNNs, as current metrics like nodal task variance might be confounded by input correlations.
- Theoretical Understanding: Further theoretical investigation is needed to understand the precise relationship between task complexity, network size, and the optimal degree of sparsity.
- Hardware/Software Optimization: While LM-RNNs are inherently sparse, current deep learning frameworks often use dense matrix operations. Future work could leverage sparse matrix representations for greater computational efficiency on GPUs.
- Extension to Other Architectures: The current study focuses on simple RNNs. Extending these findings to more complex architectures like LSTMs or Transformers is a natural next step.
Summary updated