AEGIS: Scaling Long-Sequence Homomorphic Encrypted Transformer Inference via Hybrid Parallelism on Multi-GPU Systems
Organizations: North Carolina State University, Raleigh, NC, USA · University of Central Florida, Orlando, FL, USA
Abstract
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.
Figures & tables
| Notation | Description |
| Polynomial degree (number of coefficients) | |
| Number of available slots in an encoded message | |
| Ciphertext modulus chain | |
| Special modulus chain | |
| Length of the modulus chain (maximum multiplicative depth) | |
| Current remaining multiplicative level |
| Collective | Plaintext cost | Plaintext example | Encrypted cost | Encrypted example |
| P2P send tokens | MB | MB GB | ||
| AllReduce tokens | MB MB | GB GB | ||
| AllGather tokens | MB MB | MB GB |
| Layer | Depth on Entry | Layer Latency Proportion (%) | Plaintext Tensor Parallel NVLink | HEBooster Limb Parallel NVLink | Cinnamon Limb Parallel NVLink | Hydra Tensor Parallel NVLink | AEGIS Parallel NVLink |
| Linear Projection | 0 | 28.78% | 49.52% | 31.71% | 81.71% | 89.53% | 93.29% |
| 1 | 16.20% | 50.00% | 30.75% | 30.75% | 91.13% | 92.37% | |
| 2 | 3.48% | 50.00% | 30.43% | 30.43% | 40.52% | 89.32% | |
| 18 | 3.29% | 50.00% | 30.75% | 30.75% | 91.13% | 94.21% | |
| 19 | 1.20% | 49.87% | 34.63% | 84.63% | 88.32% | 94.66% | |
| Bootstrapping | 20 | 1.14% | 50.00% | 31.50% | 61.23% | 48.63% | 91.32% |
Efficient Transformer Inference
Efficient Transformer Inference studies methods and systems that reduce the latency, memory, and energy needed to run Transformer models.
See all 121 papers