A predictive system does not process everything it sees — it predicts the next input and passes on only the part it got wrong. That "prediction error" is the currency of the whole scheme: accurate predictions cost almost nothing, and surprise is what propagates. SC-NeuroCore carries this idea in two forms — an exact linear-Gaussian world model you can filter, smooth, and learn, and a zero-multiplication stochastic realization built for hardware. This page walks both, starting from a filter you can drive below.
Every predictive model runs the same two-step loop. First it predicts: given its current belief about a hidden state, it rolls that belief forward one step. Then it corrects: a fresh measurement arrives, the model measures how far off its prediction was, and it nudges its belief toward the evidence — but only in proportion to how much it trusts that evidence over its own prediction. The demo below is exactly that loop, running a Kalman filter on a noisy signal in your browser.
Raise the measurement noise and the orange dots scatter further from the true grey line, but the blue estimate stays close — the filter leans harder on its own prediction the noisier the sensor gets. Raise the process noise and the filter trusts measurements more and reacts faster, at the cost of following the jitter. There is no free lunch, only a principled trade the filter makes for you. The identical filter equations run in the library; this canvas renders one instance of them.
Predictive coding shows up twice in SC-NeuroCore, at two different levels. One is a numerically exact world model — a validated linear-Gaussian state-space engine for continuous latent state. The other is a hardware-native stochastic form that computes the same prediction-error loop with no multipliers at all. They are complementary, not rivals: the world model is the reference mathematics; the stochastic form is what lowers onto an FPGA.
The world-model module implements the classical machinery for a linear-Gaussian state-space model in full: the forward Kalman filter for online belief updates, the Rauch–Tung–Striebel smoother for the best hindsight estimate of every past state, and expectation–maximisation to learn the model parameters from data alone. Covariances are kept symmetric and updated in Joseph / Cholesky-stabilised form, so the filter stays numerically well-conditioned rather than drifting into an invalid covariance.
The forward filter carries a native acceleration path — the same one the rest of the toolkit uses — selecting across Mojo, Go, Rust, Julia, and a pure-NumPy fallback, in that availability-aware order. Smoothing and the EM M-step remain NumPy implementations.
On conventional hardware, computing a prediction error means a subtraction and, for the weighting, a multiply. In the stochastic representation neither is needed. When the prediction and the actual input are both stochastic bitstreams, the error is just the XOR of the two — one logic gate per bit — and its magnitude is the popcount of that XOR divided by the stream length, which is a Hamming distance that approximates the absolute difference in the encoded probabilities.
The precision (which errors matter) is updated by the same spike-timing rule the spiking pages use, pushing weights toward the actual input. The whole error-and-update path becomes XOR gates and a popcount tree — no DSP block, no multiplier, no carry chain. It is explored in the toolkit as a stated conjecture (C9), not a closed theorem: the mapping is exact for the gate-level identity, and the quality of the probability approximation is what is studied empirically.
The same predict-then-correct idea powers a codec. A small autoregressive spike predictor forecasts the next multi-channel spike pattern from recent history and learns online, one sample at a time, by least-mean-squares — no gradients, no batches. The encoder transmits only the XOR between prediction and reality; because the decoder runs an identical predictor over the same recovered history, both sides stay in lockstep and the round-trip is exact.
Here $h_t$ is the flattened recent spike history and the update is the LMS rule applied after each timestep. Determinism is the point: the same history yields the same prediction yields a lossless reconstruction, which is what lets predictive coding double as a spike-codec front-end rather than only a model of perception.
Predictive coding is the bridge between perception and control: a model that can predict its next input can also imagine the consequence of an action, which is what a planner needs. The world-model module exposes exactly that forecasting facade — roll the latent state forward under a sequence of actions, with or without its growing uncertainty — so the same mathematics that filters a sensor stream can score a plan.
Evidence boundary: the world-model module is tier research (experimental). The demo above runs a genuine constant-velocity Kalman filter in your browser to illustrate the predict–correct loop; it is an illustration of the equations, not a benchmark. The zero-multiplication form (C9) is a stated conjecture whose gate-level mapping is exact and whose probability-approximation quality is characterised empirically — not a proven identity. No throughput or latency figures are quoted here.