Abstract
Modern deep learning models are characterized by an immense number of parameters, often scaling quadratically with the number of neurons. This paper explores a biologically inspired alternative: a "spatially embedded" architecture where training involves optimizing the physical coordinates of neurons in 3D space rather than individual connection weights. By deriving weights from the inverse distance between neurons, this approach reduces parameter complexity from $O(n^2)$ to $O(n)$. Our results on the MNIST benchmark demonstrate that these models achieve competitive accuracy with a fraction of the parameters required by traditional networks and exhibit remarkable robustness to extreme pruning.
Introduction
Deep Neural Networks (DNNs) have achieved state-of-the-art performance across various domains, yet their deployment on edge devices—such as remote sensors and wearables—is frequently hindered by high memory and power requirements. This "parameter-hungry" nature stems from the standard fully connected architecture, where every pair of neurons in adjacent layers requires a unique, learnable weight.
In contrast, biological brains operate under strict spatial and energetic constraints. The "genomic bottleneck" theory suggests that biological organisms do not encode every synapse in their DNA; instead, they encode rules for spatial organization and growth. Inspired by this, we propose a framework where the network's connectivity is a function of its geometry, allowing for highly compact and efficient models.
Methodology
Spatial Embedding and Weight Calculation
The core of our approach is the distance-dependent wiring rule. Each neuron $i$ is assigned a coordinate $p_i = (x, y, z)$ in Euclidean space. The weight $w_{ij}$ between two neurons $i$ and $j$ is not a free parameter but is defined by the inverse of their Euclidean distance:
$$w_{ij} = \frac{1}{\|p_i - p_j\|_2}$$
During training, the network uses backpropagation and gradient descent to move the neurons' positions, effectively "tuning" the weights by changing the spatial relationships between units.
Inhibition and Layering
Because Euclidean distances are strictly positive, the basic distance rule only allows for excitatory connections. To enable inhibitory behavior, we introduce a learnable "inhibition value" for each neuron, which is transformed into a mask (approximately +1 or -1). This allows the network to mimic the excitatory/inhibitory balance found in biological systems.
We initially constrain neurons to 2D planes (fixed $z$-coordinates) to maintain a traditional feedforward flow. In a "Relaxed" variant, the $z$-coordinates also become learnable, allowing layers to overlap and blend, creating a more fluid 3D topology.
Experimental Results
Parameter Efficiency
The primary advantage of this spatial framework is its scaling property. In a standard Multi-Layer Perceptron (MLP), doubling the number of neurons leads to a fourfold increase in weights ($O(n^2)$). In our spatial model, adding a neuron only adds its three coordinates and its inhibition value, maintaining $O(n)$ complexity.
On the MNIST dataset, a 3D MLP using this method achieved 92.17% accuracy with only ~10,600 parameters. For context, a standard MLP with an equivalent number of neurons would require over 1.6 million parameters to reach its peak accuracy (~97%).
Spiking Neural Networks (SNNs)
We also applied this spatial embedding to Spiking Neural Networks (SNNs). Interestingly, SNNs performed exceptionally well within this framework, outperforming traditional SNN baselines when parameter counts were held equal. This suggests that the temporal dynamics of spiking neurons may naturally compensate for the constraints imposed by the spatial weight rule.
Robustness to Pruning
One of the most striking findings was the "Pruning Paradox." In traditional networks, pruning usually targets the smallest weights to maintain performance. In our model, the smallest weights correspond to the longest distances. We found that pruning these long-range connections actually improved performance at high sparsity levels. Because the distance-based formula prevents weights from ever reaching zero, pruning serves as a necessary mechanism to remove the "noise" of weak, distant connections that the geometry forces into existence. At 80% to 95% sparsity, our 3D MLP consistently outperformed traditional networks with similar parameter counts.
Discussion and Visual Interpretability
Beyond efficiency, spatial embedding offers a unique window into the "black box" of neural networks. Because neurons have physical coordinates, we can visualize the network's internal structure. Mapping the activations shows that specific clusters of neurons physically organize themselves to respond to different digits, providing an intuitive geometric representation of the model's logic.
However, this approach involves a trade-off in expressiveness. Because moving one neuron affects every connection attached to it, the weights are highly interdependent. This acts as a powerful regularizer but also prevents the model from reaching the absolute peak accuracy of unconstrained, high-parameter networks.
Conclusion
Optimizing neuron positions represents a significant departure from traditional weight-based training. By leveraging spatial constraints, we can create models that are both biologically plausible and highly efficient for hardware-constrained environments. Future work will focus on scaling this approach to more complex datasets like ImageNet and exploring its application in Graph Neural Networks (GNNs), where spatial relationships are already fundamental to the data structure.
Summary updated