概述
这被称为记忆。这对版权很重要,因为受保护作品的近似复制品可能会从模型中输出;这对于隐私也很重要,因为真实人物的照片或医学扫描图可能会被吐出来。
深入探讨
A diffusion model learns to reverse a noising process: during training it sees images with noise added and learns to predict and remove that noise. If it generalizes well, it learns the statistics of images in general and produces new combinations. But neural networks can also fit individual examples, and when one image appears hundreds or thousands of times in the data, the cheapest way to reduce training loss on it is to store it. The key evidence comes from Carlini and colleagues' 2023 paper 'Extracting Training Data from Diffusion Models'. They generated many images for captions of the most duplicated training images and flagged outputs that were extremely close to a training image. They extracted over a hundred near-identical copies from Stable Diffusion, including photos of identifiable people, and found higher memorization rates in Google's Imagen. Separately, Somepalli and colleagues (2022-2023) showed that Stable Diffusion outputs frequently copied parts or layouts of training images, and linked copying to duplicated images and highly specific captions. Three misconceptions are worth correcting. First, memorization is not the model's normal behavior: extracted copies are rare relative to all generations. Second, rare does not mean harmless, because a determined user can target the images most likely to be memorized. Third, memorization is not only exact pixel copying; models can reproduce characters, logos, watermarks and distinctive compositions. This evidence has featured in legal debates, including lawsuits such as Getty Images v. Stability AI and Andersen v. Stability AI, although how courts treat model training and outputs is still being worked out and varies by country. For privacy, the concern is sharper in small fine-tuning datasets, such as medical or personal photos, where each example has more influence.
现实世界的实施
研究人员向模型输入高度重复训练图像的确切标题,得到的输出与原始照片几乎像素级相同。
一位设计师要求使用某幅名画的风格,结果收到的图像复制了一件特定艺术品的构图和细节,而不是一件新作品。
在网络图像上训练的图像生成器偶尔会呈现图库机构水印的变形版本,这表明它吸收了来自重复源图像的模式。
医院团队在使用一小组合适的患者扫描图微调扩散模型时,会在允许任何共享之前测试该模型是否能够输出真实扫描图的近似复制品。
扩散模型中记忆的未来
去重和输出相似性检查正在成为负责任的开发人员的标准做法,并且关于在推理时检测记忆提示的研究仍在继续。差分隐私可能会变得适用于医学影像等敏感领域,尽管质量权衡依然存在。法律前景尚不明朗:不同国家的法院正在审议训练和输出是否侵犯版权,结果可能会有所不同。开发人员可能会面临更大的压力,需要记录训练数据来源,并展示他们如何测试和限制吐出内容。
付诸实践
为什么这很重要
- 成本与预算. 多年来,架构决策决定着性能和运营成本。
- 更清晰的判决. 技术教育帮助团队选择正确的堆栈,而不仅仅是最新的堆栈。
- 质量控制. 更好的工程选择可以减少生产中的可靠性事故。
留意
- 优化一项基准测试可以隐藏更广泛的系统弱点。
- 基础设施和维护成本常常被低估。
- 随着系统变得更加复杂,安全性和可观察性差距可能会扩大。
后续步骤
- 在实施之前定义延迟、质量和成本目标。
- 在实际负载和数据条件下进行基准测试。
- 仪器监控错误、漂移和用户影响。
- 在扩展之前准备回滚和事件响应路径。
不断探索
常见问题
什么是扩散模型中的记忆?
扩散图像模型通常会生成新图像,但研究表明,它们有时几乎可以完全重现特定的训练图像,尤其是那些在训练数据中出现过多次的图像。这被称为记忆。这对版权很重要,因为受保护作品的近似复制品可能会从模型中输出;这对于隐私也很重要,因为真实人物的照片或医学扫描图可能会被吐出来。
扩散模型中的记忆是什么?
记忆意味着输出是特定训练图像的近似副本,而不是新图像。
为什么重复的数据可以增加记忆力?
重复曝光同一张图像使得拟合精确的示例成为降低损失的有效方法。
Carlini 及其同事的 2023 年论文证明了什么?
他们从 Stable Diffusion 中提取了一百多个近似副本,其中包括可识别人物的照片,并发现 Imagen 中的比率更高。
提取攻击如何识别可能记忆的图像?
无论种子如何,记忆的图像都会一致地出现,因此近乎相同的输出的紧密簇会标记候选图像。
哪种关于记忆的说法是正确的?
相对于所有输出,提取的副本很少见,但攻击者可以专注于最有可能被记住的图像。