Layer Collaboration in the Forward-Forward Algorithm

Guy Lorberbom, Itai Gat, Yossi Adi, Alexander G. Schwing, Tamir Hazan

Abstract

The Forward-Forward (FF) algorithm, recently proposed by Geoffrey Hinton, offers a biologically plausible alternative to backpropagation by training layers locally. However, vanilla FF often suffers from a "silo" problem where layers fail to collaborate, leading to suboptimal hierarchical representations. This paper introduces Collaborative Forward-Forward (CFF), a modification that integrates global network state into local training objectives. By allowing layers to account for the "goodness" of the entire network, CFF significantly improves performance across standard benchmarks and provides a theoretical foundation through the lens of functional entropy.

Introduction: Beyond Backpropagation

Backpropagation is the cornerstone of modern deep learning, yet it faces challenges regarding biological plausibility and gradient stability in extremely deep networks. Hinton’s Forward-Forward algorithm addresses these by using two forward passes—one with "positive" data and one with "negative" data—to train layers locally. Despite its promise, vanilla FF lacks a mechanism for inter-layer communication. Early layers remain unaware of later layers' requirements, often resulting in a "shallow trap" where the first layer performs the bulk of the computation while subsequent layers add little value or even introduce noise.

Collaborative Forward-Forward (CFF)

The authors propose transforming FF into a collaborative process through two primary innovations:

Global Goodness Integration

In standard FF, a layer's objective is to maximize its own "goodness" (the sum of squared ReLU activities). CFF introduces a term, $\gamma$, representing the sum of goodness values from other layers in the network. By incorporating this global signal into the local probability calculation for updates, each layer becomes aware of the global network state. This induces the development of hierarchical features that are mutually beneficial across the architecture.

Diagram of the Collaborative Forward-Forward (CFF) algorithm, illustrating how layers integrate global goodness information to foster collaboration.

Alternating Updates

Rather than the sequential training typical of vanilla FF, CFF utilizes alternating updates across all layers simultaneously. This allows the network to evolve as a cohesive unit, ensuring that representations at different depths are synchronized and collaborative.

Theoretical Framework: Functional Entropy

The authors provide a theoretical bridge by demonstrating that the FF algorithm implicitly maximizes functional entropy. They show that their collaborative approach maximizes this entropy more effectively than vanilla FF, facilitating better information flow and contrast between positive (real) and negative (corrupted) data samples.

Experimental Results

The CFF approach was evaluated on three standard computer vision benchmarks: MNIST, Fashion-MNIST, and CIFAR-10. The latter is particularly challenging for non-convolutional, FF-based models.

Error curves for MNIST, Fashion-MNIST, and CIFAR-10, comparing vanilla FF with the Collaborative FF (CFF) approach.

CFF consistently outperformed vanilla FF across all datasets:

  • MNIST: Error dropped from 3.3% to 2.1%.
  • Fashion-MNIST: Error dropped from 13.2% to 11.6%.
  • CIFAR-10: Error dropped from 54.2% to 51.6%.

While CFF narrows the gap with classical backpropagation (which achieves ~1.5% error on MNIST in this setup), it maintains the advantages of local learning and biological plausibility.

Discussion and Future Work

The most significant insight of this work is that layer collaboration can be achieved without global gradients. By making local loss functions "aware" of activity in other layers, CFF induces hierarchical feature learning and avoids the "shallow trap" of independent layer training.

However, limitations remain. Backpropagation still yields higher accuracy, and this study focused primarily on fully connected (MLP) architectures. Future research will investigate how these collaborative principles translate to more complex structures like Convolutional Neural Networks (CNNs) or Transformers, and whether CFF can scale to larger datasets like ImageNet.

Summary updated

BibTeX
@inproceedings{lorberbom2024layer,
  author = {Guy Lorberbom and Itai Gat and Yossi Adi and Alexander G. Schwing and Tamir Hazan},
  title = {{Layer Collaboration in the Forward-Forward Algorithm}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i13.29324},
}
Figure