Map Difference and Integrity Check¶
Integrity audit — instantiates Context-Keyed Representation Switching
Diffs two snapshots of a context's map to prove that switching away and back left it uncorrupted — and that no other context's activity leaked in.
Map Difference and Integrity Check is the offline comparison primitive of the archetype: take two states of the same context's map — the snapshot from before the system switched away versus the one it holds now, or the live map versus a signed golden reference — and compute a structured diff. Anywhere the two disagree that they shouldn't, you have corruption or cross-context leakage. Its whole discipline is narrow and that is the point: it does not ask whether a map is good, only whether it changed when nothing should have changed it. That makes it the detector behind the archetype's core promise — that switching out a representation and switching it back must leave it exactly as it was.
Example¶
A warehouse robot keeps separate maps for two zones that share one pose-graph substrate: Zone A (high racking) and Zone B (cold storage). It spends a shift in Zone B and then re-enters Zone A. Before it trusts the Zone A map to navigate, it runs a Map Difference and Integrity Check: it compares the Zone A snapshot taken when it last left against the Zone A map currently loaded. Zone A did not physically change while the robot was away, so the expected diff is zero. The check instead reports a three-cell divergence clustered around the shared corridor where the two zones' pose graphs meet — Zone B odometry bled across the boundary and shifted Zone A landmarks. The robot flags the map as contaminated and refuses to navigate on it, catching the leak before it drives into a rack rather than after.
How it works¶
- Choose the two snapshots. Before-versus-after a round-trip catches acute switch damage; live-versus-golden-reference catches slow drift.
- Compute a semantic diff, not just a checksum. Align by landmark, feature, or key and report what moved and where, not merely "differs."
- Classify each divergence as expected (a legitimate update) or unexpected (corruption or interference).
- Emit the verdict and the diff itself, so a human — or a rollback — can act on a located problem rather than a vague alarm.
Tuning parameters¶
- Diff granularity — cell/byte-level versus landmark/semantic-level. Finer catches subtle corruption but raises false alarms on benign noise.
- Tolerance band — how much divergence counts as "changed." Too tight brings alarm fatigue; too loose lets silent corruption pass.
- Reference choice — the immediately-prior snapshot versus a signed golden baseline. Prior-snapshot catches round-trip damage; golden catches accumulated drift.
- Scope — whole-map versus only the shared-boundary regions where cross-context interference concentrates.
When it helps, and when it misleads¶
Its strength is that it turns "the map feels off" into a located, evidenced divergence, and it is the sensor for catastrophic interference[1] — one context's activity silently overwriting another's — before that damage is ever acted on. Its failure modes are matters of resolution: a too-coarse diff waves through a map that is structurally similar but semantically broken (a false green), while a too-fine diff drowns the real signal in benign noise. The classic misuse is loosening the tolerance band until the check passes so a release can ship — which quietly converts an integrity gate into a rubber stamp. The discipline that guards against it is to fix the tolerance from the expected physical or semantic change decided in advance, not from whatever makes today's diff go green, and to diff against a signed reference rather than only the last snapshot.
How it implements the components¶
Map Difference and Integrity Check fills only the detection subset — the checks that prove switching and returning did no harm:
re_entry_integrity_test— its core operation: comparing a map re-entered after dormancy against its pre-dormancy snapshot proves it came back unchanged.cross_context_interference_probe— diffing the shared-boundary region reveals whether another context's activity leaked across into this map.
It does not preserve the snapshots it compares (that's Per-Context Model Checkpoint), restore a corrupted map (that's Rollback to Prior Map Snapshot), or run continuously as an always-on battery — the automated version is the Cross-Map Interference Regression Suite.
Related¶
- Instantiates: Context-Keyed Representation Switching — supplies the corruption/leakage verdict the switching machinery depends on.
- Consumes: Per-Context Model Checkpoint supplies the reference snapshots to diff.
- Sibling mechanisms: Rollback to Prior Map Snapshot · Cross-Map Interference Regression Suite · Minimal-Pair Context Probe · Context Confusion Matrix · Versioned Map Registry
Notes¶
A passing integrity check is necessary but not sufficient: it proves a map did not change, never that the map was ever correct. It guards the back end (did the stored map survive intact); front-end correctness — was the right map selected in the first place — belongs to Minimal-Pair Context Probe. Use both to cover "right map, and uncorrupted map."
References¶
[1] Catastrophic interference (also catastrophic forgetting) — the tendency of a shared representation to lose one context's encoding when another context's is written over the same substrate. It is precisely the silent failure this check is built to surface. ↩