Signed but Steerable: Measuring and Closing the Text-Vector Integrity Gap in Offline Retrieval-Augmented Generation

summary

The gist

Offline retrieval-augmented generation on edge devices is updated through signed knowledge packs that carry text and precomputed embedding vectors The hijack rate equals the distribution of angular…

In short

The research addresses a security flaw where signed knowledge packs lack integrity guarantees for their text and embedding vectors, allowing attackers to manipulate retrieval. It proposes verification methods, like tolerance checks or exact code-level verification, to close this gap across different hardware. The findings quantify query exposure under various schemes and suggest practical procedures for auditing offline RAG systems.

Key concepts

Text–Vector Integrity Gap
This is the security problem where a signature only proves who published a data pack, not that the associated text and precomputed embedding vectors are trustworthy. An attacker can exploit this gap to control the vectors and steer retrieval results towards desired outputs.
Margin Law
This law predicts how many queries an attacker can successfully 'hijack' when using tolerance-based verification. It is calculated by finding the distribution of angular retrieval margins at a specified tolerance level, providing a predictable measure of potential query exposure.
Code-Level Verification
This is the strongest security method, requiring bit-reproducible computation between the publisher and verifier. The verifier trusts only its own recomputation and rejects vectors that do not match exactly or are ambiguous, ensuring no tampering occurs.

Terminology used across episodes

This episode discusses

The paper

Signed but Steerable: Measuring and Closing the Text-Vector Integrity Gap in Offline Retrieval-Augmented Generation · Read on arXiv

Georgios Feretzakis, Alexandros Papaspyridis

securagen.ai

Transcript

Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.

Nadia: We're looking at the paper: "Signed but Steerable".

Elias: Here's the gist of the paper. Offline retrieval-augmented generation on edge devices is updated through signed knowledge packs that carry text and precomputed embedding vectors The hijack rate equals the distribution of angular retrieval margins at the tolerance (the margin law) The core problem addressed by this research is the text–vector integrity gap in offline RAG systems, where a signature proves who published a pack but not that its vectors encode its text This gap allows an attacker to control the vectors and steer retrieval, leading to predictable query exposure based on retrieval margins The paper investigates how verification methods, such as tolerance-based checks or exact code-level verification, can close this security gap across heterogeneous hardware and quantify the resulting impact on correct answers in real-world edge AI deployments The margin law provides a predictable measure of query exposure under tolerance-based verification schemes For an optimal attacker, the hijack rate under tolerance τ equals the empirical distribution of angular retrieval margins at arccos τ Margins are small in five corpora and two embedding models, so an idealised tolerance at the level of floating-point noise leaves up to 5.5% of queries exposed A threshold calibrated from our CPU INT8–FP32 comparison of a small embedding model leaves 98–100% exposed The margin law is computed from honest vectors and a query log, allowing an operator to measure exposure without attacking This measurement depends on the corpus and the embedding model, not only on the tolerance Exposure of compressed vector stores is highly dependent on the storage format, with some formats being significantly more vulnerable than others Tolerance-based audits against SQ8 leave 2–15% of queries exposed, while product quantisation and binary codes leave essentially all queries exposed On real FAISS indexes, an executed attack on product-quantisation passes the tolerance check for every tampered vector and puts the attacker’s document first for 25% of targets Code-level verification with canonicalisation detects and removes all 60 tampered codes in these experiments Exact code-level verification offers the strongest guarantee against steering, provided a bit-reproducible computation is shared between the publisher and verifier The verifier trusts only its own recomputation, marking an entry ambiguous when honest float noise could have produced the neighbouring code A stored vector is accepted only if every entry equals c, or is ambiguous and equals a, and accepted vectors are then rewritten with the verifier’s codes through canonicalisation This approach rejects no honest vector in our samples on three platforms and four compute backends The practical implications for edge devices show that verification cost competes directly with the language model’s compute resources Verification at 8 pairs per second costs the model 23–31% of its decoding speed and raises the 99th-percentile inter-token latency by 108–167% The end-to-end experiment shows that an attack using an INT8 reference threshold lowers correct answers from 0.75 to 0.39 on the device The paper concludes by recommending a procedure for checking knowledge base integrity that is measurable and calibrated It suggests preferring recompute-and-discard on devices that can afford it, auditing compressed stores at the level of codes with canonicalisation, and pinning everything that affects numerics The authors release the code, data, the reference verifier and the protocol with its deviation log so that operators can measure the exposure of their own systems This provides a concrete procedure that can be measured, calibrated and audited The paper emphasizes that provenance controls do not cover a compromised writer, and integrity audits are ineffective for compressed formats without code-level verification Code-level verification fits naturally into the life cycle of a vector database at ingestion, replication, and periodic background audits The paper highlights that determinism becomes a security property for edge inference, suggesting integer-only arithmetic or pinned kernels as the natural basis for exact verification Furthermore, cost considerations necessitate scheduling verification away from the language model’s compute when running on resource-constrained CPUs The paper provides a set of design guidelines for builders of offline RAG systems, stressing the need to measure before choosing any verification tolerance It advises calibrating abstention in domain and evaluating context pruning by its error decomposition rather than accuracy alone The final conclusion is that the gap can be closed by recomputing vectors on the device and discarding the shipped ones or by verifying quantisation codes with canonicalisation This procedure turns a recommendation for integrity checking into a measurable and auditable process The authors release the code, data, the reference verifier and the protocol with its deviation log so that operators can measure the exposure of their own systems and adopt the defences The paper states that a compromised publisher is exactly the case where a binding must cover all vectors, not just signatures The authors release the code, data, the reference verifier and the protocol with its deviation log so that operators can measure the exposure of their own systems and adopt the defences The paper notes that a compromised publisher could choose, at every ambiguous entry, the admissible code that raises a carrier and lowers the gold The authors release the code, data, the reference verifier and the protocol with its deviation log so that operators can measure the exposure of their own systems and adopt the defences The paper notes that a small NLI model was not able to detect silent factual overrides because it judges a near-copy with a changed fact as consistent Structural governance, i.e., editor thresholds for changes to existing content, rejects all twelve structural attacks we tested and remains the reliable control for updates The paper notes that the authors release the code, data, the reference verifier and the protocol with its deviation log so that operators can measure the exposure of their own systems and adopt the defences The paper notes that a small NLI model was not able to detect silent factual overrides because it judges a near-copy with a changed fact as consistent Structural governance, i.e.

Paper summary: Nadia: They’re claiming that for an optimal attacker who controls the vectors, their hijack rate under a certain tolerance tau equals the distribution of angular retrieval margins at arccos tau. This is called the margin law and it lets an operator measure exposure without actually attacking >

Elias: That means they found that on five specific corpora and two embedding models, where margins are small, even tolerances just at the level of floating-point noise can leave up to five point five percent of queries exposed, which is at most one point two percent in any corpus once you exclude exact duplicate documents > <ref:2611.06498#pg1,at the level of floating-point noise>

Priya: That sounds worrying when you think about edge devices where you don't have a lot of computational power for heavy checks. What they found is that a threshold calibrated from comparing an INT8 and FP32 version of a small embedding model leaves ninety-eight to one hundred percent of queries exposed >

Nadia: So, even with that calibration, it still exposes almost everything on the system they tested >

Elias: They also looked at how compressed vector stores are affected by this attack. Tolerance-based audits against SQ8, SQ4, product quantisation and binary storage leave two to fifteen percent of queries exposed depending on the format >

Priya: But then they look at exact code-level verification. That approach seems much stronger for closing the gap across different hardware because it detects and removes all sixty tampered codes in their experiments >

Conclusion: Nadia: The title itself, "Signed but Steerable," really captures the central tension here: you have a signature proving authorship, but you still have to deal with vectors that can be steered if the integrity isn't checked properly >

Elias: And the authors are Georgios Feretzakis and Alexandros Papaspyridis. Their main point is that they needed to move beyond just signatures and focus on how verification methods can close this text-vector integrity gap across different systems >

Priya: What this means for us is that provenance controls alone aren't enough if you are dealing with compressed formats because they don't provide the necessary guarantee against steering without code-level verification >

Nadia: So, the final recommendation they give is to prefer recompute and discard vectors on devices that can handle it, or to audit compressed stores at the level of codes with canonicalisation >

Elias: It suggests that for edge inference, determinism itself becomes a security property because using integer-only arithmetic or pinned kernels is a natural basis for exact verification >

Priya: The practical implication is that you can't just pick any tolerance and assume it works; you have to measure exposure before choosing anything because calibrating the abstention level in the domain and evaluating context pruning by error decomposition matters more than accuracy alone >

More episodes

← Home