Introducing Temporal Validity Memory: How MemStrata Retires Stale Facts Without an LLM
MemStrata maintains temporal validity with deterministic (subject, relation, object) supersession in a bi-temporal ledger. No similarity threshold. No LLM on the read path. ~2.1s retrieval latency.
A memory layer that knows what is still true
MemStrata is a local retrieval memory between your AI coding tool and your LLM provider. Like RAG, it stores facts extracted from interaction. Unlike RAG, when a fact’s value is contradicted, a deterministic supersession rule retires the stale value in a bi-temporal ledger — with no similarity threshold and no LLM call on the critical path.
This is the core of our paper Temporal Validity in Retrieval Memory (arXiv:2606.26511): eliminate stale-fact errors for agents over evolving knowledge while preserving static recall.
Write path: retain, then supersede
Each incoming turn yields a candidate fact:
- Exact-duplicate short-circuit — normalized text hash drops verbatim repeats.
- Deterministic assertion path — clean (subject, relation, object) triples normalize the (subject, relation) key. Different object → supersede. Same object → reinforce. No prior key → novel store.
- Text-gate fallback — non-triple prose uses similarity + judge only as a secondary path; non-contradictory near-duplicates are retained as distinct facts.
An early “lossy” variant that aggressively merged near-duplicates regressed below RAG on static recall. The published design therefore retains like RAG and bounds growth only on the axis that matters: contradictions.
Read path at the embedding floor
Query embedding → top-k over active facts → pack original source sentences (not terse reconstructed triples). No language model runs on the read path, so latency sits at the embedding floor (~2.1s) versus ~16–18s for LLM-reranking and verification baselines on the same local stack.
All experiments in Paper 1 run entirely on consumer hardware with Qwen2.5-Coder-7B, temperature 0, fixed seeds, and no network — so the claims are reproducible, not vendor-demo cherry picks.
Why this matters for product
For developers using Cursor, Claude Code, VS Code, or Cline, every confidently wrong answer about “what the port is now” burns tokens and trust. Temporal validity is not a nicer dashboard metric — it is the difference between an assistant that compounds knowledge and one that gaslights you with last month’s truth.
Download MemStrata and keep context local. Your code never leaves your machine.