Transfer Learning with Sparse Associative Memories

Quentin Jodelet, Vincent Gripon, Masafumi Hagiwara

Abstract

Deep learning models often struggle with deployment on edge devices due to the high computational cost of fine-tuning and the issue of catastrophic forgetting. This paper proposes a hybrid classification architecture that replaces traditional dense layers with a combination of Multiple Self-Organizing Maps (SOMs) and a Sparse Associative Memory (SAM). This approach enables ultra-fast, incremental transfer learning without backpropagation. Experimental results demonstrate training speedups of up to 2,600x compared to standard deep neural networks, with competitive accuracy across several domain-specific datasets.

Introduction

The deployment of pre-trained deep learning models on edge devices is hindered by two primary challenges: computational overhead and catastrophic forgetting. Standard classification layers rely on millions of parameters and gradient-based optimization, which are often too resource-intensive for microcontrollers. Furthermore, when these models are trained on new tasks, they tend to overwrite previously learned weights, necessitating a full retrain on the entire dataset to maintain performance.

To address these issues, the authors present a method for transfer learning that utilizes sparse, biologically-inspired structures. By leveraging the feature extraction capabilities of pre-trained networks and replacing the final layers with a SOM-SAM architecture, they enable efficient, real-time learning on the edge.

Methodology

The proposed architecture replaces the final softmax layer of a pre-trained network (e.g., VGG-16) with a two-stage sparse processing pipeline consisting of SOMs and a SAM.

Multiple Self-Organizing Maps (SOMs)

The input feature vector is partitioned into $k$ sub-vectors, each of which is processed by an independent SOM. Each SOM acts as a quantizer, mapping high-dimensional floating-point data to a sparse binary vector. In this representation, only the Best-Matching Unit (BMU)—the neuron most similar to the input sub-vector—is active. This process effectively performs Product Quantization on the feature space.

Architecture of a Self-Organizing Map (SOM) used for feature quantization, showing the mapping from input neuron $j$ to output neuron $i$ with weight $w_i(j)$.

Sparse Associative Memory (SAM)

The outputs from the $k$ SOMs are concatenated into a single sparse binary vector. This vector is then mapped to class labels via a sparse weight matrix $\Omega$. Unlike traditional weights updated via gradient descent, $\Omega$ is updated using simple additive rules:

  • Binary Method: Connections between active neurons and the correct class are set to '1' using a logical OR operation.
  • Integer Method: Connections act as counters, incrementing with each occurrence of a neuron-label pair.

This local, additive learning rule ensures that adding new classes does not interfere with existing knowledge, inherently solving the problem of catastrophic forgetting.

Experimental Results

The model was evaluated using features extracted from a VGG-16 model pre-trained on ImageNet. Testing was conducted across five datasets: Flower102, Indoor67, CUB200 (Birds), Dog120 (Stanford Dogs), and Stanford40 (Actions).

Training Efficiency

In batch training scenarios, the proposed model was 10x to 100x faster than standard benchmarks. The most significant gains were observed in incremental learning; when adding a single new class to a model that had already learned 119 others, the SOM-SAM approach was approximately 2,600x faster than a full DNN retrain.

Accuracy and Granularity

While there is a slight accuracy trade-off in some cases (e.g., 71.9% vs 74.6% on Dog120), the model outperformed standard DNNs on more specialized datasets like CUB200 (41.5% vs 37.3%). Analysis revealed that using a larger number of smaller SOMs (high granularity) is crucial for preserving the discriminative power of the original features.

Discussion and Limitations

Despite its speed, the model relies entirely on the quality of the pre-trained feature extractor. If the features are not representative of the new domain, the SOM-SAM layer cannot "fine-tune" lower layers to compensate. Additionally, while the matrix $\Omega$ is sparse, its dimensions can become large, requiring further optimization for extremely memory-constrained hardware.

Conclusion

The SOM-SAM architecture provides a robust framework for "Green AI," offering a path toward efficient, incremental learning on resource-constrained hardware. By moving away from backpropagation toward associative structures, this method achieves massive speedups and eliminates catastrophic forgetting, making sophisticated transfer learning viable for edge computing.

Summary updated

BibTeX
@inproceedings{jodelet2019transfer,
  author = {Quentin Jodelet and Vincent Gripon and Masafumi Hagiwara},
  title = {{Transfer Learning with Sparse Associative Memories}},
  booktitle = {ICANN},
  year = {2019},
  doi = {10.1007/978-3-030-30487-4\_39},
}
Figure