Biologically inspired sleep algorithm for artificial neural networks

Giri P. Krishnan, Timothy Tadros, Ramyaa Ramyaa, Maxim BazhenovarXiv 2019

Abstract

Artificial Neural Networks (ANNs) are powerful but brittle, suffering from catastrophic forgetting, poor generalization to noise, and limited transfer learning. In contrast, biological brains utilize sleep for memory consolidation. This paper presents a biologically inspired "sleep algorithm" that converts standard ANNs into Spiking Neural Networks (SNNs) to undergo an unsupervised "offline" consolidation phase. By employing Spike-Timing Dependent Plasticity (STDP) during simulated sleep, the network reinforces latent connectivity patterns. Our results demonstrate that this process mitigates catastrophic forgetting, improves robustness to noisy data, and enables forward transfer to unseen tasks across MNIST and CUB200 datasets.

Introduction

Despite their success, ANNs face fundamental challenges that distinguish them from biological intelligence. First, catastrophic forgetting occurs when training on a new task overwrites the weights established for previous tasks, causing the network to "forget" them entirely. Second, ANNs often exhibit poor generalization, failing on real-world data containing noise or distortions like blur. Finally, they lack forward transfer, the ability to apply existing knowledge to novel, similar situations without explicit retraining.

Biological systems address these issues through sleep-dependent memory consolidation. This study investigates whether a simulated sleep phase can resolve these ANN weaknesses by stabilizing memory traces and decorrelating internal representations.

Methods

The proposed pipeline bridges deep learning and computational neuroscience through four distinct stages:

  1. Awake Training: A feedforward ANN is trained via standard backpropagation on a specific task.
  2. Conversion to SNN: The ANN is converted into a Spiking Neural Network (SNN) using leaky integrate-and-fire (LIF) neurons, enabling the application of biologically realistic learning rules.
  3. The Sleep Phase: The SNN undergoes unsupervised learning using Spike-Timing Dependent Plasticity (STDP). During this phase, the network is stimulated with Poisson-distributed noise, simulating the high-activity "Up" states of deep sleep. This process reinforces connectivity patterns established during supervised training without requiring explicit replay of training data.
  4. Re-conversion: The updated weights are transferred back to the ANN for evaluation or further training.

Results

Weight Spread and Feature Reinforcement

A key mechanism identified during the sleep phase is the increase in "weight spread." STDP strengthens connections from active "on-pixels" (features) while weakening those from "off-pixels" (noise). This effectively sharpens the network's decision boundaries and makes it more robust to input variations.

Weight spread increases significantly after the sleep phase, strengthening feature-relevant connections.

Latent Memory Recovery

The algorithm demonstrates a remarkable ability to "resurrect" forgotten tasks. Even when supervised training on a new task appears to have erased previous knowledge—reducing accuracy to near 0%—the information often remains latent in the synaptic weights. The unsupervised sleep phase reactivates these weakened connections, recovering performance.

Confusion matrices for MNIST before and after sleep. The "Before sleep" state shows catastrophic forgetting of classes 0-7 after training on classes 8 and 9; these are successfully recovered after the sleep phase.

In MNIST experiments, performance on older tasks was recovered to nearly 100%, compared to near-zero in baseline "no-sleep" networks. Similar results were observed in the CUB200 bird classification dataset, where sleep reduced forgetting of high-level ResNet embeddings.

Noise Robustness and Forward Transfer

Sleep significantly improved generalization to distorted data. On MNIST images degraded by Gaussian noise or blur, accuracy increased from approximately 20% to 50% post-sleep. Furthermore, the network exhibited "forward transfer." In a custom "Patches" dataset, a network trained only on Task 1 achieved ~50% accuracy on Task 2 after sleep, despite never receiving Task 2 labels, suggesting that sleep strengthens shared features across the data distribution.

Discussion

The biologically inspired sleep algorithm offers a computationally efficient, unsupervised method for memory consolidation. While currently outperformed by state-of-the-art generative replay in some metrics, it is significantly more biologically plausible and avoids the need for complex generative models. Future work will explore combining this method with generative replay and scaling the architecture to convolutional and recurrent neural networks.

Summary updated

BibTeX
@misc{krishnan2019biologically,
  author = {Giri P. Krishnan and Timothy Tadros and Ramyaa Ramyaa and Maxim Bazhenov},
  title = {{Biologically inspired sleep algorithm for artificial neural networks}},
  year = {2019},
  eprint = {1908.02240},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.02240},
}
Figure