Exact Embedding Verification on an Edge NPU: Measurements and Deployment Constraints
- Published
- Record updated
Summary
Offline RAG on edge devices needs exact embedding verification, but recomputing vectors on a Raspberry Pi 5 CPU costs the concurrent language model 23-31% of its decoding speed. On a Raspberry Pi 5 with a Hailo-8L NPU, verification at 8 text-vector pairs per second reduces that cost to 1.3%, 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, so a cosine tolerance would let an attacker controlling the vectors displace correct documents for essentially all evaluated queries.
Mitigation
The device recomputes every chunk, retrieves only with its own vectors and, where the reference comes from a reproducible computation, 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.
Related items
- InfoAsk, Forget, Repair: What Provenance-Gated Agent Memory Costs Across Six Language ModelsSimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)
- InfoDetectable Epistemic Attack Layers: A Coverage Theorem and Standardized Harness for Conversation-History IntegritySimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)
- MediumCVE-2026-77332: memtomem-stm envelope accepts Markdown and HTML from memory fieldsSimilar attack · NVD/CVE Database
- InfoDetecting Word-Substitution Poisoning of a RAG Knowledge Base with Relative Entropy and Runtime VerificationSimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)
- MediumCVE-2026-133505: Pydantic AI tool results become file downloads on history reloadSimilar attack · NVD/CVE Database