Fiona: Accelerating FHE Inference with Packing-Aware Ternary Weights

📄 arXiv: 2609.35352v1 📥 PDF

作者: Yiteng Peng, Zhibo Liu, Dongwei Xiao, Shuai Wang

分类: cs.LG

发布日期: 2026-09-28


💡 一句话要点

提出FIONA以加速全同态加密推理

🎯 匹配领域: 支柱五:交互与反应 (Interaction & Reaction)

关键词: 全同态加密 神经网络推理 三元量化 性能优化 隐私保护

📋 核心要点

  1. 现有的全同态加密推理方法速度较慢,明文-密文乘法占据了推理时间的主要部分。
  2. FIONA通过选择性三元化权重,优化权重组内的共享三元值,保留敏感组的全精度权重,从而加速推理。
  3. 在多个模型上,FIONA显著减少了明文-密文乘法操作,提升了加密推理的速度,同时保持了较高的准确性。

📝 摘要(中文)

全同态加密(FHE)允许在加密输入上直接进行神经网络推理,但其速度仍远低于明文推理。将服务器的明文权重应用于加密激活涉及明文-密文乘法(PMult),占据了最近系统推理时间的一半以上。论文提出FIONA,一个离线优化器,基于权重的三元化对模型性能的影响,选择性地对权重进行三元化处理。FIONA鼓励每个权重组内共享三元值,并对敏感组保留全精度权重,从而在同一层内实现三元化和全精度路径的共存。实验结果表明,FIONA在VGG11、ViT和BERT模型上分别减少了53.4%-79.5%的PMult操作,推理速度提升了2.38倍、1.68倍和1.84倍,且准确率损失均低于1%。

🔬 方法详解

问题定义:论文旨在解决全同态加密推理中明文-密文乘法(PMult)操作占用大量时间的问题。现有方法在处理加密激活时,PMult操作的数量未能有效减少,导致推理速度缓慢。

核心思路:FIONA的核心思路是通过选择性地对权重进行三元化处理,鼓励权重组内共享相同的三元值,同时对敏感的权重组保留全精度权重。这种设计旨在减少PMult操作的数量,从而加速推理过程。

技术框架:FIONA的整体架构包括离线优化器、权重三元化模块和混合操作编译器。优化器根据权重三元化对模型性能的影响进行选择性处理,编译器则负责将三元化和全精度路径整合,优化计算过程。

关键创新:FIONA的主要创新在于其选择性三元化策略和混合操作的编译方法。与现有方法不同,FIONA允许在同一层内同时使用三元化和全精度权重,从而在加速推理的同时保持模型的准确性。

关键设计:FIONA在权重三元化过程中,设定了共享三元值的策略,并对敏感权重组进行全精度保留。此外,FIONA还通过应用共同的缩放因子来优化输入的累加和输出的重用,进一步提升了计算效率。

🖼️ 关键图片

fig_0
img_1
img_2

📊 实验亮点

FIONA在多个模型(如VGG11、ViT和BERT)上实现了显著的性能提升,PMult操作减少了53.4%-79.5%,推理速度分别提升了2.38倍、1.68倍和1.84倍,且在所有模型上准确率损失均低于1%。这些结果表明FIONA在加密推理领域的有效性和实用性。

🎯 应用场景

该研究的潜在应用领域包括安全数据处理、隐私保护的机器学习和云计算环境中的加密推理。FIONA的优化方法可以有效提升全同态加密技术在实际应用中的可行性,推动其在金融、医疗等对数据隐私要求高的领域的应用。未来,FIONA可能成为加密推理的标准解决方案,促进更多基于隐私保护的智能系统的开发。

📄 摘要(原文)

Fully homomorphic encryption (FHE) enables neural network inference directly on encrypted inputs, but it remains orders of magnitude slower than plaintext in- ference. Applying the server's plaintext weights to encrypted activations involves plaintext-ciphertext multiplications (PMult) and accounts for more than half of inference time in recent systems. Ternary quantization can replace these multipli- cations with additions and subtractions, but the savings rarely materialize under packed execution. A single PMult applies a weight group fixed by the packing layout and can be avoided only when all its weights share the same ternary value. Ternarizing all groups, however, largely degrades accuracy. We present FIONA, an offline optimizer that selectively ternarizes weights within a given packing layout based on the estimated effect of ternary conversion on the model's performance. FIONA encourages a shared ternary value within each weight group and retains full-precision weights for sensitive groups, so ternar- ized and full-precision paths coexist within a layer. It then compiles these hybrid operators exactly, applying common scaling factors once to accumulated inputs and reusing sums across outputs. Weight ternarization can also narrow the input ranges of downstream polynomials. FIONA fits lower-degree replacements under a cumulative accuracy budget, reducing multiplicative depth and bootstrapping. On VGG11, ViT, and BERT, FIONA reduces PMult operations by 53.4-79.5% and accelerates end-to-end encrypted inference by 2.38x, 1.68x, and 1.84x, re- spectively, with less than 1% accuracy loss across all three models.