Introduction
Deep learning almost exclusively relies on backpropagation (BP) to update neural network weights. However, researchers have long questioned whether BP is biologically plausible, as real neurons do not appear to communicate error signals backward in the same structured manner. To address this, Geoffrey Hinton recently proposed the Forward-Forward (FF) algorithm, which replaces the traditional forward and backward passes with two forward passes: one for "positive" (real) data and one for "negative" (generated or corrupted) data.
While FF has shown promise in computer vision tasks like image classification, its utility in sequential decision-making—specifically Imitation Learning (IL)—has remained unexplored. This paper investigates whether the FF algorithm can effectively train agents to mimic expert behavior from static datasets without relying on backpropagation.
Methodology: Forward-Forward in Imitation Learning
The authors frame Imitation Learning as a supervised classification problem where the environment "state" is the input and the "action" is the label.
Instead of calculating gradients via BP, the FF network is trained to maximize a "goodness" metric (the sum of squared neural activities) for positive data and minimize it for negative data.
- Positive Data: Pairs of
(state, correct action)taken directly from an expert model. - Negative Data: Pairs of
(state, incorrect action), where the incorrect action is randomly sampled from the available action set.
The model learns to distinguish "good" state-action pairs from "bad" ones by comparing their goodness scores. During inference, the model acts as a policy evaluator. It performs a forward pass for every possible action in a given state and selects the action that yields the highest goodness score. This contrasts with standard models that map a state directly to an action probability distribution.
Experiments and Key Results
The researchers evaluated their approach on two classic control benchmarks from OpenAI Gym: CartPole (keeping a pole upright) and MountainCar (building momentum to climb a hill). The training data consisted of 100,000 frames generated by an expert Proximal Policy Optimization (PPO) model. To measure how performance scales with data volume, the models were tested across various "data ratios" (1%, 5%, 10%, 50%, and 100% of the total dataset).
The results reveal several key insights about the FF algorithm's behavior in imitation learning:
- Comparable Peak Performance: On the full dataset (100%), the FF-based imitation learner performed nearly as well as the BP-based version. In MountainCar, the FF model achieved a reward of -81.2 compared to BP’s -80.4, both closely trailing the expert PPO score of -80.0.
- The Data Hunger of FF: A major takeaway is that the FF algorithm appears significantly less sample-efficient than backpropagation. The performance gap between FF and BP widens considerably as the dataset gets smaller.
- Performance Drop-off on Small Datasets: In MountainCar with only 10% of the data, the FF model struggled, scoring -121.9, while BP maintained a much stronger -106.6. Similarly, in CartPole, BP reached the maximum reward (500) perfectly using only 1% of the data. The FF model required 5% of the data to achieve the same stable result, showing much higher variance (±152.1) at the 1% mark.
These findings suggest that while FF is a viable alternative for learning, it requires more "experience" to refine its internal representation of "goodness" compared to the explicit error signals provided by BP.
Limitations and Future Directions
The authors identify two primary hurdles for the FF algorithm in this domain:
- Discrete Action Constraint: Because the current inference method requires calculating goodness for every possible action, it is strictly limited to environments with a small number of discrete actions. It cannot handle continuous action spaces (like controlling the specific torque of a motor) without significant architectural changes.
- Sample Efficiency: The model's sensitivity to dataset size makes it less practical for real-world scenarios where data is expensive or scarce.
Moving forward, the authors aim to develop an online Reinforcement Learning model using the FF algorithm and explore methods to infer actions in continuous spaces. Overcoming these limitations could move FF closer to being a general-purpose, biologically plausible alternative to backpropagation in robotics and AI.
Summary updated