Skip to main content
QUICK REVIEW

[论文解读] Stealing User Prompts from Mixture of Experts

Itay Yona, Ilia Shumailov|arXiv (Cornell University)|Oct 30, 2024
Data Mining Algorithms and ApplicationsComputer Science被引用 3
一句话总结

本文提出了一种名为 MoE Tiebreak Leakage 的新型漏洞利用技术,通过操纵批量输入以在专家选择路由(Expert-Choice-Routing)中触发可检测的平局解决信号,从而完全提取出受害者的私有提示(private prompt)。该攻击仅需 𝒪(VM²) 次查询(其中 V 为词汇量,M 为提示长度),或平均每个 token 约 100 次查询,揭示了 MoE 路由中存在关键的架构缺陷,严重威胁用户输入的机密性。

ABSTRACT

Mixture-of-Experts (MoE) models improve the efficiency and scalability of dense language models by routing each token to a small number of experts in each layer. In this paper, we show how an adversary that can arrange for their queries to appear in the same batch of examples as a victim's queries can exploit Expert-Choice-Routing to fully disclose a victim's prompt. We successfully demonstrate the effectiveness of this attack on a two-layer Mixtral model, exploiting the tie-handling behavior of the torch.topk CUDA implementation. Our results show that we can extract the entire prompt using $O({VM}^2)$ queries (with vocabulary size $V$ and prompt length $M$) or 100 queries on average per token in the setting we consider. This is the first attack to exploit architectural flaws for the purpose of extracting user prompts, introducing a new class of LLM vulnerabilities.

研究动机与目标

  • 识别并展示 MoE 模型中由于专家路由架构设计缺陷而引发的新一类漏洞。
  • 证明当攻击者与受害者的查询在使用专家选择路由的 MoE 模型中被批量处理时,用户提示的机密性可能被完全破坏。
  • 揭示由于专家缓冲区分配中的确定性平局解决机制所导致的跨批量侧信道泄露风险。
  • 提出能够保持批量独立性并引入随机性的防御策略,以阻断此类攻击。

提出的方法

  • 攻击者将自身的查询与受害者的查询批量组合,以影响 MoE 层中的专家路由过程。
  • 通过系统性地猜测受害者提示中的 token,攻击者监控模型输出,以检测表明猜测正确的可检测信号。
  • 该攻击利用了 torch.topk CUDA 实现中专家容量分配的平局处理行为,其以确定性方式解决平局。
  • 当猜测正确时,受害者的 token 会被路由到特定专家,从而产生一致的输出模式,揭示出所猜测的 token。
  • 该方法在词汇表上采用类似二分查找的策略,以高置信度恢复受害者提示的每个 token。
  • 该方法的查询复杂度为 𝒪(VM²),用于提取完整提示,在评估设置中实际平均每个 token 仅需约 100 次查询。
Figure 1 : High-level outline of the MoE Tiebreak Leakage Attack. The attacker and victim queries are batched together, affecting routing of each other. The attacker systematically guesses the next token in a victim’s confidential message. A correct guess triggers Expert-Choice-Routing tie-breaker,
Figure 1 : High-level outline of the MoE Tiebreak Leakage Attack. The attacker and victim queries are batched together, affecting routing of each other. The attacker systematically guesses the next token in a victim’s confidential message. A correct guess triggers Expert-Choice-Routing tie-breaker,

实验结果

研究问题

  • RQ1攻击者能否通过操纵 MoE 模型中的批量输入,完全提取出受害者的私有提示?
  • RQ2专家选择路由如何创建一种跨批量的侧信道,从而泄露输入信息?
  • RQ3torch.topk 中的确定性平局解决机制在促成此攻击中起到了何种作用?
  • RQ4其他 MoE 路由策略是否同样容易受到此类侧信道泄露的影响?
  • RQ5哪些架构或操作性防御措施能够有效缓解此类漏洞?

主要发现

  • MoE Tiebreak Leakage 攻击成功使用仅 𝒪(VM²) 次查询提取了完整的受害者提示,其中 V 为词汇量,M 为提示长度。
  • 在实际应用中,该攻击平均每个 token 仅需约 100 次查询,与暴力破解方法相比显著降低了查询成本。
  • 该攻击利用了 torch.topk CUDA 内核在专家路由过程中因确定性平局解决而产生的此前未知的侧信道。
  • 该漏洞特异性源于专家选择路由中隐式批量独立性的违反,即一个用户的输入可影响另一个用户的路由决策。
  • 该攻击在真实世界的 Mixtral-8x7B 模型上可行,表明架构设计缺陷可能导致完整的提示泄露。
  • 通过在专家容量、批量顺序或路由决策中引入随机性等防御措施,可有效扰乱攻击并缓解该漏洞。
Figure 2 : Step-by-step execution of the MoE Tiebreak Leakage attack. More details are provided in Section 3.3 .
Figure 2 : Step-by-step execution of the MoE Tiebreak Leakage attack. More details are provided in Section 3.3 .

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。