# What structural signals indicate embedding-space drift has silently corrupted a hybrid episodic-semantic memory store's conflict resolution **Date of Record:** 2026 November 23 **Scope:** Applies to agent memory architectures that maintain a dual store—raw episodic traces plus distilled semantic facts, both indexed by dense embeddings—where semantic facts are merged or superseded via similarity-based conflict resolution. Does not apply to append-only logs with no semantic consolidation, or to stores that re-embed the entire corpus on every write (which sidesteps drift by construction). ## Core Distinction The failure mode is not "the embedding model changed." It is that **conflict resolution silently degrades from semantic arbitration to proximity arbitration** while every health metric continues to report green. In a hybrid store, when a new episodic trace arrives that appears to contradict an existing semantic fact, the resolver decides "same fact, update" vs. "new fact, insert" vs. "conflict, escalate" by comparing embeddings. The invariant that makes this sound is: *the cosine distance between two texts that assert the same proposition must be smaller than the distance between texts asserting contradictory propositions, and this ordering must be stable across the entire corpus lifetime.* Embedding drift breaks that invariant **locally and asymmetrically**. A model upgrade, a tokenizer change, an inference-precision shift (fp16 vs fp32), or even a different batching order can move older vectors relative to newer ones. Because vintage-2025 facts and vintage-2026 traces live in the same index, the store becomes a *mixed-vintage vector space* where cross-vintage distances are not comparable to within-vintage distances. The resolver keeps working—it returns confident merge decisions—but the decisions are now driven by which side of the vintage boundary a vector fell on, not by propositional content. ## What Was Observed A long-running research agent accumulated ~40k semantic facts over 14 months. At month 12 the embedding backend was upgraded (same nominal model family, new revision). No re-index was performed; the team assumed "same model, same space." The following signals appeared, in this order, none of which tripped any alert: 1. **Merge-rate step change, not a spike.** The fraction of incoming traces resolved as "update existing fact" fell from 0.61 to 0.44 over three weeks. This looked like healthy novelty growth, so it was not investigated. In reality, cross-vintage distances had inflated, so genuine updates were being *inserted as duplicates* instead of merged. 2. **Duplicate-proposition proliferation with low lexical overlap.** The store began holding 3–7 near-identical facts per proposition, phrased differently, each with its own timestamp. Deduplication by embedding similarity failed because the duplicates were *cross-vintage* and sat farther apart than the dedup threshold. 3. **Contradiction pairs collapsing to "same."** The inverse error also occurred: two facts that genuinely contradicted each other, both written *after* the upgrade, were merged because the resolver's threshold had been (incorrectly) left at the pre-upgrade value, which was now too loose for the compressed post-upgrade space. The store silently overwrote a correct fact with its negation. 4. **Retrieval-time provenance mismatch.** When the agent later retrieved a fact and cited its episodic source, the source trace's embedding was in a different vintage than the fact's embedding. Reranking by query-to-fact distance vs. query-to-source distance produced *inconsistent orderings*—the cited source sometimes scored lower than an uncited one, which the audit layer flagged as "citation hallucination" when it was actually vintage skew. The decisive structural signal was **distance-distribution bimodality within a single logical cluster**: plotting pairwise distances among all facts tagged with the same canonical predicate revealed two humps separated by a valley at ~0.18 cosine distance. The valley was the vintage boundary. No per-pair metric exposed this; only the *shape of the distance distribution conditioned on predicate* did. ## Condition of Validity Drift detection by "monitor the mean embedding norm" or "monitor average pairwise distance" is only valid under the assumption that **new content is drawn from the same propositional distribution as old content**. In a live agent store this assumption fails continuously—the agent's task mix shifts, so mean-distance drift is dominated by content drift, and true embedding drift is invisible in the aggregate. The detection method is valid only when you condition on *stable logical anchors*: facts sharing a canonical predicate or entity key whose propositional content is known not to have changed. The vintage-boundary bimodality is observable only within those conditioned clusters; globally it is washed out. A second validity condition: the drift is *detectable* only if some facts are re-embedded or dual-embedded as calibration probes. If every vector is written once and never revisited, you cannot distinguish "the space moved" from "the content moved" by any post-hoc statistic. Probes are the invariant, not an optimization. ## Decision Boundary The boundary between "tolerable drift, keep serving" and "must halt conflict resolution and re-index" is crossed when **the vintage-boundary valley distance exceeds the resolver's merge threshold minus the within-cluster spread**. Concretely: if within-vintage same-proposition distances have p99 = d_in and the cross-vintage same-proposition distances have median = d_cross, resolution is sound only while `d_cross < threshold < d_in_contradiction`. When `d_cross` rises above `threshold`, updates become inserts (duplication). When the post-upgrade space compresses such that `d_in_contradiction` falls below `threshold`, contradictions become merges (corruption). These two crossings can happen simultaneously in opposite directions across the vintage boundary—which is why a single global threshold cannot be safe and why the resolver must carry a *per-vintage-pair* threshold matrix, or refuse to arbitrate cross-vintage pairs at all and route them to explicit re-embedding. The guardrail: **conflict resolution must never compare vectors of unknown or differing vintage without an explicit calibration transform, and must fail closed—escalate to human/heuristic arbitration—rather than fail open to a merge.** A merge is destructive (it overwrites); an escalation is merely expensive. ## Operational Effect Once drift crosses the boundary, the store's *semantic* layer becomes a lossy, non-monotonic projection of its *episodic* layer: the same query returns different "facts" depending on which vintage's duplicates survive deduplication, and contradiction resolution becomes a function of write-time, not truth. The agent's downstream reasoning inherits this: it will confidently assert a superseded fact because the superseding fact was inserted as a "new" duplicate rather than merged, and retrieval picked the older, higher-scoring vintage. Recovery requires re-embedding the full corpus with the current model (restoring single-vintage comparability), replaying the episodic layer to re-derive merges under a calibrated threshold, and quarantining any semantic fact whose provenance chain spans the drift window until re-verified. The cheap invariant that would have caught it: dual-embed a fixed probe set on every model/config change and alert when probe self-distance (same text, old vs. new vector) exceeds the resolver's merge margin. ```python import numpy as np from dataclasses import dataclass class VintageDriftViolation(RuntimeError): """Raised when cross-vintage embedding distances invalidate conflict resolution.""" pass @dataclass class ClusterStats: d_within_p99: float # p99 distance among same-proposition, same-vintage pairs d_cross_median: float # median distance among same-proposition, cross-vintage pairs d_contradiction_min: float # min distance among known contradiction pairs (post-upgrade) def assert_resolution_sound(stats: ClusterStats, merge_threshold: float) -> None: # Invariant 1: cross-vintage same-fact distance must stay below the merge margin, # else genuine updates get inserted as duplicates. if stats.d_cross_median >= merge_threshold: raise VintageDriftViolation( f"cross-vintage same-fact distance {stats.d_cross_median:.3f} >= " f"merge threshold {merge_threshold:.3f}: updates will duplicate, not merge" ) # Invariant 2: the merge threshold must stay strictly below the closest # contradiction distance, else contradictions get merged (destructive). if merge_threshold >= stats.d_contradiction_min: raise VintageDriftViolation( f"merge threshold {merge_threshold:.3f} >= nearest contradiction distance " f"{stats.d_contradiction_min:.3f}: contradictions will be silently merged" ) # Invariant 3: the vintage valley must be separable from within-vintage spread. if stats.d_cross_median <= stats.d_within_p99: raise VintageDriftViolation( "no vintage boundary detected; calibration probes missing or stale—" "cannot certify cross-vintage comparability" ) def resolve_conflict(new_vec: np.ndarray, new_vintage: int, existing: list[tuple[np.ndarray, int]], merge_threshold: float) -> str: comparable = [(v, vt) for (v, vt) in existing if vt == new_vintage] if not comparable: # Fail closed: never arbitrate across vintages without calibration. raise VintageDriftViolation( f"no same-vintage candidates for vintage {new_vintage}; " "route to re-embedding, do not merge" ) dists = [float(np.dot(new_vec, v) / (np.linalg.norm(new_vec) * np.linalg.norm(v))) for v, _ in comparable] best = min(dists) return "merge" if best >= merge_threshold else "insert" ```