NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Global Context Without Encrypted Attention: Gated Oversized Convolutions for Private Segmentation

Homomorphic encryption lets a hospital send an encrypted scan to a cloud server and receive an encrypted segmentation mask back, without the server ever seeing the image. Every multiplication the server performs on encrypted data adds noise. Once the accumulated noise crosses a threshold, the answer is destroyed, so it has to be reset with bootstrapping, an expensive procedure that dominates runtime. This budget makes two standard ways of giving a vision model global context costly. Deep stacks of small convolutions take a long time to encrypt and run: Low-Complexity Deep CNNs on FHE reports 2,271 seconds for one CIFAR-10 image with ResNet-20. Softmax attention needs exponentials and divisions that have to be approximated with deep polynomials or iterative solvers (HEAT). The current workaround is linear attention inside a fully low-degree polynomial network (ULD-Net). It has only been shown for image classification, and linear attention provably averages away sharp, localized signals (Why Softmax Attention Outperforms Linear Attention). Small lesions and thin boundaries are exactly that kind of signal.

This note proposes a different mechanism. Global context in encrypted dense prediction can come from static global filters rather than dynamic attention maps. We use one-dimensional depthwise convolutions whose kernels are longer than the feature map, as in ParCNetV2. One cheap encrypted-times-encrypted product then gates local evidence by that global context. Because the long kernels are fixed model weights, applying them multiplies ciphertext by plaintext. That is a much lighter operation than multiplying two ciphertexts, and circulant structure can make it cheap to rotate (PrivCirNet). The question we test is whether, at matched noise budget, content-dependent attention buys anything for private segmentation over static global filtering plus a gate.

Core Claim

Under a fixed multiplicative-depth budget per block, a gated oversized axial convolution block will match or beat encrypted linear attention and polynomial criss-cross attention on medical and scene segmentation. It will also use fewer bootstraps and scale better with resolution. The reasoning is that in dense prediction the long-range information a pixel needs is mostly smooth context: which organ, which side of the body, what scene. That kind of context is exactly what a static global filter can represent. The spike-sensitive decision is local, and it can be preserved by multiplying it with the context instead of averaging it into the context. Concretely, a block computes

$$y = \sigma\big( (k_w \ast_{\text{row}} k_h \ast_{\text{col}} P x) \odot (G x) \big) + x,$$

where the symbols mean the following. $x$ is the encrypted feature map. $P$ and $G$ are pointwise channel projections, stored as plaintext weights. $k_h$ and $k_w$ are learned depthwise 1D kernels of length about twice the height and width, applied with zero padding along columns and rows. $\odot$ is the single ciphertext-ciphertext product, which acts as a data-dependent gate. $\sigma$ is a degree-2 or degree-3 polynomial activation.

After a column pass and a row pass, every output pixel depends on every input pixel. The two branches are built to consume the same number of levels, so their scales agree at the multiplication. That addresses the scale-mismatch failure that multi-branch polynomial networks invite (Gap 5 in our file; ULD-Net shows that variance grows exponentially in polynomial stacks without per-sample normalization).

This differs from the closest work in three ways. ParCNetV2 is plaintext, with softmax-free gating but unconstrained operators. ULD-Net keeps attention but linearizes it and treats images as flat token sequences for classification. PrivCirNet notes that attention cannot use circulant weights because attention maps are computed at runtime; we sidestep that by removing runtime token-token maps from the global path entirely. No work in the file evaluates encrypted dense segmentation at all.

Research Program

The first component is a fully polynomial segmentation network. It has an encoder-decoder shape, with skip connections that are level-aligned by construction. The proposed block replaces attention in it. Normalization follows ULD-Net's PolyNorm and its variance penalties, so we do not reinvent stabilization. Training follows ULD-Net's recipe of training polynomial networks from scratch rather than fitting polynomials to a trained model afterwards.

The second component is the CKKS (approximate-arithmetic homomorphic encryption) implementation of the axial passes. We will compare two ways of packing the image into ciphertext slots. In row-major slot packing, a length-$L$ convolution needs on the order of $\sqrt{L}$ rotations with baby-step giant-step evaluation. The alternative is PrivCirNet-style coefficient encoding, in which a circular convolution becomes a single polynomial product. The zero-padded length-$2W$ kernel is a circular convolution on a padded row, so both apply. We will report levels consumed, rotations, and bootstraps per block for each packing, alongside the imaginary-part clearing that Low-Complexity Deep CNNs on FHE found necessary for deep CKKS networks.

The third component is an analysis of when static context suffices. We build synthetic 2D tasks in the spirit of the flat-versus-spiky tests in Why Softmax Attention Outperforms Linear Attention. In one, a pixel's label depends on the presence of a distant spike in its row or column; static filters and linear attention should both handle this. In another, the label depends on the location or identity of the most salient distant token, which should require content-dependent routing. These tasks tell us, before any encrypted run, which regime real segmentation benchmarks resemble.

Baselines

The naive reference point is a fully polynomial local CNN with $3 \times 3$ depthwise-separable convolutions, SiLU approximated by polynomials, and fused batch normalization, following FastFHE. Its receptive field grows only with depth. On classification it reaches 92.61% encrypted accuracy on CIFAR-10 with ResNet-20 at 763 seconds. No encrypted segmentation result was found on Lacuna for it. We run it at the same resolution, parameter count and total level budget as our network. It represents "do nothing about receptive field." Beating it means higher Dice at equal or lower latency.

The strongest existing encrypted global-mixing method is ULD-Net's linear attention with rotary position embeddings and PolyNorm (ULD-Net). ULD-Net reports 76.70% ImageNet top-1 with ViT-Small and 78.81% on CIFAR-100. No reported segmentation result was found on Lacuna for ULD-Net. We port its attention block into the same encoder-decoder, replacing our block one-for-one, and use its training losses and the same tuning budget, including a sweep over its penalty weights. It is the key competitor because it is also global, linear in the number of pixels, and depth-bounded. Beating it means equal or better Dice/F1 with fewer bootstraps, or clearly better Dice at matched bootstraps.

The content-routing upper reference is a polynomial criss-cross attention. It is CCNet's recurrent row-and-column attention (CCNet) with softmax replaced by squared scores normalized with PolyNorm-style scaling, run twice with shared weights. It is our construction, since no encrypted criss-cross attention exists. Plaintext softmax CCNet reports 81.9% mIoU on Cityscapes test and 45.76% on ADE20K validation, which sets a plaintext ceiling. On medical data the plaintext ceilings are TransDeepLab's 0.9239 DSC on ISIC 2017 and 80.16% DSC on Synapse, and Medical Transformer's 81.02 F1 on GlaS and 88.84 on Brain US. These plaintext models use different backbones and resolutions. We therefore report them only as ceilings and retrain our own plaintext softmax version of the criss-cross model under our protocol.

Two ablations isolate the proposal's ingredients. The first removes the gate, so the block is an oversized convolution plus polynomial activation; this tests whether data dependence matters. The second keeps the gate but shrinks the kernels to $7$ taps; this tests whether the global receptive field matters. All models share the same data, augmentation, number of epochs, level budget per block, and a fixed hyperparameter search budget.

Why not just…?

Why not just use ULD-Net's linear attention for segmentation? This is the real threat. Linear attention is global, depth-cheap, and already stabilized under homomorphic encryption. Our argument against it is theoretical: it averages tokens and cannot separate spiky from flat inputs (Why Softmax Attention Outperforms Linear Attention). Our static filter is also an averaging operator, though, so the theory alone does not favor us. Our bet is on cost and structure. Our global path needs no ciphertext-ciphertext product. It keeps the 2D row/column structure, which flattening to tokens discards. The gate lets local spikes pass through multiplicatively. If ported linear attention matches our Dice at equal bootstraps on ISIC, GlaS and Synapse, we will report that the simpler existing method suffices.

Why not just deepen the local CNN? Depth is what the encrypted setting charges for. The ResNet-110 CKKS pipeline needed imaginary-removing bootstrapping to avoid divergence, and ResNet-20 alone took 2,271 seconds per image (Low-Complexity Deep CNNs on FHE). Downsampling to enlarge receptive fields also costs boundary detail. The local-CNN baseline at matched level budget answers this directly. We will additionally run a deeper version at matched accuracy and compare latency.

Why not just approximate softmax inside criss-cross attention? Accurate softmax approximations need deep polynomials or iterative solvers. These drive bootstrap counts: HEAT's co-adaptation cut bootstraps by only 1.6× and still ran GPT-2 at about 37.6 seconds per token (HEAT). We nonetheless include a low-degree polynomial criss-cross baseline, because it is the fairest test of whether content-dependent routing matters. If it beats our block substantially at its higher cost, the right conclusion is that routing is worth paying for, and our static filter should be demoted to a cheap first stage.

Why not just prune background tokens? Pruning selects tokens depending on the data, which encrypted slot layouts cannot do without revealing information or evaluating deep selection circuits. MOAI leaves pruning unaddressed for this reason. We do not test it.

Proposed Experiments

Plaintext polynomial training establishes accuracy on four datasets: ISIC 2017 at $128\times128$ and $256\times256$, GlaS, Brain US, and Synapse slices. ADE20K at reduced resolution is a scene-parsing stress test. For every block type we report Dice, F1, mIoU and Hausdorff distance. Encrypted evaluation in CKKS at 128-bit security then runs the best configuration of each block type on ISIC and GlaS. It reports end-to-end latency, amortized latency with batch packing, bootstraps, rotations, ciphertext memory, and agreement between decrypted and plaintext masks.

A resolution sweep from $64$ to $256$ pixels per side measures how latency and bootstrap count grow. Our block's global path should grow roughly linearly in pixel count, with rotation count governed by row length. Polynomial criss-cross attention should grow as $N\sqrt{N}$, where $N$ is the number of pixels. The synthetic presence-versus-location tasks are run for all blocks in plaintext.

The decisive checks are three. First, if the gated oversized block does not beat the local CNN at equal level budget, global context is not the bottleneck and the proposal fails. Second, if ported linear attention matches it at equal bootstraps, the contribution reduces to showing that ULD-Net transfers to segmentation. Third, if the no-gate ablation matches the full block, data dependence is unnecessary, which would be surprising but still informative. The synthetic tasks should predict which of these outcomes occurs on real data. Whether they do is itself a result about what long-range reasoning medical segmentation actually requires.