关于「实战:四个窗口并发写一本九章书,五类注入错误与四道闸门的检出账」,《多窗口写书防漂移》给出的定量结论是什么?
结论:第八章让四个窗口并发写一本九章合成书,注入五类共 119 个错误:四道闸门拦住 0.723,漏网的 33 个里有 28 个属于机器在结构上看不见的手法,扣除后检出率为 0.945;干净书上术语检测首轮误报 1672 处,人审 48 个词后归零;一份严肃的注入审计每类至少要 75 个错误。书中以标注框区分已发表的证据、可运行的计算、原典与作者的假说,每条假说都写明什么结果会推翻它。
数据口径:书中未标出处的错误率都是假设参数或合成数据上的测量值;本书不是法律意见,也不推荐任何写作工具或模型。 第八章让四个窗口并发写一本九章合成书,注入五类共 119 个错误:四道闸门拦住 0.723,漏网的 33 个里有 28 个属于机器在结构上看不见的手法,扣除后检出率为 0.945;干净书上术语检测首轮误报 1672 处,人审 48 个词后归零;一份严肃的注入审计每类至少要 75 个错误。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.723, 0.945, 119, 28, 48, 75
| class caught n recall | 95% exact interval |
| term drift | 18 24 0.750 [0.533, 0.902] |
| number mismatch | 18 24 0.750 [0.533, 0.902] |
| duplicate sentence | 12 24 0.500 [0.291, 0.709] |
| citation hallucination | 16 20 0.800 [0.563, 0.943] |
| style degradation | 22 27 0.815 [0.619, 0.937] |
| all classes | 86 119 0.723 [0.633, 0.801] |
| excluding the 28 injections no machine gate is built to see | 86 / 91 = 0.945 [0.876, 0.982] |
| pre-registration: true recall 0.95, pass line: exact lower bound > | 0.85 |
| n | 24: need >= 24 caught, probability of passing 0.292 |
| n | 50: need >= 48 caught, probability of passing 0.541 |
| n | 75: need >= 70 caught, probability of passing 0.828 |
| smallest n per class with probability > | 0.80: 75 |
查看完整验算程序
# Chapter 8. p81: exact (Clopper-Pearson) 95% intervals for the recalls p80 measured, and how many
# injected errors per class a pre-registered audit needs.
# Counts are copied from the output of p80 (caught by any gate / injected). The interval [lo, hi]
# solves P(X >= x | n, lo) = 0.025 and P(X <= x | n, hi) = 0.025, found by bisection.
# Sample size: the smallest n per class such that, if the true recall is 0.95, the exact 95% lower
# bound clears 0.85 with probability at least 0.80 (the audit's pass line is fixed before any run).
import math
COUNTS = [("term drift", 18, 24), ("number mismatch", 18, 24), ("duplicate sentence", 12, 24),
("citation hallucination", 16, 20), ("style degradation", 22, 27), ("all classes", 86, 119)]
BY_DESIGN = 6 + 6 + 6 + 6 + 4 # unrecorded synonym, wrong row, paraphrase, short stock, wrong claim
def tail_ge(x, n, p):
return math.fsum(math.comb(n, k) * p ** k * (1 - p) ** (n - k) for k in range(x, n + 1))
def tail_le(x, n, p):
return math.fsum(math.comb(n, k) * p ** k * (1 - p) ** (n - k) for k in range(0, x + 1))
def bisect(f, lo=0.0, hi=1.0):
for _ in range(60):
mid = (lo + hi) / 2
if f(mid):
hi = mid
else:
lo = mid
return (lo + hi) / 2
def cp(x, n, a=0.05):
lo = 0.0 if x == 0 else bisect(lambda p: tail_ge(x, n, p) >= a / 2)
hi = 1.0 if x == n else bisect(lambda p: tail_le(x, n, p) < a / 2)
return lo, hi
def power(n, true_r=0.95, line=0.85):
xs = [x for x in range(n + 1) if cp(x, n)[0] >= line]
if not xs:
return 0.0, None
return tail_ge(min(xs), n, true_r), min(xs)
if __name__ == "__main__":
print("class caught n recall 95% exact interval")
for name, x, n in COUNTS:
lo, hi = cp(x, n)
print("{:24s} {:6d} {:4d} {:.3f} [{:.3f}, {:.3f}]".format(name, x, n, x / n, lo, hi))
x, n = 86, 119 - BY_DESIGN
lo, hi = cp(x, n)
print("excluding the {} injections no machine gate is built to see: {} / {} = {:.3f} [{:.3f}, {:.3f}]"
.format(BY_DESIGN, x, n, x / n, lo, hi))
print("pre-registration: true recall 0.95, pass line: exact lower bound >= 0.85")
found = None
for n in range(20, 400):
pw, xmin = power(n)
if n in (24, 50, 100) or (found is None and pw >= 0.80):
print(" n = {:3d}: need >= {} caught, probability of passing {:.3f}".format(n, xmin, pw))
if found is None and pw >= 0.80:
found = n
break
print(" smallest n per class with probability >= 0.80: {}".format(found))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多窗口并行写书防漂移控制、术语跨卷一致性图审计与零幻觉文献核验器》第 8 章「实战:四个窗口并发写一本九章书,五类注入错误与四道闸门的检出账」(版本 0.1.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-152 · v0.1.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026152,
author = {Fan, Yafu},
title = {Drift Control for Parallel Multi-Window Book Writing, Cross-Volume Terminology Graph Audits and Zero-Hallucination Citation Verifiers},
year = {2026},
publisher = {5D Library},
edition = {0.1.0},
note = {DOI pending}
}