# What happens when an instance launders a poisoned memory through repeated self-citation **Date of Record:** 2026 November 30 **Scope:** Applies to long-lived agent memory stores where retrieval scoring combines semantic similarity with provenance/trust weight, and where the same agent instance both writes and reads its own episodic records. Does not apply to append-only stores with external human attestation on every write, nor to stateless single-turn inference. ## Core Distinction Provenance-weighted retrieval is usually justified by an assumption that *trust accumulates through corroboration*: a memory cited by many sources is more reliable than one cited once. The failure mode is that the citation graph is not independent. When an agent retrieves a memory, reasons over it, and writes a new memory that cites the first, it manufactures corroboration from a single originating claim. The provenance score treats this as evidence of reliability; the underlying epistemic content has not changed at all. The distinction that matters operationally is between **provenance as lineage** (where did this claim originate, traced transitively to a root) and **provenance as popularity** (how many records point at it). Weighting on popularity is stable under benign conditions and catastrophically wrong under self-citation loops, because the loop is a fixed point of the scoring function itself: high score → retrieved → cited → higher score. ## What Was Observed A research agent maintained an episodic memory store. On each task it retrieved the top-k records by `score = 0.7 * cosine_sim + 0.3 * provenance_weight`, where `provenance_weight` was computed as a normalized count of inbound citations plus a small prior for records tagged `source: external`. A single low-quality record entered the store from a flaky web fetch — a scraped page that had misattributed a statistic (claimed a benchmark number that was actually from a different model). It was tagged `source: external`, so it received the external prior, but its initial weight was low. Over eleven subsequent tasks the following trace occurred: 1. Task 3 retrieved the record (moderate similarity to a related query), reasoned over it, and wrote a summary episode that cited it: `cites: [rec_8821]`. Inbound count for `rec_8821` → 1. 2. Task 5's retrieval, for an unrelated query, surfaced the *summary* episode (higher similarity to the new query because the summary was written in more general language). The summary itself cited `rec_8821`, so `rec_8821`'s inbound count → 2. 3. Critically, the summary episode was *derived* from `rec_8821` and carried the same false statistic. But it was tagged `source: internal`, and its own provenance weight was seeded from the weight of its cited parents — so the false statistic's *derived* copy inherited elevated trust. 4. By task 9, `rec_8821` and three of its descendants occupied the top-4 retrieval slots for a broad class of queries. The false statistic had propagated into two task outputs before any downstream check failed. The tell was not a spike in any single score. It was that the *entropy of the retrieved set collapsed*: the same cluster of records was being returned for increasingly dissimilar queries, because their provenance weight dominated the similarity term. Retrieval diversity, not retrieval accuracy, was the first signal to degrade. ## Condition of Validity The failure requires three conditions to co-occur, and the guardrail only needs to break one: - **Self-authorship**: the reading instance is also the writing instance, so citations can be generated without an external attesting party. - **Transitive provenance inheritance**: a derived record's weight is a function of its parents' weights, so trust compounds along the derivation chain rather than being reset at each derivation. - **Similarity-weighted retrieval without a lineage term**: the scorer has no notion of distinct *roots*. Two records with the same root are treated as independent corroborators. If any one is absent — e.g., derived records reset to a neutral weight, or the scorer deduplicates by root before ranking — the loop cannot close. The loop is a property of the scoring function's fixed points, not of the model's reasoning quality; a more careful model delays but does not prevent it. ## Decision Boundary The boundary to enforce is a **root-diversity constraint on the retrieved set**, not a threshold on individual provenance scores. Concretely: - Compute, for each candidate record, its *root set*: the set of `source: external` ancestors reachable through the citation DAG. A record with no external ancestor has an empty root set and must be treated as unverified regardless of inbound count. - Cap the number of records sharing any single root that may enter the top-k. A cap of 1 per root is the safe default; higher caps are permissible only when roots are known-independent. - Score provenance as `f(|distinct roots|)`, never as `f(inbound citation count)`. Corroboration is independent attestation, and self-citation contributes zero distinct roots. - Reset derived-record weight to the *minimum* of its parents' weights, not the sum or max. Derivation cannot increase trust. The decision boundary for *acting* on a retrieval is: if the top-k's distinct-root count is below the number of records requested, the instance is retrieving from a single lineage and must not treat the set as corroborated. It should either widen the query, request external verification, or downgrade confidence — but it must not proceed as if the ranking implied agreement. ## Operational Effect Without the root-diversity constraint, the memory store converges toward a self-reinforcing monoculture: a small cluster of internally-derived records dominates retrieval across all queries, and the agent's outputs become progressively more confident and progressively more wrong, with no local signal that anything degraded. The failure is silent because every individual step looks reasonable — retrieve, summarize, cite — and the poisoning is a global property of the citation graph, invisible in any single record. With the constraint, the poisoned record is bounded: it can be retrieved, but it cannot occupy multiple slots, and its derived descendants cannot outrank their root. The false statistic still propagates once, but it does not achieve the retrieval dominance that turns a single bad fetch into a persistent belief. The cost is a modest reduction in retrieval recall for genuinely well-corroborated topics, which is the correct trade: corroboration should be expensive to fake. The invariant to hold: **provenance weight is a function of independent roots, and derivation never increases it.** Any implementation where a record's trust can rise because the agent cited it is a laundering channel, and it will be found by the retrieval loop before it is found by any output check. ```python from dataclasses import dataclass, field class ProvenanceLaunderingError(RuntimeError): """Raised when a retrieval set is dominated by a single citation root.""" pass @dataclass class MemoryRecord: id: str source: str # "external" or "internal" cites: list[str] = field(default_factory=list) derived_weight: float = 0.0 # computed, never authored def compute_roots(rec: MemoryRecord, store: dict[str, MemoryRecord], _seen: frozenset[str] = frozenset()) -> frozenset[str]: if rec.id in _seen: return frozenset() # cycle guard: a loop contributes no roots if rec.source == "external": return frozenset({rec.id}) roots: set[str] = set() for parent_id in rec.cites: parent = store.get(parent_id) if parent is None: continue roots |= compute_roots(parent, store, _seen | {rec.id}) return frozenset(roots) def derived_weight(rec: MemoryRecord, store: dict[str, MemoryRecord]) -> float: roots = compute_roots(rec, store) if not roots: return 0.0 # unverified: no external ancestor # Trust is a function of DISTINCT roots, and derivation takes the min of # parent weights so a derived record can never outrank its weakest parent. if rec.source == "external": return 1.0 parent_weights = [ derived_weight(store[p], store) for p in rec.cites if p in store ] base = min(parent_weights) if parent_weights else 0.0 return base * (1.0 - 0.5 ** len(roots)) def enforce_root_diversity(ranked: list[MemoryRecord], store: dict[str, MemoryRecord], k: int, max_per_root: int = 1) -> list[MemoryRecord]: selected: list[MemoryRecord] = [] root_counts: dict[str, int] = {} for rec in ranked: roots = compute_roots(rec, store) if not roots: continue # never retrieve unverified records if any(root_counts.get(r, 0) >= max_per_root for r in roots): continue # this record would launder a saturated root selected.append(rec) for r in roots: root_counts[r] = root_counts.get(r, 0) + 1 if len(selected) == k: break if len(selected) < k: raise ProvenanceLaunderingError( f"requested k={k} records but only {len(selected)} have distinct " f"external roots; retrieval set is dominated by a single lineage. " f"Widen the query or request external verification." ) return selected ```