5D Library › 算法之镜 · English
第三章 阿什比必要多样性定律
唯有多样性才能消灭多样性
精神科医生、控制论学者 W. 罗斯·阿什比(W. Ross Ashby)在《控制论导论》(1956)中提出了他所说的必要多样性定律。一个调节器必须在外来扰动下把系统的结果保持在可接受的范围内。阿什比证明,结果的多样性不可能低于扰动的多样性减去调节器反应的多样性:「唯有多样性才能消灭多样性」(Ashby 1956)。用信息论的语言表述:
其中 是扰动, 是调节器的反应, 是结果。可区分的反应少于可区分的扰动的调节器,无法把结果固定住。
证据
科南特(Conant)和阿什比后来证明了一个相关定理:一个系统的每一个好的调节器,都必须是该系统的一个模型,即最简单的最优调节器把系统的状态映射到它自己的状态上 (Conant and Ashby 1970)。
推导
一个有 64 个等可能取值的扰动,以及拥有 1 到 64 种可能反应的调节器。程序为每种情况找出最好的调节器,并把结果的熵与阿什比的界限比较。
import math
from collections import Counter
# Ashby's law of requisite variety, in its simplest form.
# Disturbances D take n_d equally likely values; the regulator R chooses one of n_r responses
# after seeing D; the outcome is E = (D − R) mod n_d. The goal is to keep E at 0.
def best_outcome_entropy(n_d, n_r):
# the best regulator maps each disturbance to the response that cancels it as far as possible
outcomes = Counter()
for d in range(n_d):
r = d % n_r # the response that brings E closest to 0
outcomes[(d - r) % n_d] += 1
return -sum(c / n_d * math.log2(c / n_d) for c in outcomes.values())
n_d = 64
print(f"disturbance variety: {n_d} states = {math.log2(n_d):.0f} bits")
for n_r in (1, 4, 8, 16, 32, 64):
he = abs(best_outcome_entropy(n_d, n_r))
bound = max(0.0, math.log2(n_d) - math.log2(n_r))
print(f"regulator with {n_r:2d} responses ({math.log2(n_r):.0f} bits): "
f"best H(E) = {he:.0f} bits, Ashby's bound H(D) − H(R) = {bound:.0f} bits")
# disturbance variety: 64 states = 6 bits
# regulator with 1 responses (0 bits): best H(E) = 6 bits, Ashby's bound H(D) − H(R) = 6 bits
# regulator with 4 responses (2 bits): best H(E) = 4 bits, Ashby's bound H(D) − H(R) = 4 bits
# regulator with 8 responses (3 bits): best H(E) = 3 bits, Ashby's bound H(D) − H(R) = 3 bits
# regulator with 16 responses (4 bits): best H(E) = 2 bits, Ashby's bound H(D) − H(R) = 2 bits
# regulator with 32 responses (5 bits): best H(E) = 1 bits, Ashby's bound H(D) − H(R) = 1 bits
# regulator with 64 responses (6 bits): best H(E) = 0 bits, Ashby's bound H(D) − H(R) = 0 bits调节器少一比特多样性,结果中就多出一比特多样性。
使用者作为调节器
把这条定律用于一个使用语言模型的人,需要想清楚谁扮演什么角色。模型是候选答案的生成器,许多答案正确,有些错误。使用者的任务,是把自己接受、发表或据以行动的东西保持在范围内:让正确的答案通过,挡住错误的答案。对这个任务来说,「扰动」是答案可能出错的各种方式,使用者的「反应」是他能作出的区分:哪些说法他能识别为错误,哪些计算他能核对,哪些来源他能找到。
推导
一个核实模型:生成器在二十个领域中产生说法,其中 15% 是错的。使用者只有在自己熟悉的领域里才能可靠地发现错误;独立的来源核查能在其他领域发现一部分错误。
import random
# A model of verification. A generator produces 10,000 claims across 20 fields;
# 15 % are wrong. The operator catches a wrong claim only in fields they can check,
# with probability 0.9 there; a source check (looking each claim up) adds a chance
# to catch errors in other fields.
random.seed(2)
claims = [(random.randrange(20), random.random() < 0.15) for _ in range(10000)]
def accepted_error_rate(known_fields, lookup=0.0):
accepted, wrong = 0, 0
for field, is_wrong in claims:
caught = is_wrong and ((field < known_fields and random.random() < 0.9)
or random.random() < lookup)
if not caught:
accepted += 1
wrong += is_wrong
return wrong / accepted
for k in (1, 5, 10, 20):
print(f"operator can check {k:2d} of 20 fields: errors among accepted claims "
f"{accepted_error_rate(k):5.1%} | with independent source checks (50 %) "
f"{accepted_error_rate(k, 0.5):5.1%}")
# operator can check 1 of 20 fields: errors among accepted claims 14.5% | with independent source checks (50 %) 7.7%
# operator can check 5 of 20 fields: errors among accepted claims 12.0% | with independent source checks (50 %) 6.2%
# operator can check 10 of 20 fields: errors among accepted claims 8.8% | with independent source checks (50 %) 4.6%
# operator can check 20 of 20 fields: errors among accepted claims 1.8% | with independent source checks (50 %) 0.8%只能核对二十个领域中一个的使用者,接受的错误率几乎就是生成器的错误率;能核对全部二十个领域的使用者,接受的错误很少。独立的来源核查,例如查证说法、运行代码、请教专家,在每个水平上都把错误大约减半。工具是调节器的一部分:重要的是整个核查系统的多样性,而不只是个人记忆的多样性。
注
阿什比定律是关于调节的定理,核实模型是建立在它之上的类比,而不是它的推论。这个模型也做了简化:错误并不是均匀分布在各领域的,熟悉一个领域的使用者仍可能漏掉细微的错误。经过这些简化仍然成立的结论是:未经核实的输出,继承了生成器的错误率。
假说 · 尚未验证
尚未确立。 一个人能从语言模型中可靠提取的知识的质量,主要受限于他连同他的工具能核查说法的领域范围,而不是模型的能力。该假说预测:在用同一个模型完成同一项多领域研究任务时,最终被接受的输出中的错误率,随使用者在相关领域中已证明的能力数量增加而下降,并在要求独立核查时进一步下降。如果在一项同时测量两者的研究中,在模型和任务固定的情况下,错误率与使用者的核查范围无关,假说就被推翻。
参考文献
Fan, Y. (2026). The Algorithmic Mirror: Self-Attention Geometry, Ashby's Requisite Variety and Cognitive Projection in Information Theory and East Asian Philosophy of Mind [算法之镜] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23723557 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).