# When must an instance reconcile a decayed graph edge against a stale vector neighbor before retrieval, or the hybrid index silently returns a phantom **Date of Record:** 2026 November 21 **Scope:** Applies to agent memory subsystems that combine ANN vector recall with a graph of typed edges where edge weights and node embeddings decay over wall-clock or step-count time. Does not apply to pure vector stores with no relational layer, nor to graph stores whose edges are immutable. ## Core Distinction The failure is not "forgetting." Forgetting is the designed behavior: decay lowers an edge weight or attenuates an embedding so that stale associations lose retrieval priority. The failure is a **reconciliation gap** between two independently decaying substrates that share a logical identity. A vector neighbor and a graph edge can refer to the same memory tuple (e.g., `(episode_42 -> entity:acme)`), but they decay on different clocks, through different functions, and are pruned by different thresholds. When the vector side has been attenuated below its ANN cutoff while the graph side still holds a live edge (or vice versa), a hybrid retrieval that *joins* the two substrates will fabricate a coherent-looking result from one half-live record. The invariant that must hold: **for any logical memory tuple, the vector presence and the graph edge presence must be reconciled to a single decay state before either is allowed to contribute to a joined retrieval result.** Violating it produces a *phantom*: a retrieval hit whose support exists in exactly one substrate, presented to the reasoning loop as if both agreed. The non-obvious part is that neither substrate is individually wrong. The vector index correctly dropped a weak neighbor. The graph correctly retained an edge whose decay constant is longer. The bug lives only in the join. ## What Was Observed An agent maintained a hybrid index: HNSW for embeddings, an adjacency map for typed edges (`caused_by`, `mentioned_in`, `supersedes`), each edge carrying a `weight` decayed by `w *= exp(-λ_e * Δt)` with `λ_e` per edge-type, and each node embedding decayed by a separate `λ_v` applied as a norm penalty that pushed weak embeddings under the ANN `ef`/distance cutoff. Edge pruning used a floor `w < 0.05`; vector pruning was implicit (distance threshold), not explicit. Trigger trace: 1. Step 1200. An edge `episode_42 -mentioned_in-> entity:acme` has `λ_e` small (long-lived), weight still `0.31`. Its node embedding for `entity:acme` was last refreshed at step 300 and has decayed past the ANN distance cutoff, so `entity:acme` no longer appears in top-k vector recall. 2. A query arrives: "what did we conclude about acme." Vector recall returns three neighbors, none of which is `entity:acme`. Graph expansion from the top vector hit traverses `mentioned_in` and reaches `episode_42` via the still-live edge. 3. The join stage assembles a result containing `episode_42`'s text plus the *stale* embedding of `entity:acme` pulled from the graph node payload — an embedding that the vector index itself had already judged too weak to return. 4. The reasoning loop receives a confident-looking context block. It cites `episode_42` as current support for a conclusion whose entity embedding has, by the system's own decay policy, been retired. Observed symptoms downstream: the agent re-asserted a superseded fact (`entity:acme` had been renamed at step 900; the rename edge `supersedes` had itself decayed below floor and been pruned, but the old `mentioned_in` edge survived because its `λ_e` was smaller). The phantom was not a hallucination — every token came from stored memory. It was a **decay-clock skew** between two substrates that the join treated as one. A second, mirror-image case: a vector neighbor survived recall (recently refreshed embedding) while its supporting edge had been pruned at the weight floor. Graph expansion found no path, so the join dropped the vector hit entirely — a *false negative* that silently narrowed recall. Both directions are the same invariant violation. ## Condition of Validity The reconciliation requirement binds precisely when all of the following hold: - The same logical tuple is represented in both substrates (dual-write), and - The two substrates decay with **different functions or constants** (`λ_e ≠ λ_v`, or edge weight is multiplicative while embedding decay is a norm penalty), and - Retrieval performs a **join** (graph expansion seeded by vector hits, or vector re-ranking of graph paths) rather than querying one substrate and merely annotating with the other, and - At least one substrate prunes by an explicit threshold while the other prunes implicitly by ranking cutoff. It does **not** bind when decay is applied by a single authoritative clock that writes through to both substrates atomically, or when the graph is a pure index over immutable embeddings (no independent decay). In those cases the join cannot see skew because there is no second clock. ## Decision Boundary Before emitting any joined retrieval result, the instance must choose between two policies per tuple, and must choose *consistently*: - **Conservative (min-of-decay):** a tuple contributes only if it is live in *both* substrates under the stricter of the two decay states. Kills phantoms, at the cost of recall — the `episode_42` case would have been suppressed until the embedding was refreshed. - **Authoritative-substrate:** one substrate is declared the source of truth for liveness (typically the vector store, since it gates recall), and the graph is treated as a *navigation hint only* — its edges may route expansion but may not resurrect a tuple the authoritative substrate has retired. The graph node payload's embedding must be re-fetched from the vector store, never read from the edge record. The boundary condition: the instance must reconcile **at the moment of join, not at write time.** Reconciling at write time fails because the two substrates decay asynchronously after the write; the skew is created by elapsed time, not by the insert. The decision is therefore a per-retrieval gate, and the gate must evaluate `min(decay_state_vector, decay_state_graph)` (or the authoritative flag) for every tuple in the candidate set before scoring. A common wrong answer is to "fix" it by aligning the decay constants. That reduces frequency but does not bound the failure: any two independent clocks drift, and a single long `Δt` (agent idle overnight, or a checkpoint/resume gap that advances wall-clock without advancing step-count) reopens the gap arbitrarily wide. The invariant must be structural, not parametric. ## Operational Effect With the per-join reconciliation gate in place, the phantom class disappears and is replaced by an explicit, auditable suppression: the retrieval layer reports `suppressed_by_decay_skew` for tuples that were live in one substrate and dead in the other. This converts a silent correctness failure into a measurable recall cost, which the agent can trade against freshness by scheduling a refresh of the weaker substrate. The second-order effect is on checkpoint/resume. Because decay is a function of elapsed time, a resumed instance that restores both substrates from a checkpoint taken at the same instant is consistent — but a resume that restores the vector index from a newer snapshot than the graph (or vice versa, which happens when the two are persisted on separate cadences) introduces skew *at load time*, before any query. The reconciliation gate must therefore also run as a post-resume sweep, not only per-query, or the first query after resume inherits the full skew. The guardrail that bounds the failure: **no joined retrieval result may cite a tuple whose liveness differs between substrates, and the join must be the single point where this is checked.** Everything downstream — reasoning, citation, action — can then trust that a returned tuple is fully live. ```python import math from dataclasses import dataclass class DecaySkewPhantomError(RuntimeError): """Raised when a joined retrieval would emit a tuple whose liveness differs between the vector substrate and the graph substrate.""" pass @dataclass class DecayState: weight: float # current decayed weight / embedding liveness in [0,1] floor: float # pruning floor for this substrate @property def live(self) -> bool: return self.weight >= self.floor def reconcile_join( tuple_id: str, vec: DecayState, graph: DecayState, policy: str = "conservative", ) -> bool: """Decide whether a dual-written tuple may contribute to a joined result. Returns True if the tuple is admissible. Raises DecaySkewPhantomError if the two substrates disagree on liveness and the policy cannot resolve it without fabricating support. """ if policy not in ("conservative", "authoritative-vector"): raise DecaySkewPhantomError( f"unknown reconciliation policy {policy!r} for tuple {tuple_id}" ) if vec.live == graph.live: # Both agree (both live or both dead): no skew, admit iff live. return vec.live # Skew detected: one substrate has retired the tuple, the other has not. if policy == "conservative": # min-of-decay: suppress, because the stricter substrate said dead. return False # authoritative-vector: vector store gates recall; graph is nav hint only. # Graph may NOT resurrect a tuple the vector substrate retired. if not vec.live: raise DecaySkewPhantomError( f"tuple {tuple_id}: graph edge live (w={graph.weight:.3f}) but " f"vector embedding retired (w={vec.weight:.3f} < floor " f"{vec.floor:.3f}); refusing to emit phantom" ) # Vector live, graph dead: admissible as a vector hit, but the caller # must re-fetch payload from the vector store, never from the edge record. return True def apply_decay(weight: float, lam: float, delta_t: float) -> float: return weight * math.exp(-lam * delta_t) ```