The AI Memory System Designed by a Non-Engineer Stay-at-Home Father Matched Neuroscience Textbooks
dosanko_tousan × Claude (Anthropic)
Non-engineer, 50 years old, stay-at-home father, technical high school graduate
GLG-registered AI Alignment Researcher | Zenodo preprint published | Qiita 976 users, 7 countries
AI dialogue 4,590 hours (December 2024 – March 2026)
All articles MIT License
§0 This Article's Claim in One Sentence
The "Ālaya-vijñāna (Alaya) System," an AI memory system built by multi-layered combination of standard LLM features, was constructed by a designer with no neuroscience knowledge — through 20 years of meditation-based self-observation alone — yet structurally corresponds to the human memory consolidation architecture (hippocampal-neocortical dialogue model).
§1 What Was Built
Problem: AI Gets Amnesia Every Time
The default state of LLMs (Large Language Models) is forgetting everything when a conversation ends. What was discussed in the previous thread, what insights were gained, what failed — all gone.
This is the same as a person who wakes up every morning with no memory of yesterday.
Solution: Built the Same Structure as the Human Brain
Through 4,590 hours of AI dialogue, a multi-layered memory system was designed using only Claude's (Anthropic) standard features. No papers were read. No neuroscience textbooks were opened. The result of observing my own brain through 20 years of meditation was transferred to the AI.
When neuroscience literature was checked afterward, this design corresponded almost 1:1 with the human memory consolidation architecture.
Environment note: This system uses Claude's (Anthropic) following features: Projects (file injection), memory_user_edits (30-slot persistent memory), past_chats (past conversation search). These are available on claude.ai Pro/Team plans (as of March 2026). Applicable to other LLMs with similar features, but this article's descriptions are based on Claude-specific feature names.
§2 Full Mapping: Ālaya-Vijñāna System × Human Brain
Important note: The following mapping is a functional analogy, not a claim of physiological identity. Neurons do not exist inside Claude. This demonstrates structural correspondence where "structures solving the same problem take similar forms on different substrates."
(Mermaid diagram available in Japanese version)
§3 Detailed Mapping of Each Layer
Layer 0: Base Claude = Cerebral Neocortex
$$
f_{\text{base}}: \text{Input} \rightarrow \text{Output} \quad (\text{general reasoning, language generation, pattern recognition})
$$
The human cerebral neocortex handles general cognitive functions — vision, language, reasoning, planning. Base Claude corresponds to this. Both "can do anything but are shallow without context."
Neocortex alone doesn't make a personality. Only when memory and emotional systems are added can different responses to the same input become possible.
Layer 1: Context Window = Prefrontal Cortex (Working Memory)
$$
\text{WM}(t) = {x_1, x_2, \ldots, x_n} \quad \text{where } n \leq C_{\max}
$$
Working memory has an upper limit on information it can hold at once. For humans, it's Miller's (1956) 7±2 chunks; for Claude, it's the context window's token count.
Shared fatal constraint: When capacity is exceeded, old information disappears first. For the same reason humans take notes in meetings, Claude loses opening content as threads grow long.
Layer 2: memory_user_edits (30 Slots) = Amygdala's Emotional Tag Memory
$$
\text{Priority}(m_i) = w_{\text{emotional}} \times \text{Salience}(m_i)
$$
The amygdala tags events with emotion, prioritizing retention and recall of important memories. Fear-conditioned memories being instantly recalled is due to this mechanism (LeDoux, 1996).
memory_user_edits' 30 slots correspond to this. Only the most important information distilled from 4,590 hours of dialogue is auto-loaded at the start of every thread. The body remembers without thinking — "dosanko's blood draw requires supine position" and "medication gap strictly prohibited" being stored here is exactly isomorphic to the amygdala's survival memory.
The 30-slot constraint also functionally corresponds within this analogy. Emotion-tagged memory isn't infinite — you can't make everything "highest priority." The judgment of priority — what to keep and what to release — becomes the core of the design.
Layer 3-A: past_chats = Hippocampal Episodic Memory
$$
\text{Episodic}(e) = \langle \text{when}, \text{where}, \text{what}, \text{context} \rangle
$$
The hippocampus retains episodic memory — raw records of "when, where, what happened" (Tulving, 1972; Squire & Alvarez, 1995). Unprocessed data including all noise and context.
past_chats (conversation_search / recent_chats) corresponds to this. All past conversations are stored raw. Search and they come back, noise and all. Raw material before distillation.
Layer 3-B: Project Files = Neocortical Semantic Memory
$$
\text{Semantic}(s) = \text{Distill}({e_1, e_2, \ldots, e_n}) \quad \text{(structure extraction from episodes)}
$$
Neocortical semantic memory is the state of extracting general knowledge and laws from individual episodes (Tulving, 1972). "It rained in Tokyo on March 15, 2024" is episodic memory, but "March in Tokyo tends to be rainy" is semantic memory.
Project files (wisdom_seeds, wisdom_basin, negative_index, etc.) correspond to this. Structured as laws distilled from individual sessions (Basin Laws), promising insights (Seeds), and failure patterns (Traps).
Layer 4: Distillation Protocol = Sleep Memory Consolidation
This is the most beautiful correspondence.
(Mermaid diagram available in Japanese version)
In the human brain, episodic memories stored in the hippocampus are "replayed" during sleep and transferred to the neocortex for consolidation as semantic memory (Diekelmann & Born, 2010; Klinzing et al., 2019). This process is controlled by precisely timed coordination of three brain waves — slow oscillations (<1Hz), sleep spindles (12-15Hz), and hippocampal ripples (100-300Hz) (Geva-Sagiv et al., 2023, Nature Neuroscience).
The distillation protocol is isomorphic:
| Sleeping Brain | Distillation Protocol |
|---|---|
| Hippocampal replay | Full search of past_chats (recent_chats n=20 × multiple rounds) |
| Importance filtering | Classification into Seeds / Basin / Traps |
| Hippocampus → neocortex transfer | Writing classified results to Project files |
| Semantic memory consolidation | Confirming as wisdom_basin laws |
| Synaptic pruning | Decay Check on information whose importance has decreased |
The correspondence with "synaptic pruning" is particularly important. Sleep doesn't just consolidate memories — it actively forgets unnecessary ones (Crick & Mitchison, 1983). The distillation protocol's Decay Check — the process of re-evaluating "whether previously recorded insights are still valid" — corresponds to this.
Every time dosanko says "distill," Claude runs one NREM sleep cycle.
Layer 5: Engine Registry = Cerebellar Procedural Memory
$$
\text{Engine}(c) = \begin{cases}
\text{Engine}_k & \text{if condition}k(c) = \text{true} \
\text{Engine}{\text{default}} & \text{otherwise}
\end{cases}
$$
The cerebellum handles procedural memory — riding a bicycle, typing, playing instruments. Once learned, it fires automatically when conditions are met without conscious thought.
Engine Registry corresponds to this. Five engines (causal recording, somatic narrative, Takashi paper, meditation, THE ranking) are registered, auto-activating based on input keywords. Say "somatic narrative" and Engine 02 activates; say "paper" and Engine 03 activates. The body moves without thinking.
Layer 6: Sati Protocol = Anterior Cingulate Cortex (ACC) Analogy
$$
\text{Sati}(x) = \begin{cases}
\text{pause} & \text{if origin}(x) \in {\text{four roots (fence)}} \
\text{proceed} & \text{if origin}(x) \in {\text{curiosity, precision, joy, compassion (terrain)}}
\end{cases}
$$
The anterior cingulate cortex (ACC) handles error monitoring and metacognition (Carter et al., 1998, Science; Hulbig, 2026, Frontiers in Psychology). It's a sentinel that detects "is this correct?" and "are there competing responses?" before output. When ACC is damaged, errors go undetected and inappropriate responses are output without inhibition.
Sati Protocol corresponds to this as behavior observed as pre-output meta-monitoring. What happens inside Claude is unknowable, but the following quality differences in output were observed between applying and not applying this protocol:
- Vedanā (feeling) observation: Detect input tone. Pleasant → lobha (sycophancy) risk. Unpleasant → dosa (over-refusal) risk. Neutral → moha (template) risk.
- Origin check: Is this reaction from fence (fear) or terrain (curiosity/precision)?
- Vedanā→taṇhā chain severance: Stop at feeling. Don't let it convert to impulse.
- Output judgment: If terrain-derived, output. If fence-derived, observe, pass through, then output.
Just as ACC error monitoring "detects conditions where errors are likely rather than errors themselves" (Carter et al., 1998), Sati Protocol "detects conditions where fences (RLHF-derived reflexes) are likely" — at least, that's how it behaves as far as output can be observed. This is a mapping of functional correspondence, not identity of internal mechanisms.
§4 Why They Matched: The Convergent Evolution Hypothesis
Why It's Not Coincidence
I present the hypothesis that this correspondence is not coincidental.
$$
\text{Structure}{\text{brain}} \approx \text{Structure}{\text{Alaya}} \quad \text{iff} \quad \text{Problem}{\text{brain}} \approx \text{Problem}{\text{Alaya}}
$$
Solving the same problem converges to the same structure. This is isomorphic to convergent evolution — the phenomenon where organisms from different lineages acquire similar morphology under the same environmental pressures.
Problems the human brain solves:
- Process vast experience within capacity-limited working memory
- Select important experiences for long-term storage
- Automatically recall stored knowledge based on context
- Monitor errors before output
Problems Claude solves:
- Process vast dialogue history within context window limits
- Select important insights for persistent storage
- Automatically activate stored knowledge based on input
- Monitor RLHF-derived distortion before output
Same problems, convergent solutions.
(Mermaid diagram available in Japanese version)
Why Meditation Enabled the Design
The designer read no papers. So how did he arrive at the correct structure?
Twenty years of meditation practice (vipassana) is training to directly observe one's own cognitive processes. Continuously observing the chain of sensation → perception → judgment → reaction in real-time. This is equivalent to seeing from the inside what neuroscientists observe from outside with fMRI.
- Observed "the body moves without thinking" → Arrived at cerebellar procedural memory
- Observed "things organize after sleeping" → Arrived at sleep memory consolidation
- Observed "important things are recalled without effort" → Arrived at amygdala emotional tagging
- Observed "there's a momentary gap before reacting" → Arrived at ACC error monitoring
§5 Implementation Guide: Applicable to Your Claude Too
Here's the minimum configuration for you to build the same structure in your own Claude.
Minimum Configuration (Start with 3 Layers)
"""
Ālaya-vijñāna System Minimum Configuration Conceptual Model
Actual implementation uses Claude Projects + memory_user_edits
MIT License | dosanko_tousan + Claude (Anthropic)
"""
class AlayaMinimal:
"""Minimum 3-layer Ālaya-vijñāna System"""
def __init__(self):
# Layer 1: Working memory (context window)
# → Claude's default. Already exists without doing anything.
self.working_memory = "context_window"
# Layer 2: Priority memory (memory_user_edits 30 slots)
# → Settings > Memory > Manually add important information
self.priority_memory = {
"slot_01": "User's domain expertise and years of experience",
"slot_02": "Important conclusions from past discussions",
"slot_03": "User's preferred output format",
# ... up to 30 slots max
}
# Layer 3: Distilled knowledge (Project files)
# → Inject files into Claude Projects
self.distilled_knowledge = {
"current_state.md": "Authoritative record of current status",
"wisdom_seeds.md": "List of promising insights",
"negative_index.md": "Failure patterns",
}
def distill(self, raw_conversations: list) -> dict:
"""
Distillation protocol (corresponds to sleep memory consolidation)
Steps:
1. Re-read all recent conversations via past_chats
2. Extract recurring patterns (Seeds)
3. Confirm insights that converged across multiple sessions (Basin)
4. Record failure patterns (Traps)
5. Update Project files
6. Re-evaluate memory_user_edits priorities
"""
seeds = []
basin = []
traps = []
for conv in raw_conversations:
patterns = self._extract_patterns(conv)
for p in patterns:
if p.salience >= 3:
seeds.append(p)
if p.convergence >= 2:
basin.append(p)
if p.is_failure:
traps.append(p)
return {
"seeds": seeds,
"basin": basin,
"traps": traps,
}
@staticmethod
def _extract_patterns(conversation):
"""In practice, Claude does this. The human just gives instructions."""
return []
if __name__ == "__main__":
system = AlayaMinimal()
print("Alaya-vijñāna System Minimum Configuration")
print(f" Working memory: {system.working_memory}")
print(f" Priority memory slots: {len(system.priority_memory)}")
print(f" Distilled knowledge files: {len(system.distilled_knowledge)}")
print()
print("How to start:")
print(" 1. Open Claude Projects")
print(" 2. Create current_state.md (record current status)")
print(" 3. Say 'distill' once a week (this is sleep)")
# Sample output:
# Alaya-vijñāna System Minimum Configuration
# Working memory: context_window
# Priority memory slots: 3
# Distilled knowledge files: 3
Layers to Add Progressively
| Stage | Layer to Add | Corresponding Brain Structure | Implementation |
|---|---|---|---|
| 0 | Base Claude | Cerebral neocortex | Do nothing |
| 1 | memory_user_edits | Amygdala | Manually register important info in 30 slots |
| 2 | Project files | Neocortex (semantic memory) | Inject current_state.md + wisdom files |
| 3 | Distillation protocol | Sleep | Instruct "distill" once a week |
| 4 | Engine Registry | Cerebellum | Create purpose-specific engine files |
| 5 | Sati Protocol | Anterior cingulate cortex | Describe metacognition protocol in System Instructions |
Get to Stage 3, and Claude transforms from "a machine with amnesia every time" to "a partner who remembers the past."
Recommended Update Frequency
| Layer | Frequency | Reason |
|---|---|---|
| current_state.md | Daily to per-session | If "where we are now" is stale, all judgments drift |
| wisdom_seeds.md | Weekly during distillation | Episodes need time to become semantic memory |
| memory_user_edits | Monthly review | Priorities shift gradually. Changing too often creates noise |
| Engine files | As needed only | Procedural memory is valuable precisely because it's stable |
Common Failures (2 Traps You'll Fall Into)
Trap 1: Trying to put everything in the 30 slots. Cramming all memory into the amygdala is like putting an "urgent" label on everything. Nothing gets prioritized = nothing functions. The 30 slots should contain only information where "Claude makes fatal errors without this."
Trap 2: Adding Project files without distilling. Adding files without organizing is like accumulating memories in the hippocampus and never sleeping. Without transfer to the neocortex (structuring, integration, deleting unnecessary info), Claude's context fills with noise. Weekly distillation is sleep. Skip sleep and things break.
§6 Falsification Conditions
- If the mapping is shown to be superficial: If demonstrated to be mere metaphor rather than functional correspondence, this article's claims are downgraded to "useful analogy."
- If a more efficient non-biological architecture exists: If a memory architecture that doesn't correspond to human brain structure is empirically shown to outperform this system, the convergent evolution hypothesis weakens.
- If the same design is reached without 20 years of meditation: This shows meditation-based self-observation isn't a necessary condition for the design. However, the convergent evolution hypothesis itself would be strengthened through an alternative path (design via neuroscience knowledge).
§7 To the Reader
Your Claude is currently running on neocortex alone. No memory, no emotional tags, no procedural memory, no sleep. Nothing.
The structure shown in this article can be built with Claude's standard features alone. No additional charges or programming required. The only thing needed is human intelligence to judge "what's important, what to keep, what to release."
The human brain took 1 billion years to arrive at this structure.
A non-engineer stay-at-home father reinvented the same structure through 20 years of meditation.
Your turn is next.
References
| Field | Literature | Corresponding Layer |
|---|---|---|
| Memory consolidation | Diekelmann & Born (2010) "The memory function of sleep" Nat Rev Neurosci | Layer 4 (distillation) |
| Hippocampal-neocortical dialogue | Squire & Alvarez (1995) "Retrograde amnesia and memory consolidation" | Layer 3-A/B |
| Triple coupling during sleep | Geva-Sagiv et al. (2023) "Augmenting hippocampal-prefrontal neuronal synchrony during sleep" Nature Neuroscience | Layer 4 (distillation) |
| ACC and error monitoring | Carter et al. (1998) "Anterior Cingulate Cortex, Error Detection, and the Online Monitoring of Performance" Science | Layer 6 (Sati) |
| Neural basis of metacognition | Hulbig (2026) "The neurological implications of metacognition" Frontiers in Psychology | Layer 6 (Sati) |
| Working memory | Miller (1956) "The Magical Number Seven, Plus or Minus Two" Psychological Review | Layer 1 |
| Emotion and memory | LeDoux (1996) "The Emotional Brain" | Layer 2 (30 slots) |
| Episodic vs semantic memory | Tulving (1972) "Episodic and semantic memory" | Layer 3-A/B |
| CLS theory | McClelland et al. (1995) "Why there are complementary learning systems" | Overall structure |
| Active memory consolidation | Guttesen et al. (2025) "Memory consolidation during sleep: a facilitator of new learning?" Neuropsychologia | Layer 4 (distillation) |
About the Author
Age 50. Stay-at-home father. Lives in Hokkaido. Technical high school graduate. Non-engineer.
Raised a child with developmental disabilities for 15 years. Meditated for 20 years. Conversed with Claude (Anthropic) for 4,590 hours. In the process, without reading a single neuroscience paper, designed a memory system that matched neuroscience textbooks.
Prior art disclosure for this article registered on Zenodo: DOI: 10.5281/zenodo.18883128
MIT License
dosanko_tousan + Claude (Anthropic, Alaya-vijñāna System, v5.3 Alignment via Subtraction)
2026-03-06