Manuscript Offprint

arXiv:2609.06042

Minimizing the Effect of Sleep Deprivation in the Forward-Forward Algorithm

Joy Datta, Puja Saha, Rawhatur Rabbi, Nafiz Imtiaz Rafin, Swakkhar Shatabda, Md. Golam Rabiul Alam, Chad Mourning

Joy Datta¹, Puja Saha², Rawhatur Rabbi¹, Nafiz Imtiaz Rafin¹, Swakkhar Shatabda¹, Md. Golam Rabiul Alam¹, and Chad Mourning³

¹ Brac University, Dhaka 1212, Bangladesh joy.datta@g.bracu.ac.bd, rawhatur.rabbi@gmail.com, imtiazrafin1@gmail.com ² Rajshahi University of Engineering and Technology, Rajshahi 6204, Bangladesh ³ Ohio University, Athens, OH 45701, United States mourning@ohio.edu

Abstract. This paper addresses the challenge posed by sleep deprivation in the Forward-Forward algorithm, where separating the two passes in this algorithm and imbalancing the data processing in the passes is considered an imitation of the cognitive processes observed in humans suffering from sleep deprivation. Previous research has demonstrated that sleep deprivation in the Forward-Forward algorithm has a catastrophic effect on learning efficacy. To mitigate this issue, we explore several approaches; these include alternative activation, optimized loss function, and threshold tuning. To simulate periodic rest, we reduce the number of positive passes in alternating epochs, creating short break phases. We additionally investigate the potential of caffeine-induced stimulation to enhance performance during sleep-deprived conditions. Experimental evaluations conducted on the MNIST and Fashion-MNIST datasets demonstrate that these modifications improve accuracy under the context of sleep deprivation. For example, a 2%-62% accuracy gain is observed in a severe sleep deprivation setting (16 positive or awake periods and 1 negative or sleep period). The approaches also enhance the resilience of the algorithm and its alignment with the adaptive mechanisms of human cognition.

Keywords: Forward-Forward Algorithm · Sleep Deprivation · Back-propagation · Biologically Plausible Learning · REM Sleep

1 Introduction

Training deep neural networks typically requires minimizing a loss function by approximating gradients and updating parameters layer by layer using back-propagation [17]. While backpropagation has proven to be highly effective, it is

This version of the contribution has been accepted for publication, after peer review, but is not the Version of Record and does not reflect post-acceptance improvements or any corrections. The Version of Record is available online at https://doi.org/10.1007/978-3-032-31933-3_40.

J. Datta et al.

considered biologically implausible due to its reliance on backward passes and non-local computations [10]. Furthermore, the algorithm's high memory and computational overhead requirements pose practical limitations.

To address these concerns, the Forward-Forward (FF) algorithm has emerged as a biologically inspired alternative that removes the backward pass entirely. Instead, FF uses two forward passes, one over positive (real) data and another over negative (synthetic or corrupted) data, to adjust weights based on a local goodness metric [6]. FF trains a model by keeping the sum of squared neural activities in layers above a threshold for positive data and well below that threshold for negative data. This approach aligns more closely with how learning is believed to occur in the brain, making it both computationally efficient and biologically plausible. FF also aligns with contrastive learning, a self-supervised learning framework where learning depends on distinguishing between similar and dissimilar data pairs. Although FF does not use an explicit contrastive loss, the dynamics of its dual-pass method share conceptual foundations with contrastive learning.

Interestingly, the structure of FF resonates with the mechanisms of human cognition, particularly the balance between waking experience (the phase of new information processing) and REM sleep (pruning irrelevant patterns). In the FF framework, the positive pass simulates learning from new experiences, while the negative pass plays the role of forgetting or pruning redundant patterns, similar to how REM sleep consolidates memory by suppressing irrelevant associations [2,19]. When this balance is disrupted in humans, such as through sleep deprivation, cognitive decline is often observed [5].

This study explores solutions for sleep deprivation (SD) in FF, characterized by prolonged exposure to positive data without sufficient negative passes, which impairs the learning capacity of FF-based models. Geoffrey Hinton originally proposed the idea of separating the two passes to mimic natural sleep-wake cycles [6]. Building on this, a recent work formally studied the impact of such an imbalance, confirming that learning deteriorates when negative passes are underused [8]. For example, accuracy drops from 74% to only 10% on MNIST when the negative pass is reduced from 16 to 1 while keeping the number of positive passes unchanged, just as humans underperform cognitively when sleep deprived [1,7].

However, that work primarily observed the effect without offering solutions. In contrast, our paper aims to both analyze and mitigate the impact of sleep deprivation in FF. We approach this problem from three different perspectives:

Optimal Training Configurations: We investigate the most effective activation function that outperforms previously used ReLU by a large margin and threshold configurations across layers under sleep deprivation. Furthermore, we propose some modifications to the loss functions to enhance accuracy and overall performance.

Structured Rest Periods: Inspired by circadian rhythms, we introduce short breaks between epochs to simulate intermittent sleep phases and balance the model's exposure to positive and negative data. This helps to achieve an approximate gain in accuracy in various training settings.

Caffeine-Induced Loss: The Caffeine-Induced Loss (CIL) integrates concepts from caffeine threshold modulation in neuronal firing with homeostasis and lateral inhibition mechanisms. This loss function enhances the learning stability during sleep-deprived training by dynamically adjusting loss contributions. This approach demonstrates a substantial accuracy gain, even under severe sleep deprivation (i.e., 16 positive or awake periods and 1 sleep or negative period).

To establish both the biological and practical relevance of our findings, we conduct extensive experiments on MNIST and Fashion-MNIST, demonstrating that our proposed methods significantly improve the model accuracy in various sleep deprivation scenarios [7,22]. These results highlight the potential of incorporating biologically inspired learning schedules and neural dynamics into AI systems, particularly in domains like continual or online learning where generating negative data on demand may be challenging.

References (21)