破解大模型内部状态逆向难题,实现高精度输入还原。
Depth Gives a False Sense of Privacy: LLM Internal States Inversion
- 提出四种逆向攻击方法,突破深度层抽象限制。
- 长文本医疗咨询提示可实现86.88%的令牌匹配率。
- 适用于安全审计与隐私防护研究者参考。
大语言模型(LLMs)日益融入日常应用,但引发严重的隐私与安全担忧。近期研究提出的协同推理将早期层推理外包以保障数据本地性,并基于内部神经元模式进行模型安全审计,均暴露了模型内部状态(ISs)。传统认为内部状态难以逆向还原,因优化困难及深层表示高度抽象。本文挑战该假设,提出四种逆向攻击,显著提升还原输入的语义相似度与令牌匹配率。首先设计两种白盒优化攻击,分别针对低层与高层内部状态,通过两阶段反演过程避免陷入局部最优。随后在更贴近实际的黑盒权重访问场景下,利用源模型与衍生模型间的可迁移性扩展优化攻击。此外,提出基于生成的攻击,将逆向视为翻译任务,使用逆向模型重建输入。在医疗咨询与代码辅助数据集上的短/长提示、6个大模型的广泛评估验证了方法有效性。值得注意的是,4,112令牌长的医疗咨询提示可在Llama-3模型中层实现近乎完美的逆向,令牌匹配率达86.88% F1。最后评估四种现有防御措施,发现均无法完全阻止内部状态逆向,为未来缓解设计提供启示。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are increasingly integrated into daily routines, yet they raise significant privacy and safety concerns. Recent research proposes collaborative inference, which outsources the early-layer inference to ensure data locality, and introduces model safety auditing based on inner neuron patterns. Both techniques expose the LLM's Internal States (ISs), which are traditionally considered irreversible to inputs due to optimization challenges and the highly abstract representations in deep layers. In this work, we challenge this assumption by proposing four inversion attacks that significantly improve the semantic similarity and token matching rate of inverted inputs. Specifically, we first develop two white-box optimization-based attacks tailored for low-depth and high-depth ISs. These attacks avoid local minima convergence, a limitation observed in prior work, through a two-phase inversion process. Then, we extend our optimization attack under more practical black-box weight access by leveraging the transferability between the source and the derived LLMs. Additionally, we introduce a generation-based attack that treats inversion as a translation task, employing an inversion model to reconstruct inputs. Extensive evaluation of short and long prompts from medical consulting and coding assistance datasets and 6 LLMs validates the effectiveness of our inversion attacks. Notably, a 4,112-token long medical consulting prompt can be nearly perfectly inverted with 86.88 F1 token matching from the middle layer of Llama-3 model. Finally, we evaluate four practical defenses that we found cannot perfectly prevent ISs inversion and draw conclusions for future mitigation design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。