Pandora's White-Box: Precise Training Data Detection and Extraction in Large Language Models

📄 arXiv: 2402.17012v4 📥 PDF

作者: Jeffrey G. Wang, Jason Wang, Marvin Li, Seth Neel

分类: cs.CR, cs.AI, cs.LG

发布日期: 2024-02-26 (更新: 2024-07-15)

备注: Found software bug in experiments, withdrawing in order to address and update results


💡 一句话要点

提出新型成员推断攻击以提取大语言模型训练数据

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 隐私攻击 成员推断 训练数据提取 模型安全 深度学习

📋 核心要点

  1. 现有方法在大语言模型的隐私保护方面存在显著不足,尤其是对训练数据的成员推断能力较弱。
  2. 论文提出了两种新型成员推断攻击,利用模型梯度和logit信息,显著提升了对训练数据的推断能力。
  3. 实验结果表明,新的攻击方法在微调模型上能够提取超过50%的训练数据,且性能远超传统基线。

📝 摘要(中文)

本文开发了针对大语言模型(LLMs)的先进隐私攻击,研究者通过对模型的部分访问,试图获取关于基础训练数据的信息。我们提出了新的成员推断攻击(MIAs),其性能比基线攻击提高了数百倍,并展示了在自然环境中从微调后的LLM中提取超过50%的微调数据集的管道。我们考虑了对基础模型、预训练和微调数据的不同访问程度,以及MIAs和训练数据提取。针对预训练数据,我们提出了两种新的MIAs:一种基于(降维)模型梯度的监督神经网络分类器,另一种则利用最近的模型窃取工作,仅需对模型的logit访问。我们的研究首次将模型窃取信息明确纳入MIA中,且两种攻击均优于现有的黑箱基线。

🔬 方法详解

问题定义:本文旨在解决大语言模型中的训练数据隐私问题,现有方法在成员推断攻击(MIA)方面效果不佳,无法有效提取训练数据。

核心思路:论文提出的核心思路是结合模型梯度和logit信息,通过监督学习和模型窃取技术,提升对训练数据的推断能力。

技术框架:整体架构包括两个主要模块:一是基于模型梯度的监督分类器,二是基于logit的攻击方法,二者结合实现对训练数据的高效提取。

关键创新:最重要的技术创新在于首次将模型窃取信息纳入MIA中,显著提高了攻击的成功率,与现有方法相比,具有本质的性能提升。

关键设计:在设计中,采用了降维技术处理模型梯度,损失函数选择了适合监督学习的形式,网络结构则基于现有的深度学习框架进行优化。具体参数设置和网络结构细节在实验部分有详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,提出的成员推断攻击在微调模型上实现了接近完美的性能,成功提取了超过50%的微调数据集,相较于传统黑箱基线,性能提升了数百倍,展示了显著的效果。

🎯 应用场景

该研究的潜在应用领域包括数据隐私保护、模型安全性评估以及大语言模型的安全设计。通过提高对训练数据的提取能力,研究者可以更好地理解和防范模型在实际应用中的隐私风险,推动安全技术的发展。

📄 摘要(原文)

In this paper we develop state-of-the-art privacy attacks against Large Language Models (LLMs), where an adversary with some access to the model tries to learn something about the underlying training data. Our headline results are new membership inference attacks (MIAs) against pretrained LLMs that perform hundreds of times better than baseline attacks, and a pipeline showing that over 50% (!) of the fine-tuning dataset can be extracted from a fine-tuned LLM in natural settings. We consider varying degrees of access to the underlying model, pretraining and fine-tuning data, and both MIAs and training data extraction. For pretraining data, we propose two new MIAs: a supervised neural network classifier that predicts training data membership on the basis of (dimensionality-reduced) model gradients, as well as a variant of this attack that only requires logit access to the model by leveraging recent model-stealing work on LLMs. To our knowledge this is the first MIA that explicitly incorporates model-stealing information. Both attacks outperform existing black-box baselines, and our supervised attack closes the gap between MIA attack success against LLMs and the strongest known attacks for other machine learning models. In fine-tuning, we find that a simple attack based on the ratio of the loss between the base and fine-tuned models is able to achieve near-perfect MIA performance; we then leverage our MIA to extract a large fraction of the fine-tuning dataset from fine-tuned Pythia and Llama models. Our code is available at github.com/safr-ai-lab/pandora-llm.