The Forward-Forward Algorithm: Some Preliminary Investigations

Geoffrey E. HintonarXiv 2022 · DOI

Abstract

The Forward-Forward (FF) algorithm is a novel learning procedure that replaces the traditional forward and backward passes of backpropagation with two forward passes. By training layers greedily to distinguish between "positive" real data and "negative" generated data, FF offers a biologically plausible alternative that does not require a perfect mathematical model of the hardware. This paper presents preliminary investigations into FF's performance on standard benchmarks like MNIST and CIFAR-10, demonstrating its viability for future energy-efficient "mortal computation" systems.

Introduction

Backpropagation (BP) has been the cornerstone of deep learning for decades. However, it suffers from two significant limitations: biological implausibility and the requirement for a "black box" mathematical model. BP assumes the brain can store neural activities for a perfectly synchronized backward pass, for which there is no biological evidence. Furthermore, BP requires precise knowledge of the forward pass gradients, making it incompatible with physical systems where internal properties are unknown or non-differentiable, such as noisy analog chips.

The Forward-Forward algorithm addresses these issues by enabling learning through local objectives at each layer, removing the need for global error propagation.

Methods

The FF algorithm is a greedy, layer-by-layer learning procedure. Instead of a global loss function, every layer optimizes its own local "goodness" metric, typically defined as the sum of squared neural activities.

The Positive and Negative Passes

Learning involves two distinct phases:

  1. The Positive Pass: The network processes real data. Each layer adjusts its weights to increase the goodness of its activations.
  2. The Negative Pass: The network processes "negative" or corrupted data. The layer adjusts its weights to decrease the goodness of its activations.

To prevent layers from simply passing the activity magnitude forward, activities are normalized before being sent to the next layer. This forces subsequent layers to extract higher-order features from the orientation of the activity vector rather than its length.

Data Generation

In supervised settings, labels are embedded directly into the input. In unsupervised settings, negative data is generated by masking and hybridizing real images to create "nonsense" data that lacks long-range structure.

Generation of negative data for unsupervised learning by hybridizing real images using a mask.

Key Insights and Results

A central motivation for FF is "Mortal Computation"—the idea that software can be inseparable from specific, energy-efficient hardware. Because FF learns from local correlations rather than global derivatives, it is ideal for analog hardware that is significantly more power-efficient than digital GPUs.

Feature Learning

Despite its greedy nature, FF successfully builds a hierarchy of useful representations. Visualizing the learned weights reveals that the network develops structured feature detectors similar to those found in backpropagation-trained models.

Visualization of the receptive fields learned by the FF algorithm, showing the emergence of structured features.

Performance Benchmarks

  • MNIST: FF achieved a 1.4% test error on a permutation-invariant task, comparable to BP. With data augmentation, this improved to 0.64%.
  • CIFAR-10: FF reached approximately 41% error on a non-convolutional architecture, slightly trailing BP's 37%, but proving its viability on more complex data.
  • Robustness: The algorithm successfully learned even when "black box" non-linearities were introduced, a scenario where BP typically fails.

Discussion and Future Work

While promising, the FF algorithm is in its early stages. Current limitations include scaling to massive architectures like Large Language Models and the computational overhead of generating high-quality negative data. Future research will focus on more sophisticated "goodness" functions, applications to sequential data, and further exploration of the "wake/sleep" cycles inherent in the positive and negative passes.

Summary updated

BibTeX
@misc{hinton2022forward,
  author = {Geoffrey E. Hinton},
  title = {{The Forward-Forward Algorithm: Some Preliminary Investigations}},
  year = {2022},
  eprint = {2212.13345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.13345},
}
Figure