GPT,但反向:精确反演语言模型输出
GPT, But Backwards: Exactly Inverting Language Model Outputs
AI总结:
本文提出SODA算法,首次在白盒条件下实现对语言模型输入文本的精确反演,并证明输入长度和词汇量比模型规模对重建成功率影响更大。
摘要:
重建语言模型的未知文本输入是一项基本的审计原语,它使我们能够评估模型对一系列安全问题的脆弱性,包括窃取隐藏的系统提示、检测后门以及泄露私有数据。现有的反演工作假设可以获取不同级别的信息(例如需要输入-输出示例、模型参数、中间激活或输出logits),但往往无法完全重建所需的输入。在本文中,我们提出了稀疏独热离散Adam(SODA)算法,这是一种基于搜索的反演方法,在给定语言模型及其输出的白盒访问权限下,能够准确重建输入文本。我们的实验首次证明,在自然语言和随机输入上都可以实现精确的语言模型反演。实际上,SODA在长度不超过10个token的输入上分别达到了98%和79%的重建率。此外,我们表明,输入长度和词汇量大小对成功重建概率的影响远大于语言模型本身的规模,从而使我们能够扩展到从33M到3B参数的模型。
英文摘要:
Recent work shows that distinct inputs produce distinct hidden representations in LLMs, so the input can in principle be recovered from them. Yet, no existing method can reliably do so from the model's output text or logits alone. We introduce Sparse One-hot Discrete Adam (SODA), a white-box search-based algorithm that reconstructs textual inputs from partial knowledge of the output. Given output logits, SODA recovers natural sequences of up to 17 tokens with zero false positives and achieves a 4x improvement in exact-match reconstruction over the strongest prior method. We further show that input length and vocabulary size matter more for inversion difficulty than parameter count, with SODA inverting models from 33M to 3B parameters. Finally, we demonstrate proof-of-concept security applications: SODA recovers 6 backdoor triggers from a poisoned LLM in under 1000 iterations, and 139 tokens of personally identifiable information from synthetic user-chatbot interactions. Our code is available at https://github.com/AdrSkapars/inversion_optimisation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。