Perseus: A Full-Stack System for Homomorphic Model Inference

📄 arXiv: 2611.04488v1 📥 PDF

作者: Alessandro Zirilli, Davide Marincione, Evgenios M. Kornaropoulos, Giuseppe Ateniese, Emanuele Rodolà

分类: cs.CR, cs.AI

发布日期: 2026-11-03

备注: 4 pages, 5 tables


💡 一句话要点

提出Perseus以实现高效同态模型推理

🎯 匹配领域: 支柱五:交互与反应 (Interaction & Reaction) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 同态加密 模型推理 隐私保护 开源软件 性能优化 大型语言模型 数据安全

📋 核心要点

  1. 现有同态加密推理方法速度缓慢,且大多数框架为闭源,限制了技术进展。
  2. Perseus通过提供一个全栈的开源解决方案,优化了加密推理的各个层面,提升了性能。
  3. 实验结果显示,Perseus在多个模型上实现了最先进的延迟,并在准确性上与明文模型相近。

📝 摘要(中文)

大型语言模型(LLMs)使用户将私密数据发送给模型提供者变得非常方便,但这些数据通常以明文形式处理。完全同态加密(FHE)承诺通过在加密数据上直接计算来保护远程推理,但其速度一直令人难以接受。现有框架大多为闭源,进展受限。本文提出Perseus,一个免费的开源Python软件库,支持从加密后端和数据打包到加密非线性和端到端模型执行的全栈加密模型推理。Perseus在每个层级都内置了新颖的优化,分别为后端的密钥切换密钥再生、数据层的复杂Cachemir打包变体,以及模型层的状态最优引导器。Perseus在多个模型和模态中实现了最先进的延迟,准确率和困惑度与明文模型相差不超过3%。在Llama-3-8B上,其单令牌解码速度比任何其他实现快3.96倍。

🔬 方法详解

问题定义:本文旨在解决现有同态加密推理速度慢、框架闭源的问题,导致技术进展缓慢。

核心思路:Perseus通过提供一个完整的开源解决方案,涵盖从加密后端到模型执行的各个层面,优化了加密推理的性能。

技术框架:Perseus的整体架构包括三个主要模块:后端的密钥切换密钥再生、数据层的Cachemir打包变体和模型层的引导器。

关键创新:Perseus的创新在于其在每个层级的优化设计,特别是密钥再生和引导器的状态最优设计,使其在速度和准确性上超越现有方法。

关键设计:在密钥切换中采用了内核再生技术,数据层使用复杂的Cachemir打包,模型层则引入了对打包和幅度敏感的引导器设计。

🖼️ 关键图片

img_0

📊 实验亮点

Perseus在多个模型上实现了最先进的延迟,单令牌解码速度比其他实现快3.96倍,且在准确性上与明文模型相差不超过3%。此外,首次在加密GPT-2上进行了公开速度测试,为后续研究提供了基础。

🎯 应用场景

Perseus的研究成果在保护用户隐私的同时,能够高效地进行加密模型推理,适用于金融、医疗等对数据隐私要求极高的领域。未来,随着技术的进一步发展,Perseus可能会推动更多应用场景的落地,提升数据安全性。

📄 摘要(原文)

Large Language Models (LLMs) have made it exceptionally convenient for users to send their private data to model providers, which process them in plaintext. Fully Homomorphic Encryption (FHE) promises to secure remote inference by computing directly on encrypted data, yet it has remained prohibitively slow. The effort to make it practical remains fragmented, with most existing frameworks being closed-source, which keeps progress from compounding. We present Perseus, a free and open Python software library that supports the full stack of encrypted model inference, from the cryptographic backend and data packing, to encrypted nonlinearities and end-to-end model execution. Perseus ships with built-in novel optimizations, one at each level of the stack: in-kernel regeneration of key-switching keys at the (i) backend level, a complex variant of Cachemir packing at the (ii) data level, and a state-of-the-art bootstrap placer that is both packing- and magnitude-aware at the (iii) model level. Perseus achieves state-of-the-art latency across multiple models and modalities, within $3\%$ of the plaintext models' accuracy and perplexity. Remarkably, it is $3.96\times$ faster at single-token decoding than any other implementation on Llama-3-8B. We initiate, for the first time, a public speedrun on encrypted GPT-2, so that progress can compound.