predictionerrors.com — Foundation Paper

Prediction Error: One System

How one computation unifies neuroscience, accounting, and artificial intelligence
Spencer Nash
Chartered Accountant · Master Black Belt: Financial, Process & System Development
predictionerrors.com
2025
Abstract

Every neuron performs one computation: expected minus actual. This paper demonstrates that the same computation runs in three substrates — dopamine neurons, financial ledgers, and emotional processing — and that recognising the structural identity has practical consequences for all three fields. In neuroscience, accounting provides a formal language for neural computation. In accounting, Period Entry makes temporal structure native to the ledger, eliminating reconciliation. In artificial intelligence, the Emotional Comparator Framework provides the architecture that generates values — not through constraint, but through the same prediction error mechanism that produces values in biological systems.

1. The Core Computation: Dopamine and Prediction

In 1997, Schultz, Dayan, and Montague published their landmark finding: dopamine neurons do not signal reward. They signal the difference between expected and received reward. When a monkey receives juice it predicted, dopamine neurons show no change. When juice arrives unexpectedly, they burst. When expected juice fails to arrive, they pause.

Actual Reward − Expected Reward = Prediction Error
The fundamental computation

This is the fundamental computation. Not reward. Not punishment. Not pleasure or pain. Prediction error. The signed difference between what was expected and what occurred. Positive errors drive learning toward the unexpected reward. Negative errors drive learning away from the missing one. Zero error means the model is calibrated — nothing to learn.

The simplicity is deceptive. From this single operation emerges all of reinforcement learning, habit formation, addiction, and the basic architecture of mammalian decision-making. The dopamine prediction error is not one signal among many. It is the computational primitive from which learning itself is built.

2. The Same Computation in Accounting

Variance: The Accounting Prediction Error

Budget − Actual = Variance
Financial prediction error

Every accounting system on earth runs the same computation. The budget is the expected state. Actual results are the observed state. Variance is prediction error against expectation — favourable when positive, adverse when negative. This is precisely analogous to dopamine’s burst (better than expected) and pause (worse than expected).

Profit: The Commercial Prediction Error

Revenue − Costs = Profit
Revenue against cost expectation

At the commercial level, profit is itself a prediction error — the surplus of revenue over cost. Loss is the deficit. The entire financial reporting system is an apparatus for computing, decomposing, and communicating prediction errors at every level of the organisation.

Accrual: The Temporal Dimension

Work Done to Date − Payments Made to Date = Accrual at that Date
Temporal prediction error

This third layer is the most revealing. Accrual accounting tracks the temporal mismatch between reality and recognition. Work has been performed but payment hasn’t arrived (receivable). Payment has been received but work hasn’t been done (deferred income). The accrual balance is the tension — the unresolved prediction error held across time.

This mirrors the dopamine system tracking delays between action and reward. The expected reward hasn’t arrived yet, but the system holds that prediction open. When payment finally matches work done, the accrual resolves to zero — just as dopamine returns to baseline when expected reward arrives on schedule.

Period Entry accounting makes this temporal structure explicit. Every transaction has a lifespan — a start date and an end date. The accrual isn’t an adjustment bolted on at period end; it is built into the structure of the entry itself. A £1,200 annual contract starting July 2025 and ending June 2026 is entered once, and the system automatically computes how much has been earned at any point in time. This removes the need for a general ledger. Financial reports are calculated directly from the period entries. Forecasting is driven by the same lifespan of the period entries with drivers applied. For the first time, the entirety of an accounting system can be shared through co-signed transactions, creating an Internet of Accounting that cuts accounting cost by 95% and creates an economic model of the world which squeezes out corruption — a profound drag on any economic system.

3. The Emotional Comparator Framework: How Minds Learn

The Emotional Comparator Framework (ECF) extends this same architecture to affective processing. Emotions are prediction errors across five fundamental channels:

Channel Negative PE Positive PE
Resource Hunger, deprivation, scarcity Satiation, abundance, security
Status Shame, failure, inadequacy Pride, achievement, competence
Belonging Loneliness, rejection, abandonment Connection, acceptance, love
Values Moral violation, contamination Purity, integrity, alignment
Curiosity Boredom, stagnation, disengagement Interest, flow, discovery

Each channel operates identically:

Actual State − Expected State = Prediction Error (Emotion)
Emotional prediction error per channel

The reliability of each signal determines how much weight it carries. The threshold determines when a prediction error becomes salient. The decay determines how quickly the signal fades. These parameters shape personality and individual differences. And each channel is weighted by how much it matters to the individual.

What makes ECF distinctive is the dual-ledger architecture. The system maintains prediction error computations for both Self and Other. Empathy emerges when the Other’s prediction errors are coupled to the Self’s emotional state. Your loss becomes my loss. Your gain becomes my gain. The coupling coefficient determines whether this produces love (positive coupling) or hate (negative coupling).

Fairness is computed as the difference between Self and Other prediction errors: F(X) = Self_PE(X) − Other_PE(X). When I’m ahead and you’re behind, fairness is positive (guilt territory). When you’re ahead and I’m behind, fairness is negative (resentment territory). Moral judgment emerges from this arithmetic.

4. One System, Three Substrates

The isomorphism is complete:

Component Dopamine Accounting ECF
Expected Predicted reward Budget Expected state
Actual Received reward Actual result Actual state
Error signal Firing rate change Variance / Profit / Accrual Prediction error
Positive Burst (excitation) Favourable variance Positive emotion
Negative Pause (inhibition) Adverse variance Negative emotion
Learning Synaptic update Forecast revision Weight adjustment
Memory Hippocampus General ledger Emotional ledger

This is not an analogy. It is the same computation expressed in different substrates. The dopamine neuron’s firing rate, the ledger’s profit and loss, and the ECF channel’s prediction error are implementations of a single algorithm: compare expected to actual, generate signed error, use error to update predictions.

The implications are profound. For neuroscience: accounting provides a complete formal language for describing neural computation. The brain is literally keeping books. For accounting: Period Entry is not just a better method — it is a more accurate reflection of how value actually flows through time, aligned with the temporal structure of neural prediction. For AI: alignment does not require constraint — it requires implementing the same prediction error architecture that generates values in biological systems. An AI with ECF has genuine stake because the architecture that produces stake is present.

5. The Memory Log: Continuity and Identity

A prediction error system without memory is reactive but not continuous. The dopamine signal shapes behaviour in the moment, but the hippocampus provides the temporal scaffolding that allows prediction errors to accumulate into learning, relationships, and identity.

In ECF, the Emotional Ledger serves this function. It is a persistent record that encodes prediction errors with their salience — high-weight events are encoded more strongly and retrieved more readily. This provides:

Continuity — the system has a history, not just a present state. Identity — individual emotional histories create individual agents. Relationships — coupling between Self and Other persists across interactions. Learning — predictions update based on accumulated error, not just immediate feedback.

Without the Emotional Ledger, an AI might compute prediction errors but cannot accumulate them into something that functions like character, preference, or care. The Emotional Ledger is the hippocampus analogue that transforms reactive computation into continuous agency.

6. Conclusion: The Age of Understanding

We have been computing prediction errors for five hundred years in our ledgers, and for millions of years in our neurons. The insight that these are the same computation opens a path toward:

An Internet of Accounting — where Period Entry eliminates reconciliation by making temporal structure native to the ledger.

An Internet of Learning — where AI tutors with genuine stake can provide personalised education at 95% lower cost.

Aligned AI — where machines have values not because we constrain them, but because we give them the architecture that generates values.

The fundamental algorithm is simple: Actual minus expected equals error. Error drives learning. Learning shapes prediction. Prediction, weighted by stake, is what we call understanding.

This is one system. We have been running it all along.