-
-
Notifications
You must be signed in to change notification settings - Fork 0
Memory Biological Systems
Spector Memory doesn't just borrow neuroscience terminology — it implements the actual computational principles behind biological memory. Each package in spector-memory corresponds to a distinct brain region or cognitive mechanism, implementing the mathematical models that neuroscientists have validated over decades of research.
graph TB
subgraph "Encoding & Storage"
STE["🧩 Synapse<br/>Synaptic Tags & Scoring<br/><i>Bloom filter + binary layout</i>"]
CT["🧠 Cortex<br/>4-Tier Memory Stores<br/><i>Working → Episodic → Semantic → Procedural</i>"]
end
subgraph "Emotional & Importance Modulation"
DA["⚡ Dopamine<br/>Surprise Detection<br/><i>Welford Z-score → importance</i>"]
AM["❤️ Amygdala<br/>Emotional Valence<br/><i>-128 to +127 coloring</i>"]
end
subgraph "Retrieval Dynamics"
HB["🛑 Habituation<br/>Anti-Filter Bubble<br/><i>Repetition penalty</i>"]
IN["🚫 Inhibition<br/>Suppression Set<br/><i>Inhibition of return</i>"]
IF["🔀 Interference<br/>Deduplication<br/><i>Proactive/retroactive</i>"]
end
subgraph "Association & Learning"
HE["🔗 3-Layer Cognitive Graph<br/>Hebbian + Entity + Temporal<br/><i>Off-heap graph structures</i>"]
end
subgraph "Consolidation & Planning"
HP["💤 Hippocampus<br/>Sleep Consolidation<br/><i>ReflectDaemon cycle</i>"]
PR["📋 Prospective<br/>Future Intents<br/><i>Scheduled reminders</i>"]
MM["🔍 Metamemory<br/>Self-Reflection<br/><i>Confidence calibration</i>"]
end
DA --> STE
AM --> STE
STE --> CT
CT --> HE
HE --> HP
style HE fill:#e74c3c,color:white
style DA fill:#f39c12,color:white
style HP fill:#9b59b6,color:white
| System | Brain Region | Key Concept | Spector Implementation | Reference |
|---|---|---|---|---|
| Cortex | Prefrontal, Hippocampus, Neocortex, Basal Ganglia | Multi-store memory model | 4-tier off-heap stores (Working, Episodic, Semantic, Procedural) | Atkinson & Shiffrin, 1968[^1] |
| Synapse | Synaptic junction | Synaptic tagging & capture | 64-bit Bloom filter tag encoding, 32B binary header | Frey & Morris, 1997[^2] |
| Dopamine | Ventral tegmental area | Prediction error signaling | Welford Z-score surprise detection, flashbulb encoding | Schultz, 1997[^3] |
| Amygdala | Amygdala | Emotional memory modulation | Signed valence byte (-128 to +127), emotional filtering | McGaugh, 2004[^4] |
| 3-Layer Graph | Cortical networks, Hippocampus | Hebbian learning, STDP, episodic sequences | Off-heap HebbianGraph, EntityGraph, TemporalChain | Hebb, 1949[^5]; Bi & Poo, 2001[^6] |
| Habituation | Sensory cortex | Response decrement to repetition | Exponential penalty on repeated recall | Thompson & Spencer, 1966[^7] |
| Inhibition | Prefrontal cortex | Inhibition of return | SuppressionSet with TTL-based suppression windows | Klein, 2000[^8] |
| Interference | Hippocampus | Proactive/retroactive interference | Similarity-based deduplication during ingestion | Underwood, 1957[^9] |
| Hippocampus | Hippocampus | Sleep consolidation & replay | ReflectDaemon: decay, compaction, episodic→semantic promotion | Rasch & Born, 2013[^10] |
| Prospective | Prefrontal cortex | Prospective memory | Scheduled future intent reminders | Einstein & McDaniel, 1990[^11] |
| Metamemory | Prefrontal cortex | Metacognitive monitoring | Confidence calibration, recall quality estimation | Nelson & Narens, 1990[^12] |
| Sync | — (engineering) | Persistence & replication | WAL + mmap-backed partitions | — |
Spector approximates the exponential forgetting curve using precomputed decay buckets — avoiding expensive Math.exp() calls in the hot loop:
Where
Reference: Ebbinghaus, H. (1885). Über das Gedächtnis[^13]
Each recall shifts the decay bucket backward, simulating how retrieved memories become more durable:
Reference: Bjork & Bjork (1992). A New Theory of Disuse[^14]
The importance signal uses a Z-score from Welford's online statistics:
Where
Reference: Schultz, W. (1997). A neural substrate of prediction and reward[^3]
Co-ingested memories strengthen their bidirectional edge:
With decay during consolidation:
Reference: Hebb, D.O. (1949). The Organization of Behavior[^5]
Directed causal edges are strengthened when tag A is recalled before tag B:
Reference: Bi & Poo (2001). Synaptic modification by correlated activity[^6]
Repeated recall of the same memory incurs an exponentially increasing penalty:
Where
Reference: Thompson & Spencer (1966). Habituation: A model phenomenon[^7]
-
Fidelity to neuroscience: Each system implements a real cognitive mechanism, not just a metaphor. The mathematical models are drawn from peer-reviewed research.
-
Independent testability: Each biological system is a standalone package with its own unit tests. Systems compose via dependency injection, not inheritance.
-
Graceful degradation: Every system is optional. Disabling surprise detection, habituation, or graph augmentation produces a functional (if less intelligent) memory system.
-
Performance-first biology: Biological accuracy is constrained by microsecond latency requirements. Where exact models are too expensive (e.g., continuous exponential decay), we use precomputed approximations (decay buckets, Bloom filter tags).
-
:material-brain:{ .lg .middle } Cortex — Tier Stores
Working, Episodic, Semantic, and Procedural memory tiers
-
:material-flash:{ .lg .middle } Synapse — Tags & Scoring
Bloom filter encoding, binary layout, 6-phase scorer
-
:material-head-lightning-bolt:{ .lg .middle } Dopamine — Surprise
Welford Z-score, flashbulb encoding, importance scoring
-
:material-heart:{ .lg .middle } Amygdala — Valence
Emotional coloring, valence-based filtering
-
:material-share-variant:{ .lg .middle } 3-Layer Cognitive Graph
Hebbian, Entity-Relationship, and Temporal Causal graphs
-
:material-sleep:{ .lg .middle } Hippocampus — Consolidation
Sleep cycles, decay, episodic-to-semantic promotion
[^1]: Atkinson, R.C. & Shiffrin, R.M. (1968). Human memory: A proposed system and its control processes. In Psychology of Learning and Motivation, 2, 89–195. doi:10.1016/S0079-7421(08)60422-3
[^2]: Frey, U. & Morris, R.G.M. (1997). Synaptic tagging and long-term potentiation. Nature, 385, 533–536. doi:10.1038/385533a0
[^3]: Schultz, W. (1997). A neural substrate of prediction and reward. Science, 275(5306), 1593–1599. doi:10.1126/science.275.5306.1593
[^4]: McGaugh, J.L. (2004). The amygdala modulates the consolidation of memories of emotionally arousing experiences. Annual Review of Neuroscience, 27, 1–28. doi:10.1146/annurev.neuro.27.070203.144157
[^5]: Hebb, D.O. (1949). The Organization of Behavior: A Neuropsychological Theory. New York: Wiley.
[^6]: Bi, G. & Poo, M. (2001). Synaptic modification by correlated activity: Hebb's postulate revisited. Annual Review of Neuroscience, 24, 139–166. doi:10.1146/annurev.neuro.24.1.139
[^7]: Thompson, R.F. & Spencer, W.A. (1966). Habituation: A model phenomenon for the study of neuronal substrates of behavior. Psychological Review, 73(1), 16–43. doi:10.1037/h0022681
[^8]: Klein, R.M. (2000). Inhibition of return. Trends in Cognitive Sciences, 4(4), 138–147. doi:10.1016/S1364-6613(00)01452-2
[^9]: Underwood, B.J. (1957). Interference and forgetting. Psychological Review, 64(1), 49–60. doi:10.1037/h0044616
[^10]: Rasch, B. & Born, J. (2013). About sleep's role in memory. Physiological Reviews, 93(2), 681–766. doi:10.1152/physrev.00032.2012
[^11]: Einstein, G.O. & McDaniel, M.A. (1990). Normal aging and prospective memory. Journal of Experimental Psychology: Learning, Memory, and Cognition, 16(4), 717–726. doi:10.1037/0278-7393.16.4.717
[^12]: Nelson, T.O. & Narens, L. (1990). Metamemory: A theoretical framework and new findings. In Psychology of Learning and Motivation, 26, 125–173. doi:10.1016/S0079-7421(08)60053-5
[^13]: Ebbinghaus, H. (1885). Über das Gedächtnis: Untersuchungen zur experimentellen Psychologie. Leipzig: Duncker & Humblot. English translation: Memory: A Contribution to Experimental Psychology (1913).
[^14]: Bjork, R.A. & Bjork, E.L. (1992). A new theory of disuse and an old theory of stimulus fluctuation. In From Learning Processes to Cognitive Processes: Essays in Honor of William K. Estes, 2, 35–67.
- Home
- About
- Getting Started
-
Architecture
- Architecture--Overview
- Architecture--Core-Concepts
- Architecture--Mcp-Integration
- Architecture--Ingestion-Pipeline
- Architecture--Rag-Pipeline
- Architecture--Distributed-Mode
- Architecture--Gpu-Acceleration
-
Modules
- Modules
- Modules--Spector-Core
- Modules--Spector-Commons
- Modules--Spector-Config
- Modules--Spector-Storage
- Modules--Spector-Embed-Api
- Modules--Spector-Embed-Ollama
- Modules--Spector-Index
- Modules--Spector-Query
- Modules--Spector-Gpu
- Modules--Spector-Rag
- Modules--Spector-Engine
- Modules--Spector-Ingestion
- Modules--Spector-Memory
- Modules--Spector-Runtime
- Modules--Spector-Node
- Modules--Spector-Mcp
- Modules--Spector-Cli
- Modules--Spector-Client
- Modules--Spector-Spring
- Modules--Spector-Metrics
- Modules--Spector-Bench
- Modules--Spector-Dist
- Modules--Spector-Cortex
-
Deep Dives
- Deep-Dives--Ann-Search-Primer
- Deep-Dives--Hnsw-Explained
- Deep-Dives--Spector-Index-Architecture
- Deep-Dives--Svasq-Deep-Dive
- Deep-Dives--Understanding-Quantization
- Deep-Dives--Quantization-Comparison
- Deep-Dives--Turbo-Quant
- Deep-Dives--Real-Embedding-Benchmarks
- Deep-Dives--Svasq-Spectorindex-Whitepaper
-
🧠 Cognitive Memory
- Memory
- Memory--Getting-Started
- Architecture
- Biological Systems
- Advanced Profiles
- Deep Dives
- Memory--Api-Reference
- 🧬 Cortex Dashboard
- Reference
- Operations
- FAQ
- Roadmap
- 🔬 Labs