English

Stealing User Prompts from Mixture of Experts

Cryptography and Security 2024-10-31 v1 Artificial Intelligence Computation and Language Machine Learning

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(VM2)O({VM}^2) queries (with vocabulary size VV and prompt length MM) 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.

Keywords

Cite

@article{arxiv.2410.22884,
  title  = {Stealing User Prompts from Mixture of Experts},
  author = {Itay Yona and Ilia Shumailov and Jamie Hayes and Nicholas Carlini},
  journal= {arXiv preprint arXiv:2410.22884},
  year   = {2024}
}