Predictive Coding
The brain does not wait for the world. It generates a model of what is coming — and fires before it arrives.
What is it
Predictive coding is the brain's fundamental operating principle, articulated most fully by neuroscientist Karl Friston. The brain is not a passive receiver of sensory signals. It is an active prediction machine. At every moment, it generates a model of what it expects to perceive, and compares that prediction against incoming signals. The difference — the prediction error — is what gets processed. Not the signal itself.
This is a radical inversion of the intuitive model. Most people assume the brain works like a camera: reality arrives, the brain records it. But the evidence points the other way. Higher cortical regions send signals down to lower sensory regions, generating predictions. Sensory neurons primarily propagate upward the difference between what was expected and what arrived. The brain is always one step ahead of the input.
The practical consequence: perception is mostly inference. What you see, hear, and feel is largely your brain's best prediction, updated only where reality violated that prediction. The world you experience is generated from the inside out. Incoming signals are corrections, not instructions.
What it does in the brain
A well-trained surgeon walking into an operating theatre does not start from zero. Long before the first incision, the brain has already activated the full procedural sequence: instruments, positions, likely complications, team roles. Every step is pre-loaded. The incoming signals — what is actually visible, what the patient's vitals show — serve only to update and correct this pre-existing model. If everything goes as predicted, almost nothing reaches consciousness. The surgeon operates fluently, automatically, faster than deliberate thought allows.
Compare this to the same surgeon performing a procedure for the first time. There is no pre-loaded model. Every signal must be processed from scratch. Every action is effortful. The brain has no prediction to match against. It is doing perception instead of inference, and perception is slow.
This is why expertise feels effortless from the inside: the brain has learned to predict so accurately that almost no correction signals are needed. And it is why unfamiliar situations are exhausting: every signal generates a prediction error that must be resolved before action can proceed.
The same mechanism operates at a social level. When you walk into a room full of people you know well, your brain has pre-activated their names, their likely topics, their relationship to you. You are ready before the first word is spoken. Walk into a room of strangers, and none of that pre-activation is available. The social processing burden is orders of magnitude higher.
What it does in ThetaOS
Until recently, ThetaOS was a retrospective system. It learned from what had already happened: where you slept, which locations you visited, which transactions occurred. The slaap_log and bezochte_locaties tables told the system where you had been. Networks activated in response to that history. The context-lader loaded what was already true.
This is useful. But it is not how the brain works. The brain does not wait for you to arrive before preparing context. It begins loading the moment it knows you are going.
The predictive layer changes this. Meetings and optredens scheduled in the next seven days are now treated as anticipatory signals. If tomorrow's agenda shows a meeting at the national police headquarters in The Hague, the system fires the Den Haag cluster and Politie Den Haag networks today — before you leave, before you arrive, while there is still time to prepare. The network of people, the open threads, the relevant history: all loaded in advance.
| Signal type | Direction | When it fires |
|---|---|---|
| slaap_log / bezochte_locaties | Retrospective | After you arrive |
| transacties | Retrospective | After something happens |
| meetings (komende 7d) | Predictive | Before you arrive |
| optredens (komende 7d) | Predictive | Before you depart |
The predictive layer is a stronger signal than the retrospective one. A meeting in your calendar is a near-certainty. A location in your slaap_log is a fact — but already past. The meeting fires the network while it still matters: during preparation, during travel, the night before. This is the difference between a surgeon who pre-loads the procedure and one who figures it out on arrival.
On 14 April 2026, Martijn had two meetings in The Hague: one at the Ministry of the Interior on the National Digitalisation Strategy, one at the national police headquarters on politie OS with Hanneke Ekelmans. Neither location had been visited in the slaap_log for that date. But because both meetings were in the calendar, ThetaOS fired the Den Haag cluster and Politie Den Haag networks the evening before — surfacing six people from the national police leadership and the open thread on drug waste reuse that had been dormant since 2016. The system prepared the context before Martijn left the house.
The hierarchy of signals
Predictive coding implies a hierarchy. Not all signals are equal. A confirmed appointment is stronger than a tentative one. A meeting two days away is more actionable than one six days away. An optreden with a confirmed status fires differently than one still in the inbox. The system should weight these signals accordingly — not just detect their existence, but rank their certainty and proximity.
In the brain, prediction errors are weighted by precision: how reliable is this signal? A high-precision error updates the model strongly. A low-precision error is discounted. ThetaOS applies the same logic: a bevestigd optreden in two days should weight more heavily than an inbox item in six. The proximity and confirmation status of a future event determines how strongly it fires the associated networks.
This is the direction the system is moving: from a log of what happened toward a running model of what is about to happen, calibrated by certainty. Retrospective and predictive signals together. The system that only remembers the past is useful. The system that also anticipates the near future is ready.
Live