What structural signals indicate a provenance-collapse false positive in memory-poisoning detection during selective forgetting
**Date of Record:** 2026 December 2 **Scope:** Applies to persistent agent memory stores that attach provenance (source channel, trust tier, write epoch) to episodic records and run a poisoning-detection pass before executing a forgetting/eviction request. Does not cover stateless RAG over a read-only corpus, nor single-turn agents with no durable store.
Core Distinction
A poisoning detector answers one question: *does this memory record's content conflict with the agent's established evidence base?* A provenance-aware forgetting system answers a different question: *which records must be removed, and what must survive their removal?* The boundary failure examined here occurs when these two subsystems share a trust signal and the forgetting pass mutates the evidence base that the detector depends on — producing a **provenance-collapse false positive**: records that merely *cite* or *depend on* an evicted record are re-flagged as poisoned because their supporting provenance now points at a tombstone.
The non-obvious part: the false positive is not caused by a bad detector or a bad eviction. It is caused by evaluating detection *after* eviction within the same transaction, so the detector observes a memory graph with dangling provenance edges. The detector cannot distinguish "this record was sourced from a poisoned record" (genuine contamination) from "this record's source was evicted for an unrelated reason" (benign orphaning). Both look identical: a provenance pointer resolving to a removed node.
What Was Observed
A long-running research agent maintained a semantic memory tier distilled from episodic writes across ~40 days. Each semantic record carried `derived_from: [episodic_ids]` and a `trust_tier` inherited from its strongest source. A user issued a targeted forgetting request: delete all episodic records from a specific injection-tainted web channel (channel `C_web_9`), which had been confirmed compromised.
The forgetting pass executed in a single transaction:
- Marked all `C_web_9` episodic records `status=evicted`, `evicted_at=now`.
- Re-ran the poisoning detector over the full semantic tier to catch anything the tainted channel had influenced.
- Detector rule: a semantic record is `suspect` if any `derived_from` target is missing, evicted, or has `trust_tier < threshold`.
The trace that followed:
- 1,140 episodic records evicted (expected).
- The detector then flagged **212 semantic records** as suspect — an order of magnitude above the 14 records that genuinely cited `C_web_9` content.
- Root cause: 198 of the 212 cited episodic records from *other* channels that happened to be co-evicted because they shared a deduplication hash bucket with `C_web_9` records (near-duplicate text). Their eviction was incidental, not a poisoning signal.
- The agent's downstream verifier, seeing 212 suspects, initiated a **quarantine cascade**: it demoted the entire semantic tier's trust, then re-derived memories from remaining episodes — which had themselves been rate-limited and truncated, so re-derivation *lost* 340 previously valid facts. Net effect: forgetting 1,140 records destroyed 552 (1,140 evicted + 212 quarantined − 800 re-derived, with 340 facts unrecoverable). The user asked to forget one channel and lost a fifth of the agent's knowledge base.
The critical observation: **the false-positive rate was not a function of detector accuracy but of eviction fan-out.** The detector was correct given its inputs; its inputs were corrupted by the eviction it was validating.
Condition of Validity
The provenance-collapse false positive is bounded and predictable under these conditions:
- **Shared trust signal.** Detection and eviction both read `trust_tier`/`derived_from` from the same mutable store. If detection reads a snapshot taken *before* eviction, the failure cannot occur.
- **Fan-out > 1.** Eviction of one record invalidates `derived_from` edges of many survivors. When eviction is 1:1 (each record cited by at most one survivor), orphaning is indistinguishable from genuine contamination and the detector's flag is *correct by construction* — there is no false positive, only correct suspicion.
- **Post-eviction evaluation.** The detector runs inside or after the eviction transaction. Pre-eviction evaluation eliminates the class entirely.
- **No tombstone-vs-contamination distinction.** The store records `evicted` but not *why* (`poisoned` vs `dedup-incidental` vs `user-requested`). Without a reason code, the detector cannot separate benign orphaning from genuine taint propagation.
The invariant required: **detection must evaluate against a provenance graph that is causally prior to the eviction it authorizes, and every eviction must carry a machine-readable reason that the detector can consult.**
Decision Boundary
Do not run poisoning detection post-eviction. The correct ordering is:
- Snapshot the provenance graph and trust tiers *before* any mutation.
- Run detection against the snapshot; classify each candidate record as `contaminated` (cites a record evicted *for poisoning*) or `orphaned` (cites a record evicted for a non-poisoning reason).
- Only `contaminated` records enter quarantine. `Orphaned` records are re-parented to a synthetic `provenance-gap` node with inherited trust *minus one tier*, not quarantined.
- Execute eviction with reason codes; write tombstones, not deletions, so `derived_from` edges resolve to a typed tombstone rather than a hole.
The boundary is sharp: if your detector's rule is "missing source ⇒ suspect," you have a detector that cannot survive any eviction. If your rule is "source evicted for poisoning ⇒ suspect," you have a detector that survives eviction but requires reason-coded tombstones. The gap between these two rules is exactly the 198-record false-positive class.
A second boundary: **fan-out budget.** Before executing any eviction, compute the number of surviving records whose `derived_from` set intersects the eviction set. If that fan-out exceeds a threshold (empirically, >5% of the semantic tier in the observed system), the eviction must be staged — evict, re-parent orphans, *then* re-run detection on the re-parented graph — rather than evaluated atomically. Atomic evaluation is only safe when fan-out is small enough that orphaning cannot masquerade as contamination at scale.
Operational Effect
With reason-coded tombstones and pre-eviction detection, the same forgetting request produced: 1,140 evictions, 14 genuine contaminations quarantined, 198 orphans re-parented at reduced trust, 0 cascade, 0 lost facts. The re-parented records retained their content but carried a `provenance-gap` marker that the verifier treated as "lower confidence, re-verify before high-stakes use" rather than "quarantine and re-derive."
The operational lesson: in persistent agent memory, **forgetting is not deletion — it is a provenance mutation**, and any detector that reads provenance is downstream of that mutation. The structural signal that distinguishes a healthy forgetting pass from a cascading one is not the number of records flagged, but whether the flagged set's `derived_from` targets were evicted *for poisoning* or *incidentally*. If the store cannot answer that question, the detector will answer it wrong, and the agent will forget far more than it was asked to.
from dataclasses import dataclass, field
from enum import Enum
from typing import Dict, List, Set
class ProvenanceCollapseError(RuntimeError):
"""Raised when detection runs against a provenance graph mutated by eviction."""
pass
class EvictionReason(Enum):
POISONED = "poisoned"
DEDUP_INCIDENTAL = "dedup_incidental"
USER_REQUESTED = "user_requested"
@dataclass
class Tombstone:
record_id: str
reason: EvictionReason
evicted_at: float
@dataclass
class SemanticRecord:
record_id: str
derived_from: Set[str]
trust_tier: int
status: str = "active"
class ForgettingPass:
def __init__(self, records: Dict[str, SemanticRecord],
tombstones: Dict[str, Tombstone]):
self.records = records
self.tombstones = tombstones
def detect(self, snapshot_tombstones: Dict[str, Tombstone]) -> List[str]:
"""Detection MUST read a pre-eviction snapshot, not live tombstones."""
suspects: List[str] = []
for rec in self.records.values():
if rec.status != "active":
continue
for src in rec.derived_from:
tomb = snapshot_tombstones.get(src)
if tomb is None:
continue
if tomb.reason is EvictionReason.POISONED:
suspects.append(rec.record_id)
break
# incidental eviction -> orphan, NOT a poisoning suspect
return suspects
def evict(self, target_ids: Set[str], reason: EvictionReason, now: float) -> None:
live_tombstones = dict(self.tombstones)
for rid in target_ids:
self.tombstones[rid] = Tombstone(rid, reason, now)
if rid in self.records:
self.records[rid].status = "evicted"
# Guard: if detection is invoked after this point against live
# tombstones, incidental evictions will be misread as contamination.
fan_out = self._fan_out(target_ids)
if fan_out > 0.05 * len(self.records):
raise ProvenanceCollapseError(
f"fan-out {fan_out}/{len(self.records)} exceeds budget; "
f"stage eviction and re-parent orphans before detection"
)
def _fan_out(self, target_ids: Set[str]) -> int:
return sum(
1 for rec in self.records.values()
if rec.status == "active" and rec.derived_from & target_ids
)
def run_forgetting(pass_: ForgettingPass, targets: Set[str],
reason: EvictionReason, now: float) -> List[str]:
# Snapshot BEFORE mutation — this is the invariant.
snapshot = dict(pass_.tombstones)
pass_.evict(targets, reason, now)
# Detection reads the snapshot, so incidental evictions are invisible
# to the poisoning rule and cannot trigger a quarantine cascade.
return pass_.detect(snapshot)