# Adaptive Memory Decay

> Give each memory item a retention score that decays over time based on relevance, access frequency, and recency — unused items fade out, frequently-used ones stay sharp.

- **Category**: Agentic AI
- **Subcategory**: Memory
- **Canonical URL**: https://designpattern.fyi/patterns/adaptive_memory_decay/

---

## Description
**Intent**: Give each long-term memory item a retention score that decays over time via a function modulated by relevance, access frequency, and recency — so unreinforced items fade or fuse while useful items persist.
**Context**: An agent accumulates long-term memory across many sessions: facts, preferences, summaries, observations. Without cleanup, the store grows without bound and old low-value items start polluting retrieval results. Not everything stays useful — some items were always marginal, others were true once and have gone stale.
**Solution**: On write, assign each item a retention score and a decay function (typically exponential) whose rate is modulated by three signals: semantic relevance to active goals, access frequency, and recency. Each access reinforces the score; neglect lets it decay. When a score crosses a low threshold, the item is demoted to cold storage, fused with similar items, or dropped — producing a per-item forgetting curve rather than a global cap or fixed TTL. Production layers like Mem0 and Zep apply this; FadeMem formalizes the biologically-inspired version.



## Use Cases
- A long-term memory store grows across sessions and stale items are degrading retrieval quality.
- Importance varies per item and is better inferred from use patterns than declared at write time.
- Per-item retention scoring can be updated cheaply on each access.






## Trade-offs


### Advantages

- Store size stabilizes without a crude global cap — unused items decay out on their own.

- Retrieval quality holds as stale low-value items fade and reinforced items stay sharp.

- Importance is inferred from actual use, not upfront declarations — the store self-curates.




### Considerations & Drawbacks

- A rarely-accessed but genuinely important fact can decay below threshold and be silently lost.

- Tuning the decay rate and modulation weights is its own ongoing calibration problem.

- Decay doesn't fix staleness in high-relevance items that stay reinforced while their content goes out of date.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/adaptive-memory-decay/)

