Manuscript Offprint

arXiv:2609.09357

Encrypt What Matters: When Selective Homomorphic Inference Is Efficient

Ali Backour, Juan Reyes, Jaime Punyed, Ana Onoprishvili

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Fully homomorphic encryption (FHE) enables inference on private data without revealing it to the server, but evaluating an entire input under FHE is expensive. We study selective homomorphic inference, where only a sensitive region of interest (ROI) is encrypted, and computations independent of that region are performed in plaintext. Selective evaluation produces the same output as full FHE on the same model, without retraining. Its efficiency depends on how quickly encrypted dependencies spread through the network. For small encrypted ROIs, locality-preserving architectures can achieve order-of-magnitude homomorphic-evaluation speedups, whereas architectures with early global mixing provide essentially no speedup. These results identify locality as the key architectural property governing the benefit of selective homomorphic inference.

1 Introduction

Machine-learning inference is increasingly performed by remote services: a client sends an input to a server that owns a trained model and receives its prediction. This is convenient, but problematic when the input contains private information such as a medical image, an identity document, or a personal photograph. Fully homomorphic encryption (FHE) provides a way to run such inference without revealing the input to the server [Gentry, 2009]. With ordinary encryption, data must normally be decrypted before they can be processed, while FHE allows computation to be performed directly on encrypted values: the client encrypts an input x, the server evaluates the model on the ciphertext and returns an encrypted prediction that only the client can decrypt. The server therefore performs the inference without seeing the protected data.

The main obstacle is cost. Operations on encrypted values are substantially more expensive than ordinary arithmetic, making homomorphic neural-network inference much slower than plaintext inference [Gilad-Bachrach et al., 2016, Chou et al., 2018]. A large body of work has therefore focused on making encrypted inference cheaper. CryptoNets first demonstrated neural-network inference on encrypted inputs [Gilad-Bachrach et al., 2016], and subsequent systems improved its practicality through FHE-friendly architectures, discretizations, sparsity, packing, and programmable bootstrapping [Bourse et al., 2017, Brutzkus et al., 2019, Chou et al., 2018, Chillotti et al., 2021]. These approaches largely assume that the entire input is private and therefore encrypt the complete input.

In many applications, however, sensitivity is spatially local. A photograph may contain a sensitive face, a scan a particular lesion, or a document a name or identifier, while much of the remaining input can be public. Recent work has therefore considered encrypting only sensitive regions. PFHE [Dai, 2025] selectively encrypts privacy-sensitive image regions for CNN inference, while ΠROI\Pi_{ROI} [Bakas and Schoinianakis, 2026] develops a general hybrid protocol for encrypted regions of interest (ROIs). These works establish that selective encryption is possible and can reduce computation when only part of an input must be hidden. In this work, we characterize how encrypted dependencies propagate

Figure

Figure 1: Selective homomorphic inference evaluates only the computations that depend on the encrypted ROI under FHE. The output remains identical to full encryption.

Algorithm 1 SELECTIVEHOMOMORPHICEVALUATION

Require: quantized network M\mathcal{M}, input x\mathbf{x}, public ROI index set RR

1: Client: Send RR and the visible pixels x′=x[Rc]x' = \mathbf{x}[R^c] to the server.

2: Server: Construct the full inference circuit CM\mathcal{C}_{\mathcal{M}} for M\mathcal{M}.

3: Server: Propagate RR through CM\mathcal{C}_{\mathcal{M}} to identify the tainted computation.

4: Server: Partially evaluate CM\mathcal{C}_{\mathcal{M}} on the visible pixels x′x' to get the reduced circuit CM′\mathcal{C}_{\mathcal{M}'}.

5: Client: Encrypt x~=x[R]\tilde{\mathbf{x}} = \mathbf{x}[R] and send Enc(x~)Enc(\tilde{\mathbf{x}}) to the server.

6: Server: Evaluate CM′\mathcal{C}_{\mathcal{M}'} homomorphically on Enc(x~)Enc(\tilde{\mathbf{x}}) and return the encrypted output.

7: Client: Decrypt the encrypted output to obtain y\mathbf{y}.

through a network and when selective encryption retains a computational advantage. We notice that encrypting fewer input pixels does not necessarily mean performing proportionally less homomorphic inference. Neural networks repeatedly mix their inputs. After several layers, an activation far outside the original ROI may still depend on an encrypted pixel and must therefore also be computed homomorphically.

This paper asks: when is selective encryption actually efficient? We answer this through encrypted-dependency propagation, tracking which activations depend on encrypted inputs and therefore must remain under FHE. For CNNs, this dependency region grows predictably with the receptive field until saturation. We validate this behavior with real TFHE execution and use a support-propagation predictor to estimate speedup for other architectures. Overall, efficiency is governed less by depth or model family than by how long encrypted dependencies remain local.

References (31)