通过压缩概率分布提升语言模型逆向还原能力,显著提高私密提示恢复率。
Better Language Model Inversion by Compactly Representing Next-Token Distributions
- 利用低维子空间特性压缩多步生成的概率分布,实现无损信息保留
- 在测试集上恢复率提升2至3.5倍,最高达60%(原17%)
- 适用于系统消息逆向,且跨模型迁移表现良好
语言模型逆向旨在仅通过模型输出恢复隐藏提示,对模型部署的安全性与问责性具有重要影响,例如从API保护的语言模型系统消息中泄露隐私信息。本文提出一种新方法——基于对数概率序列的提示逆向(PILS),通过分析多步生成过程中的下一词概率来恢复隐藏提示。关键洞察是:语言模型的向量输出位于低维子空间中,因此可使用线性映射无损压缩多步的完整下一词概率分布,从而更充分地利用输出信息进行逆向。该方法在多个测试集上实现显著提升,相比之前最先进方法,精确恢复率提高2至3.5倍,在某一场景下从17%提升至60%。此外,模型表现出意外良好的泛化能力:在16步训练的逆向器,测试时扩展至32步仍能获得5至27个百分点的恢复率提升。在更具挑战性的系统消息恢复任务中也表现优异。我们还分析了原文重复在提示恢复中的作用,并提出一种新的基于对数概率的跨模型家族迁移方法。研究结果表明,下一词概率是比以往认知更易受逆向攻击的脆弱面。
原文摘要 · Abstract (English)
Language model inversion seeks to recover hidden prompts using only language model outputs. This capability has implications for security and accountability in language model deployments, such as leaking private information from an API-protected language model's system message. We propose a new method -- prompt inversion from logprob sequences (PILS) -- that recovers hidden prompts by gleaning clues from the model's next-token probabilities over the course of multiple generation steps. Our method is enabled by a key insight: The vector-valued outputs of a language model occupy a low-dimensional subspace. This enables us to losslessly compress the full next-token probability distribution over multiple generation steps using a linear map, allowing more output information to be used for inversion. Our approach yields massive gains over previous state-of-the-art methods for recovering hidden prompts, achieving 2--3.5 times higher exact recovery rates across test sets, in one case increasing the recovery rate from 17% to 60%. Our method also exhibits surprisingly good generalization behavior; for instance, an inverter trained on 16 generations steps gets 5--27 points higher prompt recovery when we increase the number of steps to 32 at test time. Furthermore, we demonstrate strong performance of our method on the more challenging task of recovering hidden system messages. We also analyze the role of verbatim repetition in prompt recovery and propose a new method for cross-family model transfer for logit-based inverters. Our findings show that next-token probabilities are a considerably more vulnerable attack surface for inversion attacks than previously known.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。