Encrypted Neural Networks without Overflows
Philipp Kern, Lorenzo Rovida, Samuel Teuber, Edoardo Manino, [1.5mm] Carsten Sinz, Alberto Leporati, [3.5mm] Karlsruhe Institute of Technology, Germany · 2026
Read Encrypted Neural Networks without Overflows by Philipp Kern, Lorenzo Rovida, Samuel Teuber, Edoardo Manino, [1.5mm] Carsten Sinz, Alberto Leporati, [3.5mm] Karlsruhe Institute of Technology, Germany (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-23096.txt.
Introduction
Kern and five coauthors tackle overflow in encrypted neural networks under CKKS, which evaluates networks on coded data using only addition, products, and rotation. Activations must be fit by curves over fixed input ranges, usually estimated by rough sampling. Sampled ranges leave networks exposed: the authors' method crafts valid inputs passing design ranges and corrupts around 47 percent of benign inputs in a CIFAR10 network. They then give a formal checking approach building working safe CKKS circuits with proven error bounds, handling more designs than prior proven methods.
Catalog record
| CREATOR | Philipp Kern, Lorenzo Rovida, Samuel Teuber, Edoardo Manino, [1.5mm] Carsten Sinz, Alberto Leporati, [3.5mm] Karlsruhe Institute of Technology, Germany |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 93014 |
| LICENSE | http://creativecommons.org/licenses/by-sa/4.0/ |
| RIGHTS | CC BY SA |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.23096
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Encrypted Neural Networks without Overflows Philipp Kern, Lorenzo Rovida, Samuel Teuber, Edoardo Manino, [1.5mm] Carsten Sinz, Alberto Leporati, [3.5mm] Karlsruhe Institute of Technology, Germany Abstract Fully homomorphic encryption (FHE) enables private inference by evaluating neural networks on encrypted data. In this way, we can delegate the computation to a third party server without ever revealing the user’s data. Currently, the CKKS scheme is the backbone of most efficient FHE implementations, but it only supports addition, multiplication, and array rotation operations, thus requiring all activation functions of the neural network to be approximated by polynomials within a certain interval, imposing strict design tolerances. In this paper, we demonstrate for the first time that this scheme is vulnerable to overflow attacks , i.e., seemingly benign inputs that can exceed such tolerances of the FHE circuit, thereby causing corrupt and unusable outputs. To avoid them, we propose a formal verification technique that computes certified bounds on the ranges of all neurons in the network. By construction, our method eliminates overflows and, in our experiments, removed observed overflows on all benchmarks, reducing failure rates from up to 47% to 0%. Moreover, our overflow-free solution is compatible with most CKKS-based frameworks, as it allows to simply substitute standard polynomials by polynomials with rigorously designed ranges. 1 Introduction Private inference schemes based on fully-homomorphic encryption (FHE) are designed to delegate the bulk of the computation to a third-party, without revealing the data itself [ 60 ] . This is especially relevant for the so-called machine learning as a service (MLaaS) business model, where clients buy access to a machine learning model, and run it on third-party servers [ 64 ] . An ideal FHE private inference scheme would encrypt the client data before transmission to the server, run the full inference over encrypted data, and only decrypt the output once it is transmitted back to the client.That way, the third-party server does never access the plaintext data, which might contain personal information. 1 1 1 The honest-but-curious threat model for the third-party server is a staple of the private inference literature. Several FHE schemes have been designed to realise this vision, including BGV [ 13 ] , BFV [ 14 , 29 ] , and TFHE [ 22 ] . Among them, the CKKS scheme [ 21 ] has emerged as the de facto standard for efficiently implementing private neural inference, as it allows to natively encode vectors of complex numbers and perform massive arithmetic operations in parallel. Recent work demonstrates that executing deep convolutional networks [ 47 ] and large language models [ 67 , 55 ] with CKKS is possible. However, the CKKS scheme imposes severe restrictions on the arithmetic operations available over the ciphertext: it only supports addition, multiplication, and array rotation. Thus, existing CKKS inference frameworks replace non-linear activation functions in the network with (high degree) polynomials [ 45 , 28 ] . In this paper, we posit the existence of a major weakness in modern CKKS designs for neural networks (NNs): adversarial input perturbations can make the CKKS network arbitrarily diverge from its reference plaintext implementation. This is because the polynomial approximations of non-linear activation functions are only tight for a limited range of values [ 52 , 39 ] . Input perturbations, adversarial or not, that exceed the range of a single activation can cause a cascade of overflows through the CKKS circuit yielding unrecoverable output values. We call this phenomenon an overflow attack 2 2 2 We understand overflow attacks similar to adversarial attacks, not in the sense of cryptographic attacks. (see Figure 1 ). Figure 1 : FHE allows neural network inference on encrypted data. However, perturbed inputs can exceed expected ranges of the FHE circuit, corrupting the output. Contributions. To address this challenge, we introduce a framework for the certified design of FHE NNs. Our framework guarantees the absence of overflow attacks, while keeping the size of the FHE circuit as small as possible. In detail, we propose the following contributions: • We present an efficient algorithm to find inputs that exceed the expected ranges of NNs with polynomial activations. With it, we demonstrate that the modern design of CKKS NNs is vulnerable to overflows. Our empirical result shows that even a small perturbation can cause up to 47\% of the tested inputs for a CIFAR10 NN to fail. • To mitigate this, we introduce a differential verification framework that can programmatically compute certified bounds on the value range of all neurons in the NN and on the approximation error of the output. The framework can handle both analytic (e.g. GELU) and non-analytic activation functions (e.g. ReLU), fully-connected and convolutional layers. • We give theoretical proofs that our bounds are sound for any possible input, i.e. not just small adversarial perturbations, and thus can be used at design time to eliminate the possibility of overflows. We also show that NNs with analytical activation functions (e.g. GELUs) yield an asymptotically smaller approximation error than NNs with non-analytical ones (e.g. ReLUs). This gives theoretical grounding to a recent empirical observation reported in [ 28 ] . • We further improve the design of CKKS NNs by allowing for the polynomial activations of different neurons in the same layer to be different, as opposed to uniform approximations in existing work. We thus generalize the Paterson-Stockmeyer algorithm [ 56 , 16 ] from evaluating (ciphertext \times constant) to (ciphertext \times plaintext). Our implementation shows that our design can achieve at least a 10x reduction in error compared to the established non-certified pipelines. We also provide an open-source implementation of our framework, based on OpenFHE [ 1 ] , which includes construction of certified polynomials and conversion to CKKS NNs. 2 Background State-of-the-art FHE NNs, especially those based on the CKKS scheme, are typically constructed in a multi-stage process, as shown in the upper part of Figure 2 : A regular NN is first approximated with polynomial activations, after which the corresponding FHE circuit is built. Throughout the paper we will conversely describe our approach, which is illustrated in the lower part of the same figure. Figure 2 : Designing CKKS neural networks requires approximating activations within their expected ranges. This paper avoids overflow attacks by computing provable bounds and certified polynomials. 2.1 Encrypted Computation with CKKS We will now provide a high-level description of the CKKS scheme and defer a larger overview on FHE schemes to Appendix A . Definition 2.1 (Arithmetic Circuit) . Given a ring R , an arithmetic circuit (or simply circuit ) is a directed acyclic graph whose nodes compute additions and multiplications from inputs, constants, and other nodes. With n input nodes and m output nodes, the circuit computes a function C:R^{n}\rightarrow R^{m} . The CKKS scheme. In the CKKS scheme, let N=2^{k} for some integer k>0 and let Q>1 be a large modulus. A plaintext message \mathbf{x}\in\mathbb{C}^{N/2} is first encoded as a polynomial (using a scaled inverse Fourier transform), then a small random error is introduced to ensure security. This results in a slightly perturbed message \mathbf{x}+{\bm{e}}_{\text{CKKS}}(\mathbf{x})\in\mathbb{C}^{N/2} , which is finally encrypted modulo Q . Like all standard FHE schemes, CKKS is based on the hardness of the Ring-Learning With Errors (RLWE) problem [ 50