Abstract
Artificial neural networks (ANNs) typically lack the structural organization observed in biological brains, where neurons are arranged in specialized functional regions. This paper proposes Spatial Neural Networks, an architecture where neurons are assigned learnable 2D coordinates and long-distance connectivity is penalized via a transport cost. Experiments on multi-task classification using MNIST and Fashion-MNIST demonstrate that these networks naturally organize into task-specific clusters. This emergent modularity allows for "splitting" the network into independent sub-networks with negligible performance degradation, offering a path toward more interpretable and modular AI systems.
Introduction
In biological systems, neural organization is not arbitrary; neurons are clustered into regions responsible for specific tasks. Conversely, standard ANNs are often dense "black boxes" where any neuron can connect to any other regardless of physical distance. This lack of structure complicates interpretability and hinders continual learning, as new tasks often overwrite weights essential for previous ones. By introducing a spatial dimension and penalizing "wiring costs," the authors aim to encourage functional specialization similar to biological brains.
Methods
Spatial Neural Networks assign each neuron $n$ a position $p(n)$ in a 2D plane. These positions are learnable parameters optimized alongside network weights. The loss function is augmented with two primary components:
- Transport Cost: Penalizes strong weights between distant neurons, calculated as the product of weight magnitude and Euclidean distance.
- Density Cost: A repulsion force that prevents neurons from collapsing into a single point, ensuring a distributed representation.
The authors found that Sigmoid activation functions were critical to prevent the network from bypassing spatial constraints through weight rescaling, a common issue with ReLU activations.
Experimental Setup
The model was evaluated on a dual-classification task involving MNIST (digits) and Fashion-MNIST (clothing). Three input configurations were tested:
- Concatenation: Images from both sets are combined into one large input.
- Mixing: Images are combined via element-wise addition.
- Sequential: Images from either set are sampled one at a time.
Results and Discussion
The spatial constraints led to the emergence of distinct clusters for different tasks without explicit supervision.
As shown in the 3D visualizations, neurons in the output layer for different tasks migrate to opposite sides of the spatial field. This separation propagates back through previous layers to minimize connection lengths, creating distinct functional pathways.
The quantitative advantage of this modularity is most evident when splitting the network. While regular networks suffer significant "tangling," spatial networks maintain high performance.
As detailed in the performance table, spatial networks achieved a 0.00% accuracy drop in Concatenated and Mixed scenarios after splitting. In contrast, regular networks saw drops as high as 60% in sequential tasks, where their neurons became inextricably linked across tasks.
Conclusion and Future Work
Spatial Neural Networks provide a biologically-grounded method for inducing modularity in AI. While successful on 2D image benchmarks, future work is needed to scale these principles to deeper architectures, 3D spatial manifolds, and more complex domains like natural language processing. Furthermore, exploring the role of spatial organization in true sequential continual learning remains a promising frontier.
Summary updated