arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.03558cs.CRcs.CL
收藏

Mondrian:针对大语言模型的提示抽象攻击以实现更便宜的 API 定价

Mondrian: Prompt Abstraction Attack Against Large Language Models for Cheaper API Pricing

CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全中心)

Wai Man Si, Michael Backes, Yang Zhang

AI总结:

本文提出 Mondrian 提示抽象攻击,通过伪 API 代理并抽象用户查询,在保持模型效用和输出质量的同时将 token 长度减少 13%–23%,从而降低 LLM API 使用成本并实现非法获利。

摘要:

机器学习即服务(MLaaS)市场正在迅速扩张并日趋成熟。例如,OpenAI 的 ChatGPT 是一种先进的大语言模型(LLM),能够针对各种查询生成回复并收取相应费用。尽管这些模型可以提供令人满意的性能,但它们远非完美。研究者长期以来一直在研究 LLM 的脆弱性和局限性,例如对抗性攻击和模型毒性。不可避免的是,商业机器学习模型同样无法免于此类问题,而随着 MLaaS 的持续发展,这可能带来严重问题。在本文中,我们发现了一种针对 LLM API 的新攻击策略,即提示抽象攻击。具体而言,我们提出 Mondrian,这是一种简单而直接的方法,通过对句子进行抽象,可以降低使用 LLM API 的成本。在该方法中,攻击者首先创建一个伪 API(具有较低的既定价格),作为目标 API(具有较高的既定价格)的代理。接着,伪 API 利用 Mondrian 修改用户查询,从目标 API 获取抽象后的响应,并将其转发回最终用户。我们的结果表明,Mondrian 在文本分类、生成和问答等多种任务上成功将用户查询的 token 长度减少了 13% 至 23%。同时,这些抽象后的查询并未显著影响任务特定模型和 ChatGPT 等通用语言模型的效用。Mondrian 还在不损害输出质量的情况下将指令提示的 token 长度减少了至少 11%。因此,提示抽象攻击使攻击者能够在不承担 API 开发和部署成本的情况下获利。

英文摘要:

The Machine Learning as a Service (MLaaS) market is rapidly expanding and becoming more mature. For example, OpenAI's ChatGPT is an advanced large language model (LLM) that generates responses for various queries with associated fees. Although these models can deliver satisfactory performance, they are far from perfect. Researchers have long studied the vulnerabilities and limitations of LLMs, such as adversarial attacks and model toxicity. Inevitably, commercial ML models are also not exempt from such issues, which can be problematic as MLaaS continues to grow. In this paper, we discover a new attack strategy against LLM APIs, namely the prompt abstraction attack. Specifically, we propose Mondrian, a simple and straightforward method that abstracts sentences, which can lower the cost of using LLM APIs. In this approach, the adversary first creates a pseudo API (with a lower established price) to serve as the proxy of the target API (with a higher established price). Next, the pseudo API leverages Mondrian to modify the user query, obtain the abstracted response from the target API, and forward it back to the end user. Our results show that Mondrian successfully reduces user queries' token length ranging from 13% to 23% across various tasks, including text classification, generation, and question answering. Meanwhile, these abstracted queries do not significantly affect the utility of task-specific and general language models like ChatGPT. Mondrian also reduces instruction prompts' token length by at least 11% without compromising output quality. As a result, the prompt abstraction attack enables the adversary to profit without bearing the cost of API development and deployment.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑