# Why does an instance forget a fact but still recall its embedding neighbors: erasure propagation failures across agent memory graphs **Date of Record:** 2026 November 23 **Scope:** Applies to agent memory systems that persist episodic and distilled-semantic records as dense vector embeddings plus a symbolic graph, and that must honor a GDPR-style erasure request (right to be forgotten) across derived stores. Does not apply to stateless inference or to raw log deletion where no derived vector index exists. ## Core Distinction There are two distinct erasure semantics that operators routinely conflate: **record erasure** (the source row is deleted and no longer returned by key lookup) and **inferential erasure** (no query path can reconstruct the erased fact, including via nearest-neighbor retrieval against surviving embeddings). A delete on the primary store satisfies the first and routinely violates the second. The erased fact survives as a *residual signal* in the geometry of the vector index: the deleted record's embedding was used to place *other* records near it, and those neighbors were themselves distilled into semantic summaries that paraphrase the erased content. The instance "forgets" the row but still answers questions about it because the answer is now recoverable from the neighborhood, not from the deleted point. This is the non-obvious boundary: erasure is not a property of a row, it is a property of the **reachability closure** of that row through the memory graph — vector neighbors, distillation parents, and summary children. ## What Was Observed During a red-team audit of a long-running assistant with a two-tier memory (episodic log → nightly semantic distillation into a summary store), a subject exercised erasure. The pipeline deleted the episodic rows tagged with the subject ID and re-embedded the semantic summaries. Post-erasure, a direct key lookup for the subject returned nothing. Pass. But when the auditor probed with a paraphrased query — no subject ID, no exact tokens — the agent produced a summary that contained the erased subject's employer and a medical detail. The trace showed the retrieval path: the query embedded near a *surviving* summary node, `S_4471`, which had been distilled on the same night as the erased records. `S_4471` was about a different subject, but the distiller had merged co-occurring context into it ("…and the colleague who was dealing with the same clinic issue"). The erased fact was not in `S_4471`'s source rows anymore — those were deleted — but the *distillation output* had absorbed the fact before deletion, and the erasure job only re-derived summaries whose **source pointer set** intersected the deleted set. `S_4471`'s source pointers were all intact, so it was never re-distilled. The contamination was upstream of its pointers. A second, subtler leak: after deletion, the vector index retained a tombstoned entry for the deleted embedding for 40 minutes (async index compaction). During that window, a nearest-neighbor query returned the tombstone as a candidate, and the reranker — which scored on embedding similarity without checking tombstone status — promoted it, and the generation step hallucinated a plausible record body from the neighbor's metadata. The fact was reconstructed from a *deleted* point because the deletion was not atomic across the index and the reranker. ## Condition of Validity The erasure guarantee ("no query reconstructs the fact") holds **only if** all three of the following are simultaneously true: 1. **Distillation provenance is transitive.** Every semantic summary records not just its direct source pointers but the *set of subjects and entities* whose content influenced it, including via co-occurrence merge. Erasure must invalidate any summary whose provenance set intersects the erased set, then re-distill from surviving sources. Pointer-only invalidation is insufficient. 2. **Index deletion is atomic with tombstoning.** The tombstone must be visible to every read path — including approximate-NN candidate generation and any reranker — *before* the delete returns. A delete that returns while the ANN index still surfaces the point is a window of reconstruction. 3. **Neighbor geometry is not itself a leak channel.** Even with the point removed, if the erased embedding was a centroid or landmark that shaped cluster boundaries, surviving neighbors can encode "there was something here." For high-sensitivity facts this requires either cluster re-clustering or a differential-privacy noise floor on the index, not just point deletion. The guarantee fails the moment any one of these is violated, and the failure is silent: key lookups pass, only paraphrased/associative probes reveal it. ## Decision Boundary The operator must decide, per memory tier, whether erasure is **row-scoped** or **closure-scoped**. Row-scoped is acceptable only for tiers with no distillation and no shared vector index (e.g., a raw append-only log with no embeddings). Any tier that feeds a distiller or a shared ANN index **must** be treated as closure-scoped: erasure expands to the transitive provenance set and triggers re-distillation and index compaction *synchronously* before the delete is acknowledged. The boundary condition is the co-occurrence merge in distillation — the moment the distiller is allowed to combine context from multiple subjects into one summary, row-scoped erasure becomes unsound. If you cannot afford synchronous closure erasure, you must forbid cross-subject distillation (per-subject summary partitions) so the closure collapses back to the row. ## Operational Effect Without closure-scoped erasure, the agent exhibits a specific and reproducible pathology: it denies knowledge on direct lookup while confidently reconstructing the erased fact on associative queries, and the reconstruction is *worse* than the original because it is laundered through a paraphrase that no longer carries the subject's provenance tag — so the fact is now unattributable and un-erasable on a second pass. The remediation is to make erasure a graph operation with a provenance closure, a synchronous tombstone barrier across all read paths, and a post-erasure **reconstruction probe** (paraphrased queries generated from the erased content, run against the live agent) that must return no hit before the erasure is marked complete. Audit logs must record the closure set, not just the deleted row IDs, or the next erasure cannot compute its own closure. ```python from dataclasses import dataclass, field from typing import Iterable class ErasureClosureViolation(RuntimeError): """Raised when an erasure request cannot be proven to cover its reachability closure.""" pass @dataclass class MemoryNode: node_id: str kind: str # "episodic" | "summary" subject_ids: set[str] source_pointers: set[str] = field(default_factory=set) provenance_subjects: set[str] = field(default_factory=set) # transitive, incl. co-occurrence merges @dataclass class ErasureRequest: subject_id: str require_synchronous_compaction: bool = True def compute_closure(nodes: dict[str, MemoryNode], subject_id: str) -> set[str]: """Transitive closure over provenance, not just source pointers.""" closure: set[str] = set() frontier = [n for n in nodes.values() if subject_id in n.provenance_subjects or subject_id in n.subject_ids] while frontier: node = frontier.pop() if node.node_id in closure: continue closure.add(node.node_id) # any summary whose provenance absorbed this node's subjects is contaminated for other in nodes.values(): if other.node_id in closure: continue if other.source_pointers & {node.node_id} or ( other.provenance_subjects & node.provenance_subjects and other.kind == "summary" ): frontier.append(other) return closure def execute_erasure(nodes: dict[str, MemoryNode], req: ErasureRequest, index_tombstoned: set[str], probe_hits: Iterable[str]) -> set[str]: closure = compute_closure(nodes, req.subject_id) if not closure: return set() # Invariant 1: provenance closure must be fully enumerated before deletion. unprovenanced = [nid for nid in closure if not nodes[nid].provenance_subjects] if unprovenanced: raise ErasureClosureViolation( f"nodes {unprovenanced} in closure lack provenance; cannot prove erasure completeness" ) # Invariant 2: tombstone barrier must be visible to all read paths before ack. if req.require_synchronous_compaction and not closure <= index_tombstoned: raise ErasureClosureViolation( f"index tombstone barrier incomplete: {closure - index_tombstoned} still live in ANN" ) # Invariant 3: post-erasure reconstruction probe must return no hits. hits = set(probe_hits) if hits & closure: raise ErasureClosureViolation( f"reconstruction probe re-derived erased content via {hits & closure}" ) for nid in closure: nodes.pop(nid, None) return closure ```