Abstract
Deep learning networks generally use non-biological learning methods. By contrast, networks based on more biologically plausible learning, such as Hebbian learning, show comparatively poor performance and difficulties of implementation. Here we show that Hebbian learning in hierarchical, convolutional neural networks can be implemented almost trivially with modern deep learning frameworks, by using specific losses whose gradients produce exactly the desired Hebbian updates. We provide expressions whose gradients exactly implement a plain Hebbian rule ($dw \approx xy$), Grossberg's instar rule ($dw \approx y(x-w)$), and Oja's rule ($dw \approx y(x-yw)$). As an application, we build Hebbian convolutional multi-layer networks for object recognition. We observe that higher layers of such networks tend to learn large, simple features (Gabor-like filters and blobs), explaining the previously reported decrease in decoding performance over successive layers. To combat this tendency, we introduce interventions (denser activations with sparse plasticity, pruning of connections between layers) which result in sparser learned features, massively increase performance, and allow information to increase over successive layers. We hypothesize that more advanced techniques (dynamic stimuli, trace learning, feedback connections, etc.), together with the massive computational boost offered by modern deep learning frameworks, could greatly improve the performance and biological relevance of multi-layer Hebbian networks.
Introduction
Most modern AI relies on backpropagation, a method that is mathematically powerful but biologically unrealistic. The brain lacks a global error signal passed backward through every synapse in a perfectly synchronized chain. Biologists point instead to Hebbian learning ("cells that fire together, wire together"), which is local and unsupervised. However, Hebbian learning has historically struggled in deep, hierarchical networks. While the first layer usually learns useful features like edges, deeper layers often collapse into learning redundant, blurry versions of those same features. Consequently, accuracy often decreases as layers are added. Furthermore, implementing these local rules in frameworks designed for global gradients (like PyTorch) is often inefficient.
Methods
This research introduces two primary innovations to bridge the gap between biological plausibility and engineering efficiency:
- Hebbian Updates via Surrogate Losses: Instead of writing custom low-level kernels, the author defines a mathematical loss function $\mathcal{L}$ such that its gradient with respect to the weights ($\partial\mathcal{L}/\partial w$) is exactly equal to a Hebbian rule (e.g., Oja’s rule). This allows researchers to use standard, GPU-accelerated "backward" passes to perform local Hebbian updates.
- Structural Interventions: To prevent deeper layers from becoming redundant, two specific constraints are introduced:
- "Triangle" Activations: A method that subtracts the mean activation and rectifies the result, creating a competitive but less "winner-take-all" response.
- Massive Pruning: Forcing 99% of connections between layers to be zero. This extreme sparsity prevents deeper neurons from simply averaging all features of the previous layer, forcing them to specialize.
Key Insights: Overcoming the "Copycat" Problem
In standard Hebbian setups, deeper layers fail to learn complex shapes; they merely learn larger, blurrier versions of the Gabor filters (edges) found in Layer 1. This "copycat" problem explains why "deeper" was not historically "better" for Hebbian networks.
By contrast, the improved network with triangle activations and 99% pruning forces neurons to integrate information in a way that increases total information content in deeper layers. This sparsity is a feature, not a bug, as it prevents the averaging effect that leads to feature blurring.
Results
The model was evaluated on the CIFAR-10 dataset. The results show a dramatic improvement over "default" Hebbian approaches:
- Standard Hebbian Network: Achieved roughly 34.5% accuracy. Notably, the accuracy of the representation dropped from Layer 1 (~49%) to the final output.
- Improved Network: Achieved 64.55% accuracy. Crucially, accuracy increased as the signal moved through the layers (from ~58% in Layer 1 to ~64% at the output), proving the hierarchy successfully aggregated information.
While 64% is still below the 90%+ achieved by supervised backpropagation, it represents a massive leap for purely unsupervised, biologically-inspired convolutional networks.
Discussion and Future Work
Despite the progress, the learned features in deeper layers remain difficult to interpret and do not yet show the clear "object-part" hierarchy seen in the human visual cortex. Promising paths forward include incorporating temporal dynamics (trace learning), feedback connections for top-down signaling, and using meta-learning to discover even more effective biological learning rules.
Summary updated