Logits of API-Protected LLMs Leak Proprietary Information

LLM MQIA Other LLM AI Safety / AI Ethics PIAAP Other AI Safety
2024年03月14日
商业化的大型语言模型(LLMs)的普及导致高级API-only访问专有模型成为常见做法。在本文中,我们展示了即使在对模型架构采取保守假设的情况下,通过相对较少的API查询(例如,使用不到1000美元的OpenAI的gpt-3.5-turbo),仍然可以学习到关于API保护的LLM的惊人数量的非公开信息。我们的发现集中在一个关键观察上:大多数现代LLMs都存在softmax瓶颈,这限制了模型输出到完整输出空间的线性子空间。我们展示了这导致了模型图像或模型签名,从而解锁了几个具有负担得起的成本的功能:高效地发现LLM的隐藏大小,获取全词汇输出,检测和消除不同的模型更新,识别给定单个完整LLM输出的源LLM,甚至估计输出层参数。我们的实证研究展示了我们的方法的有效性,允许我们估计OpenAI的gpt-3.5-turbo的嵌入大小约为4,096。最后,我们讨论了LLM提供商可以如何防范这些攻击,以及如何将这些能力视为一个特性(而不是一个漏洞),从而实现更大的透明度和问责制。
The commercialization of large language models (LLMs) has led to the common practice of high-level API-only access to proprietary models. In this work, we show that even with a conservative assumption about the model architecture, it is possible to learn a surprisingly large amount of non-public information about an API-protected LLM from a relatively small number of API queries (e.g., costing under $1,000 for OpenAI's gpt-3.5-turbo). Our findings are centered on one key observation: most modern LLMs suffer from a softmax bottleneck, which restricts the model outputs to a linear subspace of the full output space. We show that this lends itself to a model image or a model signature which unlocks several capabilities with affordable cost: efficiently discovering the LLM's hidden size, obtaining full-vocabulary outputs, detecting and disambiguating different model updates, identifying the source LLM given a single full LLM output, and even estimating the output layer parameters. Our empirical investigations show the effectiveness of our methods, which allow us to estimate the embedding size of OpenAI's gpt-3.5-turbo to be about 4,096. Lastly, we discuss ways that LLM providers can guard against these attacks, as well as how these capabilities can be viewed as a feature (rather than a bug) by allowing for greater transparency and accountability.
许愿