Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Decision-Aware Quadratic ReLU Replacement for HE-Friendly Inference

About

Fully homomorphic encryption (FHE) supports only additions and multiplications, so FHE-only neural-network inference typically replaces ReLU with polynomials fitted over empirical activation intervals. Such interval fitting often requires higher-degree polynomials to control activation error, incurring homomorphic evaluation costs, while classification is determined by the final logit decision. We revisit ReLU replacement from a decision-aware perspective: given a trained single-hidden-layer ReLU MLP and a specified calibration set, can an HE-friendly low-degree polynomial replace ReLU without retraining while preserving calibration-set decisions? We focus on quadratic replacement, the lowest-degree that retains a genuine per-unit nonlinearity. For calibration sets positive-margin separable in the lifted space, we formulate quadratic replacement as a linear separation problem, yielding necessary and sufficient conditions for calibration-lossless replacement and a constructive algorithm for the coefficients. When the positive-margin condition fails -- often because a few near-boundary or misclassified calibration samples bring the lifted hulls into contact -- we extend the same geometric framework via reduced convex hulls and Lagrangian-dual soft-margin relaxations. These cap the weight any single sample can carry, converting the problem into smaller convex quadratic programs that yield approximately feasible coefficients with high empirical agreement on calibration-set decisions. In particular, at the maximal weight cap $\mu=1$, the reduced-convex-hull relaxation reduces to standard convex-hull separation; the relaxation thus continuously extends the positive-margin exact theory. Under CKKS, the quadratic replacement matches plaintext top-1 accuracy on multiple benchmarks, running 3.7--4.1$\times$ faster than Remez-7 in the activation module and 1.18--1.68$\times$ faster end-to-end.

Rui Li, Wenyuan Wu, Weijie Miao• 2026

Related benchmarks

TaskDatasetResultRank
Image ClassificationFGVC-Aircraft (test)--
322
Image ClassificationStanford Cars (test)--
320
Intent ClassificationBanking77 (test)
Accuracy98.47
196
Intent ClassificationMASSIVE (test)--
17
ClassificationOtto (test)
Accuracy76.05
6
Text ClassificationSIB-200 (test)
Top-1 Accuracy89.71
6
Showing 6 of 6 rows

Other info

Follow for update