Polynomial approximation replaces non-polynomial activation functions—such as ReLU, sigmoid, or tanh—with polynomial substitutes that can be computed using only addition and multiplication over ciphertexts. This is essential because leveled FHE schemes natively support only arithmetic operations; evaluating a true ReLU requires comparison and branching, which are not directly expressible in the encrypted domain without bootstrapping.
Glossary
Polynomial Approximation

What is Polynomial Approximation?
Polynomial approximation is the mathematical process of representing non-linear functions as low-degree polynomials to enable their evaluation within the arithmetic constraints of leveled homomorphic encryption schemes.
Common techniques include Chebyshev approximation, Taylor series expansion, and minimax approximation, each trading off degree, interval fidelity, and computational depth. The goal is to find the lowest-degree polynomial that maintains acceptable inference accuracy while staying within the scheme's noise budget, directly impacting the latency and viability of encrypted inference pipelines.
Key Approximation Techniques
The core mathematical strategies for replacing non-linear activation functions with polynomial equivalents to enable computation within the constraints of leveled homomorphic encryption schemes.
Least Squares Approximation
A foundational method that minimizes the squared error between the target non-linear function and a polynomial over a defined interval.
- Mechanism: Solves for polynomial coefficients that minimize the integral of the squared difference.
- Best for: Approximating smooth functions like sigmoid or tanh where average-case error matters.
- Trade-off: May exhibit Runge's phenomenon at interval boundaries, causing large edge errors.
- Example: Approximating sigmoid on [-5, 5] with a degree-7 polynomial.
Minimax Approximation
Uses the Remez algorithm to find the polynomial that minimizes the maximum absolute error over the target interval.
- Mechanism: Iteratively adjusts coefficients to achieve an equioscillation property.
- Best for: Approximating ReLU or sign functions where worst-case error must be bounded.
- Advantage: Guarantees uniform error bounds across the entire domain.
- Example: A degree-3 minimax approximation of ReLU on [-1, 1] ensures no point exceeds a specified error threshold.
Chebyshev Interpolation
Constructs an approximating polynomial by interpolating the target function at the roots of Chebyshev polynomials.
- Mechanism: Selects interpolation nodes clustered near interval edges to suppress Runge's phenomenon.
- Best for: Near-optimal uniform approximation with simple construction.
- Advantage: Provides a close proxy to minimax results without iterative Remez computation.
- Example: Interpolating the swish activation at Chebyshev nodes for stable encrypted inference.
Taylor Series Expansion
A local approximation method using derivatives at a single point to construct a power series.
- Mechanism: Expands the function around a center point using its derivatives.
- Best for: High accuracy very close to the expansion point.
- Limitation: Error grows rapidly away from the center; rarely used alone for wide-interval HE inference.
- Example: Approximating exp(x) near x=0 for softmax components in encrypted attention mechanisms.
Piecewise Polynomial Fitting
Divides the input domain into segments and fits a separate low-degree polynomial to each segment.
- Mechanism: Combines interval partitioning with local approximation.
- Best for: Functions with sharp transitions like ReLU or leaky ReLU.
- Implementation: Requires homomorphic multiplexing to select the correct polynomial based on encrypted input sign.
- Example: Using a degree-2 polynomial for negative inputs and a linear identity for positive inputs to approximate ReLU.
Composite Polynomial Approximation
Approximates a complex function by composing simpler, individually approximated sub-functions.
- Mechanism: Breaks the target into a chain of operations, each replaced by a polynomial.
- Best for: Functions like GELU or swish that combine multiplication with smooth activation.
- Advantage: Reduces the total multiplicative depth compared to a single high-degree fit.
- Example: Approximating GELU by composing a polynomial for the Gaussian CDF with the identity function x.
Frequently Asked Questions
Clear, technical answers to common questions about approximating non-linear functions for encrypted computation.
Polynomial approximation is the process of replacing non-linear functions—such as ReLU, sigmoid, or tanh—with low-degree polynomial equivalents to enable their evaluation within Leveled Fully Homomorphic Encryption (FHE) schemes. Because FHE schemes like CKKS and BFV natively support only addition and multiplication over encrypted data, any non-linear activation must be expressed as a polynomial. The approximation is computed over a specific input domain (e.g., [-1, 1]) using methods like least squares fitting, Chebyshev interpolation, or Minimax approximation. The goal is to minimize the approximation error while keeping the polynomial degree low, since each multiplication consumes the noise budget and increases latency. For example, the ReLU function max(0, x) can be approximated by a degree-2 or degree-4 polynomial, trading off accuracy for computational efficiency in the encrypted domain.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding polynomial approximation requires familiarity with the underlying homomorphic encryption schemes, noise management techniques, and the non-linear functions being approximated.
Noise Budget Management
Every homomorphic multiplication consumes noise budget and increases ciphertext size. Polynomial approximation directly impacts this budget:
- Higher-degree polynomials consume more multiplicative depth
- Leveled FHE requires knowing the exact circuit depth before encryption
- Modulus switching and rescaling reduce noise but also reduce precision
- The goal is finding the lowest-degree polynomial that achieves acceptable model accuracy while fitting within the available noise budget
Multi-Party Computation Hybridization
Polynomial approximation is often used in hybrid MPC-HE protocols to optimize end-to-end encrypted inference:
- Linear layers (matrix multiplications, convolutions) are evaluated efficiently using HE with SIMD packing
- Non-linear activations are evaluated using MPC protocols, avoiding polynomial approximation entirely
- This design pattern leverages the linear-operation efficiency of HE and the non-linear evaluation efficiency of MPC
- Trade-off: introduces communication rounds between parties but eliminates approximation error
Ciphertext Packing and SIMD
Single Instruction Multiple Data parallelism dramatically improves the amortized throughput of polynomial evaluation:
- Multiple plaintext values are packed into a single ciphertext
- A single homomorphic addition or multiplication applies to all packed slots simultaneously
- Polynomial approximation of activation functions benefits from batch evaluation across many neurons
- Galois keys enable rotation of slots within a packed ciphertext, required for implementing convolution operations in the encrypted domain

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us