Papers › The Forward-Forward Algorithm: Some Preliminary Investigations

The Forward-Forward Algorithm: Some Preliminary Investigations

27 Dec 2022NA 2022 12arXiv:2212.13345archive 2025-07-28

Geoffrey Hinton

The aim of this paper is to introduce a new learning procedure for neural networks and to demonstrate that it works well enough on a few small problems to be worth further investigation. The Forward-Forward algorithm replaces the forward and backward passes of backpropagation by two forward passes, one with positive (i.e. real) data and the other with negative data which could be generated by the network itself. Each layer has its own objective function which is simply to have high goodness for positive data and low goodness for negative data. The sum of the squared activities in a layer can be used as the goodness but there are many other possibilities, including minus the sum of the squared activities. If the positive and negative passes could be separated in time, the negative passes could be done offline, which would make the learning much simpler in the positive pass and allow video to be pipelined through the network without ever storing activities or stopping to propagate derivatives.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 20 code samples: 19 from 7 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 20: 18 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 2 violated, 9 with no contract checked; 7 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 4 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 19 samples from 7 repositories, 17 ran (10 with no instrument failure; 7 where Syntology's instrument failed); 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 3 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

19 repositories listed; official and paper-mentioned ones first.

ads-cmu/forwardforward mentioned on GitHubpytorchMITSyntology: 5 samples, 4 ran (0 instrument-failed) · 1 unverified report
ahmed-alllam/Forward-Forward-Algorithm mentioned on GitHubpytorchSyntology: not harvested report
dah33/explore_forward_forward mentioned on GitHubpytorchSyntology: 3 samples, 3 ran (3 instrument-failed) · 0 unverified report
dslisleedh/FF-jax mentioned on GitHubjaxSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
keitaroskmt/e2e-info mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to End-to-End Training Induces Information Bottleneck through Layer-Role Differentiation:... (arXiv:2402.09050; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
kfkarlsson/ffperceptron mentioned on GitHubpytorchMITSyntology: not harvested report
loewex/forward-forward mentioned on GitHubpytorchMITSyntology: not harvested report
tdooms/trifecta mentioned on GitHubpytorchSyntology: not harvested report
2023-MindSpore-4/Code12 mindsporeSyntology: not harvested report
EscVM/EscVM_YT pytorchSyntology: not harvested report
IsmailKonak/FF-Algorithm-Pytorch-Implementation pytorchMITSyntology: not harvested report
JacksonWuxs/Forward-Forward-Network pytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified report
MindCode-4/code-11 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Entropy Law: The Story Behind Data Compression and LLM Performance (arXiv:2407.06645; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
alimpk/ffx-pytorch pytorchSyntology: not harvested report
ghadialhajj/FF_unsupervised pytorchSyntology: 3 samples, 3 ran (2 instrument-failed) · 0 unverified report
keras-team/keras-io tfSyntology: 5 samples, 4 ran (0 instrument-failed) · 1 unverified report
mohammadpz/pytorch_forward_forward pytorchMITSyntology: not harvested report
pytorch/examples pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Dynamic Structure Pruning for Compressing CNNs (arXiv:2303.09736; that paper's own run record: 7 ran (of which 2 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
venkateshtantravahi/ForwardForwardAlgorithm pytorchApache-2.0Syntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

20 samples harvested: 18 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 2 violated, 9 with no contract checked; 7 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · violated contract
3ran · our draft was wrong
4ran; the contract check could not run
9ran
2unverified

Licence: 2 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 7 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. 1 sample is listed last, in a group without a repository. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

ads-cmu/forwardforward community (archive-listed) 5 samples, 4 ran (0 instrument-failed) · 1 unverified
get_input_layer_size official_python_implementation/src/utils.py ran MIT (permissive) · 95617e9a91fc12c3 · report fixture: signature opt:MockOpt/0/? · returned int · level recorded 2026-09-25
get_y_neg previous_implementation/utilities.py ran fingerprinted MIT (permissive) · f2002874306f8d15 · report fixture: signature y:Tensor/1/int, num_classes:int/0/int · returned Tensor · level recorded 2026-09-25
overlay_y_on_x previous_implementation/utilities.py ran MIT (permissive) · a0e52ce3feaa9f9e · report fixture: signature x:Tensor/2/float, y:Tensor/1/int, classes:int/0/int · returned Tensor · level recorded 2026-09-25
parse_args in 355 papers official_python_implementation/src/utils.py ran MIT (permissive) · 27e4d18bafbf444d · report fixture: signature opt:DictConfig/0/? · returned DictConfig · level recorded 2026-09-25
get_loaders in 51 papers previous_implementation/utilities.py unverified MIT (permissive) · 4613748f89bf60c7 · report
dah33/explore_forward_forward community (archive-listed) 3 samples, 3 ran (3 instrument-failed) · 0 unverified
centroid_loss ff_centroids.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant MIT (permissive) · a19a77b09f9a85a0 · report fixture: signature h:Tensor/2/float, y_true:Tensor/1/int, alpha:float/0/float, epsilon:float/0/float, temperature:float/0/float · returned Tensor · level recorded 2026-09-22
distance_to_centroids ff_centroids.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted MIT (permissive) · 111d222d62981510 · report fixture: signature h:Tensor/2/float, y_true:Tensor/1/int, epsilon:float/0/float · returned Tensor · level recorded 2026-09-22
superimpose_label ff_hinton.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant MIT (permissive) · 4836aa139ad7993d · report fixture: signature x:Tensor/4/float, y:Tensor/1/int · returned Tensor · level recorded 2026-09-22
dslisleedh/FF-jax community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
forward_layernorm src/model.py ran · our draft was wrong no licence file found · pointer only · ace2602caf20f685 · report fixture: signature fn:callable/0/?, eps:float/0/float · returned function · level recorded 2026-09-22
JacksonWuxs/Forward-Forward-Network community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
norm in 120 papers
census: 23 implementations from 26 papers, 15 distinct outputs across 6 buckets, one shared input per bucket this sample: bucket 1 of 6, arg 1: rank 2, kind float, dtype float32
forwardforward.py ran · our draft was wrong fingerprinted MIT (permissive) · a76b972fcaf75086 · report fixture: signature x:Tensor/2/float, p:int/0/int, dim:int/0/int, keepdims:bool/0/bool · returned Tensor · level recorded 2026-09-22
ghadialhajj/FF_unsupervised community (archive-listed) 3 samples, 3 ran (2 instrument-failed) · 0 unverified
create_mask in 35 papers utils.py ran · our draft was wrong MIT (permissive) · 3d9cb0a5f1664e74 · report fixture: signature shape:tuple/1/int, iterations:int/0/int · returned Tensor · level recorded 2026-09-22
create_negative_batch utils.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant MIT (permissive) · 58385c5adf85ca32 · report fixture: signature images:Tensor/4/float · returned Tensor · level recorded 2026-09-22
create_negative_image utils.py ran · violated contract fingerprinted MIT (permissive) · 6046c45d26e6e0cb · report fixture: signature image_1:Tensor/2/float, image_2:Tensor/2/float · returned Tensor · level recorded 2026-09-22
keras-team/keras-io community (archive-listed) 5 samples, 4 ran (0 instrument-failed) · 1 unverified
bytes_to_mib guides/int4_quantization_in_keras.py ran fingerprinted Apache-2.0 (permissive) · 60054a37a716255b · report fixture: signature n:int/0/int · returned float · level recorded 2026-09-25
get_image_ids guides/keras_hub/object_detection_retinanet.py ran Apache-2.0 (permissive) · 84ed89928efc3042 · report fixture: signature data_dir:str/0/str, split:str/0/str · returned list · level recorded 2026-09-25
parse_annotation_data guides/keras_hub/object_detection_retinanet.py ran Apache-2.0 (permissive) · 2482e50dc9cbad0a · report fixture: signature annotation_file_path:str/0/str · returned dict · level recorded 2026-09-25
transform_value_range guides/keras_cv/custom_image_augmentations.py ran Apache-2.0 (permissive) · 21f9fa6e83ffc8c3 · report fixture: signature images:Tensor/4/float, original_range:list/1/float, target_range:list/1/float · returned Tensor · level recorded 2026-09-25
test_step guides/keras_nnx_guide.py unverified Apache-2.0 (permissive) · d99d599f73e1e0e6 · report
venkateshtantravahi/ForwardForwardAlgorithm community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
collate_fn in 500 papers src/utils.py ran Apache-2.0 (permissive) · d342307ef9dbe378 · report fixture: signature batch:list/1/tuple · returned tuple · level recorded 2026-09-25
Repository not located 1 sample, 1 ran (0 instrument-failed) · 0 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
sigmoid in 216 papers
census: 36 implementations from 56 papers, 7 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 1 of 3, arg 1: rank 1, kind float, dtype float64
repository not located ran · violated contract fingerprinted licence of this copy not recorded · f35babe3912ec8b1 · report fixture: signature x:ndarray/1/float · returned ndarray · level recorded 2026-09-22

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections