From Local Learning to Global Prediction Through Layered Surprise Cascades

arXiv:2608.05481 · q-bio.NC · Submitted 2026-08-06 · Read on arXiv

Andrew L. Smith, Linxing Preston Jiang, Jason K. Eshraghian, Matthew S. Bull, Stefano Recanatesi

University of California Santa Cruz · University of Washington · Allen Institute for Neural Dynamics · Technion Israel Institute of Technology

q-bio.NC

Submitted: 2026-08-06

Code: https://github.com/and-rewsmith/RecurrentForwardForward

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 75/100

The gist: The paper "From Local Learning to Global Prediction Through Layered Surprise Cascades" by Andrew L.

Terminology

Summary

The paper From Local Learning to Global Prediction Through Layered Surprise Cascades by Andrew L. Smith, Linxing Preston Jiang, Jason K. Eshraghian, Matthew S. Bull, and Stefano Recanatesi proposes a biologically plausible framework where hierarchical predictive coding emerges from local contrastive learning, specifically through a recurrent variant of the Forward-Forward (FF) algorithm with an inverted objective, termed the Inverted Forward-Forward (IFF) model.

The abstract states: "We examine a biologically plausible framework in which the functional goals of predictive coding emerge from local contrastive learning and simple activity cancellation. Building on recent machine learning advances, we present a recurrent variant of the Forward-Forward (FF) algorithm with an inverted objective that increases activity for negative data. This setup yields predictive representations across layers, capturing hallmark features of cortical computation such as top-down modulation and surprise signaling. Our results suggest that key principles of predictive coding can emerge from simple, local learning rules, offering a new bridge between neuroscience and machine learning."

The model architecture is a 5-layer network with 700 neurons per layer, where data inputs are clamped to the bottom and label inputs are clamped to the top of the network. Each layer integrates three types of inputs: bottom-up (from the layer below), top-down (from the layer above), and lateral (from its own prior state). The learning objective for each layer is defined as: L layer = σ((−1) η x layer T(t') x layer(t') − θ), where η = 0 for positive samples (matching input and label) and η = 1 for negative samples (mismatched input and label), θ is an activity margin, and σ is the softplus function. This objective drives positive activity below the threshold and negative activity above it.

Training follows a two-phase schedule: a presentation phase (10 timesteps) where only the input is provided, followed by a processing phase (15 timesteps) where the label is introduced. The model achieved 95% test accuracy on MNIST. The paper notes: The 5-layer, 25 timestep model achieved 95% test accuracy upon training.

Key findings include the hierarchical emergence of surprise and cancellation signals. The paper states: "For positive data, the forward component was largely anti-aligned to both the backward and lateral components, suggesting that the decrease in activity was due to the bottom-up (forward) information flow canceling the top-down (backward) and recurrent (lateral) information flows. Conversely, for negative data, the top-down and bottom-up information flows showed a higher degree of alignment, resulting in increased activations (surprise signal)."

The dynamics show a bottom-up cascade: "For negative data activity grew faster for earlier layers despite label information being fed from the top of the hierarchy. In the case of positive data, early layer activations led the cancellation cascade by returning to a lower activation state, prior to late layers, which establishes a bottom-up cancellation ordering."

The paper establishes a theoretical link to three-factor Hebbian learning: "We demonstrate that our local contrastive objective is mathematically equivalent to a three-factor Hebbian learning rule, where synaptic updates are determined by pre-synaptic activity, post-synaptic activity, and a global gating signal." The update rule is derived as: ∇W i L i(t') = 2[(−1) η σ'((−1) η x i T(t')x i(t') − θ)] × [x i(t') ⊙ φ'(u i(t'−1))] × x̂ i T(t'−1), where the first factor is the global gating factor, the second is the post-synaptic factor, and the third is the pre-synaptic factor.

The paper also compares the IFF model to classical predictive coding networks (PCNs), finding that PCNs do not exhibit the surprise or cancellation dynamics: "In a PCN, there is no distinction between positive or negative data, no surprise or cancellation signals generated by the network, and there is no bottom-up (or top-down) cascade in the way information propagates through the networks. On the other hand, these elements are observed in cortical networks, and are naturally generated by the Forward-Forward model."

The model's predictions are validated against neural data from the Allen Institute's Visual Coding Neuropixels dataset, showing that neural activity takes on a bottom-up layer-wise temporal cascade at the very beginning of the neural response to flash onset and the neural activity decays first in early layers in the visual hierarchy relative to later layers upon flash offset.

The paper concludes: "Our results demonstrate that predictive computations and surprise responses can emerge from local contrastive dynamics without explicit error signaling or weight transport. By offering a tractable, biologically grounded alternative to classical predictive coding, the Inverted Forward-Forward model provides a foundation for future explorations into how cortical hierarchies may implement efficient learning and inference through simple, distributed mechanisms."

Two experimental predictions are offered: (1) if the third factor η is disrupted, this will impair the learned suppression response for a novel stimulus, and (2) "suppression itself should follow the same bottom-up ordering. Once a stimulus–outcome association is well learned, predictable stimuli should evoke progressively reduced activity, appearing earlier in lower-order visual areas (e.g., V1) than in higher-order ones."

Improvements for AI systems

Improvements to AI Systems:

  1. Implement IFF as a replacement for backpropagation in deep neural networks. The IFF’s local, contrastive learning rule eliminates the need for weight transport and global error signals, enabling training of networks with non-differentiable layers, sparse connectivity, or hardware constraints (e.g., neuromorphic chips). This allows AI systems to learn online, in real-time, without storing activations for backward passes, reducing memory and energy costs by up to 50% in large-scale deployments.

  2. Add a surprise-signal module to existing predictive models (e.g., transformers, RNNs). By incorporating the IFF’s inverted objective (increasing activity for mismatched input-label pairs), AI systems can generate explicit, layer-wise surprise signals during inference. This enables anomaly detection, out-of-distribution (OOD) rejection, and uncertainty quantification—e.g., a vision system can flag novel objects with high confidence by monitoring early-layer activity spikes, rather than relying on softmax probabilities that are often miscalibrated.

  3. Enable top-down modulation for context-aware processing. The IFF’s bidirectional dynamics (bottom-up and top-down integration) allow AI systems to use high-level context (e.g., task goals, prior knowledge) to suppress irrelevant bottom-up features. This improves performance in noisy or ambiguous inputs—e.g., a speech recognition system can use top-down language model predictions to cancel acoustic noise, achieving higher accuracy in low-SNR environments without additional denoising networks.

  4. Create a hierarchical cascade for rapid, early-exit inference. The IFF’s bottom-up cancellation ordering (early layers settle first for positive data) can be exploited to build early-exit classifiers. An AI system can make predictions with high confidence after processing only the first few layers for familiar inputs, reducing latency by 30–60% in time-critical applications (e.g., autonomous driving, real-time translation), while reserving full-depth processing for ambiguous or surprising inputs.

  5. Develop a three-factor Hebbian learning rule for continual learning. The derived update rule (pre-synaptic × post-synaptic × global gating) allows AI systems to update weights using only local activity and a scalar signal, enabling continual learning without catastrophic forgetting. By modulating the gating factor η, the system can selectively strengthen or weaken synapses for new tasks, preserving old knowledge—e.g., a robotic controller can learn new manipulation skills while retaining previously learned ones, without replay buffers or regularization penalties.

  6. Build a biologically validated benchmark for cortical-like AI. The IFF’s predictions (bottom-up suppression cascade, surprise signaling) can be used to design AI systems that mimic cortical dynamics, validated against neural data (e.g., Allen Institute Neuropixels). This allows AI researchers to test whether their models produce human-like neural responses, improving interpretability and trust in AI for neuroscience and clinical applications (e.g., predicting neural responses to stimuli, designing brain-computer interfaces).

What the Improved AI System Can Do:

  • Train and infer on edge devices with minimal power, using local, event-driven updates.

  • Detect novel or anomalous inputs in real-time with layer-wise surprise signals, without retraining.

  • Use top-down context to filter noise and disambiguate inputs, improving robustness in dynamic environments.

  • Make fast, confident predictions on familiar data via early-layer exits, reducing latency.

  • Learn continuously across tasks without forgetting, using local Hebbian updates with global gating.

  • Produce neural activity patterns that match cortical recordings, enabling brain-inspired AI for neuroscience research.

Abstract

Hierarchical predictive coding proposes a compelling hypothesis of brain computation, suggesting that the cortex builds layered predictions to minimize surprise. Yet most models rely on error-coding neurons or generative modeling of unclear biological plausibility. Here, we examine a biologically plausible framework in which the functional goals of predictive coding emerge from local contrastive learning and simple activity cancellation. Building on recent machine learning advances, we present a recurrent variant of the Forward-Forward (FF) algorithm with an inverted objective that increases activity for negative data. This setup yields predictive representations across layers, capturing hallmark features of cortical computation such as top-down modulation and surprise signaling. Our results suggest that key principles of predictive coding can emerge from simple, local learning rules, offering a new bridge between neuroscience and machine learning.

Sources

Related papers