5D Library › The Sandbox, Determinism and Active Inference · 中文
Chapter 1 The Bayesian Brain and the Self-Fulfilling Prophecy
Not a camera
Older theories of perception imagined the brain as a camera: light comes in, an image forms, and understanding follows. Over the past thirty years a different view has gained ground. On this view the brain constantly predicts its incoming sensory input, and what travels upward is mainly the difference between prediction and input, the prediction error. Perception is the brain’s best guess about what is out there, a guess shaped jointly by past experience and present input.
Evidence
Karl Friston summarised this family of ideas as the free-energy principle: a system that maintains itself can be described as minimising a quantity called variational free energy, which is an upper bound on sensory “surprise” (Friston 2010). Andy Clark’s review calls it predictive processing, discusses its unified account of perception, attention and action, and sets out the criticisms it faces, such as whether the theory is so broad as to be hard to falsify (Clark 2013). A systematic textbook treatment is Parr, Pezzulo and Friston’s Active Inference (Parr et al. 2022).
One point needs to be clear from the start. The free-energy principle is a mathematical framework, not a single experimental law. It says that if a system is to keep its structure in a changing environment, its internal states and behaviour can be described as approximate Bayesian inference. Which brain circuits implement such inference, and how, are open research questions. This book uses the framework because it gives a precise language for how beliefs shape action and action in turn shapes belief, not because it has been proven the one correct description of mind.
Prior, evidence and precision
The basic operation of Bayesian inference combines a prior with evidence into a posterior. In the simplest case belief and observation are normal distributions, each with a precision (the inverse of the variance, a measure of certainty). The posterior mean is the precision-weighted average:
The more precise the prior, the less the same evidence can move the belief. The program below imagines someone with a pessimistic prior about how others will respond to them ( on a scale from , hostile, to , warm), while the environment actually delivers an average response of .
Calculation
How belief changes with the number of observations, for priors of different precision.
# A strong prior and a stream of evidence: Gaussian belief updating (precision-weighted averaging).
# Belief about "how others respond to me", on a scale from -3 (hostile) to +3 (warm).
PRIOR_MEAN = -2.0 # the inherited expectation
TRUE_MEAN = 0.5 # what the environment actually delivers on average
OBS_PRECISION = 1.0 # precision (1/variance) of one observation
def posterior(prior_prec, n, discount=1.0):
"""Mean after n observations at TRUE_MEAN. 'discount' < 1 down-weights observations that
contradict the prior (a precision assigned by the believer, not by the world)."""
w = prior_prec + n * OBS_PRECISION * discount
return (prior_prec * PRIOR_MEAN + n * OBS_PRECISION * discount * TRUE_MEAN) / w
def n_to_halfway(prior_prec, discount=1.0):
target = (PRIOR_MEAN + TRUE_MEAN) / 2
n = 0
while posterior(prior_prec, n, discount) < target:
n += 1
return n
print("prior precision | belief after 5, 20, 100 observations | observations to move halfway")
for pp in (1, 5, 20, 50):
b = [posterior(pp, n) for n in (5, 20, 100)]
print(f"{pp:15d} | {b[0]:+5.2f} {b[1]:+5.2f} {b[2]:+5.2f} | {n_to_halfway(pp):4d}")
print("same prior (precision 5), but contradicting observations given one tenth of their weight:")
b = [posterior(5, n, 0.1) for n in (5, 20, 100)]
print(f"{5:15d} | {b[0]:+5.2f} {b[1]:+5.2f} {b[2]:+5.2f} | {n_to_halfway(5, 0.1):4d}")
# prior precision | belief after 5, 20, 100 observations | observations to move halfway
# 1 | +0.08 +0.38 +0.48 | 1
# 5 | -0.75 +0.00 +0.38 | 5
# 20 | -1.50 -0.75 +0.08 | 20
# 50 | -1.77 -1.29 -0.33 | 50
# same prior (precision 5), but contradicting observations given one tenth of their weight:
# 5 | -1.77 -1.29 -0.33 | 50Two results stand out. First, the number of observations needed to move the belief halfway between prior and truth equals the ratio of prior precision to the precision of one observation; a prior of precision 50 needs 50 contrary experiences to shift halfway. Second, the last line shows that if a person discounts experiences that contradict the expectation (giving them a tenth of their weight), a prior of precision 5 behaves exactly like a prior of precision 50. In this model, stubbornness can come from two different sources: a very certain prior, or a very low precision assigned to unexpected evidence. From outside they look the same, but they may need different remedies.
The self-fulfilling prophecy
In 1948 the sociologist Robert Merton described the “self-fulfilling prophecy”: a definition of a situation that is false at first evokes new behaviour, and the new behaviour makes the originally false definition come true (Merton 1948). His example was a sound bank that failed because of rumours of a run.
Evidence
At the interpersonal level, Snyder, Tanke and Berscheid had men talk by telephone with a woman after showing them a photograph supposedly of her, either attractive or unattractive. Men who believed their partner attractive behaved more warmly, and the women (who knew nothing of the photographs) in turn behaved in a more friendly and confident way; raters who heard only the women’s side of the conversation could tell the difference (Snyder et al. 1977). Such effects are called behavioural confirmation. On the other hand, a review of teacher-expectation (“Pygmalion”) effects finds that in natural classrooms expectations usually have only a modest effect on achievement, with small average effect sizes, and that some famous early results are disputed (Jussim and Harber 2005).
So self-fulfilling prophecies are real but not all-powerful: most of the time expectations have moderate effects. The program below writes behavioural confirmation as a feedback loop between two people and asks under what conditions it can sustain a false expectation for a long time.
Calculation
A two-person feedback model of behavioural confirmation. is how far the other person’s response depends on how they are treated; is how fast that person’s own disposition drifts toward the way they are treated.
# Behavioural confirmation (Snyder, Tanke & Berscheid 1977) as a two-person feedback loop.
# Perceiver expects warmth e; treats the target with warmth b = e; the target responds
# r = alpha*b + (1-alpha)*w, where w is the target's own disposition. The perceiver updates e
# toward r. Optionally the target's disposition drifts toward how they are treated (rate rho).
def run(alpha, rho, e0=-2.0, w0=1.0, eta=0.2, steps=200):
e, w = e0, w0
for _ in range(steps):
b = e
r = alpha * b + (1 - alpha) * w
e += eta * (r - e)
w += rho * (b - w)
return e, w
print("alpha rho | perceiver's expectation target's disposition after 200 meetings")
for alpha, rho in ((0.0, 0.0), (0.6, 0.0), (0.9, 0.0), (0.6, 0.02), (0.9, 0.02)):
e, w = run(alpha, rho)
print(f"{alpha:4.1f} {rho:5.2f} | {e:+5.2f} {w:+5.2f}")
# without drift (rho = 0) the expectation still converges to the truth, only more slowly
for alpha in (0.0, 0.6, 0.9):
e, n = -2.0, 0
while abs(e - 1.0) > 0.3:
e += 0.2 * ((alpha * e + (1 - alpha) * 1.0) - e); n += 1
print(f"alpha {alpha}: {n} meetings until the expectation is within 0.3 of the truth (rho = 0)")
# alpha rho | perceiver's expectation target's disposition after 200 meetings
# 0.0 0.00 | +1.00 +1.00
# 0.6 0.00 | +1.00 +1.00
# 0.9 0.00 | +0.95 +1.00
# 0.6 0.02 | +0.40 +0.40
# 0.9 0.02 | -0.50 -0.50
# alpha 0.0: 11 meetings until the expectation is within 0.3 of the truth (rho = 0)
# alpha 0.6: 28 meetings until the expectation is within 0.3 of the truth (rho = 0)
# alpha 0.9: 114 meetings until the expectation is within 0.3 of the truth (rho = 0)The result is more interesting than intuition suggests. As long as the other person’s disposition stays fixed (), the expectation eventually returns to the truth, even when nine-tenths of the response depends on treatment; it just takes much longer, 114 meetings instead of 11. Behavioural confirmation on its own only delays correction. For a false expectation to come true, a further condition is needed: the other person must actually change, as when a child who is always treated coldly gradually becomes withdrawn (). Then both settle at a compromise that lies closer to the original false expectation.
Note
This model is a simplified analogy: it compresses a person’s disposition into one number and a relationship into repeated linear updates. It shows a mechanism that is logically possible and the conditions it needs, but not what actually happens in any particular family or relationship.
Is evidence discounted?
Evidence
There are some relevant experiments. Sharot and colleagues found that people update their beliefs about future life events more when the news is better than expected than when it is worse, a good-news/bad-news asymmetry (Sharot et al. 2011); one study reported that people with depression lack this optimistic asymmetry (Korn et al. 2014). Others have argued that part of the asymmetry may be an artefact of the statistical method (Shah et al. 2016). Whether, and how much, people discount evidence that contradicts their expectations is therefore not settled.
Hypothesis · not established
Not established. In everyday decisions people give markedly less weight to evidence that contradicts a core expectation than to evidence that agrees with it, and the asymmetry is stronger for pessimistic than for optimistic expectations. The hypothesis predicts that in a task where participants first report how they expect others to respond and then receive genuine feedback that agrees or disagrees, the precision fitted by a Bayesian model to contrary evidence is lower than that fitted to agreeing evidence, and the gap correlates positively with how pessimistic the expectation is. If the two fitted precisions do not differ, or the gap is unrelated to pessimism, the hypothesis is refuted.
The question of this book
Putting the two strands together gives the starting point of this book. A person enters the world with a precise, pessimistic prior. If they only observed passively, evidence would eventually correct the prior, if slowly. But people are not passive observers. Their actions change the evidence they receive, and sometimes change the world itself. The next chapter turns to this: in the framework of active inference, how does action take part in making a prediction come true?
References
Fan, Y. (2026). The Sandbox, Determinism and Active Inference: Markov Blankets, Variational Free-Energy Minimisation, Exploration-Exploitation Trade-offs and East Asian Causality in Computational Neuroscience [沙盘、宿命与主动推理] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23738794 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).