5D Library › 沙盘、宿命与主动推理 · English

第一章 贝叶斯脑与自我实现的预言

不是照相机

旧的知觉理论把大脑想象成一台照相机:光线进来,图像形成,然后才有理解。过去三十年里,一种不同的看法逐渐占据重要位置。按照这种看法,大脑不断地对即将到来的感官输入作出预测,真正向上传递的主要是预测与输入之间的差异,即预测误差;知觉是大脑对「外面是什么」的最佳猜测,这个猜测同时由过去的经验和当前的输入决定。

证据

弗里斯顿(Karl Friston)把这一类思想概括为自由能原理:能够维持自身存在的系统,其行为可以描述为在最小化一个称为变分自由能的量,而变分自由能是感官「惊奇」(surprise)的上界 (Friston 2010)。克拉克(Andy Clark)的综述把它称为预测加工,并讨论了它对知觉、注意与行动的统一解释,也列出了它面临的批评,例如理论是否过于宽泛、难以证伪 (Clark 2013)。较系统的教科书式表述见 Parr、Pezzulo 与 Friston 的《主动推理》(Parr et al. 2022)。

这里有一点需要先说清楚。自由能原理是一个数学框架,不是一条单一的实验定律。它说的是:如果一个系统要在变化的环境中维持自己的结构,它的内部状态和行为就可以被描述为在做近似的贝叶斯推断。至于大脑的哪些回路以什么方式实现这种推断,还是活跃的研究问题。本书使用这一框架,是因为它给「信念怎样影响行动、行动又怎样反过来影响信念」提供了一套精确的语言,而不是因为它已经被证明是对心智的唯一正确描述。

先验、证据与精度

贝叶斯推断的基本运算是把先验与证据合成为后验。在最简单的情形下,信念和观察都用正态分布表示,各自有一个精度(方差的倒数,表示有多确定)。后验均值是两者的精度加权平均:

μ后=π先μ先+nπ观x‾π先+nπ观.\mu_{\text{后}} = \frac{\pi_{\text{先}}\,\mu_{\text{先}} + n\,\pi_{\text{观}}\,\bar{x}}{\pi_{\text{先}} + n\,\pi_{\text{观}}}.

先验精度越高,同样多的证据能使信念移动的距离就越小。下面的程序设想一个人对「别人会怎样回应我」持有一个悲观的先验(−2-2,在 −3-3 敌意到 +3+3 温暖的量表上),而环境实际给出的平均回应是 +0.5+0.5。

推导

不同先验精度下,信念随观察次数的变化。

# 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                     |   50

两个结果值得注意。第一,信念移动到先验与真相中点所需的观察次数,恰好等于先验精度与单次观察精度之比;一个精度为 50 的先验,需要 50 次相反的经验才能动摇一半。第二,最后一行显示,如果一个人给与预期相反的经验打折扣(只赋予十分之一的权重),精度为 5 的先验就表现得和精度为 50 的先验一模一样。在这个模型里,「固执」可以来自两个不同的来源:先验本身很确定,或者对不合预期的证据赋予了很低的精度。从外面看两者没有区别,但改变它们的办法可能不同。

左:精度为 5 的悲观先验、5 次观察的证据与后验。右:不同先验精度下,后验均值随观察次数接近真实值(虚线)的速度。

自我实现的预言

社会学家默顿(Robert Merton)在 1948 年提出「自我实现的预言」:一个起初错误的情境定义,引发新的行为,而新的行为使原本错误的定义成真 (Merton 1948)。他举的例子是一家本来健康的银行,因为挤兑的传言而真的倒闭。

证据

在人际层面,斯奈德、坦克与贝尔沙伊德的实验让男性受试者与一位女性通电话,事先给他们看一张据称是对方的照片,照片或者有吸引力,或者没有。认为对方有吸引力的男性在通话中表现得更热情,而女性一方(并不知道照片的事)也随之表现得更友好、更自信;评分者只听女性一方的录音就能分辨出这种差异 (Snyder et al. 1977)。这类现象被称为行为确认。另一方面,关于教师期望效应(「皮格马利翁效应」)的综述指出,在自然课堂中期望对学生成绩的影响通常不大,平均效应量较小,而且早期的一些著名结果存在争议 (Jussim and Harber 2005)。

所以,自我实现的预言确实存在,但不是万能的:多数时候预期的影响是温和的。下面的程序把行为确认写成两个人之间的反馈回路,看看它在什么条件下能长期维持一个错误的预期。

推导

行为确认的双人反馈模型。α\alpha 是对方的回应受到被对待方式影响的程度;ρ\rho 是对方的「本性」本身随被对待方式而漂移的速度。

# 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)

结果比直觉更有意思。只要对方的本性不变(ρ=0\rho = 0),哪怕对方的回应九成取决于被对待的方式,期望最终仍会回到真相,只是慢得多:从 11 次相处延长到 114 次。行为确认本身只会延缓纠错。要让一个错误的预期真正「成真」,需要另一个条件:对方本身被改变了,例如一个总被冷淡对待的孩子渐渐真的变得退缩(ρ>0\rho > 0)。这时两人最终在一个折中的位置稳定下来,而这个位置离最初的错误预期更近。

注

这个模型是简化的类比:它把一个人的「本性」压缩成一个数,把相处压缩成一次次线性更新。它说明了一种逻辑上可能的机制,以及这种机制需要满足的条件,但不能说明在任何具体的家庭或关系中实际发生了什么。

证据会被打折扣吗

证据

相关的实验已有一些。沙罗特等人发现,人们在得知关于未来的消息比预想的好时,信念更新幅度大于消息比预想的坏时,即「好消息/坏消息」的更新不对称 (Sharot et al. 2011);有研究报告抑郁症患者没有这种乐观的不对称 (Korn et al. 2014)。但也有研究指出,这种不对称有一部分可能是统计方法造成的假象 (Shah et al. 2016)。所以,「人会给不合预期的证据打折扣」在方向和大小上都还没有定论。

假说 · 尚未验证

尚未确立。 在日常决策中,人对与自己核心预期相反的证据所赋予的权重,明显低于对相符证据所赋予的权重,而且这种不对称在悲观预期上比在乐观预期上更强。该假说预测:在一个先让受试者报告对他人回应的预期、再给出与预期相符或相反的真实反馈的任务中,用贝叶斯模型拟合得到的「相反证据精度」低于「相符证据精度」,且这一差距与预期的悲观程度正相关。如果两种证据的拟合精度没有差别,或者差距与悲观程度无关,假说就被推翻。

本书的问题

把这两段合起来,就得到本书的出发点。一个人带着精度很高的悲观先验进入世界;如果他只是被动地观察,证据最终会修正先验,只是很慢。但人不是被动的观察者。他的行动会改变他得到的证据,有时甚至改变世界本身。下一章转向这个问题:在主动推理的框架里,行动怎样参与「让预测成真」。

参考文献

Clark, Andy. 2013. “Whatever Next? Predictive Brains, Situated Agents, and the Future of Cognitive Science.” Behavioral and Brain Sciences 36 (3): 181–204.
Friston, Karl. 2010. “The Free-Energy Principle: A Unified Brain Theory?” Nature Reviews Neuroscience 11 (2): 127–38.
Jussim, Lee, and Kent D. Harber. 2005. “Teacher Expectations and Self-Fulfilling Prophecies: Knowns and Unknowns, Resolved and Unresolved Controversies.” Personality and Social Psychology Review 9 (2): 131–55.
Korn, Christoph W., Tali Sharot, Henrik Walter, Hauke R. Heekeren, and Raymond J. Dolan. 2014. “Depression Is Related to an Absence of Optimistically Biased Belief Updating about Future Life Events.” Psychological Medicine 44 (3): 579–92.
Merton, Robert K. 1948. “The Self-Fulfilling Prophecy.” The Antioch Review 8 (2): 193–210.
Parr, Thomas, Giovanni Pezzulo, and Karl J. Friston. 2022. Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press.
Shah, Punit, Adam J. L. Harris, Geoffrey Bird, Caroline Catmur, and Ulrike Hahn. 2016. “A Pessimistic View of Optimistic Belief Updating.” Cognitive Psychology 90: 71–127.
Sharot, Tali, Christoph W. Korn, and Raymond J. Dolan. 2011. “How Unrealistic Optimism Is Maintained in the Face of Reality.” Nature Neuroscience 14 (11): 1475–79.
Snyder, Mark, Elizabeth Decker Tanke, and Ellen Berscheid. 1977. “Social Perception and Interpersonal Behavior: On the Self-Fulfilling Nature of Social Stereotypes.” Journal of Personality and Social Psychology 35 (9): 656–66.

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).