arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.15431cs.LGcs.CLcs.CR
收藏

时间会证明一切:通过大型语言模型中的输出Token数量进行时序侧信道攻击

Time Will Tell: Timing Side Channels via Output Token Count in Large Language Models

University of Toronto(多伦多大学)

Tianchen Zhang, Gururaj Saileshwar, David Lie

AI总结:

本文提出一种基于LLM输出Token数量的新型时序侧信道攻击,攻击者可借此以超70%精度推断机器翻译目标语言与文本分类输入类别,并提出了相应的缓解措施。

摘要:

本文演示了一种新型侧信道,攻击者可基于大型语言模型(LLM)响应中的输出Token数量,提取有关推理输入的敏感信息。我们在两个常见的LLM任务中利用该侧信道构建了攻击:在机器翻译任务中恢复目标语言,以及在分类任务中恢复输出类别。此外,由于LLM的自回归生成机制,攻击者可以利用时序信道可靠地恢复输出Token数量,甚至能在网络环境中针对流行的闭源商业LLM进行攻击。我们的实验表明,在三个不同模型(Tower、M2M100、MBart50)上,攻击者能够在翻译任务中以超过75%的精度获知输出语言。利用该侧信道,我们还展示了在文本分类任务中,开源LLM(如Llama-3.1、Llama-3.2、Gemma2)和生产模型(如GPT-4o)的输入类别可能以超过70%的精度被泄露。最后,我们提出了针对输出Token数量侧信道的基于分词器、系统和提示词的缓解措施。

英文摘要:

This paper demonstrates a new side-channel that enables an adversary to extract sensitive information about inference inputs in large language models (LLMs) based on the number of output tokens in the LLM response. We construct attacks using this side-channel in two common LLM tasks: recovering the target language in machine translation tasks and recovering the output class in classification tasks. In addition, due to the auto-regressive generation mechanism in LLMs, an adversary can recover the output token count reliably using a timing channel, even over the network against a popular closed-source commercial LLM. Our experiments show that an adversary can learn the output language in translation tasks with more than 75% precision across three different models (Tower, M2M100, MBart50). Using this side-channel, we also show the input class in text classification tasks can be leaked out with more than 70% precision from open-source LLMs like Llama-3.1, Llama-3.2, Gemma2, and production models like GPT-4o. Finally, we propose tokenizer-, system-, and prompt-based mitigations against the output token count side-channel.

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

↑