Homomorphic encryption (HE) enables privacy-preserving analytics but remains hindered by high computational overhead. We find that the inverse square root-a key primitive in many statistical and machine learning workloads-exhibits inconsistent and often suboptimal performance across HE libraries and hardware. This stems from a core trade-off between two costly HE operations: evaluating high-degree Chebyshev polynomials to speed up Newton's method versus performing bootstrapping to manage ciphertext noise. Because their relative costs vary by up to 6x across environments, any fixed configuration proves inherently inefficient. To address this challenge, we present HE-DAP, a cross-platform optimization framework that automatically navigates this trade-off. By profiling an environment's unique performance characteristics, HE-DAP finds the optimal balance between polynomial degree and iteration count to accelerate the encrypted inverse square root computation for a given accuracy target. Our evaluation on Lattigo, HEaaN-CPU, and HEaaN-GPU shows that HE-DAP's adaptive approach yields significant performance gains. It accelerates the core inverse square root computation by up to 2.35x over the fixed configuration in PP-STAT while maintaining high numerical accuracy (MRE <= 3.1 x 10^-8). We further demonstrate that optimizing this fundamental building block directly enhances the end-to-end performance of complex statistical analyses, confirming the practical benefits of our environment-aware approach. By automatically adapting to heterogeneous execution environments, HE-DAP demonstrates that principled parameter optimization can make privacy-preserving statistical analytics practical at scale.
翻译:同态加密(HE)虽然能够实现隐私保护分析,但却一直受限于高昂的计算开销。我们发现在许多统计与机器学习任务中的关键基础算子——逆平方根运算——在不同HE库与硬件环境下呈现不一致且通常次优的性能。这源于两种昂贵HE运算之间的核心权衡:评估高阶切比雪夫多项式以加速牛顿法,以及执行自举操作以管理密文噪声。由于两者相对成本在不同环境中变化幅度可达6倍,任何固定配置均难逃固有低效性。为解决这一挑战,我们提出HE-DAP这一跨平台优化框架,可自动导航该权衡。通过剖析特定环境的性能特征,HE-DAP能针对给定精度目标,在多项式阶数与迭代次数间找到最优平衡点,从而加速加密逆平方根计算。我们在Lattigo、HEaaN-CPU及HEaaN-GPU上的评估表明,HE-DAP的自适应方法带来了显著性能提升:相比PP-STAT中的固定配置,核心逆平方根计算加速比最高达2.35倍,同时保持高数值精度(MRE ≤ 3.1×10⁻⁸)。我们进一步证明,优化这一基础构建模块可直接提升复杂统计分析的端到端性能,验证了环境感知方法的实际效益。通过自动适应异构执行环境,HE-DAP表明:经合原则的参数优化能使隐私保护统计分析实现规模化应用。