Unlocking the Potential of Similarity Matching: Scalability, Supervision and Pre-training

Yanis Bahroun, Shagesh Sridharan, Atithi Acharya, Dmitri B. Chklovskii, Anirvan M. Sengupta

Abstract

While effective, the backpropagation (BP) algorithm exhibits limitations in terms of biological plausibility, computational cost, and suitability for online learning. As a result, there has been a growing interest in developing alternative biologically plausible learning approaches that rely on local learning rules. This study focuses on the primarily unsupervised similarity matching (SM) framework, which aligns with observed mechanisms in biological systems and offers online, localized, and biologically plausible algorithms. i) To scale SM to large datasets, we propose an implementation of Convolutional Nonnegative SM using PyTorch. ii) We introduce a localized supervised SM objective reminiscent of canonical correlation analysis, facilitating stacking SM layers. iii) We leverage the PyTorch implementation for pre-training architectures such as LeNet and compare the evaluation of features against BP-trained models. This work combines biologically plausible algorithms with computational efficiency opening multiple avenues for further explorations.

Introduction

Backpropagation (BP) is the engine of modern artificial intelligence, yet it faces significant "biological PR problems." It requires global information exchange across a network, is computationally expensive, and does not naturally support the online, local learning observed in biological brains. This paper bridges the gap between biologically plausible learning and modern deep learning performance by scaling "Similarity Matching" (SM) to GPUs.

Similarity Matching is a promising alternative that ensures similar inputs yield similar neural representations. Historically, SM has struggled with two major hurdles: scalability on modern hardware and the difficulty of incorporating supervision for effective layer stacking. This work introduces a new supervised objective ($S^2M$) and demonstrates that SM-based pre-training creates stable, high-quality features that can compete with or enhance standard backpropagation-trained models.

Methods

The authors tackle the limitations of SM with a three-pronged approach:

  1. Convolutional NSM in PyTorch: Nonnegative Similarity Matching (NSM) was re-implemented using the EinOps library and PyTorch. This allows the algorithm to leverage tensor operations and GPU acceleration, moving away from slow, patch-by-patch CPU processing.
  2. Supervised Similarity Matching ($S^2M$): A new mathematical objective was derived to align neural activity with both input data and ground-truth labels. This "localized supervision" allows each layer to learn features useful for classification without needing a global error signal from the top of the network.
  3. SM-based Pre-training: SM was used to initialize the weights of a standard architecture (LeNet). The first layer is trained using SM's local rules, and then the whole network is fine-tuned using standard backpropagation.

Key Results

Massive Speedups

A core contribution of this work is proving that biologically inspired algorithms can be efficient on silicon. By leveraging GPU acceleration, the authors achieved a 177x speedup over conventional implementations.

Table 1: Computational speedup of the proposed PyTorch implementation compared to conventional CPU methods.

As shown in Table 1, processing 10,000 images took 2399 seconds on a conventional CPU implementation but only 13.54 seconds using the GPU-accelerated PyTorch version.

Competitive Accuracy

On the CIFAR-10 dataset, the new $S^2M$ objective was evaluated against other biologically plausible algorithms like Equilibrium Propagation (EP) and Contrastive Similarity Matching (CSM).

Figure 3: Accuracy of the S^2M objective on CIFAR-10 compared to other biologically plausible methods.

A single-layer network using the $S^2M$ objective achieved 49.11% accuracy, outperforming EP (42.40%) and standard CSM (40.79%), and coming close to the "CSM-Structured" benchmark of 50.50%.

Stability through Pre-training

The study revealed that filters learned via unsupervised SM are remarkably stable. When starting with SM weights and then running backpropagation, the filters barely rotate. This suggests that SM identifies "natural" features that backpropagation eventually converges toward anyway.

Discussion and Future Work

This paper demonstrates that global gradients are not strictly necessary to learn useful features. By optimizing a local similarity objective, neurons can organize themselves into useful filters independently.

While significant strides were made, limitations remain. Most evaluations were performed on relatively shallow networks; scaling these local rules to massive architectures like Transformers or ResNets remains a challenge. Furthermore, "greedy" layer-wise learning often hits a performance ceiling compared to end-to-end global optimization. Future research will focus on refining the SM framework for continual learning settings, where local learning rules typically shine.

Summary updated

BibTeX
@inproceedings{bahroun2023unlocking,
  author = {Yanis Bahroun and Shagesh Sridharan and Atithi Acharya and Dmitri B. Chklovskii and Anirvan M. Sengupta},
  title = {{Unlocking the Potential of Similarity Matching: Scalability, Supervision and Pre-training}},
  booktitle = {LLW @ ICML},
  year = {2023},
  url = {https://openreview.net/forum?id=PkQRsD5N1t},
}
Figure