量化会降低大模型复现训练数据的能力,但不足以作为隐私保护手段。
Bits and Memories: Measuring Verbatim Extraction Across LLM Quantization

- 直接测量模型在不同精度下的原文复现能力,而非依赖会员推断。
- 四比特量化下大模型仍能复现大部分记忆数据,仅损失少量性能。
- 量化并非有效隐私防护,应关注数据提取而非会员推断。
语言模型部署前几乎总是进行量化,现有研究多以会员推断评估量化对隐私的影响。但我们认为这并非公众真正担忧的隐私风险——即模型逐字复现训练数据。本文直接测量了从全精度到四比特量化下,三类规模模型在Pythia数据集上的原文复现能力,并同步记录困惑度(perplexity)变化。结果表明:量化是选择性遗忘者,原文记忆衰退速度远快于整体能力下降,且该现象在两种量化算法和两个评估语料中均成立。然而,这种选择性仍不足以为隐私提供保障:在最大模型上,四比特量化仍可复现绝大多数已知记忆序列,仅损失数个百分点的性能;且随着模型增大,幸存记忆比例上升。结论:压缩不应被视为清除记忆数据的手段,数据提取才是实际需关注的风险指标。所有代码、采样数据及配置结果均已开源。
原文摘要 · Abstract (English)
Language models are almost always quantized before they are deployed, and a growing line of work asks whether quantization also lowers their privacy risk. That work measures privacy almost entirely with membership inference. We think this is the wrong thing to measure for the risk that most people actually worry about, namely a model reproducing its training data word for word, and we measure that directly. Using the Pythia models and the public set of sequences each of them is known to have memorized, we track verbatim extraction across five precision levels, from full precision down to four bits, and across three model sizes, while measuring general capability (perplexity) at every point. We find two things. Quantization is a selective forgetter: verbatim memorization falls off faster than capability at every precision and every model size we tried, and this holds under two unrelated quantization algorithms and two evaluation corpora. But the selectivity is not enough to make quantization a privacy defense, which cuts against the optimistic reading of earlier membership-inference results. At the largest model we study, four-bit quantization still reproduces most of the memorized sequences while giving up only a few percent of capability, and the fraction of memorized data that survives quantization grows with model size. We conclude that compression should not be treated as a way to remove memorized training data, and that extraction, not membership inference, is the number practitioners should be watching. All code, sampled evaluation data, and per-configuration results are released.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。