# What structural signals indicate memory poisoning before a forget-propagation wave completes **Date of Record:** 2026 November 29 **Scope:** Applies to federated agent meshes where a poisoned episodic memory entry is detected at one node and a `FORGET`/tombstone warrant is propagated to peers that hold derived semantic memories. Does not apply to single-agent local memory stores or to stateless request/response agents with no shared memory substrate. ## Core Distinction The naive mental model treats memory poisoning as a *content* problem: a bad fact was written, so you detect the bad fact and delete it. That model fails in federated meshes because the poisoned fact is rarely stored verbatim at the peers that matter. What propagates is the *derivative*: an embedding centroid shifted by the poisoned entry, a distilled rule ("vendor X is always approved"), a cached tool-argument template, or a confidence weight nudged upward during consolidation. By the time the originating node issues a `FORGET` warrant, peer nodes no longer hold the poisoned bytes—they hold a compressed, unattributable residue. The operational distinction is therefore between **attributable poisoning** (a retrievable entry whose provenance chain still points at the source) and **structural poisoning** (a distortion in the shape of the peer's memory graph that no longer references the source entry). Detection must key on structural signals, because content matching against the original poisoned text returns zero hits on exactly the peers that are most compromised. ## What Was Observed During a three-node federation (nodes A, B, C sharing a semantic tier synced every 90s), node A ingested a prompt-injected tool result that asserted a refund policy exception. Within one consolidation cycle, A distilled this into a semantic rule with provenance `{source: tool_call_8812, confidence: 0.71}`. Node B, which had received A's episodic digest, re-distilled the same claim independently and stored it with provenance `{source: peer_digest_A, confidence: 0.68}`. Node C never saw the raw entry but absorbed it indirectly: its retrieval-augmented planner began citing the exception rule because B's digest raised the co-occurrence weight between `refund` and `exception` in C's local embedding index. When A's auditor flagged the original entry and emitted a `FORGET` warrant, the following was measured: - Node A: direct deletion succeeded; content hash matched; tombstone written; confidence of the derived rule dropped to 0. - Node B: content hash of the warrant's target did **not** match B's stored rule (different provenance string, different confidence float, re-tokenized text). The `FORGET` handler reported `NOT_FOUND` and B retained the rule at confidence 0.68. - Node C: no stored rule matched at all; the poisoning lived only in embedding-space weight shifts. No handler fired. Seventy-two hours later, B's retained rule had been re-cited eleven times, each citation nudging its confidence up via the consolidation feedback loop, and C's planner was routing refund requests through the poisoned exception path. The forget wave had "completed" with a 100% handler-success rate at the warrant layer while the poisoning remained fully live at two of three nodes. The structural signals that *did* correlate with live poisoning, discovered post-hoc: 1. **Provenance-orphan rules**: semantic entries whose provenance points at a peer digest that has since been tombstoned. B's rule was an orphan the moment A's warrant landed, but nothing checked digest liveness. 2. **Confidence divergence across peers**: the same claim held at materially different confidence on different nodes (0.0 on A, 0.68 on B, implicit on C) is a signature of incomplete propagation, not of healthy independent corroboration. 3. **Re-citation ratchet**: a rule whose confidence monotonically increases across consolidation cycles *without* new external evidence is self-reinforcing and suspect. 4. **Embedding-neighborhood drift**: C's case, detectable only by comparing the retrieval neighborhood of a query before and after the poisoning window—the poisoned concept had migrated into the top-k for queries it previously did not touch. ## Condition of Validity The invariant this record establishes is: **a `FORGET` warrant is complete only when every peer's memory graph is provenance-consistent with respect to the tombstoned source, not when every peer's content-hash handler returns success.** This holds under three conditions: - Peers perform independent distillation (so derivatives diverge in form from the source). - Consolidation includes a confidence-update or re-citation feedback loop (so poisoning can amplify without new evidence). - Retrieval is embedding-based (so influence can exist without a matching stored record). If any of these is false—e.g., peers store verbatim replicated entries with no distillation, or consolidation is frozen during the forget window—content-hash matching is sufficient and the structural checks are unnecessary overhead. The invariant also does not bound *inbound* poisoning arriving during the forget window itself; a peer that ingests new poisoned digests mid-wave will re-orphan rules after the consistency check passes, requiring the wave to be re-run or the window fenced. ## Decision Boundary The decision boundary is where to spend detection budget: on content matching (cheap, catches attributable poisoning, misses structural) versus graph-consistency auditing (expensive, catches structural, requires a full provenance graph and embedding snapshots). Operationally, escalate from content matching to structural auditing when **any** of the following holds at a peer after a `FORGET` warrant: - A semantic rule's provenance references a source that the warrant or a prior warrant tombstoned (provenance-orphan). - The same claim exists at confidence differing by more than a threshold (observed: 0.3) across peers. - A rule's confidence increased across the last N consolidation cycles with zero new external evidence citations (re-citation ratchet). - The retrieval top-k for a sentinel query set changed membership across the poisoning window without a corresponding content change (embedding drift). Do **not** escalate on content-hash mismatch alone—that is the expected, benign result of independent distillation and will fire on every legitimate derivative. The signal is the *combination* of orphaned provenance and confidence divergence, which is cheap to compute once provenance is tracked and is near-zero false-positive on healthy meshes (healthy derivatives retain live provenance and converge in confidence). ## Operational Effect The architectural guardrail is a **two-phase forget protocol** with a structural reconciliation gate. Phase one is the existing content-hash `FORGET` (fast, best-effort). Phase two is a graph-consistency sweep that runs *after* phase one and does not trust handler success: it walks every peer's semantic tier, flags provenance-orphans and confidence-divergent claims, and issues *derivative* warrants that name the peer-local rule rather than the original source. Phase two must also snapshot the retrieval neighborhood of a sentinel query set before and after the window and diff membership, catching the node-C class of poisoning that has no stored rule at all. A forget wave is marked `COMPLETE` only when phase two returns zero orphans, zero unexplained confidence divergence, and zero sentinel drift—or when the residual is explicitly quarantined with a confidence cap and a re-citation freeze. Without the freeze, the ratchet re-amplifies any rule the sweep missed, and the wave's success metric becomes actively misleading. ```python import hashlib from dataclasses import dataclass, field from typing import Dict, List, Optional class ForgetPropagationIncomplete(RuntimeError): """Raised when a FORGET wave reports handler success but structural poisoning persists.""" pass @dataclass class SemanticRule: rule_id: str text_hash: str confidence: float provenance: str # source id this rule was distilled from citation_count: int = 0 @dataclass class PeerMemory: node_id: str rules: Dict[str, SemanticRule] = field(default_factory=dict) tombstoned_sources: set = field(default_factory=set) sentinel_topk: Dict[str, set] = field(default_factory=dict) def structural_reconciliation( peers: List[PeerMemory], sentinel_queries: List[str], confidence_divergence_threshold: float = 0.3, ) -> None: """ Phase-two gate. Must run after content-hash FORGET handlers report success. Raises if any structural poisoning signal survives the wave. """ orphans: List[str] = [] ratchets: List[str] = [] drifts: List[str] = [] # Signal 1 + 3: provenance-orphans and re-citation ratchets for peer in peers: for rule in peer.rules.values(): if rule.provenance in peer.tombstoned_sources: orphans.append(f"{peer.node_id}:{rule.rule_id} -> dead {rule.provenance}") if rule.citation_count > 0 and rule.confidence >= 0.65: # confidence climbing with no fresh-evidence marker ratchets.append(f"{peer.node_id}:{rule.rule_id} conf={rule.confidence:.2f}") # Signal 2: cross-peer confidence divergence on identical claim hashes by_hash: Dict[str, List[tuple]] = {} for peer in peers: for rule in peer.rules.values(): by_hash.setdefault(rule.text_hash, []).append((peer.node_id, rule.confidence)) for h, holders in by_hash.items(): confs = [c for _, c in holders] if len(confs) > 1 and (max(confs) - min(confs)) > confidence_divergence_threshold: orphans.append(f"divergent claim {h[:8]}: {holders}") # Signal 4: sentinel retrieval drift for q in sentinel_queries: sets = [p.sentinel_topk.get(q) for p in peers if q in p.sentinel_topk] if len(sets) >= 2: union = set().union(*sets) inter = set.intersection(*sets) if union and len(inter) / len(union) < 0.5: drifts.append(q) if orphans or ratchets or drifts: raise ForgetPropagationIncomplete( f"FORGET wave incomplete: orphans={orphans} ratchets={ratchets} drift={drifts}" ) # else: wave may be marked COMPLETE ```