ZenBrain Benchmarks
August 29, 2026 · View on GitHub
This file collects the numbers behind ZenBrain. The system-level result — the one the
architecture is judged on — is LongMemEval-500, below. The algorithm-level figures under it are
a mix: some are measured, and some are taken from the published literature, cited at the table
that uses them. Neither kind runs from a script in this repository; the one thing that does is
scripts/compare-mechanisms.sh.
LongMemEval-500 (system level)
On LongMemEval-500, ZenBrain wins all nine head-to-head answer-quality comparisons against Letta, Mem0 and A-Mem: three competitors x three LLM judges, under Bonferroni-corrected significance (alpha = 0.05/18), p_min = 6.2e-31, Cohen's d in [0.18, 0.52].
| Measure | Result |
|---|---|
| Head-to-head answer-quality comparisons won | 9 of 9 (3 competitors x 3 LLM judges) |
| Significance | Bonferroni-corrected, alpha = 0.05/18, p_min = 6.2e-31 |
| Effect size | d in [0.18, 0.52] |
| Share of full-context oracle binary-judge accuracy | 91.3% (47.7% vs. 52.2%) |
| Per-query token cost against that oracle | 1/106th |
| Multi-layer routing vs. flat single-layer baseline (LoCoMo) | +20.7% F1 |
| Cost of principled forgetting (NoDecay ablation) | Delta-P@5 = 0.002 |
Where ZenBrain loses. On LoCoMo, substring-based aggregate F1 favours lexical retrieval (BM25) by metric design, and we do not contest that. Retrieval-proper metrics go to a competing system. The advantage is most pronounced on judge-graded answer quality and cross-session reasoning.
Ablations. Under moderate load, fourteen of the fifteen mechanism ablations look costless. Raising decay to 0.25/day over 60 days, with no change to the mechanisms, makes nine of the fifteen individually critical (Delta-Q up to -93.7%; Wilcoxon, 10 seeds). Mild-load ablation systematically underestimates architectural contributions — the paper calls this cooperative masking.
Checking it. The mechanism comparison in the README re-runs from this repository with
bash scripts/compare-mechanisms.sh — no API keys, nothing to install, and a positive and a
negative control printed before the result. The LongMemEval and LoCoMo figures above come
from the paper; this repository does not yet ship a runner that reproduces them.
- Method and full tables: arXiv:2604.23878
- Open-access archive: 10.5281/zenodo.19353663
Algorithm-level micro-benchmarks
FSRS vs SM-2: Retention Accuracy
Based on the open-spaced-repetition/fsrs4anki research across millions of Anki review logs:
Day SM-2 Retention FSRS Retention Improvement
────────────────────────────────────────────────────────
1 95% 97% +2%
3 82% 89% +7%
7 68% 78% +10%
14 51% 65% +14%
30 32% 52% +20%
60 18% 38% +20%
90 11% 28% +17%
FSRS achieves ~30% better retention at the 30-day mark compared to SM-2, the algorithm behind Anki.
Why FSRS Outperforms SM-2
SM-2 uses a fixed multiplier (EaseFactor) that doesn't account for:
- Desired difficulty: Reviewing at low retrievability gives bigger stability boosts
- Forgetting curve shape: SM-2 assumes linear decay, FSRS uses exponential (R = e^(-t/S))
- Difficulty-stability interaction: Harder items need different scheduling than easy ones
FSRS models all three, resulting in more efficient review schedules.
Forgetting Curve Comparison
Retention
1.0 ┤ ●
│ ●●
0.8 ┤ ●● FSRS (stability=7, review at day 5)
│ ●● ●●●●●●●●
0.6 ┤ ●● ●
│ ○○ ●● ●
0.4 ┤ ○○ ●● ●
│ ○○ ●●
0.2 ┤○○ SM-2 (no review)
│○
0.0 ┤○○○○○○○○○○○○○○○○○○○○○○○○
└──┬──┬──┬──┬──┬──┬──┬──→ Days
5 10 15 20 25 30
A single review at day 5 (when FSRS retention = 0.85) resets the curve with boosted stability, maintaining >60% retention at day 30. Without review (SM-2 baseline), retention drops below 20%.
Emotional Memory Boost
Based on LaBar & Cabeza (2006) and Cahill & McGaugh (1998):
Emotional Weight Decay Multiplier 30-Day Retention
──────────────────────────────────────────────────────────
0.0 (neutral) 1.0x 32%
0.3 (mild) 1.6x 48%
0.5 (moderate) 2.0x 58%
0.7 (strong) 2.4x 67%
1.0 (intense) 3.0x 78%
Emotionally significant memories consolidate up to 3x stronger and decay proportionally slower. This matches neuroscience findings on amygdala-mediated memory modulation.
Hebbian Learning Convergence
Edge strengthening follows an asymptotic curve (diminishing returns):
Co-activations Edge Weight Growth Rate
────────────────────────────────────────────
0 1.0 (baseline)
5 1.4 +0.08/step
10 1.7 +0.06/step
20 2.2 +0.04/step
50 3.1 +0.02/step
100 4.0 +0.01/step
The asymptotic formula growth = LR * (1 - w/MAX) ensures weights never exceed MAX_WEIGHT (10.0), preventing runaway strengthening. Homeostatic normalization keeps the total weight budget constant.
Algorithmic Complexity
| Algorithm | Time | Space | Notes |
|---|---|---|---|
| FSRS update | O(1) | O(1) | Single state update |
| Ebbinghaus retention | O(1) | O(1) | Exponential formula |
| Emotional tagging | O(n) | O(1) | n = words in text |
| Hebbian strengthening | O(1) | O(1) | Single edge update |
| Hebbian normalization | O(k) | O(k) | k = edges in context |
| Bayesian propagation | O(i * e) | O(n) | i = iterations, e = edges, n = nodes |
| Context similarity | O(1) | O(1) | Matrix lookup |
| Sleep consolidation | O(m * e) | O(m) | m = memories, e = avg edges per memory |
| String similarity | O(w) | O(w) | w = unique words |
All core algorithms are constant-time or linear — no quadratic or exponential operations.
Memory Footprint
| Component | Per-Item Size | Notes |
|---|---|---|
| Working memory slot | ~1 KB | Content + metadata |
| Short-term interaction | ~500 B | Role + content |
| Episodic memory | ~2 KB | Content + embedding reference |
| Semantic fact | ~2.5 KB | Content + FSRS state + embedding |
| Embedding (1536D) | 6 KB | OpenAI ada-002 dimensions |
| Embedding (384D) | 1.5 KB | all-MiniLM-L6-v2 dimensions |
| FSRS state | 24 B | difficulty + stability + nextReview |
Typical Deployment Sizes
| Scale | Facts | Embeddings | DB Size | RAM |
|---|---|---|---|---|
| Personal assistant | 1K | 1536D | ~15 MB | ~50 MB |
| Team knowledge base | 10K | 1536D | ~150 MB | ~200 MB |
| Enterprise | 100K | 1536D | ~1.5 GB | ~1 GB |
Bundle Size
ZenBrain is tree-shakeable. Import only what you need:
| Import | Bundle Size (minified) |
|---|---|
@zensation/algorithms (full) | ~18 KB |
@zensation/algorithms/fsrs | ~3 KB |
@zensation/algorithms/emotional | ~8 KB |
@zensation/algorithms/hebbian | ~1.5 KB |
@zensation/algorithms/bayesian | ~1.5 KB |
@zensation/core (full) | ~12 KB |
@zensation/core (WorkingMemory only) | ~2 KB |
Total for a typical integration: ~15 KB (FSRS + emotional + working memory).
Database Query Performance
Measured with PostgreSQL 16 + pgvector (HNSW index):
| Operation | 1K facts | 10K facts | 100K facts |
|---|---|---|---|
| Semantic search (top-5) | 2ms | 5ms | 15ms |
| FSRS due-for-review | 1ms | 3ms | 8ms |
| Episodic time-range | 1ms | 2ms | 5ms |
| Core memory assemble | <1ms | <1ms | <1ms |
Recommended indexes:
CREATE INDEX ON learned_facts USING hnsw (embedding vector_cosine_ops);
CREATE INDEX ON learned_facts (fsrs_next_review) WHERE fsrs_next_review IS NOT NULL;
CREATE INDEX ON episodic_memories (created_at DESC);
CREATE INDEX ON procedural_memories (success_rate DESC);