Skip to content

research(nightly): temporal-coherence-agent-memory#564

Draft
ruvnet wants to merge 3 commits into
mainfrom
research/nightly/2026-06-13-temporal-coherence-agent-memory
Draft

research(nightly): temporal-coherence-agent-memory#564
ruvnet wants to merge 3 commits into
mainfrom
research/nightly/2026-06-13-temporal-coherence-agent-memory

Conversation

@ruvnet

@ruvnet ruvnet commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Nightly Research: Temporal Coherence Decay for Agent Memory Retrieval

Adds crates/ruvector-temporal-coherence — a pure Rust crate scoring agent memories by temporal decay and graph-coherence gating.

What's included

  1. Working Rust PoCcrates/ruvector-temporal-coherence with three VectorSearch variants
  2. ADR-211docs/adr/ADR-211-temporal-coherence-agent-memory.md
  3. Research documentdocs/research/nightly/2026-06-13-temporal-coherence-agent-memory/README.md
  4. Public gistdocs/research/nightly/2026-06-13-temporal-coherence-agent-memory/gist.md
  5. Real benchmark results — all 4 acceptance tests pass

Three retrieval variants

Variant Scoring Primary fitness
FlatSearch cosine similarity cosine_recall=1.000 ✓
TemporalSearch cosine × exp(-λ·age) recency=0.962 ✓
CoherenceSearch cosine × (decay + graph gate) coh_gate=0.971 ✓

Benchmark (N=5 000, D=128, K=10, 200 queries, Rust 1.94.1)

FlatSearch    mean=1036µs  p50=1017µs  p95=1136µs  965 q/s  recall=1.000  PASS
TemporalSearch mean=1033µs p50=1020µs  p95=1096µs  967 q/s  recency=0.962 PASS
CoherenceSearch mean=1070µs p50=1053µs p95=1179µs  935 q/s  coh_gate=0.971 PASS

Ecosystem connections

  • Fills the gap between ruvector-core (cosine search), ruvector-temporal-tensor (compression), and ruvector-coherence (quality metrics)
  • Trait-based API — swap FlatSearchCoherenceSearch without changing caller code
  • Zero external dependencies beyond rand (for benchmark dataset generation)
  • MCP tool surface planned: expose half_life_hours and coherence_weight as tool parameters
  • WASM/Cognitum Seed compatible: no unsafe blocks, pure safe Rust

Research doc

docs/research/nightly/2026-06-13-temporal-coherence-agent-memory/README.md

ADR

docs/adr/ADR-211-temporal-coherence-agent-memory.md

Top alternatives considered (not selected this run)

  • gMMR diversity (score 4.50) — recommended as next nightly topic
  • QuIVer 2-bit topology quantization (score 4.45)
  • Agent memory compaction via mincut (score 4.05)

Run it

git checkout research/nightly/2026-06-13-temporal-coherence-agent-memory
cargo test -p ruvector-temporal-coherence
cargo run --release -p ruvector-temporal-coherence --bin tcd-benchmark

Generated by Claude Code

claude added 3 commits June 13, 2026 07:24
Implements ruvector-temporal-coherence with three VectorSearch variants:
- FlatSearch: pure cosine similarity baseline
- TemporalSearch: cosine × exponential time decay
- CoherenceSearch: cosine × (decay + graph-coherence gate)

All 21 unit tests pass. Acceptance benchmark: N=5000 D=128 K=10 200q
- FlatSearch: cosine_recall=1.000 PASS
- TemporalSearch: recency=0.962 PASS
- CoherenceSearch: coh_gate=0.971 PASS
- Latency: ~1036µs mean / 965 q/s (x86-64, linear scan, Rust 1.94.1)

https://claude.ai/code/session_01AZSYgw84vT12vXZDsRGDvK
- docs/adr/ADR-211-temporal-coherence-agent-memory.md
- docs/research/nightly/2026-06-13-temporal-coherence-agent-memory/README.md
- docs/research/nightly/2026-06-13-temporal-coherence-agent-memory/gist.md

ADR-211 documents design decisions, benchmark evidence, failure modes,
alternatives considered (gMMR, QuIVer, MinCut compaction), and migration path.

https://claude.ai/code/session_01AZSYgw84vT12vXZDsRGDvK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants