AEGIS通过协同计算与加密并行,大幅降低长序列加密Transformer的通信开销。
AEGIS: Scaling Long-Sequence Homomorphic Encrypted Transformer Inference via Hybrid Parallelism on Multi-GPU Systems
- 根据数据流与加密耦合关系智能分配GPU任务,减少不必要的通信
- 在2048个标记输入下,自注意力层通信量减少81.3%、前馈网络减少57.9%
- 适用于需要隐私保护的长文本推理场景,如医疗或金融分析
全同态加密(FHE)使隐私保护的Transformer推理成为可能,但长序列加密Transformer会迅速超出单块GPU的内存容量,因为编码权重本身已很大,且加密激活值随序列长度快速增长。多GPU执行因此成为必然,但扩展仍具挑战性,因通信由应用级聚合和加密级RNS耦合共同引发。现有方法要么频繁设备同步,要么复制加密张量,导致通信过多和延迟增加。我们提出AEGIS,一种面向多GPU平台的可扩展长序列加密Transformer推理系统。AEGIS基于由Transformer数据流和CKKS多项式耦合共同诱导的密文依赖关系确定设备放置策略,将模数一致与标记一致的数据共置,仅在应用依赖必要时引入通信,并重新排序多项式算子以重叠剩余集体操作与计算。在2048个标记输入下,相比最先进设计,前馈网络间通信减少57.9%,自注意力层减少81.3%。在四块GPU上,达到96.62%的可扩展效率,端到端速度提升3.86倍,每设备内存减少69.1%。这些结果确立了协同应用-加密并行作为可扩展同态Transformer推理的实际基础。
原文摘要 · Abstract (English)
Fully Homomorphic Encryption (FHE) enables privacy-preserving Transformer inference, but long-sequence encrypted Transformers quickly exceed single-GPU memory capacity because encoded weights are already large and encrypted activations grow rapidly with sequence length. Multi-GPU execution therefore becomes unavoidable, yet scaling remains challenging because communication is jointly induced by application-level aggregation and encryption-level RNS coupling. Existing approaches either synchronize between devices frequently or replicate encrypted tensors across devices, leading to excessive communication and latency. We present AEGIS, an Application-Encryption Guided Inference System for scalable long-sequence encrypted Transformer inference on multi-GPU platforms. AEGIS derives device placement from ciphertext dependencies jointly induced by Transformer dataflow and CKKS polynomial coupling, co-locating modulus-coherent and token-coherent data so that communication is introduced only when application dependencies require it, while reordering polynomial operators to overlap the remaining collectives with computation. On 2048-token inputs, AEGIS reduces inter-GPU communication by up to 57.9% in feed-forward networks and 81.3% in self-attention versus prior state-of-the-art designs. On four GPUs, it achieves up to 96.62% scaling efficiency, 3.86x end-to-end speedup, and 69.1% per-device memory reduction. These results establish coordinated application-encryption parallelism as a practical foundation for scalable homomorphic Transformer inference.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。