paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Tensor Compiler with Automatic Data Packing for Simple and Efficient Fully Homomorphic Encryption

面向简洁高效全同态加密的自动数据打包张量编译器
PLDI 8(PLDI)2024匹配度 3/10 · 该论文属于编译器与代码生成方向,涉及张量程序的布局选择与自动打包优化,与用户关注的 ML 系统编译层有轻微交集;但它既不做静态分析,也不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,属于同领域不同子方向,且未强调形式化验证。引用 34 inbox
Aleksandar Krastev, Nikola Samardzic, Simon Langowski, Srinivas Devadas, Daniel Sanchez
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出 Fhelipe 张量编译器,用自动数据打包为全同态加密程序选择并优化张量布局,兼顾易用与性能。

FHE 可在密文上计算,但性能开销高且极难编程:数据须打包进长向量,操作受限,噪声随运算增长,带来不直观的性能权衡,大型应用手动实现繁琐。本文提出 Fhelipe 张量编译器,暴露 numpy 风格张量接口,将高层张量程序编译为高效 FHE 电路;其核心是自动数据打包,为张量选择布局并打包进密文,框架覆盖广泛布局并解析优化,从而高效编译大型程序,克服先前编译器布局低效或难以扩展的问题。在 FHE 加速器与 CPU 上评估,其性能匹配或超越手工优化的大型应用(如深度神经网络),较最先进 FHE 编译器平均快 18.5 倍,代码量减少 10–48 倍。

问题
FHE 性能开销高且编程困难:需手动把数据打包进长向量,操作受限且噪声随运算增长,大型应用(如神经网络)难以高效编译。
方法
Fhelipe 提供 numpy 风格张量编程接口,将高层张量程序编译为 FHE 电路;核心是自动数据打包,在广泛布局空间中解析地选择并优化张量到密文的布局。
评估
在先进 FHE 硬件加速器与 CPU 上,与手工优化的大型 FHE 应用及最先进 FHE 编译器比较;Fhelipe 性能匹配或超越手工实现,平均加速 18.5×,代码量减少 10–48×。
原文摘要(Abstract)

Fully Homomorphic Encryption (FHE) enables computing on encrypted data, letting clients securely offload computation to untrusted servers. While enticing, FHE has two key challenges that limit its applicability: it has high performance overheads (10,000× over unencrypted computation) and it is extremely hard to program. Recent hardware accelerators and algorithmic improvements have reduced FHE’s overheads and enabled large applications to run under FHE. These large applications exacerbate FHE’s programmability challenges. Writing FHE programs directly is hard because FHE schemes expose a restrictive, low-level interface that prevents abstraction and composition. Specifically, FHE requires packing encrypted data into large vectors (tens of thousands of elements long), FHE provides limited operations on these vectors, and values have noise that grows with each operation, which creates unintuitive performance tradeoffs. As a result, translating large applications, like neural networks, into efficient FHE circuits takes substantial tedious work. We address FHE’s programmability challenges with the Fhelipe FHE compiler. Fhelipe exposes a simple, numpy-style tensor programming interface, and compiles high-level tensor programs into efficient FHE circuits. Fhelipe’s key contribution is automatic data packing , which chooses data layouts for tensors and packs them into ciphertexts to maximize performance. Our novel framework considers a wide range of layouts and optimizes them analytically. This lets Fhelipe compile large FHE programs efficiently, unlike prior FHE compilers, which either use inefficient layouts or do not scale beyond tiny programs. We evaluate Fhelipe on both a state-of-the-art FHE accelerator and a CPU. Fhelipe is the first compiler that matches or exceeds the performance of large hand-optimized FHE applications, like deep neural networks, and outperforms a state-of-the-art FHE compiler by gmean 18.5×. At the same time, Fhelipe dramatically simplifies programming, reducing code size by 10× – 48×. CCS Concepts: • Software and its engineering → Compilers; • Security and privacy → Cryptography.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{KrastevSLDS24,
  title = {A Tensor Compiler with Automatic Data Packing for Simple and Efficient Fully Homomorphic Encryption},
  author = {Aleksandar Krastev and Nikola Samardzic and Simon Langowski and Srinivas Devadas and Daniel Sanchez},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656382}
}