-
-
Notifications
You must be signed in to change notification settings - Fork 0
Memory Habituation
Biological Analog: Habituation is the simplest form of learning β a decrease in response to a stimulus after repeated presentations. You stop hearing the ticking clock after a few minutes. The brain allocates attention to novel stimuli, not repeated ones. This prevents sensory overload and enables adaptation.
Without habituation, an AI agent repeatedly recalls the same "most relevant" memories β creating a filter bubble. If memory A has the highest similarity score, it dominates every recall, crowding out potentially useful but slightly-less-similar memories.
Query 1: "database issues" β [A, B, C, D, E] β A dominates
Query 2: "database issues" β [A, B, C, D, E] β Same results!
Query 3: "database issues" β [A, B, C, D, E] β Filter bubble
Query 1: "database issues" β [A, B, C, D, E] β Fresh results
Query 2: "database issues" β [B, C, A, D, F] β A drops, F emerges
Query 3: "database issues" β [C, F, B, G, D] β New memories surface
The habituation system tracks recall frequency per memory ID and applies an exponentially increasing penalty:
flowchart LR
RECALL["Memory recalled"] --> TRACK["Track recall count<br/><i>per memory ID</i>"]
TRACK --> COMPUTE["Compute penalty<br/><b>penalty = rate ^ (count - 1)</b>"]
COMPUTE --> APPLY["Adjust score<br/><b>score Γ penalty</b>"]
APPLY --> RESULT["Reduced score<br/>β drops in ranking"]
style RECALL fill:#4a90d9,color:white
style APPLY fill:#e74c3c,color:white
style RESULT fill:#f39c12,color:white
Where
| Recall # | Penalty (rate=0.85) | Effect |
|---|---|---|
| 1st | 1.00 | Full score |
| 2nd | 0.85 | 15% reduction |
| 3rd | 0.72 | 28% reduction |
| 5th | 0.52 | Half score |
| 10th | 0.20 | 80% reduction |
| 20th | 0.04 | Nearly eliminated |
info: Decay Rate Configuration The default decay rate of 0.85 provides a balance between novelty and relevance. A higher rate (0.95) creates a gentler penalty β useful when the agent genuinely needs to recall the same memory frequently. A lower rate (0.70) aggressively surfaces new content.
Habituation is applied after the 6-phase scorer produces results, but before final ranking:
flowchart TD
SCORER["6-Phase Scorer<br/><i>produces top-K candidates</i>"] --> SUPPRESS["Step 4: Suppression Filter<br/><i>remove explicitly blocked</i>"]
SUPPRESS --> HAB["Step 5a: Habituation Penalty<br/><i>attenuate repeated results</i>"]
HAB --> GRAPH["Steps 5cβ5e: Graph Augmentation<br/><i>Hebbian, Temporal, Entity</i>"]
GRAPH --> SORT["Final Sort β Top-K"]
style HAB fill:#e74c3c,color:white
style SORT fill:#00b894,color:white
Key: The penalty multiplies the score field β it doesn't modify the underlying memory. Habituation is a recall-time effect, not a storage-time effect.
| System | Interaction |
|---|---|
| Reconsolidation | Habituation reduces recall score, but reconsolidation increases the memory's durability. A frequently-recalled memory resists temporal decay (fewer buckets) but gets a lower score on repeated queries. |
| Surprise Detection | New, surprising memories start with high importance and no habituation penalty β they naturally dominate initial queries. |
| Suppression | If a memory is fully suppressed, habituation is irrelevant β it's excluded at Step 4 before habituation is applied. |
- :material-cancel: [[Inhibition β Suppression|Memory--Inhibition]] β explicit memory blocking
- :material-link: [[Hebbian β Association Learning|Memory--Hebbian]] β how co-activation creates associations
- :material-lightning-bolt: [[6-Phase Scoring Pipeline|Memory--Scoring-Pipeline]] β the full recall pipeline
- Home
- Getting Started
-
Cognitive Memory
- Overview
- Getting Started
- Use Cases & Configuration
- API Reference
- Architecture
- The 6-Phase Scoring Pipeline
- Cognitive Profiles
- Salience & Importance
-
Biological Systems
- Overview
- Cortex β Tier Stores
- Hippocampus β Sleep Consolidation
- Synapse β Tags & Scoring
- Dopamine β Surprise Detection
- Amygdala β Emotional Valence
- 3-Layer Cognitive Graph
- Habituation β Anti-Filter Bubble
- Inhibition β Suppression
- Interference β Deduplication
- Prospective β Future Intents
- Metamemory β Self-Reflection
- Sync β Persistence & Replication
- Performance & Internals
- Cognitive Evaluation
-
Architecture
- System Overview
- Core Concepts
- Ingestion Pipeline
- RAG Pipeline
- MCP Integration
- Distributed Mode
- Event Notifications
- Namespace Sharding
- GPU Acceleration
- Performance Tuning
- Test Framework & LLM Judge
- JDK API Status
- Security & Data
- Deep Dives
- Cortex Dashboard
-
Community
- Contributing
- FAQ
- Roadmap
- π¬ Labs