arXiv:2506.19563cs.CRcs.AI2025-06被引 2

通过分析模型内部状态,检测大模型推理时的隐私泄露问题。

PrivacyXray: Detecting Privacy Breaches in LLMs through Semantic Consistency and Probability Certainty

  • 利用模型层间语义一致性和概率确定性识别隐私输出
  • 在5个大模型上平均准确率达92.69%,提升20.06%
  • 无需外部数据,自动生成真实私有数据用于检测

大语言模型广泛应用于医疗、金融、法律等敏感领域,推理过程中存在隐私信息泄露风险。现有隐私提取攻击(如越狱)无法验证泄露信息的真实性,因缺乏公开数据集进行交叉验证,导致检测空白。为此,我们提出PrivacyXray,一种基于模型内状态分析的隐私泄露检测框架。分析发现,当生成正确私有信息时,模型表现出更高的语义连贯性与概率确定性。PrivacyXray据此设计四项指标:层内与层间语义相似度、词级与句级概率分布。该方法克服了无开源私有数据集的难题,不依赖外部验证数据,通过合成真实私有数据并结合模型内态检测机制实现。实验表明,PrivacyXray在五个大模型上平均准确率达92.69%,相较现有最佳方法提升20.06%,展现良好稳定性与实际应用价值。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are widely used in sensitive domains, including healthcare, finance, and legal services, raising concerns about potential private information leaks during inference. Privacy extraction attacks, such as jailbreaking, expose vulnerabilities in LLMs by crafting inputs that force the models to output sensitive information. However, these attacks cannot verify whether the extracted private information is accurate, as no public datasets exist for cross-validation, leaving a critical gap in private information detection during inference. To address this, we propose PrivacyXray, a novel framework detecting privacy breaches by analyzing LLM inner states. Our analysis reveals that LLMs exhibit higher semantic coherence and probabilistic certainty when generating correct private outputs. Based on this, PrivacyXray detects privacy breaches using four metrics: intra-layer and inter-layer semantic similarity, token-level and sentence-level probability distributions. PrivacyXray addresses critical challenges in private information detection by overcoming the lack of open-source private datasets and eliminating reliance on external data for validation. It achieves this through the synthesis of realistic private data and a detection mechanism based on the inner states of LLMs. Experiments show that PrivacyXray achieves consistent performance, with an average accuracy of 92.69% across five LLMs. Compared to state-of-the-art methods, PrivacyXray achieves significant improvements, with an average accuracy increase of 20.06%, highlighting its stability and practical utility in real-world applications.

隐私检测大模型安全内态分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。