Encrypted inference lets a server run a neural network on data it cannot read. It is slow mainly because the encrypted numbers are enormous. A single image becomes megabytes of ciphertext, and moving those bytes in and out of memory dominates the cost. Analog crossbar arrays are grids of resistive memory cells that multiply a vector by a stored matrix in one step, using Ohm's and Kirchhoff's laws inside the memory itself. They are the densest and most energy-efficient way to do that multiplication, but their answers are noisy. Current leaks through neighboring cells (so-called sneak paths), and conductances drift. The working hypothesis behind this note comes from the most popular encrypted-arithmetic scheme, CKKS. CKKS is already approximate: every decrypted result carries some error by design. Crossbar error might therefore be absorbed into that existing allowance instead of being eliminated at great cost.
The difficulty is that crossbar errors do not land uniformly. To multiply 50-bit ciphertext coefficients on a crossbar that resolves a few bits, both operands must be split into narrow slices ("bit-planes"). The partial products are then shifted and summed. An error in a low-order partial product is multiplied by a small power of two and disappears below the CKKS precision floor. The same error in a high-order partial product is multiplied by up to $2^{50}$ and destroys the result. Our claim is that the right design is significance-aware. Low-order bit-planes go to dense, selector-free, unverified analog arrays whose errors are charged against a computed CKKS precision budget. Only the few high-order bit-planes are computed exactly, on verified isolated-cell arrays or in digital logic. We will make this precise with an explicit error-transfer model from crossbar non-idealities to decrypted-message precision, and test it against measured sneak-path behavior on ciphertext data. That data has worst-case statistics for crossbars because its bits are pseudorandom.
Core Claim
The problem is a plaintext-ciphertext polynomial product, the dominant operation in encrypted linear layers. It can be written as a matrix-vector product. The encoded plaintext forms a negacyclic matrix of coefficients modulo $q$, which is stored in the crossbar. A ciphertext component is the vector streamed through it.
Split the ciphertext coefficients into input slices of $b_x$ bits and the stored matrix into weight slices of $b_w$ bits. Let $\varepsilon^{(0)}_{ij}$ and $\varepsilon^{(1)}_{ij}$ be the integer errors, after analog-to-digital rounding, in the partial sum for input slice $i$ and weight slice $j$ on the two ciphertext components. Decryption computes $c_0 + c_1 s$ with a small ternary secret $s$. The extra error in the decrypted message is therefore
$$ E \;=\; \sum_{i,j} 2^{\,b_x i + b_w j}\left(\varepsilon^{(0)}_{ij} + \varepsilon^{(1)}_{ij}\, s\right) \bmod q . $$
The precision lost, in bits, is roughly $\log_2(\lVert E\rVert_\infty/\Delta)$ relative to the CKKS scaling factor $\Delta$.
Two consequences follow. First, multiplying by $s$ inflates errors on the second component by roughly the square root of the secret's Hamming weight, assuming independent errors. The two components should therefore not be protected equally. Second, the weight $2^{b_x i + b_w j}$ sets a sharp boundary. Partial products whose shift is well below $\log_2 \Delta$ minus the target precision can tolerate a sizable error rate. Those above it must be exact. The novelty is not "absorb hardware noise into the encryption noise", which MemFHE already states as an aspiration. The novelty is three things together:
- an explicit, validated transfer function from crossbar physics to CKKS precision;
- the observation that this transfer function is highly non-uniform across bit-planes;
- an array partition that exploits the non-uniformity.
Relation to Prior Work
Two papers motivate this work by showing that processing-in-memory attacks the right bottleneck for encrypted computation. MemFHE builds an end-to-end accelerator on resistive-RAM crossbars, including a pipelined bootstrapping design. It reports 265× over GPU on encrypted arithmetic. It uses exact digital bit-level logic inside the arrays rather than analog multiplication. It suggests hardware noise could be folded into encryption parameters, but gives no model of how that would work. FHEmem places bit-serial modular arithmetic next to DRAM mats in high-bandwidth memory. It reports 4.0× speedup and 6.9× energy efficiency on ResNet-20 and encrypted logistic regression (HELR). It is fully deterministic, so it never confronts analog error. Both forgo the main advantage of resistive crossbars, which is analog in-array summation. We pursue exactly that advantage.
Two papers supply methods we reuse. U-SWIM verifies only the roughly 10% of neural-network weights that a Hessian approximation marks as sensitive. It reports a 10× programming speedup with under 0.5% CIFAR-10 accuracy loss. Our bit-plane significance plays the role of its Hessian, with one difference: in our setting sensitivity is known exactly from algebra rather than estimated. U-SWIM also leaves sneak paths as future work, and those are central here. Circa shows private-inference networks tolerate about 10% stochastic activation faults and heavy low-order bit truncation with under 1% accuracy loss. This supports spending some decrypted precision. However, Circa works purely at the protocol level on commodity hardware.
Three lines of work constrain the design. The sneak-path literature, including An Electromagnetic Perspective of Artificial Intelligence Neuromorphic Chips, shows that leakage depends on how many neighboring cells sit in low-resistance states. Ciphertext and encoded-key data are pseudorandom, so they are close to the worst case for this effect. This point is raised as a gap around Mondal et al. and the randomizer work STAR. Crossbar error statistics measured on sparse neural-network activations therefore cannot be borrowed. Selector work such as the CuAg threshold switch in Thermally stable threshold selector based on CuAg alloy shows that isolation improves multiplication accuracy at a cost in area or variability. That is the price we pay only for the high-order bit-planes. Finally, Cheetah tunes encryption parameters per layer against noise budgets. We extend that bookkeeping with one more error source.
Research Program
The first component is a crossbar error simulator for ciphertext workloads. It uses nodal analysis of a passive or selector-equipped array, with these inputs: wire resistance, the ratio of on to off resistance, selector nonlinearity, programming variability and drift, and analog-to-digital converter resolution. It is driven by actual CKKS ciphertext bit-planes and encoded plaintext matrices. The output is the empirical distribution of $\varepsilon_{ij}$ per bit-plane pair and per array type. We expect these errors to be non-Gaussian, correlated across columns sharing a row, and dependent on the data's population of ones. We will check that rather than assume it.
The second component validates the transfer model. Simulated errors are injected into a real CKKS implementation. Measured decrypted precision loss is then compared with the prediction from the equation above, including the $s$-amplification on the second component and the effect of correlated errors.
The third component is a partition optimizer. Given a target output precision for each layer, it chooses three things for each bit-plane pair: dense unverified one-resistor arrays, selector-equipped arrays, or exact digital or verified isolated-transistor arrays. It also chooses the slice widths $b_x$ and $b_w$ and the converter resolution. The objective is to minimize area and energy subject to the precision budget. A Cheetah-style per-layer choice of $\Delta$ is folded in, so the optimizer can buy slack either from the hardware or from the parameters.
A side analysis addresses leakage. The added error depends only on the ciphertext, which the server already holds, and on the server's own weights. It therefore reveals nothing new to the server. However, the error is weight-dependent and reaches the client after decryption. We will measure whether it carries detectable information about the model.
Baselines
The naive reference point treats the whole multiplication as analog with no bit-plane awareness. Every partial product runs on the same dense unverified arrays, and the engineer simply checks whether decryption survives. We expect this to fail outright for realistic sneak-path error rates. Showing where it fails calibrates the problem. It will run on the identical simulator, parameter sets and workloads.
The strongest existing method is exact digital processing-in-memory. We will represent it in two ways. One is MemFHE-style bit-level in-situ resistive logic, reimplemented in our simulator with the same array technology and process assumptions. The other is the FHEmem design point, for which the file gives a reported result of 4.0× speedup and 6.9× energy efficiency on ResNet-20 and HELR relative to its own baseline. We will compare on energy and area per plaintext-ciphertext polynomial multiplication, and end to end on ResNet-20 and HELR, at equal decrypted precision. No reported result was found on Lacuna for any analog-crossbar encrypted multiplication, so there is no prior number for the analog approach itself. Beating this baseline means at least 2× lower energy per multiplication at matched area and matched end-task accuracy. Without that margin, the extra complexity is not justified.
The key ablation is uniform absorption. It uses the same analog arrays everywhere, with all bit-planes protected identically. The resulting average error is absorbed by raising $\Delta$ or adding a modulus level, under a Gaussian noise assumption. This isolates whether significance-aware allocation, rather than analog computing per se, produces the gain. A second ablation replaces the measured, data-dependent sneak-path error model with an independent Gaussian of matched variance. This tests whether physics-aware modeling changes the chosen partition.
All variants get the same tuning budget over $\Delta$, slice widths and converter resolution. All use the same CKKS ring dimension and 128-bit security parameters.
Why not just…?
Why not just use exact digital processing-in-memory, as MemFHE and FHEmem do? This is the main competitor, and it may win if the exact high-order bit-planes come to dominate cost. That happens when the precision target forces most partial products into the exact regime. The transfer model predicts how many bit-planes can go analog for a given $\Delta$, and the end-to-end comparison in the Baselines settles the question. If fewer than roughly half the partial products can be offloaded, we will report that analog crossbars are not worth it for this operation.
Why not just treat crossbar noise as one more Gaussian and raise the scale factor? This is the simplest form of MemFHE's suggestion and a real threat. Raising $\Delta$ by $k$ bits costs modulus budget and therefore multiplicative depth, which means more bootstrapping. Meanwhile an unprotected high-order error grows by up to $2^{50}$, so no reasonable $\Delta$ increase covers it. The uniform-absorption ablation measures this directly. If it matches the partitioned design within 20% on energy at equal depth, the bit-plane idea is unnecessary and we will say so.
Why not just write-verify and error-correct every cell, U-SWIM style but universal? Full verification costs roughly 10× more programming time, by U-SWIM's own reported speedup from verifying a tenth of weights. Codes add redundant columns. Neither removes read-time sneak-path error, which depends on the input pattern and not on how carefully cells were programmed. We will include a "verify everything plus selectors everywhere" configuration to measure what the uniform-protection approach costs in area.
Proposed Experiments
The first decisive check is model validity. Measured decrypted precision loss should match the transfer-model prediction within one bit across all bit-plane pairs and array types, on CKKS parameters of ring dimension $2^{15}$ and above. If correlated sneak-path errors break this agreement, the model must be revised before anything else.
The second check is the boundary. We will sweep the error rate injected into each bit-plane pair and locate the shift threshold above which decryption precision collapses. We will confirm that the threshold tracks $\log_2\Delta$ minus the target precision, as the equation predicts.
The third check is task accuracy. Networks will run end to end:
- the CryptoNets MNIST network, whose reported accuracy is 99% in CryptoNets;
- ResNet-20 on CIFAR-10;
- HELR.
Each runs under the optimized partition, measuring accuracy change, energy, area and latency against the Baselines. A Circa-like tolerance of under 1% accuracy loss serves as the acceptance threshold.
The fourth check covers data statistics. We will compare sneak-path error distributions on ciphertext bit-planes with those on plaintext neural-network activations. This quantifies how much worse encrypted data is for crossbars. We will also test whether a cheap public randomizing permutation of the input stream, in the spirit of STAR, helps. Such a permutation leaves the algebra unchanged.
The project fails cleanly in any of three cases. Correlated errors could make the precision budget unpredictable. Uniform absorption could match the partitioned design. Or the exact high-order bit-planes could leave no energy advantage over FHEmem-style digital processing-in-memory. Each of these outcomes is informative.
References
- MemFHE: End-to-end Computing with Fully Homomorphic Encryption in Memory
- FHEmem: A Processing In-Memory Accelerator for Fully Homomorphic Encryption
- U-SWIM: Universal Selective Write-Verify for Computing-in-Memory Neural Accelerators
- Circa: Stochastic ReLUs for Private Deep Learning
- An Electromagnetic Perspective of Artificial Intelligence Neuromorphic Chips
- In-situ Stochastic Training of MTJ Crossbar based Neural Networks
- STAR: Improving Lifetime and Performance of High-Capacity Modern SSDs Using State-Aware Randomizer
- Thermally stable threshold selector based on CuAg alloy for energy-efficient memory and neuromorphic computing applications
- Cheetah: Optimizing and Accelerating Homomorphic Encryption for Private Inference
- CryptoNets: Applying Neural Networks to Encrypted Data with High Throughput and Accuracy