关于「有界信任:从共识到分簇,以及「回音室」的证据」,《集群动力学与分布式共识》给出的定量结论是什么?
结论:有界信任模型中,意见只受相近意见的影响。黑格泽尔曼—克劳泽模型在人数很多时约在 \(\varepsilon \approx 0.2\) 处由分簇转为共识,人数少时阈值模糊,阈值附近收敛很慢,共识比例也不一定单调;德富昂模型的主要簇数约为 \(\lfloor 1/(2\varepsilon)\rfloor\),两端常留下离群者,\(\varepsilon \ge 0.5\) 时必定共识。模型中的「两极化」只是两个簇,不一定在两端;「回音室」是类比,现场实验并不支持「多接触对立观点就能减少极化」的简单推论。下一章把这些研究与古代关于「和」与「同」的论述并读。
数据口径:本书是教学与研究用的数学模型,不是管理咨询,也不构成任何政治主张。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序,全部核对)、原典与作者的假说;书中所有数据都是虚构或模拟的。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| eps | P(consensus) | mean clusters | mean major | 1/(2 eps) | median steps | max steps |
| 0.05 | 0.00 | 7.97 | 7.35 | 10.00 | 9 | 31 |
| 0.08 | 0.00 | 5.03 | 4.75 | 6.25 | 9 | 49 |
| 0.10 | 0.00 | 4.05 | 3.85 | 5.00 | 9 | 59 |
| 0.12 | 0.00 | 3.25 | 3.10 | 4.17 | 9 | 73 |
| 0.15 | 0.00 | 2.50 | 2.45 | 3.33 | 8 | 74 |
| 0.17 | 0.00 | 2.17 | 2.10 | 2.94 | 8 | 84 |
| 0.19 | 0.03 | 2.00 | 1.98 | 2.63 | 8 | 15 |
| 0.20 | 0.17 | 1.90 | 1.82 | 2.50 | 7 | 128 |
| 0.21 | 0.33 | 1.68 | 1.68 | 2.38 | 7 | 63 |
| 0.22 | 0.55 | 1.45 | 1.45 | 2.27 | 12 | 145 |
| 0.23 | 0.65 | 1.35 | 1.35 | 2.17 | 10 | 145 |
| 0.25 | 0.97 | 1.02 | 1.02 | 2.00 | 10 | 41 |
| 0.27 | 1.00 | 1.00 | 1.00 | 1.85 | 6 | 14 |
| 0.30 | 1.00 | 1.00 | 1.00 | 1.67 | 5 | 7 |
| P(consensus) by population size N (30 runs each; N = 5000: 10 runs) | ||||||
| N | eps=0.17 eps=0.19 eps=0.21 eps=0.23 eps=0.25 | |||||
| 50 | 0.00 | 0.07 | 0.03 | 0.13 | 0.57 | |
| 500 | 0.00 | 0.00 | 0.30 | 0.83 | 0.97 | |
| 5000 | 0.00 | 0.10 | 1.00 | 1.00 | 1.00 |
核心公式
\[x_i(t+1) = \frac{1}{|I_i(t)|}\sum_{j\in I_i(t)} x_j(t), \qquad I_i(t) = \{j : |x_j(t) - x_i(t)| \le \varepsilon\}.\]
查看完整验算程序
# Hegselmann-Krause (2002) bounded confidence: every agent moves at once to the mean of
# all opinions within eps of its own (itself included). N = 500 opinions drawn uniformly
# from [0, 1]; 40 runs per eps. On sorted opinions the eps-windows are found by two
# pointers and summed with prefix sums, so one step costs O(N). Stop when no opinion
# moves by more than 1e-10.
# Clusters: groups of final opinions closer than 1e-6; "major" = at least 5 % of agents.
import random, statistics
def hk(x, eps, max_steps=5000):
x = sorted(x); n = len(x)
for t in range(1, max_steps + 1):
pre = [0.0]
for v in x: pre.append(pre[-1] + v)
lo = hi = 0; new = []
for v in x:
while x[lo] < v - eps: lo += 1
while hi < n and x[hi] <= v + eps: hi += 1
new.append((pre[hi] - pre[lo]) / (hi - lo))
if max(abs(a - b) for a, b in zip(new, x)) < 1e-10:
return new, t
x = new # the update preserves the order of opinions
return x, max_steps
def clusters(x, tol=1e-6):
sizes = [1]
for a, b in zip(x, x[1:]):
if b - a > tol: sizes.append(1)
else: sizes[-1] += 1
return sizes
if __name__ == "__main__":
rng = random.Random(2002); N = 500
print(" eps P(consensus) mean clusters mean major 1/(2 eps) median steps"
" max steps")
for eps in (0.05, 0.08, 0.10, 0.12, 0.15, 0.17, 0.19, 0.20, 0.21, 0.22, 0.23, 0.25,
0.27, 0.30):
res = [hk([rng.random() for _ in range(N)], eps) for _ in range(40)]
cl = [clusters(x) for x, _ in res]; steps = [t for _, t in res]
cons = sum(len(c) == 1 for c in cl) / 40
major = statistics.mean(sum(s >= 0.05 * N for s in c) for c in cl)
mc, md = statistics.mean(map(len, cl)), statistics.median(steps)
print(f" {eps:.2f} {cons:4.2f} {mc:5.2f} {major:5.2f} "
f"{1 / (2 * eps):5.2f} {md:5.0f} {max(steps):5d}")
print("P(consensus) by population size N (30 runs each; N = 5000: 10 runs)")
print(" N " + "".join(f" eps={e:.2f}" for e in (0.17, 0.19, 0.21, 0.23, 0.25)))
for n in (50, 500, 5000):
runs = 10 if n == 5000 else 30
row = [sum(len(clusters(hk([rng.random() for _ in range(n)], e)[0])) == 1
for _ in range(runs)) / runs for e in (0.17, 0.19, 0.21, 0.23, 0.25)]
print(f" {n:5d} " + "".join(f" {v:4.2f} " for v in row))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《集群动力学、耦合振子同步与分布式共识的数学模型》第 6 章「有界信任:从共识到分簇,以及「回音室」的证据」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23828063
DOI: 10.5281/zenodo.23828063 · 阅读本章所在专著 · 5DL-B-044 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026044,
author = {Fan, Yafu},
title = {Collective Dynamics, Coupled-Oscillator Synchrony and Distributed Consensus},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23828063},
url = {https://doi.org/10.5281/zenodo.23828063}
}