EinHops:用于 RNS-CKKS 张量上表达性同态操作的 Einsum 表示法
EinHops: Einsum Notation for Expressive Homomorphic Operations on RNS-CKKS Tensors
AI总结:
针对全同态加密中多维张量操作受限的问题,本文提出基于 Einstein summation 表示法的极简系统 EinHops,将其分解为固定的 FHE 操作序列,实现了简单、通用且可解释的加密张量操作。
摘要:
全同态加密(FHE)是一种允许直接对加密数据执行计算的加密方案,有效地闭环了安全与外包计算。数据不仅在静止和传输时加密,在处理时也加密。然而,FHE 提供了有限的指令集:SIMD 加法、SIMD 乘法和一维向量的循环旋转。这一限制使得执行多维张量操作具有挑战性。实践者必须将这些张量打包成一维向量,并将张量操作映射到这种一维布局上,而非其传统的嵌套结构。虽然先前的系统在自动化这一过程方面取得了显著进展,但它们通常将关键的打包决策隐藏在多层抽象之后,使得调试、优化和在这些系统之上进行构建变得困难。在这项工作中,我们通过爱因斯坦求和(einsum)表示法来处理 FHE 中的多维张量操作。Einsum 表示法在其语法中显式编码了维度结构和操作,自然地揭示了张量应如何打包和转换。我们将 einsum 表达式分解为一组固定的 FHE 友好操作。我们实现了我们的设计并提出了 EinHops,这是一个极简系统,将 einsum 表达式分解为固定的 FHE 操作序列。EinHops 使开发者能够使用 FHE 执行加密张量操作,同时保持对底层打包策略的完全可见性。我们在一系列张量操作上评估了 EinHops,从简单的转置到复杂的多维收缩。我们展示了 einsum 表示法的显式特性使我们能够构建一个简单、通用且可解释的 FHE 张量系统。我们在以下仓库开源 EinHops:https://github.com/baahl-nyu/einhops。
英文摘要:
Fully Homomorphic Encryption (FHE) is an encryption scheme that allows for computation to be performed directly on encrypted data, effectively closing the loop on secure and outsourced computing. Data is encrypted not only during rest and transit, but also during processing. However, FHE provides a limited instruction set: SIMD addition, SIMD multiplication, and cyclic rotation of 1-D vectors. This restriction makes performing multi-dimensional tensor operations challenging. Practitioners must pack these tensors into 1-D vectors and map tensor operations onto this one-dimensional layout rather than their traditional nested structure. And while prior systems have made significant strides in automating this process, they often hide critical packing decisions behind layers of abstraction, making debugging, optimizing, and building on top of these systems difficult. In this work, we approach multi-dimensional tensor operations in FHE through Einstein summation (einsum) notation. Einsum notation explicitly encodes dimensional structure and operations in its syntax, naturally exposing how tensors should be packed and transformed. We decompose einsum expressions into a fixed set of FHE-friendly operations. We implement our design and present EinHops, a minimalist system that factors einsum expressions into a fixed sequence of FHE operations. EinHops enables developers to perform encrypted tensor operations using FHE while maintaining full visibility into the underlying packing strategy. We evaluate EinHops on a range of tensor operations from a simple transpose to complex multi-dimensional contractions. We show that the explicit nature of einsum notation allows us to build an FHE tensor system that is simple, general, and interpretable. We open-source EinHops at the following repository: https://github.com/baahl-nyu/einhops.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。