Strength & Decay

Every memory in Brain Memory has a strength value (0.0 to 1.0) that determines how easily it can be recalled. Strength decays over time following an exponential curve, modeling the Ebbinghaus forgetting curve from cognitive psychology.

The Decay Formula

effective_strength = base_strength * (decay_rate ^ days_since_last_access)

Where:

  • base_strength — The stored strength value in the memory's frontmatter (0.0 to 1.0)
  • decay_rate — A per-day retention factor (e.g., 0.995 means 99.5% retained each day)
  • days_since_last_access — Calendar days since the memory was last recalled or accessed

How Strength Is Set at Creation

When a memory is first created via /brain:memorize, its initial strength is determined by two factors:

  1. Memory type — Each type has a base strength (see Memory Types)
  2. Cognitive type modifier — Episodic memories get +0.10, procedural get -0.10, semantic is unchanged
initial_strength = type_base_strength + cognitive_modifier

For example:

  • An episodic insight: 0.90 + 0.10 = 1.00 (capped at 1.0)
  • A semantic decision: 0.85 + 0.00 = 0.85
  • A procedural learning: 0.70 - 0.10 = 0.60

Example Decay Calculations

Consider a decision memory (base strength 0.85, decay rate 0.995):

Days Since AccessEffective StrengthCalculation
00.8500.85 * 0.995^0
70.8200.85 * 0.995^7
300.7310.85 * 0.995^30
900.5420.85 * 0.995^90
1800.3460.85 * 0.995^180
3650.1410.85 * 0.995^365

Now compare with an observation (base strength 0.40, decay rate 0.950):

Days Since AccessEffective StrengthCalculation
00.4000.40 * 0.950^0
70.2790.40 * 0.950^7
140.1950.40 * 0.950^14
300.0860.40 * 0.950^30
600.0180.40 * 0.950^60

Observations fade quickly. If they turn out to be important, recalling them will boost their strength through spaced reinforcement.

How Strength Changes Over Time

Strength is not static. Several mechanisms modify it:

Reinforcement Through Recall

Every time a memory is recalled via /brain:remember, it receives a strength boost:

new_strength = min(1.0, strength + boost)

The boost amount depends on the time since last recall (spacing effect) and the number of prior recalls (diminishing returns). See Spaced Reinforcement for the full formula.

Decay Rate Improvement

Each recall also improves the memory's decay rate, making it more resistant to forgetting:

new_decay_rate = decay_rate + 0.10 * (0.999 - decay_rate)

This means frequently recalled memories gradually become nearly permanent. The decay rate asymptotically approaches 0.999 (the slowest possible decay).

Synaptic Homeostasis During Sleep

During the sleep cycle, if the mean strength across all memories exceeds 0.5, a global downscaling is applied to prevent strength inflation. After downscaling, high-salience, recently-accessed, and frequently-recalled memories receive selective re-boosts. This mirrors the Synaptic Homeostasis Hypothesis (SHY) from neuroscience.

Consolidation

When memories decay below the consolidation threshold (default: 0.3), they become candidates for merging. Related weak memories are combined into a single stronger memory:

consolidated_strength = max(source_strengths) + 0.15   (capped at 1.0)
consolidated_decay    = min(source_decay_rates)         (slowest decay wins)

See Consolidate command for details.

Decay Rate Reference

Memory TypeDecay RateMeaning
Observation0.950Loses 5% of strength per day — fades in about 2 weeks
Experience0.985Loses 1.5% per day — fades in about 6 weeks
Learning0.990Loses 1% per day — fades in about 10 weeks
Goal0.993Loses 0.7% per day — fades in about 14 weeks
Decision0.995Loses 0.5% per day — fades in about 20 weeks
Insight0.997Loses 0.3% per day — fades in about 8 months
Relationship0.997Loses 0.3% per day — fades in about 8 months
Preference0.998Loses 0.2% per day — fades in about 1 year
Info

These are the default decay rates at creation. Each recall improves the rate, so frequently-accessed memories decay much more slowly than these defaults suggest.

Key Thresholds

ThresholdValueWhat Happens
Strong memory> 0.7Returned as a confident single match
Moderate memory0.4 - 0.7Included in synthesized responses
Consolidation candidate< 0.3Eligible for merging with related memories
Archive threshold< 0.1Moved to _archived/ during sleep (unless salience >= 0.7)