Skip to main content

Module pattern_detection

Module pattern_detection 

Source
Expand description

Pattern-Triggered Replay Detection (PIPE-2)

Implements biologically-inspired pattern detection for memory consolidation. Instead of fixed-interval replay, this module detects meaningful patterns that should trigger immediate consolidation.

§Neuroscience Basis

Based on hippocampal sharp-wave ripple research (Rasch & Born 2013):

  • Consolidation is triggered by coherent neural activity patterns
  • High-value memories and semantically related clusters get priority
  • Emotional significance (salience spikes) triggers immediate replay

§Pattern Types

  1. Entity Co-occurrence: Memories sharing multiple named entities
  2. Semantic Clustering: Dense groups of semantically similar memories
  3. Temporal Clustering: Memories from the same session/timeframe
  4. Salience Spikes: High importance/arousal memories
  5. Behavioral Changes: Topic switches, user corrections

Structs§

BehavioralContext
Behavioral context tracking
EntityPatternStats
Statistics for an entity group pattern
PatternDetectionResult
Result of pattern detection cycle
PatternDetector
Pattern detector for triggering memory replay
PatternDetectorStats
Statistics about pattern detection
PatternMemory
Memory data for pattern analysis
SalienceEvent
A salience spike event
SemanticCluster
A detected semantic cluster
TemporalCluster
A detected temporal cluster (session)

Enums§

BehaviorChangeType
Type of behavioral change detected
ReplayTrigger
Trigger types for pattern-based replay