ZenBrain: A Neuroscience-Inspired 7-Layer Memory Architecture for Autonomous AI Systems
Abstract
ZenBrain is a seven-layer, neuroscience-derived memory architecture for LLM agents that unifies fifteen mechanisms—from Two-Factor synaptic consolidation to a Simulation-Selection sleep loop—under a single MemoryCoordinator: nine foundational algorithms plus six Predictive Memory Architecture components (NeuromodulatorEngine, ReconsolidationEngine, TripleCopyMemory, PriorityMap, StabilityProtector, MetacognitiveMonitor). No system among those surveyed in §2.2 and Appendix A integrates more than two of them. Ablating each mechanism separately exposes an effect we call cooperative masking. Under moderate load, fourteen of the fifteen ablations look costless—the architecture reads as mostly dead weight. Raising decay to 0.25/day over 60 days, with no change to the mechanisms, makes nine of the fifteen individually critical (ΔQ up to −93.7%; Wilcoxon, 10 seeds), five of them moving from exactly 0% to below −89% (Fig. 2). The mechanisms form a cooperative survival network, and mild-load ablation systematically underestimates architectural contributions—a caution we conjecture applies beyond ZenBrain. Every ablation table here reproduces in under one minute on a laptop (npm install, no API keys); 11,589 CI tests. On LongMemEval-500, ZenBrain wins all nine head-to-head answer-quality comparisons (3 competitors × 3 LLM judges) against Letta, Mem0, and A-Mem under Bonferroni-corrected significance (α=0.05/18, p_min=6.2×10⁻³¹, d ∈ [0.18, 0.52]), and reaches 91.3% of a full-context oracle's binary-judge accuracy at 1/106th of the per-query token cost (47.7% vs. 52.2%; App. F.5–F.6, Fig. 3). The Sim-Selection sleep loop adds 37% stability with 47.4% storage reduction (p ≤ 5.1×10⁻³); TripleCopyMemory retains S(t)=0.912 at 30 days; multi-layer routing beats a flat single-layer baseline by +20.7% F1 on LoCoMo. A NoDecay ablation shows principled forgetting costs only ΔP@5=0.002 (p=0.043). Honest scope. LoCoMo's substring-based aggregate F1 favors lexical retrieval (BM25) by metric design; we do not contest this. ZenBrain's advantages are most pronounced on judge-graded answer quality and cross-session reasoning; a cross-provider bias-direction check (Δ_GPT−Anth = −0.0001 for ZB vs. −0.049 for Mem0) rules out LLM-judge-specific confounds. Open-source under the @zensation npm scope, Apache-2.0.
// Source
Authors: Alexander Bering
Institutions: Zen-Noh (Japan)