[Paper Review] On Polynomial Approximations for Privacy-Preserving and Verifiable ReLU Networks
This paper proposes a novel degree-2 polynomial activation function, $\sigma_{\text{poly}}(x) = x^2 + x$, to replace the ReLU function in privacy-preserving and verifiable deep neural networks. Unlike the commonly used square function ($x^2$), this polynomial better approximates ReLU with integer coefficients, leading to up to 10.4% higher test accuracy on CIFAR and Tiny ImageNet datasets across multiple architectures including VGG-16 and NIN.
Outsourcing deep neural networks (DNNs) inference tasks to an untrusted cloud raises data privacy and integrity concerns. While there are many techniques to ensure privacy and integrity for polynomial-based computations, DNNs involve non-polynomial computations. To address these challenges, several privacy-preserving and verifiable inference techniques have been proposed based on replacing the non-polynomial activation functions such as the rectified linear unit (ReLU) function with polynomial activation functions. Such techniques usually require polynomials with integer coefficients or polynomials over finite fields. Motivated by such requirements, several works proposed replacing the ReLU function with the square function. In this work, we empirically show that the square function is not the best degree-2 polynomial that can replace the ReLU function even when restricting the polynomials to have integer coefficients. We instead propose a degree-2 polynomial activation function with a first order term and empirically show that it can lead to much better models. Our experiments on the CIFAR and Tiny ImageNet datasets on various architectures such as VGG-16 show that our proposed function improves the test accuracy by up to 10.4% compared to the square function.
Motivation & Objective
- To address the poor accuracy performance of the square activation function ($x^2$) when replacing ReLU in privacy-preserving and verifiable deep neural networks.
- To identify a better degree-2 polynomial with integer coefficients that uniformly approximates the ReLU function, especially under finite field or integer coefficient constraints.
- To empirically validate that the proposed polynomial activation improves model accuracy compared to $x^2$ on deeper architectures and realistic datasets like CIFAR and Tiny ImageNet.
- To demonstrate that the square function is suboptimal even under constraints of integer coefficients or finite fields, challenging its widespread use in secure ML frameworks.
Proposed method
- Propose a new polynomial activation function $\sigma_{\text{poly}}(x) = x^2 + x$ as a uniform approximation to the scaled ReLU function $2 \cdot \text{ReLU}(x)$ on the interval $[-1, 1]$.
- Theoretical analysis shows that $\text{ReLU}(x)$ cannot be uniformly approximated by integer-coefficient polynomials on $[-1, 1]$, but $2 \cdot \text{ReLU}(x)$ can when the scaling constant is even.
- For larger intervals $[-a, a]$, the method uses a real-coefficient polynomial approximation to $2 \cdot \text{ReLU}(x)$, then rounds coefficients to integers for finite field compatibility.
- The method ensures compatibility with privacy-preserving and verifiable computation techniques that require integer or finite-field polynomials.
- Empirical evaluation compares the proposed $x^2 + x$ with $x^2$ across multiple architectures (VGG-16, NIN, LeNet, CNN) and datasets (CIFAR-10, CIFAR-100, Tiny ImageNet-10, Tiny ImageNet-200).
- Hyperparameters such as learning rate, weight decay, and batch size are tuned for fair comparison across activation functions.
Experimental results
Research questions
- RQ1Is the square function ($x^2$) the optimal degree-2 polynomial with integer coefficients for approximating ReLU in deep neural networks?
- RQ2Can a better degree-2 polynomial with integer coefficients be found that more accurately approximates ReLU than $x^2$?
- RQ3Does replacing ReLU with a polynomial that better approximates it lead to significant accuracy improvements in privacy-preserving and verifiable inference frameworks?
- RQ4Can a polynomial with integer coefficients uniformly approximate the ReLU function on $[-1, 1]$?
- RQ5How does the proposed polynomial $x^2 + x$ compare to $x^2$ in terms of test accuracy across deeper architectures and complex datasets?
Key findings
- The proposed polynomial activation $\sigma_{\text{poly}}(x) = x^2 + x$ improves test accuracy by 5.6% over $x^2$ on CIFAR-10 using the architecture from Liu et al. (2017).
- On CIFAR-100, the proposed function improves accuracy by 4.0% compared to $x^2$ using the same architecture.
- For the NIN architecture, the improvement reaches 7.7% on CIFAR-10 and 9.4% on CIFAR-100 over the square function.
- On VGG-16 with Tiny ImageNet-200, the proposed function achieves a 10.4% higher test accuracy than the square function.
- On LeNet with Tiny ImageNet-10, the proposed function improves accuracy by 5.8% over $x^2$.
- Theoretical analysis confirms that $\text{ReLU}(x)$ cannot be uniformly approximated by integer-coefficient polynomials on $[-1, 1]$, but $2 \cdot \text{ReLU}(x)$ can be, justifying the choice of $x^2 + x$ as a better approximation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.