Non-Linear Polynomial Approximations of the Sigmoid for Plain and Encrypted Models
Sudeepa Panta, Qinghua Li · 2025
Homomorphic encryption (HE) revolutionizes secure data processing by allowing complex computational operations to be performed on encrypted data, preserving data privacy throughout machine learning workflows especially in cloud computing environments. However, the non-polynomial nature of activation functions like sigmoid poses challenges for HE frameworks, which are limited to basic arithmetic operations. This study explores Hermite polynomial and cubic spline interpolations as efficient methods to approximate the sigmoid function, balancing computational efficiency with approximation accuracy. The techniques are evaluated in both plaintext and encrypted environments. Experiments conducted on neural networks with the Fashion-MNIST and PneumoniaMNIST datasets demonstrate that clamped cubic splines with Chebyshev nodes and mid-degree Hermite polynomials achieve near-perfect approximations while maintaining competitive classification accuracy. Furthermore, an encrypted logistic regression model using Hermite polynomials demonstrates comparable performance to its plaintext counterpart, with only a 0.30% accuracy difference. These findings highlight the feasibility of polynomial approximations for enabling secure, privacy-preserving machine learning, paving the way for more efficient machine learning computations under encryption constraints.