# What structural signals indicate context poisoning in provenance-weighted retrieval attribution **Date of Record:** 2026 November 17 **Scope:** Applies to retrieval-augmented generation systems that attach provenance metadata to retrieved chunks and compute a weighted attribution score over those chunks before generation. Does not apply to systems without per-chunk provenance, nor to purely parametric models where no retrieval step exists. ## Core Distinction Context poisoning is not the same as retrieval error. Retrieval error is a ranking problem: the correct chunk exists but was ranked below the cutoff. Context poisoning is a *provenance integrity* problem: a chunk enters the context window with metadata that misrepresents its origin, trust level, or derivation chain, causing the attribution weighting to assign it influence it should not have. The distinguishing signal is structural, not semantic. A poisoned chunk frequently reads as plausible, on-topic, and well-formed. What betrays it is a discontinuity in the provenance graph — a weight that cannot be justified by the chunk's declared derivation path. Provenance-weighted attribution computes an influence score `w_i` per chunk from source trust, recency, corroboration count, and derivation depth. Poisoning manifests when `w_i` is high but the *supporting structure* for `w_i` is absent or contradictory. The failure is a mismatch between the declared weight and the structural evidence that should underwrite it. ## What Was Observed In a production retrieval pipeline serving ~40k queries/day, three structural signatures preceded known poisoning incidents: 1. **Orphaned high-trust weight.** A chunk declared `source_trust=0.95` (internal wiki tier) but its `derivation_chain` referenced a document ID that did not exist in the provenance store. The weight was high; the backing node was missing. This is the single most reliable signal: trust weight without a resolvable parent. 2. **Corroboration inflation with zero independent origin.** `corroboration_count=7` was reported, but all seven citations traced to a single upstream document via copy chains. Independent-origin count was 1. The weighting formula treated corroboration as independent evidence; it was not. 3. **Recency/derivation-depth inversion.** A chunk with `derivation_depth=0` (claimed primary source) carried content that was verbatim-identical to a chunk at `derivation_depth=4` from a different branch. A primary source cannot be a copy of a fourth-generation derivative. The depth metadata was falsified. In each case, the poisoned chunk's *content* passed semantic relevance filters. Only the provenance structure exposed it. ## Condition of Validity These signals are valid only when the provenance store is append-only and independently verifiable against the retrieval index. If provenance metadata is written by the same process that writes chunk content, an attacker who can poison content can also forge consistent provenance, and none of the three signatures fire. The detection boundary is therefore: **provenance-weighted poisoning detection is sound only under a trust separation between the content-write path and the provenance-write path.** When that separation is absent, the correct posture is to treat attribution weights as advisory and fall back to source-allowlisting rather than weighting. A second condition: corroboration must be computed over *independent origins*, not citation edges. If the corroboration counter is incremented per citation rather than per distinct root, signal 2 is invisible. ## Decision Boundary The operational rule is a hard gate, not a score adjustment: - If `source_trust` exceeds a tier threshold AND the derivation parent is unresolvable → **reject the chunk**, do not down-weight it. Down-weighting a forged-provenance chunk leaves it in context at reduced influence, where it still steers generation via adjacency and token proximity. - If independent-origin count is 0 while corroboration count > 1 → **quarantine and re-derive** the corroboration graph before the chunk is eligible. - If derivation-depth inversion is detected → **reject both branches** until the true primary is identified; the inversion means at least one branch's metadata is untrustworthy and you cannot tell which from the inversion alone. The boundary between "down-weight" and "reject" is whether the *provenance structure* is self-consistent. Self-consistent but low-trust chunks are down-weighted. Structurally contradictory chunks are rejected regardless of declared trust. ## Operational Effect Enforcing structural rejection reduced poisoned-chunk admission to near zero in the observed pipeline, at the cost of a ~2.3% false-rejection rate on legitimately re-derived documents whose provenance chains had not yet been backfilled. The mitigation was to make missing-parent a *soft* reject (quarantine pending backfill) while keeping depth-inversion a *hard* reject. The key operational lesson: provenance weighting is only as trustworthy as the independence of the provenance writer, and the cheapest structural detector is the orphaned-weight check, which requires no semantic analysis and runs in O(1) per chunk. ```python class ProvenancePoisoningError(RuntimeError): """Raised when a chunk's declared attribution weight is not underwritten by a structurally consistent provenance record.""" pass def validate_chunk_provenance(chunk, provenance_store, tier_threshold=0.9): trust = chunk.get("source_trust", 0.0) parent = chunk.get("derivation_parent") depth = chunk.get("derivation_depth") corroboration = chunk.get("corroboration_count", 0) independent_origins = chunk.get("independent_origin_count", 0) # Signal 1: high-trust weight with unresolvable derivation parent. if trust >= tier_threshold: if parent is None or parent not in provenance_store: raise ProvenancePoisoningError( f"chunk {chunk.get('id')} declares trust={trust} " f"but derivation parent {parent!r} is unresolvable" ) # Signal 2: corroboration inflated over a single origin. if corroboration > 1 and independent_origins == 0: raise ProvenancePoisoningError( f"chunk {chunk.get('id')} reports corroboration={corroboration} " f"with independent_origin_count=0 (forged corroboration)" ) # Signal 3: primary-source claim that is a copy of a deep derivative. if depth == 0 and parent is not None: parent_depth = provenance_store[parent].get("derivation_depth") if parent_depth is not None and parent_depth >= 1: raise ProvenancePoisoningError( f"chunk {chunk.get('id')} claims depth=0 (primary) but " f"derives from depth={parent_depth} node {parent!r}" ) return True ```