Efficient Online Learning with Predictive Coding Networks: Exploiting Temporal Correlations

Darius Masoum Zadeh-Jousdani, Elvin Hajizada, Eyke Hüllermeier

TL;DR

Predictive Coding offers a biologically plausible, hardware-friendly alternative to backpropagation, but its reliance on slow, iterative inference steps makes it costly for edge devices. Predictive Coding Network with Temporal Amortization (PCN-TA) solves this by carrying forward latent neuron states across sequential frames rather than resetting them from scratch. This simple change cuts required inference steps by 50% and reduces weight updates by 10% compared to backpropagation, all while improving classification accuracy.

What Problem Does This Paper Address?

Robotic systems processing streaming sensor data at the edge need efficient, continuous online learning. While backpropagation dominates deep learning, it requires global error signals computed across the entire network—making it biologically implausible and inefficient for neuromorphic chips that favor local, brain-like computation.

Predictive Coding (PC) is a biologically grounded framework where learning occurs purely via local prediction errors between adjacent layers. However, standard PC has a major bottleneck: before updating synaptic weights for a single input, it must iteratively adjust its internal neuron states over multiple inference steps until prediction errors converge. In streaming video scenarios, re-running this iterative inference from scratch for every single frame is wasteful because consecutive frames are temporally correlated.

Methods

The authors introduce PCN-TA (Predictive Coding Network with Temporal Amortization):

  • Temporal Amortization: Instead of resetting internal neuron states ($v_i$) to feedforward predictions at every new frame, PCN-TA warm-starts them using the converged latent states from the previous frame ($v_i^t \leftarrow v_i^{t-1}$).
  • Two-Step Pass per Frame: For each subsequent frame, the network runs a feedforward pass to generate baseline predictions, reinstates the preserved hidden states from the prior frame, and then runs iterative state updates via gradient descent on the variational free energy (VFE).
  • Local Synaptic Updates: Once latent states converge, network weights ($\theta$) undergo a single local update based on the residual local prediction errors.
  • Architecture: The model was tested using a convolutional neural network (CNN) featuring a 124-filter convolutional layer, max-pooling, two fully connected hidden layers (200 and 128 units), and a 20-unit output layer trained using mean squared error (MSE) loss and the Adam optimizer.

Datasets

  • COIL-20: A robotic perception benchmark consisting of grayscale images ($128 \times 128$) across 20 objects captured at sequential rotational angles. The continuous rotation provides temporally correlated video-like frames, evaluated in an online, class-incremental setting.
  • No new benchmarks were introduced.

Key Insights and Ideas

  • Temporal Continuity as an Implicit Prior: Because physical scenes change smoothly across frames, the converged latent representation of frame $t-1$ serves as an accurate prediction for frame $t$. This drastically shortens the trajectory needed for inference convergence.
  • Dynamic Weight Sparsity: In PCN-TA, because states are already close to equilibrium, fewer neurons end up with significant prediction errors at the end of inference. As a result, substantially fewer weights require non-zero adjustments, leading to sparse updates ideal for low-power neuromorphic hardware.
  • Decoupling from Backprop Equivalence: Prior PC variants aimed strictly to replicate backpropagation gradients (which requires re-initializing states each sample). By abandoning strict backprop equivalence, PCN-TA leverages temporal correlations directly, achieving higher accuracy and faster adaptation than standard PC.

Key Results

  • 50% Fewer Inference Steps: PCN-TA running just 50 inference iterations outperformed a standard PC network running 100 iterations in classification accuracy.
  • Higher Accuracy: When granted the full 100 iterations, PCN-TA outperformed both the baseline PC network and eventually matched or surpassed backpropagation in the later training epochs.
  • 10% Fewer Weight Updates than Backprop: Backpropagation started around 1.7 million weight updates per frame in initial epochs. PCN-TA required significantly fewer updates from the outset and maintained the lowest average update count across all epochs, achieving roughly 10% fewer updates than standard backpropagation.

Limitations and Future Work

  • Benchmark Scale: Evaluation was limited to COIL-20, a relatively small, controlled dataset with simple backgrounds and single-object rotations.
  • Generalization Across Conditions: The network was not evaluated on distinct video sequences of the same object under shifting environmental conditions (e.g., variable lighting, occlusions, or complex backgrounds).
  • Theoretical Departures: The reliance on the fixed-prediction assumption and carry-over dynamics means the network deviates from true backpropagation equivalence, warranting more theoretical investigation into its convergence guarantees under diverse non-stationary data streams.

Summary updated

Abstract

Robotic systems operating at the edge require efficient online learning algorithms that can continuously adapt to changing environments while processing streaming sensory data. Traditional backpropagation, while effective, conflicts with biological plausibility principles and may be suboptimal for continuous adaptation scenarios. The Predictive Coding (PC) framework offers a biologically plausible alternative with local, Hebbian-like update rules, making it suitable for neuromorphic hardware implementation. However, PC's main limitation is its computational overhead due to multiple inference iterations during training. We present Predictive Coding Network with Temporal Amortization (PCN-TA), which preserves latent states across temporal frames. By leveraging temporal correlations, PCN-TA significantly reduces computational demands while maintaining learning performance. Our experiments on the COIL-20 robotic perception dataset demonstrate that PCN-TA achieves 10% fewer weight updates compared to backpropagation and requires 50% fewer inference steps than baseline PC networks. These efficiency gains directly translate to reduced computational overhead for moving another step toward edge deployment and real-time adaptation support in resource-constrained robotic systems. The biologically-inspired nature of our approach also makes it a promising candidate for future neuromorphic hardware implementations, enabling efficient online learning at the edge.
BibTeX
@inproceedings{zadehjousdani2025efficient,
  author = {Darius Masoum Zadeh-Jousdani and Elvin Hajizada and Eyke Hüllermeier},
  title = {{Efficient Online Learning with Predictive Coding Networks: Exploiting Temporal Correlations}},
  booktitle = {EdgeAI4R @ IROS},
  year = {2025},
  url = {https://openreview.net/forum?id=GKfyGppO1D},
}
Figure