Cognitive Foundations of Forgetting
Memory management in AI systems mirrors the fundamental processes of human cognition. Our brains do not retain every piece of information indefinitely; instead, they employ sophisticated mechanisms of prioritization, consolidation, and forgetting. This selective retention enables efficient retrieval of relevant knowledge while preventing cognitive overload. AGISystem2's memory management implements similar principles through explicit usage tracking, priority scoring, and controlled forgetting mechanisms.
The philosophical significance extends to questions of identity and continuity. What makes a knowledge base the "same" over time when concepts can be forgotten? AGISystem2 addresses this through protection mechanisms that preserve core concepts while allowing peripheral knowledge to decay naturally. This balance between retention and forgetting is essential for maintaining a coherent, efficient knowledge base that remains responsive to current needs.
Usage Tracking
Every concept in AGISystem2 maintains usage statistics that inform memory management decisions:
- usageCount: Total accesses (queries + assertions + inferences)
- assertCount: Times used as subject/object in ASSERT
- queryCount: Times used in ASK, PROVE, or CF queries
- lastUsed: Timestamp of most recent access
- createdAt: When the concept was first introduced
These metrics combine into a priority score that determines a concept's importance:
priority = (recency_weight * recency) + (frequency_weight * frequency)
Where recency decays exponentially from last access, and frequency is log-scaled usage count.
Forgetting Mechanisms
AGISystem2 provides several forgetting strategies:
Threshold-Based Forgetting
Remove concepts with usage count below a threshold:
@result FORGET threshold=5
This removes all unprotected concepts used fewer than 5 times.
Pattern-Based Forgetting
Remove concepts matching a glob pattern:
@result FORGET pattern=temp_*
This removes temporary concepts like temp_session_1, temp_query, etc.
Specific Concept Forgetting
Remove a specific concept by name:
@result FORGET concept=ObsoleteConcept
Dry Run Mode
Preview what would be forgotten without actually removing:
@preview FORGET threshold=10 dryRun=true
Protection Mechanisms
Critical concepts can be protected from any forgetting operation:
@_ PROTECT CoreConcept @_ PROTECT Water @_ PROTECT fundamental_axiom
Protected concepts:
- Cannot be removed by FORGET commands
- Are preserved across sessions
- Can be unprotected when no longer critical:
@_ UNPROTECT CoreConcept
List all protected concepts:
@list LIST_PROTECTED
Priority Boosting
Manually increase a concept's priority to prevent forgetting:
@_ BOOST ImportantConcept 100 # Add 100 to usage count @_ BOOST Water # Default: add 10
This is useful when:
- Importing concepts that should be retained
- Marking domain-critical terms
- Recovering accidentally demoted concepts
CLI Commands
The CLI exposes memory management through simple commands:
| Command | Description |
|---|---|
usage <concept> | Show usage statistics |
protect <concept> | Mark as protected |
unprotect <concept> | Remove protection |
forget threshold=N | Remove low-usage concepts |
forget concept=name | Remove specific concept |
boost <concept> [N] | Increase priority |
Technical Implementation References
- DS(/knowledge/usage_tracking): Usage counters and priority scoring
- DS(/knowledge/forgetting): Forgetting mechanisms and protection
- DS(/knowledge/concept_store.js): ConceptStore persistence