cs.LGAug 25, 2026
SaveSingle State Update Predictive Coding training for Time Series Forecasting and Anomaly Detection
Organizations: IDLab, Department of Information and Technology, Ghent University—imec, 9052 Ghent, Belgium
Abstract
Predictive Coding (PC) is a neural learning paradigm that enables parallelizable neural network layer updates. However, the main bottleneck of PC Networks (PCN) is the sequential backwards error propagation. To tackle this, we introduce a training technique that pairs a Generative PCN with a support Encoding PCN. The two PCNs are trained in parallel to match their neural activations, without sequential propagation. We apply this to time series anomaly detection and show that our approach results in more stable, continuous, online learning.
Figures & tables
Figure 1: Guided PC training step 1. Parallel feedforward initialization of the G-PCN and the E-PCN. The initializations follow a sequential order: from to for the G-PCN and form to for the E-PCN. The G-PCN maps to via the layer , that acts as temporal mapping layer.
Figure 2: Guided PC training step 2. G-PCN and E-PCN parallel state update, to minimize the Guiding Energy and the Inernal Energy at the last layer. All the the states and receive a non-zero update.
Figure 3: Guided PC training step 3. G-PCN state update to minimize the Internal Energy . The states already received a non-zero update from step 2 (Figure 2 ). Therefore, the update with respect to will be non-zero for all .
Figure 4: Guided PC training step 4. G-PCN and E-PCN parallel weight update. The G-PCN weights are updated to minimize , while the E-PCN weights are updated to minimize . In this way, the E-PCN is trained to match the G-PCN representation, acting as a support network.
Figure 5: Average accuracy expressed as Mean Squared Error between the ground truth images and the predicted images , in sequences with three different anomaly types. 100 experiments have been averaged per each category. The semi-transparent area indicates the standard deviation per time frame. The Guided PC obtains better stability with respect to anomalies, despite performing only one unified state update step
| G-PCN | E-PCN | |
| level | (512, 512) tanh | - |
| levels – | (512, 512) tanh | (512, 512) tanh |
| level | (512, 4096) linear | (4096, 512) tanh |
Table 1: Architectural details for the G-PCN and the E-PCN. The G-PCN forward direction goes in increasing order, while the E-PCN one goes in decreasing direction (see Figure 1 ). Every cell of the table lists the Dense layers dimensions, the layer connections and the non-linearity applied to the activation.
| SGD learning rates | Adam learning rates | Adam | |
| Guided PC | [1e-2, 5e-2, 1e-1] | [1e-4, 2.5e-4, 5e-4] | [(0, 0), (0.1, 0.1), (0.5, 0.5), (0.9, 0.9)] |
| Vanilla PC | [1e-4, 2.5e-4, 5e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1] | [1e-3, 5e-3, 1e-2, 5e-2, 1e-1] | |
Table 2: Hyperparameters used for design space grid search. The and coefficient for the Adam optimizers have been explored in couples of the same value (using the same for both the Guided PC optimizers).
| Internal Energy learning rates | Guiding Energy learning rates | |||
| States | Weights | States | Weights | |
| G-PCN | 5e-2 | 2.5e-4 | 1e-1 | - |
| E-PCN | - | - | 1e-1 | 1e-4 |
| Vanilla-PCN | 5e-2 | 2.5e-4 | - | - |
Table 3: Learning rates used for Guided PC and Vanilla PC.
| Guided PC | Vanilla PC |
| ms | ms |
Table 4: Training time per frame averaged for 150.000 frames, from 100 experiments of 1500 frames each ( standard deviation). The required training times are similar for the two techniques because the Guided PC implementation cannot still leverage the parallelization potential.