关于「收费站公开统计加噪发布规程与证伪方案」,《差分隐私与经营统计发布》给出的定量结论是什么?
结论:第八章给出收费站公开统计的七步加噪发布规程、蒸馏小工具「隐私预算会计器」、审计方法(100 次试验即可以 0.869 的把握查出噪声尺度减半的实现)与预注册证伪方案。书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。
数据口径:书中参数为示意;全部计算由书中程序生成;本书是非个人化的法律与经营建议,差分隐私是数学保证,不替代法律合规,法规只述大意,以上架前人工复核为准。 第三章处理敏感度:营收按人截断,示意数据中均方根误差 6545 元,占营收 4.09 %;客群分布按并行组合只花一次预算。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.869, 100
| audit of a claimed eps = 1.0 count mechanism | ||||
| real eps | trials M | thresh t | power | alarm if ok |
| 4.0 | 100 | 40.20 | 0.891 | 0.000 |
| 3.0 | 100 | 40.30 | 0.916 | 0.000 |
| 2.0 | 100 | 40.60 | 0.869 | 0.006 |
| 1.5 | 268 | 40.85 | 0.870 | 0.022 |
| 1.2 | 1609 | 40.90 | 0.850 | 0.013 |
查看完整验算程序
# Chapter 8. p82: how many trials an audit needs to catch a weak eps.
# The release code claims eps = 1 for a count. A bug (say, noise scale
# divided by 2) makes the real eps larger. The audit runs the mechanism
# M times on a neighbour pair (true counts 40 and 41), thresholds at t,
# and computes a one-sided lower bound
# eps_lo = ln((TPR - z s1) / (FPR + z s0)), s = sqrt(P (1 - P) / M).
# The bug is caught when eps_lo > 1. Planning uses the expected rates
# with z = 1.645 + 0.842 (5% one-sided, 80% power); a fixed-seed run of
# 2000 audits checks power and the false-alarm rate at the planned M
# (M starts at 100 so that normal approximations are reasonable).
import math
import random
CLAIM = 1.0
Z_PLAN, Z_TEST = 1.645 + 0.842, 1.645
def tail(t, mu, b):
z = (t - mu) / b
return 0.5 * math.exp(-z) if z >= 0 else 1.0 - 0.5 * math.exp(z)
def eps_lo(tpr, fpr, m, z):
lo = tpr - z * math.sqrt(tpr * (1 - tpr) / m)
hi = fpr + z * math.sqrt(fpr * (1 - fpr) / m)
return math.log(lo / hi) if lo > 0 and hi < 1 else 0.0
def plan(eps_true):
b = 1.0 / eps_true
grid = [40.0 + k / 20.0 for k in range(0, 61)]
m = 100
while m < 10 ** 7:
for t in grid:
if eps_lo(tail(t, 41, b), tail(t, 40, b), m, Z_PLAN) > CLAIM:
return m, t
m = int(m * 1.05) + 1
return None, None
rng = random.Random(20261113)
def run_audits(eps_true, m, t, reps=2000):
b = 1.0 / eps_true
p1, p0 = tail(t, 41, b), tail(t, 40, b)
caught = 0
for _ in range(reps):
k1 = rng.gauss(m * p1, math.sqrt(m * p1 * (1 - p1)))
k0 = rng.gauss(m * p0, math.sqrt(m * p0 * (1 - p0)))
tpr = min(max(k1 / m, 1e-9), 1 - 1e-9)
fpr = min(max(k0 / m, 1e-9), 1 - 1e-9)
if eps_lo(tpr, fpr, m, Z_TEST) > CLAIM:
caught += 1
return caught / reps
print("audit of a claimed eps = %.1f count mechanism" % CLAIM)
print("%9s %10s %9s %10s %12s" % (
"real eps", "trials M", "thresh t", "power", "alarm if ok"))
for eps_true in (4.0, 3.0, 2.0, 1.5, 1.2):
m, t = plan(eps_true)
print("%9.1f %10d %9.2f %10.3f %12.3f" % (
eps_true, m, t, run_audits(eps_true, m, t),
run_audits(CLAIM, m, t)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《差分隐私拉普拉斯机制与隐私预算会计、公开经营统计而不泄露个人的发布母典》第 8 章「收费站公开统计加噪发布规程与证伪方案」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-296 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026296,
author = {Fan, Yafu},
title = {Differential Privacy, the Laplace Mechanism and Privacy-Budget Accounting: Publishing Business Statistics without Exposing Any Individual},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}