arXiv:2502.00847cs.CRcs.AI2025-02被引 1

提出SecPE,让大模型在加密下同时保证隐私与抗攻击。

SecPE: Secure Prompt Ensembling for Private and Robust Large Language Models

  • 用全同态加密重构提示集成核心算法,实现私密推理与鲁棒性融合。
  • 在8个任务上保持高准确率,鲁棒性提升仅损失2.5%效率。
  • 加密下取最大值操作提速35.4倍,对其他加密应用也有价值。

随着大语言模型在公众中的普及,隐私保护与对抗鲁棒性成为两大迫切需求,但长期被分别研究。本文首次尝试将私密推理与提示集成紧密结合,前者通过加密传输和处理数据保护用户隐私,后者通过多提示响应聚合提升对抗鲁棒性。尽管两者单独有效,但结合使用带来新挑战,现有方法效率低下。为此,我们提出SecPE,为提示集成的核心算法构建高效的全同态加密(FHE)实现。我们在8个任务上评估了SecPE的准确性、鲁棒性和效率。结果表明,SecPE在仅损失2.5%效率的前提下保持高干净准确率,并显著提升鲁棒性,实现了良好的“准确率-鲁棒性-效率”平衡。针对加密后取最大值操作导致的主要性能瓶颈,SecPE比当前最优方案快35.4倍,这一成果具有独立应用价值。

原文摘要 · Abstract (English)

With the growing popularity of LLMs among the general public users, privacy-preserving and adversarial robustness have become two pressing demands for LLM-based services, which have largely been pursued separately but rarely jointly. In this paper, to the best of our knowledge, we are among the first attempts towards robust and private LLM inference by tightly integrating two disconnected fields: private inference and prompt ensembling. The former protects users' privacy by encrypting inference data transmitted and processed by LLMs, while the latter enhances adversarial robustness by yielding an aggregated output from multiple prompted LLM responses. Although widely recognized as effective individually, private inference for prompt ensembling together entails new challenges that render the naive combination of existing techniques inefficient. To overcome the hurdles, we propose SecPE, which designs efficient fully homomorphic encryption (FHE) counterparts for the core algorithmic building blocks of prompt ensembling. We conduct extensive experiments on 8 tasks to evaluate the accuracy, robustness, and efficiency of SecPE. The results show that SecPE maintains high clean accuracy and offers better robustness at the expense of merely $2.5\%$ efficiency overhead compared to baseline private inference methods, indicating a satisfactory ``accuracy-robustness-efficiency'' tradeoff. For the efficiency of the encrypted Argmax operation that incurs major slowdown for prompt ensembling, SecPE is 35.4x faster than the state-of-the-art peers, which can be of independent interest beyond this work.

大模型安全加密推理鲁棒性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。