LeetArxiv

LeetArxiv

Forward Forward Algorithm in Python

Training Neural Networks Without Backprop via Hinton's Forward Forward Algorithm

Murage Kibicho's avatar
Murage Kibicho
Jun 17, 2026
∙ Paid
Quick Summary
We code the paper that introduced the Forward-Forward deep learning algorithm in Python.

Stop reading papers. Start coding them. Subscribe for weekly paper implementations. By a real human. Not AI summaries.

Here are some free gpu credits.
Here’s 10 dollars off your next international transfer.
Forward Forward Algorithm Summary

1.0 Paper Introduction

Forward-Forward (Hinton, 2022)1 is a biologically-plausible backpropagation alternative that achieves ~96% (Löwe, 2023)2 accuracy on MNIST without flowing gradients.

Abstract for The Forward-Forward Algorithm: Some Preliminary Investigations (Hinton, 2022)

It vastly outperforms Target Propagation (Bengio, 2014)3, another biologically plausible backprop alternative, that reaches ~39% accuracy on MNIST.

This is the third part in our Alternatives To Backpropagation series:

Target Propagation: A Biologically Plausible Neural Network Training Algorithm

Target Propagation: A Biologically Plausible Neural Network Training Algorithm

Murage Kibicho
·
July 13, 2025
Read full story
Belief Propagation is an Obscure Alternative to Backpropagation for Training Reasoning Models

Belief Propagation is an Obscure Alternative to Backpropagation for Training Reasoning Models

Murage Kibicho
·
Jan 8
Watch now

1.1 Hinton’s Algorithm

Forward-Forward algorithm summary. Taken from (Hinton, 2022)

Hinton’s idea is super simple: we run two forward passes. The first pass permits the network learn correct data points. The second pass is inundated with incorrect data to permit the network conceptualize false data*.

*It’s somewhat analogous to training a GAN that discriminates between good and bad inputs.

Each layer is trained in isolation (using gradient descent), so gradients don’t flow backwards through the network.

Goodness is the sum of square outputs of ReLU

(Hinton, 2022) proposes goodness as a metric for measuring an individual layer’s ability to contrast correct and false data.

Keep reading with a 7-day free trial

Subscribe to LeetArxiv to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 Murage Kibicho · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture