CGF-Softmax: 一种基于累积生成函数的softmax重参数化方法,用于在同态加密下高效推理
CGF-Softmax: A Cumulant-Based Softmax Reformulation for Efficient Inference under Homomorphic Encryption
AI总结:
本文提出CGF-softmax,通过累积生成函数重参数化softmax分母,消除了同态除法和显式最大减法,降低乘法深度并保持softmax关键属性,在视觉Transformer和大语言模型中实现高效准确的加密推理。
摘要:
同态加密(HE)是保护隐私的机器学习框架,允许在加密数据上直接进行推断。然而,评估softmax,作为Transformer架构的核心组件,在HE中尤为具有挑战性,由于其多变量结构、指数函数引起的动态范围大以及昂贵的除法操作。在本文中,我们提出了CGF-softmax,通过累积生成函数(CGF)重参数化softmax分母。通过消除同态除法和显式最大减法,这种重参数化显著减少了乘法深度,同时保持softmax的关键属性。在视觉Transformer和大语言模型上的广泛实验表明,CGF-softmax在加密推断中提供了高效且准确的softmax近似。特别是,它在推断准确性上接近高深度精确方法,同时通过减少乘法深度显著降低了计算成本。
英文摘要:
Homomorphic encryption (HE) is a prominent framework for privacy-preserving machine learning, enabling inference directly on encrypted data. However, evaluating softmax, a core component of transformer architectures, remains particularly challenging in HE due to its multivariate structure, the large dynamic range induced by exponential functions, and the costly division operation. In this paper, we propose CGF-softmax, which reformulates the softmax denominator through the cumulant generating function (CGF). By eliminating both homomorphic division and explicit maximum subtraction, this reformulation substantially reduces multiplicative depth while preserving key properties of softmax. Extensive experiments on Vision Transformers and large language models show that CGF-softmax provides an efficient and accurate approximation of softmax in encrypted inference. In particular, it achieves inference accuracy close to that of high-depth exact methods, while requiring substantially lower computational cost through reduced multiplicative depth.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。