TL;DR
While biologically plausible local learning rules like Nonnegative Similarity Matching (NSM) offer an intriguing alternative to backpropagation, they have historically struggled with GPU scalability, deep stacking, and supervisory feedback. This paper introduces an efficient GPU-accelerated PyTorch/EinOps implementation of Convolutional NSM, proposes a localized supervised objective ($S^2M$) that trains greedily layer by layer, and demonstrates that NSM can effectively pre-train convolutional neural network (CNN) filters that remain remarkably stable during backpropagation fine-tuning.
What Problem Does This Paper Address?
Backpropagation (BP) powers modern deep learning, but it requires storing global activations, locking layers during backward passes, and exchanging gradients across the entire network—features that are biologically implausible, energy-intensive, and ill-suited for online streaming data.
Nonnegative Similarity Matching (NSM) offers a biologically plausible, Hebbian-like alternative derived from normative principles: representations are learned by preserving pairwise similarities between inputs. However, NSM has hit practical roadblocks:
- Scalability: NSM involves lateral inhibition (recurrent inhibitory dynamics), which is notoriously difficult to map efficiently onto GPUs and integrate with convolutional feature extraction.
- Deep Stacking: Purely unsupervised NSM suffers from diminishing returns when stacked; as representations grow deeper, they align less with downstream classification labels.
- Pre-training utility: It remained unclear whether biologically inspired representations could warm-start and align with standard gradient-descent-trained models.
Methods
The authors tackle these bottlenecks through three interconnected contributions:
- GPU-Accelerated Convolutional NSM (
pynsm): The recurrent neural dynamics of NSM require solving an iterative min-max optimization problem involving feedforward weights ($W$) and lateral inhibitory connections ($M$). By leveraging theEinOpslibrary alongside PyTorch, the authors express lateral inhibition and patch-based convolutions as concise tensor contractions, running dynamics entirely on GPUs without manual axis permutations. -
Supervised Similarity Matching ($S^2M$): To enable greedy, layer-wise supervised training, the authors introduce a target metric reminiscent of Canonical Correlation Analysis (CCA): $$\min_{Z_k \ge 0} \left\| \left( Z_{k-1}^\top Z_{k-1} + \alpha_k Y^\top Y \right) - Z_k^\top Z_k \right\|_F^2$$ Here, $Y$ represents one-hot labels and $\alpha_k$ governs the label influence. This yields local Hebbian update rules for both feedforward weights, lateral inhibition, and label-feedback weights ($V_k$).
-
Biologically Plausible Pre-training: A single-layer NSM is trained on image patches. Its learned feedforward weights ($W$) are used to initialize the first convolutional layer of standard CNNs (e.g., LeNet), while the remaining layers are initialized randomly before fine-tuning with backpropagation.
Datasets
The authors evaluate their methods on standard computer vision benchmarks:
- CIFAR-10: Used for measuring throughput/speedup across CPU and GPU pipelines, evaluating SVM classification across neuron budgets, and comparing single-layer supervised performance against other local-learning baselines.
- MNIST: Used to evaluate filter orientation stability when pre-training LeNet filters with NSM followed by BP fine-tuning.
No new benchmarks were introduced.
Key Insights and Ideas
- Tensor contractions tame lateral inhibition: Lateral recurrence has long been an engineering bottleneck for bio-plausible models on GPUs. Formulating neural dynamics as tensor network operations unlocks standard deep-learning hardware acceleration.
- Supervision rescues deep feature alignment: By directly blending label similarity ($Y^\top Y$) with representation similarity ($Z_{k-1}^\top Z_{k-1}$), $S^2M$ enforces task relevance locally without requiring end-to-end backpropagated gradients.
- Natural alignment with gradient descent: When CNN filters are pre-trained with NSM, several filters rotate minimally (cosine similarity near 1.0) during subsequent BP fine-tuning. This reveals that local similarity matching finds representations close to the basins of attraction discovered by gradient descent.
Key Results
- Over $170\times$ Speedup: On 10,000 CIFAR-10 images, the PyTorch GPU implementation runs in 13.54 seconds, compared to 93.85 seconds on a high-end CPU and 2,399 seconds for the conventional CPU patch-streaming implementation, with zero loss in classification accuracy.
- Competitive Local Classification: In single hidden-layer CIFAR-10 benchmarks, $S^2M$ achieves 49.11% test accuracy (using logistic regression), substantially outperforming Equilibrium Propagation (42.40%) and standard Contrastive Similarity Matching (40.79%), while remaining close to structured contrastive SM (50.50%).
- Filter Stability: In LeNet pre-training experiments on MNIST, three out of six pre-trained filters showed virtually no rotation during fine-tuning, and tuning $\alpha_1$ revealed a sweet spot that maximized filter stability across 100 trials.
Limitations and Future Work
- Model Scale: Evaluations were limited to single-layer feature extractors and shallow architectures (LeNet) on low-resolution datasets (MNIST and CIFAR-10). Scaling $S^2M$ across many stacked layers on ImageNet-scale tasks remains unverified.
- End-to-End Replacement: The paper uses NSM primarily for feature extraction or pre-training the initial layer; replacing full deep networks entirely with multi-layer greedy $S^2M$ during end-to-end inference was left for future exploration.
Summary updated