Principle:42 evey Hermes plugins Exponential Memory Decay
| Knowledge Sources | |
|---|---|
| Domains | Memory_Management, Decay_Model, Forgetting |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A memory decay model based on exponential half-life, where a memory's effective score decreases by half every N days without access, enabling automatic forgetting of stale, unaccessed memories.
Description
Exponential Memory Decay implements a computational model of forgetting inspired by the Ebbinghaus forgetting curve. Each memory has an importance score (1-5) and a last accessed timestamp. The decayed score is:
Failed to parse (syntax error): {\displaystyle \text{decayed\_score} = \text{importance} \times e^{-0.693 \times \Delta t / t_{1/2}} }
Where is days since last access and is the half-life (default 14 days). The constant 0.693 is , ensuring the score halves exactly every half-life period.
Memories below a threshold (default 0.1) are flagged for removal. The agent can boost a memory's importance (increment by 0.5, capped at 5.0) or access it (update last_accessed, increment access count), which resets the decay clock.
This model solves the problem of unbounded memory growth: without decay, every fact ever learned would remain equally weighted, making it impossible to identify which memories are still relevant.
Usage
Use this principle when building memory systems that need to forget stale information automatically. The half-life parameter controls how quickly memories fade — shorter half-lives are more aggressive, longer ones more conservative. The boost/access mechanisms allow the agent to actively maintain important memories.
Theoretical Basis
The decay formula:
Where:
- = decayed score at time (days since access)
- = importance (base value)
- = half-life (default 14 days)
- = decay constant
# Abstract pattern (NOT real implementation)
import math
def decay_score(importance, last_accessed, half_life_days=14):
days_since = (time.time() - last_accessed) / 86400
return importance * math.exp(-0.693 * days_since / half_life_days)
# With half_life=14, a memory with importance=3.0 not accessed for:
# 7 days → 3.0 × e^(-0.693×7/14) = 3.0 × 0.707 = 2.12
# 14 days → 3.0 × e^(-0.693×14/14) = 3.0 × 0.500 = 1.50
# 28 days → 3.0 × e^(-0.693×28/14) = 3.0 × 0.250 = 0.75
# 42 days → 3.0 × e^(-0.693×42/14) = 3.0 × 0.125 = 0.375
The threshold for removal (default 0.1) means a memory with importance 5.0 would be flagged after approximately 77 days without access.