r/secondbrain • • 4h ago

I built a 100% zero-inference agent memory engine in Node + SQLite WAL: 74.3% Top-5 on LoCoMo-10 (~5.8 ms/q, 0 embeddings, 0 Docker)

Most agent memory setups require a vector DB, an embedding model, Docker, or extra LLM calls just to retrieve context. I wanted to see how far a **100% zero-inference** engine could go using only local Markdown/JSON + `node:sqlite` (WAL) with zero npm dependencies.

**The ceiling I hit**

Pure lexical search (BM25/FTS5) and naive graph spreading hit a hard wall around ~65.6% on multi-session dialogue. High-frequency hubs hijack the top slots, and multi-hop or conversational references fail when there is no embedding model bridging the gap.

**What I implemented in HebbMesh (v1.7) to break that wall without an LLM**

- **Hebbian plasticity + homeostasis:** co-activated memories strengthen their edges, with homeostatic scaling so popular hubs don't drown out specific memories.

- **Phase interference & Pauli-style marginal coverage:** instead of naive additive spreading, non-resonant paths cancel out (destructive interference) and Top-K selection penalizes slot redundancy to force genuine context diversity.

- **Dialogue physics:** in real conversations, meaning lives in speaker continuity and immediate turn-window context rather than isolated messages or question-type dictionaries.

**Results on public LoCoMo-10 (1,982 questions)**

- **74.3% Top-5** (**81.5% Top-10**) — nearly **+19 pts** over standard BM25.

- **~5.8 ms/query** on a regular desktop CPU (no GPU, no external API).

- **20/20** pass rate against Context/Memory Injection (CMI) poisoning probes.

**Honest caveats**

- Because it uses zero embeddings, pure paraphrase queries with zero lexical/graph bridge can still miss compared to dense SOTA retrievers.

- This is strictly the retrieval/memory layer, not a full agent framework (still running End-to-End QA + LongMemEval next).

Open-source under **AGPL-3.0** (`Node >= 22.5`, 0 dependencies). Happy to answer questions on the math, the LoCoMo-10 eval script, or where it breaks.

- **GitHub:** https://github.com/victormunoz-sec/hebbmesh

- **Release v1.7.0 & Paper (EN/ES):** https://github.com/victormunoz-sec/hebbmesh/releases/tag/v1.7.0

- **Zenodo DOI:** https://doi.org/10.5281/zenodo.24514028

2 Upvotes

0 comments sorted by