forward-forward-learning

Implement local layer-wise learning without backpropagation using two forward passes.

60|13|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/plurigrid/asi --skill forward-forward-learning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forward-forward-learning
Source: https://github.com/plurigrid/asi/tree/main/skills/forward-forward-learning
Command: npx skills add https://github.com/plurigrid/asi --skill forward-forward-learning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hinton's Forward-Forward (FF) algorithm enables local, backpropagation-free learning suitable for biologically plausible setups, on-chip training, memory-efficient networks, and parallel layer-wise updates.

Core Features & Use Cases

  • Two Forward Passes: Positive and negative data passes to optimize layer-wise goodness.
  • Goodness-Based Objectives: Layer-wise objectives using goodness of activations.
  • Self-Contrastive Extensions: Self-generated negatives for robust learning.
  • On-Chip Learning & Memory Efficiency: Suitable for neuromorphic hardware and edge devices.

Quick Start

Initialize an FFNetwork with your desired layer dimensions and begin training with a local-forward step loop.

Frequently Asked Questions about forward-forward-learning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does forward-forward learning enable training without backpropagation?

Forward-forward learning uses two forward passes—one on positive data and one on negative data—to compute layer-wise goodness scores. Each layer maximizes the difference between positive and negative goodness locally, eliminating the need for backpropagation while enabling per-layer optimization.

Can I use forward-forward learning for memory-efficient on-chip training?

Yes. Forward-forward is designed for memory-efficient on-chip training and neuromorphic hardware. It eliminates gradient storage overhead and enables parallel layer-wise updates, making it suitable for edge devices and resource-constrained environments.

What is the goodness function in forward-forward neural networks?

The goodness function G(h) = sum h_i² measures the total squared activation magnitude per layer. Forward-forward learns by maximizing G(h⁺) − G(h⁻), where h⁺ and h⁻ are activations from positive and negative data passes respectively.

How does forward-forward differ from traditional backpropagation-based learning?

Forward-forward uses local layer-wise objectives and self-contrastive positive/negative passes instead of global gradient computation. This enables biologically plausible learning, parallel updates across layers, and reduced memory footprint compared to backpropagation.

Can forward-forward networks use self-generated negative samples?

Yes. Forward-forward supports self-contrastive extensions where negative samples are self-generated, enabling robust learning without requiring explicit paired negative data while maintaining the contrastive goodness-based objective.