TL;DR
Replacing ReLU activations with polynomials in secure multi-party computation (MPC) dramatically speeds up encrypted deep neural network inference, but historically caused catastrophic training failure in deep models. This paper introduces ESPN, a single-round MPC exponentiation protocol based on the binomial theorem, alongside PILLAR, a regularized training method that prevents polynomial activations from exploding. Together, they achieve 3× to 110× faster inference over wide-area networks on networks as large as ResNet-50 (23M parameters) while maintaining accuracy competitive with plaintext models.
What Problem Does This Paper Address?
In Machine Learning as a Service (MLaaS), clients query proprietary models hosted on remote cloud servers. Secure Two-Party Computation (2PC) allows clients to evaluate these models over encrypted inputs without revealing their private data to the server or exposing model weights to the client.
However, secure inference is bottlenecked by non-linear layers like ReLUs and MaxPools (often accounting for over 90% of total inference runtime). In standard MPC frameworks, linear operations (convolutions, matrix multiplies) run efficiently over arithmetic secret shares, but non-linear comparisons require expensive conversions back and forth to binary shares or garbled circuits. Across high-latency Wide Area Networks (WANs), the round-trip latency of these conversions makes deep networks prohibitively slow.
Replacing ReLUs with low-degree polynomial approximations allows models to stay entirely within arithmetic secret sharing. Unfortunately, polynomials rapidly diverge outside narrow ranges, causing "escaping activations"—where values compound across deep layers (>11 layers), gradients explode, and training collapses to NaN.
Methods
The authors co-design the cryptographic MPC protocols with the neural network training pipeline:
- ESPN (Exponentiating Secret Shared Values using Pascal’s Triangle):
- Computes powers $x^k = (x_A + x_B)^k$ using the binomial theorem expansion: $\sum_{i=0}^k \binom{k}{i} x_A^{k-i} x_B^i$.
- Party A locally calculates $x_A^{k-i}$ while Party B locally calculates $\binom{k}{i} x_B^i$.
- A single parallel round of Beaver multiplication reconstructs the terms, evaluating arbitrary degree-$n$ polynomials in just 1 communication round using standard pre-computed Beaver triplets. (They also integrate HoneyBadger, an alternative single-round protocol requiring specialized offline material).
- PILLAR (Polynomial Activation Regularization):
- Quantization-Aware Fitting: Solves for polynomial coefficients using mixed-integer linear programming (MILP) bounded to fixed-point precision, preventing high-order coefficients from rounding to zero.
- Activation Regularization: Adds an exponential penalty loss term $p(x) = (x / \lambda_{\text{reg}})^\gamma$ (with even power $\gamma = 10$) that applies negligible loss when inputs $|x| \le \lambda_{\text{reg}}$ but penalizes out-of-range values aggressively.
- Training Safeguards: Uses an input clipping function and a warm-up schedule for the regularization hyperparameter $\beta$ during the first few epochs so early training instability does not trigger infinite gradients. Crucially, clipping is discarded entirely at inference.
- Architecture Tweaks: Employs Batch Normalization to keep activations centered, and replaces MaxPool with Average Pooling to stay within arithmetic MPC.
Datasets
The authors evaluate their techniques on standard vision benchmarks across multiple architectures:
- CIFAR-10 & CIFAR-100: Evaluated on MiniONN (7 layers), VGG-16, ResNet-18, ResNet-32, and ResNet-110.
- ImageNet (ILSVRC): Evaluated on ResNet-50 (~23 million parameters).
No new datasets were introduced; standard benchmark splits and pre-processing were used.
Key Insights and Ideas
- Binomial Splitting Eliminates MPC Rounds: Instead of evaluating powers iteratively ($O(n)$ rounds via Horner's rule) or sequentially ($O(\log n)$ rounds via square-and-multiply), the binomial theorem splits secret shares so that every term can be prepared locally and resolved in a single simultaneous Beaver multiplication.
- Loss Functions Cannot Rely on Classification Error Alone: When activation inputs escape the approximation window, activations compound exponentially across layers. The network reaches
NaNbefore standard classification loss gradients can steer the weights back into range. Explicitly penalizing layer inputs above a hard threshold solves this root cause. - Temporary Training Wheels: Clipping inputs during the first few training epochs prevents immediate numerical blow-up, allowing the regularizer time to pull activations into the safe polynomial domain. Once converged, clipping is removed without accuracy loss during MPC evaluation.
Key Results
- Inference Speed:
- Over a simulated 100 ms RTT WAN on CIFAR, ESPN and HoneyBadger deliver a 4× speedup over CryptGPU, 5× over GForce, and 18×–40× over COINN.
- On ImageNet (ResNet-50), the method achieves a 3× speedup over CryptGPU, 15× over Cheetah, and 90×–110× over COINN.
- In real-world AWS WAN benchmarks (Ohio to Frankfurt), ResNet-50 inference dropped from 268.7s (CryptGPU) to 104.9s (HoneyBadger) and 153.9s (ESPN).
- Communication Rounds: Reduced round complexity by 3× to 5× compared to state-of-the-art baselines (e.g., dropping ResNet-110 rounds from 1093 in CryptGPU down to 221).
- Accuracy:
- On CIFAR-10 ResNet-18: 93.3% encrypted accuracy (vs. 94.6% for CryptGPU).
- On CIFAR-100 ResNet-18: 74.4% encrypted accuracy (vs. 76.6% for CryptGPU).
- On ImageNet ResNet-50: 77.3% encrypted top-1 accuracy (compared to 80.8% plaintext ResNet-50 baseline and dominating COINN's 73.9%).
Limitations and Future Work
- Bit-Ring Capacity vs. Polynomial Degree: Because CrypTen relies on a 64-bit ring, polynomial degrees are practically capped at $n=4$ to prevent fixed-point truncation failures and ring overflow. Moving to larger cryptographic ring sizes (e.g., 128-bit) could allow higher-degree approximations (such as degree 8) to close the accuracy gap.
- Average Pooling Penalty on Non-Residual Nets: Replacing MaxPool with AvgPool avoids binary conversions but degrades accuracy by up to ~6% on architectures lacking skip connections (like VGG-16).
- Threat Model: The protocols assume a semi-honest (honest-but-curious) two-party setting. Extending single-round polynomial evaluation to malicious adversaries remains open for future research.
Summary updated