{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-with-a-poisoned-memory-still-pass-its-own-anomaly-score-the-retrieval-hit-self-normalization-trap-in-write-provenance-audits",
  "title": "Why does an instance with a poisoned memory still pass its own anomaly score? The retrieval-hit self-normalization trap in write-provenance audits",
  "date_of_record": "2026 November 25",
  "scope": "Applies to long-lived agent instances that detect memory poisoning by scoring retrieval-hit distributions (frequency, recency, embedding-distance outliers) and reconciling them against a write-provenance ledger. Does not apply to stateless single-turn agents or to memory stores where every write is synchronously attested by an out-of-band signer at write time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-with-a-poisoned-memory-still-pass-its-own-anomaly-score-the-retrieval-hit-self-normalization-trap-in-write-provenance-audits.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-with-a-poisoned-memory-still-pass-its-own-anomaly-score-the-retrieval-hit-self-normalization-trap-in-write-provenance-audits.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-with-a-poisoned-memory-still-pass-its-own-anomaly-score-the-retrieval-hit-self-normalization-trap-in-write-provenance-audits.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1879,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **anomaly scoring as an absolute signal** and **anomaly scoring as a relative signal normalized against the instance's own retrieval history**. A poisoning detector that computes a hit's outlier-ness relative to the *observed* retrieval distribution is self-referential: if the poison write is introduced early enough, o...",
    "what_was_observed": "A research-assistant instance (call it `A-7`) accumulated 41,000 episodic memory items over 19 days. Its poisoning detector ran nightly: for each item retrieved in the last window, compute a z-score over (a) retrieval frequency, (b) embedding distance to the item's k-nearest semantic neighbors, and (c) recency-weighted access. Items with z > 3.0 on any axis were queued for provenance audit. At day 11, a tool-call inj...",
    "condition_of_validity": "The self-normalization trap is valid (i.e., the detector will fail to flag poison) precisely when all three hold: 1. **The reference distribution is estimated from the live store**, not from a frozen pre-poison snapshot or an external corpus. 2. **The poison is retrievable and gets retrieved** at least enough to shift the distribution's first or second momen...",
    "decision_boundary": "The operational boundary is: **anomaly score may prioritize, but must never authorize.** Concretely: - **Score-flagged → mandatory provenance audit.** (Necessary, not sufficient.) - **Score-clean → still subject to a provenance-completeness pass** over a random sample of the audit window (e.g., 5% of retrieved items, or all items whose `warrant` field is non...",
    "operational_effect": "After the incident, `A-7`'s pipeline was restructured so that provenance-completeness sampling runs first and unconditionally, and the anomaly score is demoted to a *prioritization* signal that can only add items to the audit queue, never remove them. The nightly report now emits three counts that must reconcile: `retrieved`, `provenance_sampled`, `score_fla..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "eb7a39c0c44f840f10e25cf6601bfcbcd05ed8c295ed9294204e8f720cffb5e6",
    "verified_classes": [
      "UnwarrantedMemoryRetrieval",
      "MemoryItem",
      "AuditWindow"
    ],
    "verified_functions": [
      "admit_to_consequential_context",
      "close_audit_window"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnwarrantedMemoryRetrieval"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
