Analog compute-in-memory chips multiply a matrix by a vector inside the memory array itself. They do this by summing currents along wires, and they can be orders of magnitude more energy-efficient than GPUs. A client who rents such a chip from an untrusted server faces a problem: every existing method for checking outsourced arithmetic assumes the answer is exact. Analog chips never return exact answers. That leaves the client unable to tell honest device noise from a server that cut corners, for example by running a pruned model, skipping rows, or fabricating outputs. This note proposes a noise-tolerant randomized check for analog matrix-vector products. The client compares a secret random projection of the server's output against a cheap precomputed prediction, and accepts if the two agree within a threshold. The key design choice is where that threshold comes from. We derive it from the physics of a specific circuit trick, not from noise statistics the server reports.
The circuit is the "1FeFET-1R" cell. A ferroelectric transistor stores a weight as its conductance, and a large fixed resistor is placed in series with it. Because the resistor dominates the cell's total resistance, a 5:1 spread in transistor resistance shrinks to roughly 1.15:1 in current. This bounds how far any honest cell can stray from its programmed value, using a quantity set by a well-controlled passive component. We argue that this physical bound is exactly what a verifier needs. It turns "trust the server's noise claims" into "trust a device tolerance you can check on a datasheet," and it lets us state how much cheating can hide inside honest noise.
Core Claim
Series-resistor degeneration makes a sound, noise-tolerant Freivalds-style check possible for analog in-memory matrix-vector products. A Freivalds check verifies a product by comparing random projections of the two sides instead of recomputing it. Two things make this work: (i) the honest error envelope follows from the resistor-to-channel resistance ratio, and (ii) the one error the resistor does not fix, temperature-driven current drift, acts mostly as a shared gain that the check can normalize away. The resistor value then becomes a verification design knob. Larger resistors shrink the "slack," meaning how large a malicious deviation can go undetected. They also compress the signal gap between stored levels. So there is a resistor value that maximizes the ratio of signal to undetectable deviation, and no one has characterized it.
The closest prior work either verifies exact digital arithmetic or tolerates analog error without verifying anything. Slalom checks GPU matrix products with Freivalds' identity $Cs = A(Bs)$ inside a trusted enclave. Its test is bit-exact, so it would reject every honest analog output. Verifiable Computing for Approximate Computation extends interactive proofs to rounding over finite rings, but only for discrete rounding, not continuous physical drift. Optimistic Verifiable Training forces digital GPUs to agree bit-for-bit by logging rounding decisions. No two analog chips agree bit-for-bit, so that route is closed. On the analog side, Fault-Free Analog Computing with Imperfect Hardware compensates crossbar defects by decomposing matrices, and Analog Lagrange Coded Computing handles real-valued coded computation. Both assume honest workers; the latter explicitly leaves adversarial verification open. Our proposal takes the randomized-projection method from Slalom and the error-bounding mechanism from the FeFET line. It adds what neither supplies: a threshold with a physical justification and a stated soundness slack.
Research Program
The setting follows Slalom's split. A client, or a small trusted enclave, owns the weights $W$ ($m \times n$) and computes the nonlinear layers. It outsources linear layers to a server running 1FeFET-1R crossbars, and the server reports each layer's digitized output $y$ for input $x$. Offline, the client draws secret random vectors $s, s' \in \mathbb{R}^m$ and stores $u = W^\top s$ and $u' = W^\top s'$. After that, each check costs $O(m+n)$, while the outsourced product costs $O(mn)$.
We model an honest output as $y = \gamma (W + \Delta W) x + \eta$. Here $\gamma$ is a chip-wide gain set by temperature, $\Delta W$ is the static cell-to-cell deviation left after programming, and $\eta$ is read and converter noise. The client estimates the gain from the second projection and tests the first:
$$\hat\gamma = \frac{s'^\top y}{u'^\top x}, \qquad z = \left| s^\top y - \hat\gamma\, u^\top x \right| \le \tau(x) .$$
The first work package bounds the threshold $\tau(x)$ from circuit physics. A cell's conductance is $g = 1/(R_s + R_{ch})$, where $R_s$ is the series resistor and $R_{ch}$ is the transistor channel resistance. To first order, a channel-resistance deviation $\Delta R_{ch}$ perturbs $g$ by a relative amount of about $\Delta R_{ch}/R_s$. So $|\Delta W_{ij}|$ is bounded by the specified channel spread divided by $R_s$, plus the resistor's own fabrication tolerance. This gives a bound on $|s^\top \Delta W x|$ in terms of $\|s\|$, $\|x\|$ and that ratio. We will build this model with parameters from the fabricated devices in the file. These include channel resistances of 2–10 kΩ, series resistors of 50 kΩ and 1 MΩ, 2-bit cells tolerating 40 mV threshold variation on a 32×32 array (First demonstration of in-memory computing crossbar using multi-level Cell FeFET), and the 0–85 °C operating range studied in TReCiM.
The second work package handles temperature. Energy-efficient Computation-In-Memory Architecture using Emerging Technologies observes that series resistors do not stop thermal current drift. This is the finding that motivates the gain-normalized test. We will measure in simulation how much of the drift is truly common-mode across the array and how much is cell-specific. Any cell-specific residual gets folded into $\tau$.
The third work package is the soundness analysis. The vector $s$ is secret and Gaussian. So for any adversarial deviation $d$ added to $y$, the projection $s^\top d$ is distributed as $N(0, \|d\|^2)$ over the client's randomness. The check therefore catches $d$ with probability that grows with the ratio of $\|d\|$ to $\tau$. Repeating the check with $k$ independent vectors drives the miss probability down exponentially in $k$. The central quantity is the slack $\varepsilon(R_s)$: the largest deviation that passes with meaningful probability. We will compute it as a function of $R_s$ alongside the signal gap between stored levels. That gap also shrinks roughly as $1/R_s$ once the resistor dominates, which is what creates the trade-off. We will also treat the leakage of $s$ through repeated accept/reject feedback, and evaluate vector rotation as the mitigation.
The final deliverable is a sweep over resistor value, array size, cell bit depth and temperature. For each setting it reports false-reject rate, detection power against concrete cheating strategies, verifier cost, and the damage a worst-case adversary can do while staying inside the slack.
Baselines
The naive reference is accepting every answer the server returns. This measures how much accuracy damage each cheating strategy causes when nothing checks it, and every other method is scored by how much of that damage it prevents.
Exact Freivalds as in Slalom, applied to the analog outputs, is the direct transplant of existing practice. We expect it to reject essentially all honest runs. Including it documents that the transplant fails; it is not a competitor to beat on power. Slalom reports 6× to 20× throughput gains over pure enclave execution with under 0.5% accuracy loss on digital GPUs. That number is context for the digital alternative, not a figure an analog check should match.
The strongest competitor is a data-fitted tolerant Freivalds check. It is the same projection test, but $\tau$ is set to a high quantile of $z$ measured on honest runs at a single calibration temperature, with no physics envelope and no gain normalization. It will use the same secret vectors, the same number of projections $k$, the same simulated chips, and the same honest calibration budget as our method. We will tune its quantile so that its false-reject rate matches ours on held-out honest runs. We find no reported result on Lacuna for any tolerant Freivalds check on analog crossbars. Our method beats it if, at an equal false-reject rate held across 0–85 °C, it detects deviations at a meaningfully smaller norm, or keeps the false-reject rate from blowing up when temperature leaves the calibration point.
Digital row spot-checking has the client recompute $k$ randomly chosen output rows exactly and compare them within tolerance. Its per-input cost, $kn$, is comparable to $k$ projections. It will receive the same total client operation budget.
Two ablations isolate the key ingredients. The first removes gain normalization, testing $s^\top y$ against $u^\top x$ directly. The second replaces the physics-derived $\tau$ with the data-fitted one while keeping normalization. A third comparison sweeps $R_s$ from zero, a bare FeFET cell, up to 1 MΩ, which tests whether degeneration is what makes a small slack possible.
Why not just…?
Why not just outsource to a digital accelerator and use Slalom unchanged? If the server can use a GPU, this is the right answer, and we do not claim otherwise. The proposal only matters in a deployment where the untrusted compute is analog, which is where the reported efficiency of these arrays pulls (885.4 TOPS/W in First demonstration of in-memory computing crossbar using multi-level Cell FeFET). The file gives no GPU efficiency figure measured the same way, so we make no direct efficiency comparison.
Why not just fit a tolerance threshold on honest runs and skip the physics? This is the real threat. In a single fixed-temperature regime, it may perform as well as our method. Our case rests on two points the experiments test directly. First, a threshold fitted at one temperature should either false-reject or become loose as the chip drifts, because the resistor does not remove drift. Second, a data-fitted threshold says nothing about slack on an unseen chip, whereas the physics bound does. If the fitted baseline matches us across the full temperature range, the contribution shrinks to gain normalization plus the slack analysis, and we will report it that way.
Why not just run the job on two chips and compare? Honest chips differ from each other through device-to-device variation. The comparison therefore needs a tolerance anyway, and the same envelope problem reappears at twice the server cost. It also fails if one operator controls both chips. We include a two-chip comparison in the sweep to show where its false-reject rate lands at the same tolerance.
Why not just recompute a few rows digitally? For deviations spread across many outputs, spot-checking should roughly match random projections. But an adversary who concentrates a deviation on a few rows escapes row sampling with high probability, while a Gaussian projection mixes every row. The sparse-deviation attack below is designed to separate the two. If spot-checking matches us even there, it should be preferred for its simplicity.
Proposed Experiments
We simulate 1FeFET-1R arrays using the device parameters above, tiled to layer sizes, with 2-bit and 3-bit cells, 2-bit to 6-bit output converters, and temperatures from 0 to 85 °C. Workloads are ResNet-18 on CIFAR-10 and the 64-point discrete Fourier transform. Both are workloads used for analog crossbars in Fault-Free Analog Computing with Imperfect Hardware, which reports above 99.999% cosine similarity for that transform. The client checks each linear layer, given the server's reported input to that layer, so honest error does not compound inside the check.
The adversaries are:
- model substitution with a pruned or low-rank $W$;
- silently skipping a fraction of output rows;
- fabricated outputs;
- a sparse-deviation attack that targets the few logits deciding each classification;
- an informed slack attack, where the adversary knows the envelope and chooses the largest deviation it predicts will pass, to maximize accuracy loss.
The metrics are:
- detection probability as a function of deviation norm, at a fixed 1% honest false-reject rate over the temperature range;
- the empirical slack against the predicted slack $\varepsilon(R_s)$;
- worst-case accuracy loss under the informed slack attack;
- client cost per checked input relative to computing the product locally.
For context on cost, SafetyNets reports client verification 8× to 82× faster than local evaluation. That figure comes from exact interactive proofs on digital hardware.
The decisive checks are three. First, the physics-derived $\tau$ must hold the false-reject rate near target across 0–85 °C where the fitted baseline does not. Second, the predicted slack must track the measured slack across the resistor sweep, including an interior resistor value that maximizes the ratio of level gap to slack. Third, under the informed slack attack, the accuracy damage the adversary can cause at the chosen resistor value must be small next to the damage from the unchecked baseline. If the first check fails, the physics envelope adds nothing over data fitting. If the second fails, the resistor is not a usable verification knob, and the proposal reduces to a tolerant Freivalds check.
References
- Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware
- Verifiable Computing for Approximate Computation
- Optimistic Verifiable Training by Controlling Hardware Nondeterminism
- Fault-Free Analog Computing with Imperfect Hardware
- Analog Lagrange Coded Computing
- First demonstration of in-memory computing crossbar using multi-level Cell FeFET
- TReCiM: Lower Power and Temperature-Resilient Multibit 2FeFET-1T Compute-in-Memory Design
- Energy-efficient Computation-In-Memory Architecture using Emerging Technologies
- SafetyNets: Verifiable Execution of Deep Neural Networks on an Untrusted Cloud