通过模拟微调过程,用优化差距检测模型训练数据成员身份,更准且不需训练。
In-Context Probing for Membership Inference in Fine-Tuned Language Models
- 利用优化间隙作为成员身份信号,基于微调收敛时成员样本剩余优化潜力极低的原理。
- 在多个任务和模型上测试,相比已有黑盒攻击方法,在低误报率下显著提升攻击准确率。
- 无需额外训练,支持参考数据或自扰动两种探测策略,适合隐私审计与模型部署评估。
成员推理攻击(MIAs)对使用敏感数据微调的大语言模型构成严重隐私威胁。现有黑盒方法依赖置信度或词元似然,但这些信号常受样本内容难度或罕见性干扰,导致泛化能力差、信噪比低。本文提出ICP-MIA,一种基于训练动态理论的新型攻击框架,核心思想是优化过程中的收益递减现象:收敛时,成员样本的剩余损失降低潜力趋近于零,而非成员仍保留较大优化空间。为在黑盒环境下估计该差距,提出无训练的上下文探测(ICP)方法,通过精心设计输入上下文模拟微调行为。采用两种探测策略:基于参考数据(使用语义相似的公开样本)和自扰动(通过掩码或生成)。在三个任务和多个LLM上的实验表明,ICP-MIA显著优于现有黑盒攻击,尤其在低假阳性率下表现优异。进一步分析了参考数据对齐、模型类型、参数高效微调配置及训练调度对攻击效果的影响。研究结果确立了ICP-MIA作为实际可行且理论扎实的模型隐私风险审计框架。
原文摘要 · Abstract (English)
Membership inference attacks (MIAs) pose a critical privacy threat to fine-tuned large language models (LLMs), especially when models are adapted to domain-specific tasks using sensitive data. While prior black-box MIA techniques rely on confidence scores or token likelihoods, these signals are often entangled with a sample's intrinsic properties - such as content difficulty or rarity - leading to poor generalization and low signal-to-noise ratios. In this paper, we propose ICP-MIA, a novel MIA framework grounded in the theory of training dynamics, particularly the phenomenon of diminishing returns during optimization. We introduce the Optimization Gap as a fundamental signal of membership: at convergence, member samples exhibit minimal remaining loss-reduction potential, while non-members retain significant potential for further optimization. To estimate this gap in a black-box setting, we propose In-Context Probing (ICP), a training-free method that simulates fine-tuning-like behavior via strategically constructed input contexts. We propose two probing strategies: reference-data-based (using semantically similar public samples) and self-perturbation (via masking or generation). Experiments on three tasks and multiple LLMs show that ICP-MIA significantly outperforms prior black-box MIAs, particularly at low false positive rates. We further analyze how reference data alignment, model type, PEFT configurations, and training schedules affect attack effectiveness. Our findings establish ICP-MIA as a practical and theoretically grounded framework for auditing privacy risks in deployed LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。