Exact Embedding Verification on an Edge NPU: Measurements and Deployment Constraints
Georgios Feretzakis, Alexandros Papaspyridis
securagen.ai
Published November 27, 2026 · on the feed December 2, 2026 · ▲ 1 · arXiv 2611.37400
The abstract
Offline retrieval-augmented generation (RAG) on edge devices receives knowledge as signed packs of text and precomputed embedding vectors. Prior work showed that a signature does not bind the vectors to the text, that any verifier which accepts recomputed vectors within a cosine tolerance concedes a predictable share of queries, and that on a Raspberry Pi 5 the recomputation needed for exact checks costs a concurrently running language model 23-31% of its decoding speed on the CPU. Here we ask whether a neural processing unit (NPU) makes exact verification practical. On a Raspberry Pi 5 with a Hailo-8L accelerator, verifying 8 text-vector pairs per second costs the language model 1.3% of its decoding speed instead of 23-31%, and re-embedding a 1,745-window corpus takes 3.4 s instead of 72.9 s in FP32 on the CPU. The NPU's INT8 embeddings deviate from floating point (median cosine 0.917), so a tolerance set at the empirical 0.1% quantile of honest NPU-FP32 cosine similarities (0.784, about 38 degrees) would let an attacker who controls the vectors displace the correct document for essentially all evaluated queries; with that tolerance applied as an angular budget in a separate BGE-M3 experiment, an end-to-end attack lowers correct answers from 0.75 to 0.35. The same chip, however, returns bit-identical embeddings across repetitions, batch sizes and processes, which makes exact comparison against a reference generated on the same tested device and configuration possible. We also describe how to deploy exact verification: the device recomputes every chunk, retrieves only with its own vectors and, where the reference comes from a computation shown to reproduce its output, compares shipped reference vectors bit for bit; a mismatch is treated as an integrity event to be investigated rather than resolved by a tolerance; and a signed manifest binds every element that determines the bits.
The Brief
2:46A short podcast summary of the paper. Written and voiced by AI.
Transcript
Exact Embedding Verification on an Edge NPU. Measurements and Deployment Constraints. By Georgios Feretzakis and one other, from Securagen. Published on the twenty-seventh of November.
Retrieval-augmented generation that runs offline on an edge device gets its knowledge delivered as signed packs: text, plus embedding vectors computed in advance. Earlier work established three uncomfortable facts about this arrangement. A signature does not bind the vectors to the text. Any verifier that accepts recomputed vectors within a cosine tolerance gives away a predictable share of queries. And on a Raspberry Pi 5, the recomputation needed for exact checking costs a language model running alongside it twenty-three to thirty-one percent of its decoding speed on the CPU. The question here is whether a neural processing unit makes exact verification practical. The answer is yes, but only by comparing bits, not by allowing a tolerance.
The test device is a Raspberry Pi 5 with a Hailo-8L accelerator. Verifying eight text and vector pairs per second costs the language model one point three percent of its decoding speed, against twenty-three to thirty-one percent on the CPU. Re-embedding a corpus of one thousand seven hundred and forty-five windows takes three point four seconds, where the CPU in FP32 needs seventy-two point nine seconds.
The catch is precision. The NPU computes embeddings in INT8, and they drift from floating point, with a median cosine of zero point nine one seven against FP32. Suppose a tolerance is set at the empirical zero point one percent quantile of honest cosine similarities between the NPU and FP32. That comes to zero point seven eight four, roughly thirty-eight degrees. An attacker who controls the vectors could then displace the correct document for essentially every query evaluated. In a separate experiment with BGE-M3, using that tolerance as an angular budget, an end-to-end attack lowers the rate of correct answers from zero point seven five to zero point three five.
What rescues exact checking is determinism. The same chip returns bit-identical embeddings across repetitions, across batch sizes and across processes. That makes exact comparison possible against a reference produced on the same tested device and configuration.
The bit-for-bit guarantee is tied to that same device and configuration. The authors therefore spell out how to deploy it. The device recomputes every chunk and retrieves using only its own vectors. Where the reference comes from a computation shown to reproduce its output, shipped reference vectors are compared bit for bit. A mismatch is treated as an integrity event to be investigated, not something a tolerance quietly absorbs. And a signed manifest binds every element that determines the bits.
The accelerator removes the cost argument against exact verification, but its lower precision rules out the tempting shortcut of a loose cosine threshold. Its repeatability is what makes the strict version workable: on this hardware, the safe comparison is the exact one.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free