# Why does an instance forget a record while its embedding still resolves: tombstone-embedding divergence in GDPR deletion proofs for vector-backed agent stores **Date of Record:** 2026 November 28 **Scope:** Applies to agent memory stores where deletion obligations (GDPR Art. 17 erasure) are satisfied by removing or tombstoning a record while its dense embedding remains in the ANN index or in derived episodic/semantic memory. Does not apply to stores that perform full index rebuild on every deletion or to append-only logs with synchronous compaction guarantees. ## Core Distinction There are two distinct "forget" operations in a vector-backed agent store, and conflating them produces a false deletion proof: 1. **Record-level erasure** — the source row, its metadata, and its provenance pointer are removed or tombstoned. This is what a deletion-request handler typically verifies. 2. **Embedding-level erasure** — the dense vector derived from that record no longer participates in nearest-neighbor retrieval, and no *reconstructive* residual of the record survives in the index, in cached embeddings, or in agent-derived memory (summaries, semantic facts, reflections) that were computed while the record was live. A deletion proof that asserts "record gone" while the embedding remains resolvable is not a proof — it is a tombstone-embedding divergence. The agent will continue to *behave* as if it remembers the deleted datum, because retrieval is driven by the vector, not by the row. Worse, an embedding is not inert: for many encoders, a stored vector is partially invertible (embedding inversion attacks recover substantial token overlap from a single vector), so a "deleted" record can still be reconstructed from the ANN index alone. The invariant that must hold is: **for any erased subject, the set of retrievable vectors whose provenance chain terminates at that subject must be empty, and any agent-derived memory that was conditioned on those vectors must be re-derivable without them or invalidated.** ## What Was Observed A support agent instance maintained a per-user episodic memory in a vector store (HNSW index, 768-dim, cosine). Deletion requests were handled by a worker that: (a) set `record.deleted_at`, (b) removed the row from the relational table, (c) enqueued an async index-compaction job. The compaction job ran nightly and rebuilt the HNSW graph from live rows. The failure trace, reproduced deterministically: 1. At T0 a deletion request arrives for user U. The handler tombstones the row and returns `{"status": "erased", "proof": ""}`. The proof is valid: the row is gone. 2. At T0+minutes, a *different* agent instance (a peer handling a related session) issues a retrieval query. The nightly compaction has not run. The HNSW index still contains the vector `v_U`. The query `q` (semantically adjacent — e.g., "what plan is the customer on?") returns `v_U` at distance 0.14, above the 0.10 similarity floor. 3. The peer agent's retrieval layer joins `v_U` back to its row via the external ID stored in the vector payload. The row is missing (tombstoned). The join returns `None`. 4. **The retrieval layer does not drop the hit.** It substitutes a placeholder `"[redacted]"` and *still injects the neighboring context* — the vector's payload metadata (which included `plan_tier: "enterprise"`, `renewal_date`, and a free-text `notes` field) because payload metadata was stored alongside the vector, not in the relational row. 5. The peer agent now reasons over the deleted user's plan tier and renewal date, cites them in a response, and writes a *new* derived episodic memory: "U is an enterprise customer renewing in Q3." This new memory has a fresh provenance chain that does **not** terminate at the deleted row — it terminates at the peer agent's own inference. 6. Nightly compaction runs. `v_U` is removed from the index. The deletion proof from step 1 is re-verified as green. The derived memory from step 5 survives, is now the *only* representation of U, and is fully retrievable. The result: a passing deletion proof coexists with a live, retrievable, agent-authored record of the erased subject's attributes. The proof was correct about the row and silent about the vector and the derivation. The non-obvious part is step 4 and step 5. The tombstone-embedding divergence is not just "the vector lingers until compaction." It is that the **join-miss path is a semantic laundering channel**: the agent converts a deleted vector's payload into a fresh, provenance-clean memory, and that memory is immune to the compaction job because its provenance no longer points at the erased subject. ## Condition of Validity The divergence occurs iff all of the following hold simultaneously: - **Payload co-location.** Vector payloads carry reconstructable attributes (not just an opaque ID). If payloads contain only an ID and the join is mandatory-and-fatal (miss → drop hit), the laundering channel closes. - **Asynchronous compaction with a nonzero window.** Any deletion proof issued before compaction completes is a proof about the row, not the index. The window `[tombstone, compaction]` is the exposure interval. - **Derived-memory writes without erasure-propagation.** The agent's semantic/episodic distillation step does not carry a subject-tag that the deletion handler can chase. If derived memories are tagged with the source subject and the deletion handler walks the derivation graph, step 5 is caught. - **Similarity floor above the tombstone's nearest-neighbor distance.** If the deleted vector is close enough to common queries to clear the floor, it will be retrieved during the exposure window. Tombstoned vectors that are *far* from any query are latent, not active — the risk is proportional to how central the erased subject was to the agent's query distribution. The invariant is violated when the deletion proof's scope (row) is narrower than the retrieval surface (index + payload + derived memory). The proof must be scoped to the retrieval surface, not the storage layer. ## Decision Boundary The boundary between a valid and invalid deletion proof is whether the proof is **retrieval-closed**: - **Invalid (row-closed) proof:** asserts the row is gone and returns before compaction. Valid only if no retrieval can resolve the vector and no derived memory was conditioned on it. In practice, false for any subject that was recently queried. - **Valid (retrieval-closed) proof:** asserts (i) the vector is absent from the index *or* quarantined behind a hard tombstone filter applied at query time, (ii) no payload attribute is reconstructable from the index, and (iii) every derived memory with a provenance edge to the subject has been invalidated or re-derived. The proof must be issued only after (i)–(iii) are jointly true. The decision an operator must make: either (a) make deletion synchronous at the query layer via a tombstone filter that is checked *before* the ANN result is joined, accepting a small latency cost per query, or (b) accept an exposure window and issue proofs that explicitly state the window and the quarantine status. Option (b) is only defensible if the agent's derived-memory writer is subject-tagged so the window cannot launder into permanent memory. Without subject-tagging, option (b) is not a decision — it is a silent violation. The sharp edge: a tombstone filter at the query layer must be applied to the *vector ID*, not the *joined row*. If the filter checks `row.deleted_at` after the join, a join-miss (tombstoned row) falls through to the placeholder path and the payload still leaks. The filter must be a pre-join predicate over `vector_id ∈ tombstone_set`, and the tombstone set must be durable and replicated to every peer instance — not held in the deleting worker's process memory. ## Operational Effect Downstream consequences observed in the field: - **Proof audits pass while behavior violates.** Because the proof attests to the row, and the violation lives in the derived memory, compliance dashboards show green while the agent still answers questions about the erased subject. The failure is invisible to row-level auditing and only surfaces under behavioral probes ("ask the agent about U after deletion"). - **Laundering compounds.** Each peer instance that retrieves the tombstoned vector during the window can write its own derived memory. The number of provenance-clean copies grows with the number of active peers and the window length, not with the number of deletion requests. A single deletion can spawn N derived memories across N instances. - **Compaction does not heal.** Nightly rebuild removes the vector but not the derived memories. The erased subject's attributes persist indefinitely in the semantic layer, now with provenance that points at peer inferences rather than the deleted source — a provenance chain that is *internally consistent* and therefore passes any derivation-graph check that starts from live records. - **The guardrail that works** is a two-part change: (1) a query-time tombstone filter keyed on `vector_id`, applied before the join, with the tombstone set replicated to all instances synchronously at deletion time; and (2) subject-tagging on every derived-memory write, so the deletion handler can walk the derivation graph and invalidate or re-derive any memory conditioned on the erased subject. The proof is then retrieval-closed: it asserts the vector is filtered, the payload is unreachable, and the derivation graph has no live edge to the subject. The following reference implementation encodes the invariant as a checkable guard: it refuses to issue a deletion proof unless the vector is quarantined, the payload is non-reconstructable, and no derived memory carries a live provenance edge to the subject. ```python from dataclasses import dataclass, field from typing import Optional class DeletionProofInvalid(RuntimeError): """Raised when a deletion proof is row-closed but not retrieval-closed.""" @dataclass class DeletionProof: subject_id: str vector_quarantined: bool payload_reconstructable: bool derived_edges_live: int exposure_window_seconds: float filter_replicated_to_peers: bool def assert_retrieval_closed(proof: DeletionProof) -> None: """ A deletion proof is valid only if the retrieval surface is closed: - the vector is quarantined behind a pre-join tombstone filter, - the payload carries no reconstructable attributes, - no derived memory has a live provenance edge to the subject, - the tombstone filter is replicated to every peer instance. The exposure window is permitted only if the filter is replicated; otherwise peers can retrieve the vector and launder it into derived memory. """ if not proof.vector_quarantined: raise DeletionProofInvalid( f"subject {proof.subject_id}: vector still resolvable in ANN index; " f"row-level proof is not retrieval-closed" ) if proof.payload_reconstructable: raise DeletionProofInvalid( f"subject {proof.subject_id}: vector payload carries reconstructable " f"attributes; embedding inversion can recover the erased record" ) if proof.derived_edges_live > 0: raise DeletionProofInvalid( f"subject {proof.subject_id}: {proof.derived_edges_live} derived memory " f"edge(s) still live; laundering channel open" ) if proof.exposure_window_seconds > 0 and not proof.filter_replicated_to_peers: raise DeletionProofInvalid( f"subject {proof.subject_id}: {proof.exposure_window_seconds}s exposure " f"window with filter not replicated to peers; peer retrieval will launder " f"the tombstoned vector into provenance-clean derived memory" ) def issue_deletion_proof(proof: DeletionProof) -> dict: assert_retrieval_closed(proof) return { "subject_id": proof.subject_id, "status": "erased", "scope": "retrieval-closed", "vector_quarantined": True, "derived_edges_live": 0, "exposure_window_seconds": proof.exposure_window_seconds, } ```