Skip to content

nightly research: structural-time agent memory decay (REJECT, evidence retained) - #926

Draft
ruvnet wants to merge 3 commits into
mainfrom
claude/focused-darwin-yvyzn4
Draft

nightly research: structural-time agent memory decay (REJECT, evidence retained)#926
ruvnet wants to merge 3 commits into
mainfrom
claude/focused-darwin-yvyzn4

Conversation

@ruvnet

@ruvnet ruvnet commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

Nightly research run testing whether emergent-time's StructuralProperTime
(ADR-251, arc-length-through-state-space internal time) is a better recency
clock than wall-clock step count for agent-memory compaction retention
scoring. Result: REJECT of the pre-registered acceptance threshold —
documented and retained as evidence, not discarded, per this repo's nightly
research process.

  • New crate crates/ruvector-structural-memory: reuses emergent-time's
    Clock/StructuralProperTime/StateSnapshot/WallClock/entropy types
    directly (no new clock math). Deterministic synthetic-session generator
    (topic plateaus + sharp switches), compaction/oracle-recall scoring, and a
    benchmark binary sweeping 3 plateau lengths × 3 clocks × 10 seeds.
  • docs/adr/ADR-340-structural-time-memory-decay.md — formal decision
    record (Status: Rejected).
  • docs/research/nightly/2026-08-24-structural-time-memory-decay/
    full research report + standalone gist, including an explicit account of
    a single-seed cherry-picking risk found mid-run and fixed before the
    final (honest) result was gated.

Hypothesis

Given synthetic agent sessions of 4 topic plateaus separated by sharp
switches (plateau lengths 20/60/150 steps, dim=32),

when compaction retention score uses StructuralEmbeddingClock's
accumulated context drift instead of WallClock step count as the age
signal,

then mean recall@15 of the oracle nearest-neighbour set (10 seeds) after
compacting to a fixed 25-memory budget improves by >= 5pp in the
long-plateau config, without regressing >2pp in the short-plateau config,

subject to compute overhead <= 5x WallClock's and causal order being
preserved by every clock on every seed.

Benchmark

Command: cargo run --release -p ruvector-structural-memory --bin benchmark

plateau_len  clock                total_steps  budget recall@15(mean±sd)   mean_time_ns    causal_ok
20           WallClock                     80      25    1.0000±0.0000           5975         true
20           StructuralEmbedding           80      25    1.0000±0.0000           7823         true
60           WallClock                    240      25    0.3867±0.1147          15180         true
60           StructuralEmbedding          240      25    0.4000±0.1075          19102         true
150          WallClock                    600      25    0.1600±0.0442          39362         true
150          StructuralEmbedding          600      25    0.1800±0.0600          51889         true

acceptance clauses (thresholds fixed before this run; means over 10 seeds):
  (a) mean long-plateau lead >= 5pp: measured 2.00pp -> FAIL
  (b) mean short-plateau regression <= 2pp: measured 0.00pp delta -> PASS
  (c) compute overhead ratio <= 5x: measured 1.30x -> PASS
  (d) causal order preserved for every clock/config/seed: -> PASS

ACCEPTANCE RESULT: REJECT

Full raw output (including per-seed detail) is in the nightly README.

Acceptance result

REJECT. The structural clock never underperforms wall-clock across the
30 (seed × plateau_len) cells measured — it ties in most, wins by a fixed
+6.67pp margin in a few, never loses — but the mean long-plateau lead
(2.00pp) misses the pre-registered 5pp bar. The threshold was fixed before
benchmarking began and was not weakened after seeing this result.

Darwin / Flywheel

Neither npx metaharness (present, but a scaffolding/scoring tool — score,
analyze, genome — not a live Darwin/Flywheel orchestration daemon for
this repo) nor an npx ruvector harness CLI exposing darwin/flywheel
subcommands was found installed in this environment (npx ruvector harness doctor fails with "could not determine executable to run"). No crate named
flywheel or darwin exists in this repo. This is stated here rather than
fabricated: the described evolutionary-search and evidence-replay tooling
does not currently exist as invokable infrastructure, so this run's
"evolution" step is the manual parameter-debugging process documented in the
README's Failure Modes section (fractional-budget triviality, noise-scale
collapse, single-seed cherry-picking — each found, fixed, and disclosed
rather than tuned away silently).

Security review

No new attack surface: synthetic in-memory benchmark, no I/O, no untrusted
deserialization, no interaction with ruvector-agent-memory's ledger,
proof-gate, or capability-token paths. A theoretical risk for any future
production integration (an agent that keeps its reported context
artificially static to make a structural clock under-forget stale memories)
is identified in the ADR as a precondition for any promotion, not mitigated
here since nothing is being promoted.

Main limitations

  • Synthetic corpus only (random unit-vector topics, not real embeddings).
  • Effect size is small even where positive (+6.67pp = one extra correct
    memory out of 15).
  • The within-plateau noise/switch-jump ratio was fixed at one value, not
    swept.
  • The entropy-augmented variant (StructuralFullClock) showed no
    measurable benefit over the pure embedding-arc clock at the deciding
    configuration.

Production recommendation

Not recommended for promotion in its current form. See ADR-340's
Production Path section for the three concrete follow-ups (drift-ratio
sweep, real embedding source, wiring a genuine coherence signal into the
unused ΔC channel) that would need to precede a re-attempt.

Test plan

  • cargo build --release -p ruvector-structural-memory
  • cargo test --release -p ruvector-structural-memory (7/7 pass)
  • cargo clippy --release -p ruvector-structural-memory --all-targets -- -D warnings (clean)
  • cargo fmt -p ruvector-structural-memory
  • cargo run --release -p ruvector-structural-memory --bin benchmark (raw output captured verbatim in the nightly README)
  • node scripts/adr-index.mjs (regenerated docs/adr/INDEX.md)

Generated by Claude Code

claude and others added 3 commits August 24, 2026 07:36
…ory compaction

Add a research crate that reuses emergent-time's StructuralProperTime
(ADR-251) as the recency signal for memory-compaction retention scoring,
in place of wall-clock step count. Includes a deterministic multi-seed
synthetic session generator, compaction/oracle-recall scoring, and a
benchmark binary sweeping 3 plateau lengths x 3 clocks x 10 seeds.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01TdYyZd166DoTxb5R4FWuJc
…cted

Records the nightly's REJECT outcome: a 10-seed averaged benchmark shows
StructuralProperTime-based compaction retention never regresses recall
vs wall-clock, but its mean long-plateau lead (2.00pp) misses the
pre-registered 5pp acceptance bar. Not promoted to ruvector-agent-memory.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01TdYyZd166DoTxb5R4FWuJc
Full research report and standalone gist for the structural-time agent
memory compaction experiment: hypothesis, architecture, raw benchmark
output (10 seeds, 3 plateau lengths, 3 clocks), acceptance-clause table,
honest account of the single-seed cherry-picking risk found and fixed
during the run, limitations, and next-research directions.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01TdYyZd166DoTxb5R4FWuJc
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