让大模型生成私密文本更安全高效,计算成本降低8倍以上。
InvisibleInk: High-Utility and Low-Cost Text Generation with Differential Privacy
- 仅对敏感词元进行隐私保护,降低隐私开销。
- 生成长文本时计算成本仅为非私密生成的4-8倍。
- 适合需要高隐私保障的文本生成场景,如医疗、金融。
随着基于大语言模型的长文本生成技术发展,检索增强生成(RAG)和推理时扩展等范式日益成熟,但如何安全地融入私密信息仍是关键挑战。本文提出InvisibleInk,一种满足严格差分隐私保证的可扩展长文本生成框架。该框架将LLM的下一个词采样视为在模型logits上的指数机制,并引入两项创新:首先,仅对敏感信息相关的logits进行隔离与裁剪;其次,从一个包含前k个私有词元的小超集无隐私成本采样。实验证明,在相同隐私水平下,InvisibleInk相比现有最优基线实现至少8倍的计算成本降低。首次实现了高质量私密长文本生成,其计算成本仅为非私密生成的4-8倍,具备实际应用潜力。代码已开源,可通过pip安装使用。
原文摘要 · Abstract (English)
As major progress in LLM-based long-form text generation enables paradigms such as retrieval-augmented generation (RAG) and inference-time scaling, safely incorporating private information into the generation remains a critical open question. We present InvisibleInk, a highly scalable long-form text generation framework satisfying rigorous differential privacy guarantees with respect to the sensitive reference texts. It interprets sampling from the LLM's next-token-distribution as the exponential mechanism over the LLM logits with two innovations. First, we reduce the privacy cost by isolating and clipping only the sensitive information in the model logits (relative to the public logits). Second, we improve text quality by sampling without any privacy cost from a small superset of the top-$k$ private tokens. Empirical evaluations demonstrate a consistent $8\times$ (or more) reduction in computation cost over state-of-the-art baselines to generate long-form private text of the same utility across privacy levels. InvisibleInk is able to generate, for the first time, high-quality private long-form text at less than $4$-$8\times$ times the computation cost of non-private generation, paving the way for its practical use. We open-source a pip-installable Python package (invink) for InvisibleInk at https://github.com/cerai-iitm/invisibleink.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。