research(nightly): mincut-memory-compaction — graph-topology-aware agent memory eviction#527
Draft
ruvnet wants to merge 1 commit into
Draft
research(nightly): mincut-memory-compaction — graph-topology-aware agent memory eviction#527ruvnet wants to merge 1 commit into
ruvnet wants to merge 1 commit into
Conversation
Implements ADR-196: graph-topology-aware agent memory compaction using k-NN cosine similarity graph isolation scoring. Adds crates/ruvector-memory-compaction with three variants: - GreedyAgeCompactor: FIFO baseline, O(n log n) - DecayScoreCompactor: exponential decay + greedy diversity, O(n²) - MinCutCompactor: k-NN graph isolation score, O(n²×D) Measured results (x86_64 release, clustered 8-cluster Gaussian): MinCutGraph quality 0.8331 vs GreedyAge 0.7118 (N=1000, D=64) MinCutGraph quality 0.8328 vs GreedyAge 0.7263 (N=3000, D=128) +0.1065–0.1213 centroid quality improvement on clustered data 13 unit tests pass. All benchmark acceptance checks pass. https://claude.ai/code/session_01YZdKfKvw1ezECnQypnX447
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly RuVector Research — 2026-06-01
Topic: MinCut-Guided Agent Memory Compaction
ADR: docs/adr/ADR-196-mincut-memory-compaction.md
Crate: crates/ruvector-memory-compaction
Research doc: docs/research/nightly/2026-06-01-mincut-memory-compaction/README.md
Public gist: docs/research/nightly/2026-06-01-mincut-memory-compaction/gist.md
What this adds
A standalone Rust crate implementing three compaction strategies for timestamped agent vector memory, benchmarked on isotropic and clustered Gaussian datasets at 50% retention.
Variants
GreedyAgeCompactorDecayScoreCompactorMinCutCompactorQuality = cosine similarity between pre- and post-compaction centroids (1.0 = perfect).
Key result
MinCutGraph leads GreedyAge by +0.1065–0.1213 on 8-cluster Gaussian data — the algorithm exploits semantic cluster topology to preserve cluster cores while evicting peripheral/isolated entries.
Build status
Ecosystem connections
SpectralCoherenceScoreplanned as Phase 2 quality gateevicted_idsfeeds proof-gated witness log (Phase 2)memory/compactMCP tool surface (Phase 3)GreedyAgeCompactorfor edge RAM-constrained deploymentsWhat is NOT claimed
MinCutCompactorat n=5000 takes 3.6 s — not production-ready without HNSW-accelerated graph build (planned Phase 2)Research loop
This branch should either become a production RuVector capability or a falsified research path with useful evidence.
Generated by Claude Code