CryptoMoE:通过平衡专家路由实现隐私保护且可扩展的专家混合模型推理
CryptoMoE: Privacy-Preserving and Scalable Mixture of Experts Inference via Balanced Expert Routing
AI总结:
针对现有框架难以扩展到MoE架构的问题,提出CryptoMoE框架,通过平衡专家负载、安全协议及优化策略,实现MoE模型私有高效推理,实验显示其延迟和通信量大幅降低且准确性损失小。
摘要:
基于密码原语的私有大语言模型(LLM)推理为隐私保护深度学习提供了一条有前景的路径。然而,现有框架仅支持LLaMA-1等密集型LLM,难以扩展到专家混合(MoE)架构。关键挑战在于安全评估MoE层中的动态路由机制,若未完全保护,该机制可能泄露敏感输入信息。本文提出CryptoMoE,这是首个支持基于MoE的模型进行私有、高效且准确推理的框架。CryptoMoE通过平衡专家负载来保护专家路由信息,并提出用于安全专家调度和组合的新协议。CryptoMoE还开发了置信度感知的令牌选择策略和批量矩阵乘法协议,以进一步提高准确性和效率。在DeepSeekMoE-16.4B、OLMoE-6.9B和QWenMoE-14.3B上的大量实验表明,与密集型基线相比,CryptoMoE实现了2.8~3.5倍的端到端延迟降低和2.9~4.3倍的通信量减少,且准确性损失最小。我们还将CipherPrune(ICLR'25)适配于MoE推理,并证明CryptoMoE可将通信量减少高达4.3倍。代码可在https://github.com/PKU-SEC-Lab/CryptoMoE获取。
英文摘要:
Private large language model (LLM) inference based on cryptographic primitives offers a promising path towards privacy-preserving deep learning. However, existing frameworks only support dense LLMs like LLaMA-1 and struggle to scale to mixture-of-experts (MoE) architectures. The key challenge comes from securely evaluating the dynamic routing mechanism in MoE layers, which may reveal sensitive input information if not fully protected. In this paper, we propose CryptoMoE, the first framework that enables private, efficient, and accurate inference for MoE-based models. CryptoMoE balances expert loads to protect expert routing information and proposes novel protocols for secure expert dispatch and combine. CryptoMoE also develops a confidence-aware token selection strategy and a batch matrix multiplication protocol to improve accuracy and efficiency further. Extensive experiments on DeepSeekMoE-16.4B, OLMoE-6.9B, and QWenMoE-14.3B show that CryptoMoE achieves $2.8\sim3.5\times$ end-to-end latency reduction and $2.9\sim4.3\times$ communication reduction over a dense baseline with minimum accuracy loss. We also adapt CipherPrune (ICLR'25) for MoE inference and demonstrate CryptoMoE can reduce the communication by up to $4.3 \times$. Code is available at: https://github.com/PKU-SEC-Lab/CryptoMoE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。