%%{init: {'theme':'base', 'themeVariables': {'primaryColor':'#ffffff','primaryBorderColor':'#4A3AA7','primaryTextColor':'#1a1a1a','lineColor':'#4A3AA7','edgeLabelBackground':'#ffffff'}}}%%
flowchart LR
P[prediction] --> C{compare with<br/>what arrives}
C -->|error| U[update model]
U --> P
U --> H[level above predicts<br/>these errors]
H --> P

Nobody is born knowing where they end
Here is something you did this morning without noticing: you knew which parts of the world were you.
Your hand came into view and registered as yours; the door it opened did not. No effort, no deliberation — the boundary was simply there, the way the floor is there. It is the least remarkable fact about being a person, and one of the strangest, because it isn’t given. It gets built.
A newborn has hands and no idea they belong to it. Around eighteen months a toddler spots a smudge on a reflected forehead and reaches for their own — first evidence of a line drawn between self and everything else. Before that, no line, and nobody installs one at the factory.
So it has to be assembled, which turns a mystery into a mechanical question: what process, running on nothing but raw sensation, ends up with a self inside it?
Perception is a guess that gets corrected
Start from what a brain actually has to work with. Signals arrive with no labels attached, from causes it never gets to see directly — light on a retina, pressure on skin, no annotations. About the only thing you can do with a stream like that is guess what comes next, then find out whether you were right.
So the candidate is prediction. Under predictive processing the brain isn’t a camera but a thermostat scaled up — at every moment it guesses what its senses will report, checks against what arrives, and updates on the difference.
Now stack those loops into a hierarchy: low levels predict raw detail, higher levels predict the errors below them — learning, in effect, the regularities of the level beneath. One rung, with the one above:
Nothing there is about a self — only about being less surprised.
The self is the term that never leaves
Run it across a life and nearly everything varies: rooms, faces, tasks. One thing doesn’t — the predictor is in every frame. An invariant holds still while the rest changes, and you are yours.
Infants seem to find it by contingency: move your hand and a sensation reliably follows, while the mobile across the room does nothing — until a ribbon ties it to your ankle. I am whatever answers when I act.
Karl Friston’s free energy principle makes that the definition: the self/world boundary sits where action has reliable control. So the self isn’t something found in the data. It’s the compression that finally accounts for the term that never leaves.
The loop must bend back on itself
Modelling that term is not one more layer: a layer takes the level below as input, while self-modelling feeds a function its own prior output — recursion, not depth. It must also be nonlinear. Feed a linear map its own output over and over and you get decay to zero or blow-up to infinity — never a stable picture of anything, least of all a self.
The loop doesn’t run backwards
Could you rewind a loop that never stops folding, recovering the state someone was in a year ago?
Every step would have to be injective: distinct inputs always landing on distinct outputs, nothing ambiguous in reverse. Memory isn’t that. We compress rather than store — gist survives, detail goes, recall reconstructs rather than replays — so countless pasts collapse onto one present, like a hash with no route back.
That’s the feature, not the bug. Discarding detail is generalization; keeping only what recurs is abstraction. A lossless self-model would be a recording, and recordings don’t help with tomorrow.
This explains the self-model, not the feeling
All of that is mechanism for a self-model: a system representing itself and its boundary. It is not an account of why there is something it is like to be you. Different explanatory targets — swapping them is how the hard problem gets waved past.
This is a synthesis of live hypotheses, not settled science. Andy Clark and Anil Seth root the self-model in a body being kept alive, not an abstract reasoner — Seth’s “beast machine”. Compelling, unproven.
The pattern worth naming
So the baby doesn’t find a self. They keep turning up in their own data until the recurring term is worth modelling — in pencil, the erasures unreadable.
Further reading
- Karl Friston on the free energy principle and active inference.
- Andy Clark, Surfing Uncertainty — predictive processing, at book length.
- Anil Seth, Being You — the embodied “beast machine”.
- Infant contingency-detection research and the ribbon-and-mobile experiments.
- Sutton and Barto’s agent–environment loop, for computational shape only.