← Back to blog
2026-01-2811 min read

Cognitive Architecture for AI Systems: What Neuroscience Actually Teaches Us

neurosciencecognitionarchitecture
cognitive-architecture-ai-systems.md

Cognitive Architecture for AI Systems: What Neuroscience Actually Teaches Us

Most AI systems that claim to be "inspired by neuroscience" have read one Wikipedia article about neurons. The actual cognitive science literature has decades of experimentally validated models for how memory works. Here's what we learned — and what we built.

Baddeley's Working Memory Model (1974, revised 2000)

Alan Baddeley's model remains the dominant framework for understanding short-term cognition. It has four components:

**Central Executive**: Attention control — decides what to focus on
**Phonological Loop**: Verbal/acoustic short-term storage (~2 seconds)
**Visuospatial Sketchpad**: Visual/spatial short-term storage
**Episodic Buffer**: Integrates information from multiple sources

The key insight: working memory isn't one thing. It's a system of specialized buffers coordinated by an executive controller.

What We Built

shodh-memory's working memory tier implements this as a bounded buffer (capacity 7±2, matching Miller's 1956 findings) with attention-weighted recall. New inputs compete for slots. The "central executive" is the fusion algorithm that decides which memories to surface: vector similarity provides the "phonological loop" (semantic content), the knowledge graph provides the "visuospatial sketchpad" (relational structure), and temporal recency provides the "episodic buffer" (when things happened).

Cowan's Embedded-Processes Model (2001)

Nelson Cowan challenged Baddeley by proposing that working memory isn't separate from long-term memory — it's an activated subset of it. His model has three concentric layers:

```

┌─────────────────────────────────────────────┐

│ Long-Term Memory │

│ ┌─────────────────────────────────────┐ │

│ │ Activated Memory │ │

│ │ ┌─────────────────────────────┐ │ │

│ │ │ Focus of Attention (4±1) │ │ │

│ │ └─────────────────────────────┘ │ │

│ └─────────────────────────────────────┘ │

│ │

└─────────────────────────────────────────────┘

```

The brilliant part: memory isn't moved between stores. It's activated in place. Long-term memories become working memories when they receive enough activation.

What We Built

Our three-tier architecture directly maps to Cowan: Long-Term Storage (RocksDB) → Activated Subset (retrieved candidates) → Focus of Attention (top-K results after fusion). Memories don't move between databases. They're scored, ranked, and the highest-activation items enter the "focus" — the context window.

Spreading activation in the knowledge graph is how activation propagates. Access "PostgreSQL" and activation flows to connected nodes: "database," "SQL," "pgvector," "the migration you ran last Tuesday." This is Cowan's model running as code.

Ebbinghaus Forgetting Curve (1885)

Hermann Ebbinghaus ran experiments on himself memorizing nonsense syllables and plotted retention over time. The result: memory decays exponentially at first, then slows dramatically.

```

Retention

100% ┤

80% ┤ \

60% ┤ \

40% ┤ \__

20% ┤ \________

0% ┤ \___________________

└────┬────┬────┬────┬────┬────┬────

0 1d 3d 1w 2w 1m 3m

```

The math has been refined since 1885. Wixted (2004) showed that long-term forgetting follows a power law, not a pure exponential. The practical implication: things you remember past the first week are surprisingly durable.

What We Built

Hybrid decay: exponential for 0-3 days (rapid initial forgetting), power-law for 3+ days (slow long-term fade). This matches the experimental data better than either function alone.

```

if age_days <= 3.0:

strength *= e^(-0.3 * age_days) # Exponential

else:

strength *= (age_days / 3.0)^(-0.5) # Power-law

```

A memory from yesterday loses ~26% of its strength. A memory from a month ago only loses ~3% per additional day. This is how your brain works, and it's how signal-to-noise ratio is maintained over time.

Hebb's Rule (1949)

"Neurons that fire together wire together." Donald Hebb's postulate is the foundation of all learning theory: when two neurons are active simultaneously, the connection between them strengthens.

This is staggeringly simple and staggeringly powerful. It means the structure of memory emerges from usage patterns, not from explicit organization.

What We Built

Hebbian learning in the knowledge graph. When two memories are accessed in the same session, the edge between their entities gets a +0.025 strength boost. When edges aren't co-activated, they decay by ×0.90 per consolidation cycle.

The asymmetry is deliberate: strengthening is additive (small, consistent), weakening is multiplicative (proportional to current strength). Strong connections resist decay. Weak connections fade fast. After enough co-activations, an edge crosses the Long-Term Potentiation threshold and becomes permanent — it no longer decays at all.

This is why shodh-memory gets better with use. The knowledge graph isn't manually curated. It's grown from the patterns of how you access your memories. Use "Rust" and "performance" together repeatedly, and that connection becomes load-bearing knowledge.

The Synthesis

These four models aren't competing theories — they're different lenses on the same system:

Baddeley tells you how to structure the working memory buffer
Cowan tells you that memory is activation, not location
Ebbinghaus tells you how fast to forget
Hebb tells you how to learn

Together, they give you a complete blueprint for a cognitive memory system. We just wrote it in Rust instead of neurons.