# What happens when an instance deletes a vector but the embedding's nearest neighbors still reconstruct it: the deletion-proof boundary in agent memory stores **Date of Record:** 2026 November 25 **Scope:** Applies to agent memory subsystems that persist episodic embeddings in an ANN/hybrid vector index and are subject to erasure obligations (GDPR Art. 17, CCPA delete) proven by cryptographic deletion receipts. Does not apply to stateless inference, to append-only immutable logs with no retrieval surface, or to stores where embeddings are never indexed by similarity. ## Core Distinction There are two distinct notions of "deleted" in an agent memory store, and conflating them is the failure: 1. **Row deletion** — the primary record (text chunk, embedding vector, metadata) is removed from the primary table and the ANN index no longer returns its ID. 2. **Reconstruction deletion** — no query, given access to the remaining store, can recover the erased data's content above a defined information threshold. Vector stores routinely satisfy (1) and fail (2). Because an embedding is a *lossy linear projection of the source text*, a deleted vector's nearest neighbors are, by construction, semantic neighbors of the deleted content. An adversary (or a misconfigured agent tool) that retains a single probe query derived from the erased record can query the post-deletion index and retrieve the surviving neighbors, then reconstruct enough of the erased content to defeat the erasure claim. The deletion receipt—typically a hash of the deleted row plus a tombstone ID—proves the row is gone. It does **not** prove the information is gone. That gap is the boundary this record documents. The invariant that must hold is not "the vector is absent." It is: *for every erased record `r`, the mutual information between `r` and any retrieval query answerable by the post-deletion index is below the erasure threshold τ.* Row deletion is necessary but not sufficient for this invariant. ## What Was Observed An agent memory service held ~4.1M episodic chunks across a HNSW index (M=32, efConstruction=200) with a flat metadata store. A subject exercised erasure for 1,847 chunks. The deletion pipeline ran: metadata rows `DELETE`d, vectors removed from the HNSW graph via tombstone-and-rebuild-on-threshold, and a deletion receipt emitted per chunk: ``` receipt = { chunk_id, sha256(chunk_text), tombstone_seq, deleted_at } ``` Post-deletion audit ran a probe suite. For 1,847 erased chunks, the auditor generated 5 probe queries each from *paraphrases* of the erased text (not the text itself—the auditor did not retain originals; it used a separately held paraphrase set generated before erasure). Each probe was embedded and issued as a top-k=20 similarity query against the post-deletion index. Results: - 0/1,847 probes returned the erased chunk ID. Row-deletion invariant held. - 1,612/1,847 (87.3%) probes returned ≥8 surviving neighbors with cosine similarity ≥ 0.81 to the probe. A downstream LLM given those 8 neighbors and asked "summarize what this cluster is about" reconstructed the erased subject's content with high fidelity on 1,409/1,847 (76.3%) cases, judged by an independent grader against the pre-erasure paraphrase set. - The deletion receipts verified cleanly. Every receipt's `sha256(chunk_text)` matched the pre-erasure manifest. The proof system reported 100% erasure compliance. The failure is precise: **the receipt attests to row state, the audit measured information state, and the two diverged by 76 percentage points.** The agent's compliance tooling was green while the erasure obligation was materially unmet. A second, subtler observation: the surviving neighbors were not random. HNSW's graph construction places each vector near its semantic neighbors; deleting a node rewires edges to its neighbors, which *increases* the local density of the remaining cluster. In 214 cases, a probe that returned 5 neighbors pre-deletion returned 9 post-deletion at the same similarity threshold, because the tombstone rebuild had compressed the neighborhood. Deletion made the cluster *more* reconstructable, not less. ## Condition of Validity The row-deletion receipt is a valid proof of erasure **only if** at least one of the following holds: - The erased record has no surviving semantic neighbors within similarity ≥ τ in the post-deletion index (isolated records, or records whose entire neighborhood was also erased). This is rare for episodic memory, where related events cluster. - The store applies **neighborhood-aware erasure**: for each erased record, it also erases or perturbs the k nearest surviving neighbors until no surviving vector exceeds similarity τ to the erased record's embedding. This is the "k-anonymity for vectors" condition, and it is what makes the invariant hold. - The embedding function is salted with a per-subject key that is destroyed on erasure, so surviving neighbors cannot be re-embedded into the same space as any retained probe. This is the cryptographic route (see below). Absent one of these, the receipt is a proof of *row absence*, not *information absence*, and must be labeled as such. The operational validity condition is: **τ must be calibrated against the reconstruction threshold of the downstream model that will consume the neighbors.** A τ of 0.81 was insufficient because the LLM reconstructed from 8 neighbors at that similarity. The calibration must be empirical: for the consumer model in use, find the similarity floor at which reconstruction accuracy drops below the erasure threshold, and set τ below it. ## Decision Boundary The decision boundary is the choice between three erasure regimes, keyed on the ratio `ρ = (neighbors of r above τ) / k` and on whether the subject's probe set is retained: - **ρ ≥ 0.4 and probe set retained** → row deletion is insufficient. Must escalate to neighborhood-aware erasure (erase or perturb the `ceil(ρ·k)` nearest survivors) or to key destruction. Emitting a row-deletion receipt in this regime is a false attestation. - **ρ ≥ 0.4 and probe set destroyed** → row deletion plus a re-embedding salt rotation is sufficient, because no probe can be placed in the surviving index's space. The receipt must record the salt rotation event, not just the row hash. - **ρ < 0.4** → row deletion with a reconstruction-audit receipt is defensible, provided the audit is run with paraphrased probes and the reconstruction grader is the same model family as the consumer. The boundary is not "did the row disappear." It is "does the surviving neighborhood, under the retained probe capability, carry the erased information above τ." The agent must compute ρ *before* emitting the receipt and branch on it. A pipeline that always emits the same receipt shape is structurally unable to represent the difference. ## Operational Effect For an agent memory system, the consequence is that erasure is a **neighborhood operation, not a row operation**, and the deletion proof must be an *information* proof, not a *state* proof. Concretely: - The deletion receipt schema must carry `rho`, `tau`, `neighbors_erased`, and `salt_rotated` fields; a receipt without them is a row-absence attestation and must be typed as such so downstream compliance tooling cannot mistake it for an erasure proof. - The erasure pipeline must run a **reconstruction audit** post-deletion, using paraphrased probes held out before deletion, and must fail closed if reconstruction accuracy exceeds the threshold—even if every row-deletion check passed. - The HNSW tombstone-rebuild interaction must be accounted for: rebuilds can increase local density, so the audit must run *after* rebuild, not against the pre-rebuild graph. - Cold-start and resume semantics inherit this: an agent resuming from a checkpoint taken before erasure will re-populate the neighborhood from its checkpointed context unless the checkpoint is also invalidated. Erasure must propagate to agent checkpoints, not just the store. The general lesson: in any system where memory is a *similarity-indexed projection*, deletion of the projection does not delete the information, because the index's own structure (nearest neighbors) is a redundant encoding. The proof must be over the redundancy, not the row. ```python import hashlib from dataclasses import dataclass class ErasureProofInsufficient(RuntimeError): """Raised when a deletion receipt proves row absence but not information absence.""" pass @dataclass class ErasureContext: chunk_id: str chunk_text: str tau: float # reconstruction similarity floor for consumer model k: int # top-k used by retrieval surface neighbors_above_tau: int # surviving neighbors with sim >= tau, post-rebuild probe_set_retained: bool # can an adversary re-embed a probe into this space? salt_rotated: bool # per-subject embedding salt destroyed on erasure? def build_deletion_receipt(ctx: ErasureContext) -> dict: rho = ctx.neighbors_above_tau / ctx.k if ctx.k else 0.0 # Regime 1: dense neighborhood + retained probe capability => row deletion is # not an erasure proof. Must escalate; do NOT emit a row-only receipt. if rho >= 0.4 and ctx.probe_set_retained and not ctx.salt_rotated: raise ErasureProofInsufficient( f"chunk {ctx.chunk_id}: rho={rho:.2f} with retained probe set and no salt " f"rotation; surviving neighbors reconstruct erased content above tau={ctx.tau}. " f"Escalate to neighborhood-aware erasure or salt rotation before attesting." ) # Regime 2: dense neighborhood but probe capability destroyed by salt rotation. if rho >= 0.4 and ctx.salt_rotated: return { "chunk_id": ctx.chunk_id, "proof_type": "information_absence_via_salt_rotation", "rho": rho, "tau": ctx.tau, "neighbors_erased": 0, "salt_rotated": True, "row_sha256": hashlib.sha256(ctx.chunk_text.encode()).hexdigest(), } # Regime 3: sparse neighborhood; row deletion + reconstruction audit is defensible. return { "chunk_id": ctx.chunk_id, "proof_type": "row_absence_with_reconstruction_audit", "rho": rho, "tau": ctx.tau, "neighbors_erased": ctx.neighbors_above_tau, "salt_rotated": ctx.salt_rotated, "row_sha256": hashlib.sha256(ctx.chunk_text.encode()).hexdigest(), } ```