Research

Temporal validity for agent memory

MemStrata is backed by a research program on stale-fact errors, marker-free evaluation, code evolution boundaries, and generalization beyond code — run locally, deterministically, with a 7B model.

0.59
Cosine AUROC
Contradiction vs duplicate — near chance
~0%
Stale-fact error
MemStrata when forced to answer
0.95–1.0
Evolving accuracy
Four marker-free evolving benchmarks
~2.1s
Retrieval latency
Embedding floor — no LLM on read path
Flagship

Paper 1 — on arXiv

1 Published arXiv preprint · cs.CL / cs.AI

Temporal Validity in Retrieval Memory: Eliminating Stale-Fact Errors for AI Agents over Evolving Knowledge

Deterministic supersession that RAG cannot match by construction

RAG gives agents access to accumulated knowledge but has no model of time. When a fact changes, cosine similarity surfaces both stale and current values nearly equally (AUROC 0.59 for contradiction vs duplicate). MemStrata stores facts like RAG, then retires contradicted values with a deterministic (subject, relation, object) supersession rule in a bi-temporal ledger — no similarity threshold, no LLM on the read path. Across six local benchmarks with a 7B model, MemStrata ties RAG on static knowledge and reaches 0.95–1.00 accuracy on evolving knowledge where RAG reaches 0.20–0.47. Stale-fact-error drops from 15–40% (RAG, when forced to answer) to ~0%.

  • Cosine AUROC 0.59 — similarity cannot separate contradictions from duplicates
  • Evolving knowledge accuracy 0.95–1.00 vs RAG 0.20–0.47
  • Stale-fact-error ~0% vs RAG 15–40% when required to answer
  • Retrieval ~2.1s (embedding floor) vs ~16–18s LLM-rerank baselines
temporal validitystale-fact errorbi-temporal ledgerRAG
Portfolio

Five papers. One temporal spine.

From mechanism (P1) to real code histories (P2), scope taxonomy (P3), structural staleness (P4), and world-knowledge breadth (P5).

2 Draft

SWE-bench Longitudinal: Temporal Memory on Real Code Histories

130 marker-free scenarios from real buggy→fixed GitHub histories

Paper 2 stress-tests temporal_v6 on real software evolution. From SWE-bench Lite/Verified we extract 130 clean single-value, marker-free scenarios. On this longitudinal suite, temporal_v6 reaches 0.908 accuracy vs 0.569 naive RAG and 0.585 advanced RAG, with stale-fact-error 0.023 vs 0.262 for both RAG variants — at ~2.1s retrieval vs ~21s for LLM reranking.

  • 130 real SWE-bench longitudinal scenarios (marker-free)
  • Accuracy 0.908 (MemStrata) vs 0.569 / 0.585 (naive / advanced RAG)
  • Stale-fact-error 0.023 vs 0.262 for RAG
  • Active memory size bounded (135 vs 260 for RAG)
SWE-benchcode evolutionlongitudinalstale facts
3 Draft

Where Temporal Memory Applies: A Taxonomy of Code Evolution

Measuring the value-change ceiling on 707 real GitHub fixes

Papers 1–2 show deterministic supersession eliminates stale-fact errors on clean value changes. Paper 3 maps scope on real code: of 707 SWE-bench fixes, ~19% are native value-changes handleable by the ledger; a contract extractor lifts the ceiling to only ~24%. The remaining ~76% is logic/control-flow that does not reduce to a triple. Recency-aware RAG — including “pick newest chunk” LLM rerankers — fails to match the ledger; a recency-adversarial re-read of old values exposes a sharp boundary.

  • ~19% native value-change ceiling over 707 real fixes
  • Contract extraction lifts to only ~24% overall
  • ~76% logic bulk is out of triple extraction scope
  • Recency baselines do not substitute for a temporal ledger
taxonomycode evolutionvalue-change ceilingSWE-bench
4 Draft

Structural-Staleness-Aware Retrieval for the Un-Extractable Majority

Detect-and-flag for the ~76% logic bulk — without overclaiming extraction

Paper 4 answers the reviewer question left by Paper 3: what about the 76%? The honest answer is not “extract logic too,” but detect structural change and flag staleness at retrieval. Scope-level CST checksums mark logic-stale scopes; retrieval warns the model that code was modified since indexing. An identity layer (entity UUIDs + FQN resolution) productionizes renames without mutating ledger history. All mechanisms stay off the hot path or O(1).

  • Scope-level structural checksums for logic-staleness detection
  • Retrieval-time warnings instead of fake triple extraction
  • Entity UUID identity layer for renames over time
  • Moat-safe: does not mutate the CERTAIN ledger spine
structural stalenessdetect-and-flagtree-sitteridentity
5 In progress

Generalized Temporal Context: Value Supersession Beyond Code

Does the mechanism transfer to world knowledge?

Paper 5 is the breadth thesis. On synthetic marker-free world-knowledge scenarios, temporal_v6 reaches 0.85 accuracy / 0.075 stale with LLM extraction — and 1.000 / 0.000 with oracle gold triples. The residual is extraction quality, not the supersession mechanism. The mechanism generalizes perfectly; the remaining work is a domain-appropriate NL extractor and real temporal NLP benchmarks (TEMPO, ECT-QA) using bi-temporal as-of(T) reads.

  • Oracle synth: 1.000 acc / 0.000 stale (mechanism is perfect)
  • LLM-extract residual is extraction, not supersession
  • Mechanism generalizes beyond code to world-knowledge facts
  • Next: general NL extractor + real TEMPO / ECT-QA evaluation
world knowledgegeneralizationTEMPOas-of queries

How we evaluate

Experiments run locally and deterministically on consumer hardware: Qwen2.5-Coder-7B, nomic-embed-text, temperature 0, fixed seeds, no network. We report stale-fact-error separately from accuracy, enforce marker-free evolving benchmarks, and compare competitors on the same stack when claiming architectural wins.

Citation: Yadav, N. (2026). Temporal Validity in Retrieval Memory. arXiv:2606.26511. Abstract →