决策感知的二次ReLU替换:面向同态加密友好推理 Decision-Aware Quadratic ReLU Replacement for HE-Friendly Inference 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-05-21
👁️ 预览文献
💡 AI 中文简介
全同态加密(FHE)只能做加法和乘法,因此纯FHE神经网络推理通常用多项式拟合ReLU。传统做法在激活区间上拟合,为控制误差往往需要高次多项式,导致同态计算开销大。本文从“决策”角度重新审视ReLU替换:给定已训练的单隐层ReLU MLP和校准集,能否用低次多项式在不重训练的情况下替换ReLU并保持校准集分类决策?作者聚焦二次替换,将其建模为线性可分问题,给出无损替换的充要条件和系数构造算法;当正间隔条件不满足时,用缩减凸包和拉格朗日对偶软间隔松弛扩展理论。在CKKS下,二次替换在多个基准上达到明文Top-1精度,激活模块比Remez-7快3.7–4.1倍,端到端快1.18–1.68倍。
领域隐私保护机器学习 / 全同态加密推理
适合谁读需要一定专业背景(同态加密、凸优化、神经网络基础)
核心贡献1. 提出决策感知的ReLU替换视角,将二次替换建模为提升空间中的线性分离问题,给出校准集无损替换的充要条件与构造算法;2. 通过缩减凸包与拉格朗日对偶软间隔松弛,将正间隔条件失效的情形转化为小规模凸二次规划,在最大权重上限μ=1时退化为标准凸包分离,连续扩展了精确理论。
关键数据在CKKS下,二次替换在多个基准上匹配明文Top-1精度;激活模块比Remez-7快3.7–4.1倍,端到端快1.18–1.68倍。
推荐理由如果你关心同态加密下的神经网络推理效率,这篇工作用几何视角把ReLU替换从“拟合误差”转向“决策保持”,用二次多项式就实现了高精度和显著加速,值得一读。
关键词["全同态加密", "隐私保护机器学习", "凸几何", "多层感知机", "训练后认证"]

原文摘要

查看英文原文摘要

Fully homomorphic encryption (FHE) supports only additions and multiplications, so FHE-only neural-network inference typically replaces ReLU with polynomials fitted over empirical activation intervals. Such interval fitting often requires higher-degree polynomials to control activation error, incurring homomorphic evaluation costs, while classification is determined by the final logit decision. We revisit ReLU replacement from a decision-aware perspective: given a trained single-hidden-layer ReLU MLP and a specified calibration set, can an HE-friendly low-degree polynomial replace ReLU without retraining while preserving calibration-set decisions? We focus on quadratic replacement, the lowest-degree that retains a genuine per-unit nonlinearity. For calibration sets positive-margin separable in the lifted space, we formulate quadratic replacement as a linear separation problem, yielding necessary and sufficient conditions for calibration-lossless replacement and a constructive algorithm for the coefficients. When the positive-margin condition fails -- often because a few near-boundary or misclassified calibration samples bring the lifted hulls into contact -- we extend the same geometric framework via reduced convex hulls and Lagrangian-dual soft-margin relaxations. These cap the weight any single sample can carry, converting the problem into smaller convex quadratic programs that yield approximately feasible coefficients with high empirical agreement on calibration-set decisions. In particular, at the maximal weight cap $μ=1$, the reduced-convex-hull relaxation reduces to standard convex-hull separation; the relaxation thus continuously extends the positive-margin exact theory. Under CKKS, the quadratic replacement matches plaintext top-1 accuracy on multiple benchmarks, running 3.7--4.1$\times$ faster than Remez-7 in the activation module and 1.18--1.68$\times$ faster end-to-end.