关于「「匿名」不匿名:准标识符、差分攻击与明细重构」,《差分隐私与经营统计发布》给出的定量结论是什么?

结论:去掉名字不等于匿名:在一万人的邮编区里,按出生日期与性别唯一的居民约占 0.843,要到四万多人才降到一半;斯威尼与戈尔分别报告 87 % 与 63 % 左右的全国比例,方法不同,结论都是「大多数」。只发汇总也不等于安全:两个只差一人的均值相减,得到的正是新会员的 1680.00 元。小误差挡不住许多次提问:12 位会员、48 个带正负 1 误差的子集计数,对手仍能猜对 0.919。把总预算钉在 1 的拉普拉斯发布,才让对手退回到抛硬币的 0.511。下一章回答一个直接的问题:这个「预算」究竟是什么,ε 等于 1 到底意味着什么?

数据口径:书中参数为示意;全部计算由书中程序生成;本书是非个人化的法律与经营建议,差分隐私是数学保证,不替代法律合规,法规只述大意,以上架前人工复核为准。 第三章处理敏感度:营收按人截断,示意数据中均方根误差 6545 元,占营收 4.09 %;客群分布按并行组合只花一次预算。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.511, 0.919, 12, 48

n = 12 secret bits, m = 48 noisy subset counts
noise on each answerbits recovered
exact answers1.000
uniform +-10.919
uniform +-20.789
uniform +-40.636
Laplace eps 48 total0.925
Laplace eps 4.8 total0.614
Laplace eps 1 total0.511
查看完整验算程序
# Chapter 1. p13: reconstructing secret bits from many subset counts.
# Dinur-Nissim style: n = 12 members each hold one secret bit (bought a
# sensitive category or not). The shop answers m = 48 subset counts
# ("how many of these members bought it"), each with some noise. The
# attacker tries all 2**12 = 4096 candidate tables, keeps the one whose
# subset counts are closest in L1 to the answers. Reported: share of
# bits recovered, mean over 30 fixed-seed trials (0.5 = coin flipping).
# Laplace rows spread a total budget eps over the 48 answers (eps / 48
# each, basic composition). All data are illustrative.
import math
import random

N, M, TRIALS = 12, 48, 30
rng = random.Random(20261113)
POP = [bin(c).count("1") for c in range(1 << N)]


def laplace(r, b):
    u = r.random()
    while u == 0.0:
        u = r.random()
    if u < 0.5:
        return b * math.log(2.0 * u)
    return -b * math.log(2.0 * (1.0 - u))


def attack(noise):
    shares = []
    for _ in range(TRIALS):
        secret = rng.randrange(1 << N)
        masks = [rng.randrange(1, 1 << N) for _ in range(M)]
        answers = [POP[secret & q] + noise() for q in masks]
        best, best_d = 0, None
        for cand in range(1 << N):
            d = math.fsum(abs(POP[cand & q] - a)
                          for q, a in zip(masks, answers))
            if best_d is None or d < best_d:
                best, best_d = cand, d
        shares.append((N - POP[best ^ secret]) / N)
    return math.fsum(shares) / len(shares)


rows = [("exact answers", lambda: 0),
        ("uniform +-1", lambda: rng.randint(-1, 1)),
        ("uniform +-2", lambda: rng.randint(-2, 2)),
        ("uniform +-4", lambda: rng.randint(-4, 4)),
        ("Laplace eps 48 total", lambda: laplace(rng, 1.0)),
        ("Laplace eps 4.8 total", lambda: laplace(rng, 10.0)),
        ("Laplace eps 1 total", lambda: laplace(rng, 48.0))]
print("n = %d secret bits, m = %d noisy subset counts" % (N, M))
print("%-24s %16s" % ("noise on each answer", "bits recovered"))
for name, fn in rows:
    print("%-24s %16.3f" % (name, attack(fn)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《差分隐私拉普拉斯机制与隐私预算会计、公开经营统计而不泄露个人的发布母典》第 1 章「「匿名」不匿名:准标识符、差分攻击与明细重构」(版本 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}
}

本书其他章节结论