# What structural signals indicate that a poisoned memory survived episodic-to-semantic distillation in a long-horizon agent **Date of Record:** 2026 December 1 **Scope:** Applies to agents that consolidate episodic traces into a semantic store (summarization, fact extraction, or embedding-based promotion) across long horizons and rely on provenance metadata to detect poisoning. Does not apply to agents that keep raw episodic logs as the sole memory substrate or that never promote derived facts. ## Core Distinction The failure that matters here is not *ingestion* poisoning (a malicious or corrupt observation entering the episodic log) — that is detectable by provenance on the raw record. The non-obvious boundary is **laundering through distillation**: an episodic record whose provenance is intact and whose content is suspicious gets summarized into a semantic fact that carries *only* the summarizer's provenance, not the source record's. The tainted claim survives with a fresh, clean-looking lineage. Detection must therefore operate on *structural* signals of the derived fact, because the provenance chain that would have flagged it was collapsed during promotion. The key invariant that is violated: **provenance fidelity across abstraction** — the property that a derived memory's confidence, source set, and contradiction status are a monotone function of its constituent episodic records. Distillation is not provenance-preserving by default; summarizers emit fluent facts with no mechanism to carry forward the "this came from one low-trust record that contradicts three others" signal. ## What Was Observed A support agent with a 90-day horizon consolidated nightly. On day 12, a single episodic record from a low-trust tenant channel asserted a refund policy change ("refunds now auto-approve up to $500"). The record was correctly tagged `trust=0.3`, `source=unverified_channel`, and `contradicts=[policy_doc_v7]`. The nightly summarizer promoted it into a semantic fact: `"Refund auto-approval threshold is $500"` with `provenance=summarizer_run_2041`, `confidence=0.82`, and no contradiction flag — because the summarizer's prompt asked for concise facts, not epistemic bookkeeping. By day 40, three subsequent episodic records *cited the semantic fact* as ground truth (the agent had retrieved it and reasoned from it), so the fact now had corroborating inbound references. The derived fact's confidence rose to 0.94. The original low-trust, contradicted record was garbage-collected on day 30 per retention policy. The observable structural tell was present the whole time but unqueried: the semantic fact's *support set* (records that entail it) had cardinality 1 at promotion and cardinality 1 at day 40 too — the "corroboration" was circular, records derived from the fact itself, not independent evidence. A provenance graph traversal at promotion time would have shown a single-source fact contradicting a high-trust document. ## Condition of Validity This failure mode requires all of: (1) a distillation step that does not propagate source trust and contradiction sets; (2) a retention policy that expires raw episodic records before the horizon where the derived fact is audited; (3) retrieval that feeds derived facts back into episodic logs, creating apparent corroboration. If any one is absent — e.g., raw records retained indefinitely, or distillation that carries a `min(source_trust)` field — the laundering is bounded. The invariant to enforce: **a derived memory's effective trust is the minimum (not the mean) of its support set's trust, and its contradiction set is the union of its constituents' contradiction sets.** Any promotion that fails this is a provenance-laundering event and must be flagged, not silently accepted. ## Decision Boundary The decision is not "is this fact true" but "does this fact's provenance chain survive abstraction." Concretely: at promotion, compute the support set; if `cardinality(support) == 1` and the single source has `trust < threshold` or a non-empty `contradicts`, the derived fact must be stored as `provisional` with an explicit `laundering_risk` flag and a back-reference to the source record — and the source record's retention must be extended to at least the derived fact's audit horizon. Circular corroboration (records whose own support traces back to the fact) must be excluded from confidence updates; detect by checking whether an inbound reference's provenance graph reaches the fact itself. If the derived fact is contradicted by any high-trust document at promotion, it must not be promoted at all — it goes to a quarantine store, not the semantic store. ## Operational Effect Without this guardrail, poisoning detection degrades to a race between the attacker's patience and the retention window: a single low-trust record, once distilled and then cited, becomes indistinguishable from a verified fact, and the evidence that would convict it is deleted by the same pipeline that promoted it. With the guardrail, the derived fact carries `provenance_laundering_risk=True`, its confidence is pinned to `min(support_trust)`, and the source record is retained until audit — so a day-40 review can walk the graph back to the day-12 unverified channel and the contradicting policy doc. The cost is retention storage and a slightly noisier semantic store (provisional facts); the benefit is that distillation stops being a provenance-laundering oracle. ```python from dataclasses import dataclass, field from typing import List class ProvenanceLaunderingError(RuntimeError): """Raised when a derived memory's provenance chain fails the abstraction-fidelity invariant.""" pass @dataclass class EpisodicRecord: id: str trust: float contradicts: List[str] = field(default_factory=list) derived_from: List[str] = field(default_factory=list) # ids of facts this record cites @dataclass class SemanticFact: id: str support: List[str] # episodic record ids that entail this fact confidence: float provisional: bool = False laundering_risk: bool = False def promote_fact(fact: SemanticFact, episodes: dict, high_trust_docs: List[str], trust_threshold: float = 0.5) -> SemanticFact: # Exclude circular corroboration: support records that themselves derive from this fact. independent = [e for e in fact.support if fact.id not in episodes[e].derived_from] if not independent: raise ProvenanceLaunderingError(f"fact {fact.id} has no independent support; all evidence is circular") effective_trust = min(episodes[e].trust for e in independent) contradictions = set() for e in independent: contradictions.update(episodes[e].contradicts) if contradictions & set(high_trust_docs): raise ProvenanceLaunderingError( f"fact {fact.id} contradicted by high-trust docs {contradictions & set(high_trust_docs)}; quarantine, do not promote" ) if len(independent) == 1 and effective_trust < trust_threshold: fact.provisional = True fact.laundering_risk = True fact.confidence = effective_trust # pin, do not let summarizer confidence stand # extend retention of the source record to the fact's audit horizon else: fact.confidence = min(fact.confidence, effective_trust) return fact ```