In the BrainStem system, the weighting of a memory trace for the Efraimidis-Spirakis sampling (Phase 7d) is determined by its dynamic Activity Score m This score is not a static property but a neuromodulated value that decides which candidates enter the "Up-State" oscillations of slow-wave sleep
According to the system's logic, the weight for a candidate is calculated as follows:
a = base_score • (0.6 + 0.5 • Glutamate) • (1.0 - 0.3 • GABA) + noise + (0.12 if
Here is how your specific points, confidence, recency, and reuse, factor into this weighting:
Reuse (Frequency of Observation): This is a primary driver. The system tracks the evidence_count for every hypothesis, which increment each time a semantic signature is re-observed in the corpus. High-frequency traces have a higher probability of being included in the candidate pool
Confidence vs. Uncertainty: The base_score typically balances uncertainty (to drive learning and exploration) with confidence (to stabilize existing knowledge). Traces with high uncertainty often get prioritized for replay during exploration-heavy regimes (driven by Noradrenaline), while high-confidence "anchors" get a persistent boost (+0.12) to ensure they are interleaved with novel data for stabilization
Neuromodulated Context (Not just Recency): While the system uses timestamps (updated_at) for technical checkpointing, the actual "weight" during sleep is governed by the current state of Glutamate (the learning drive) and GABA (the inhibitor). Glutamate amplifies the activity of candidates, while GABA dampens it to prevent "digital epilepsy" or runaway co-excitation
Consistency (The Final Gate): Even if a trace has a high weight and is sampled, it only consolidates if it achieves high Consistency across multiple oscillations (n = 5 by default). A trace must survive the system's "selection pressure", which is self-regulated based on the current Glutamate/GABA balance, to be reinforced.
By using this combination of frequency-based evidence and neuromodulated activity, the system ensures that consolidation is biased toward information that is both statistically significant (frequently reused) and contextually relevant to the system's current learning goals
Kartik N V J K
AI Developer | Making AI reliable, trustworthy & accessible to everyone | Active community contributor
Using a slow-wave sleep phase to decide which memory traces consolidate is a genuinely interesting way to keep the system from cementing its own hallucinations as ground truth. The Efraimidis-Spirakis weighted sampling is a neat fit there, since it biases consolidation toward high-weight traces without hard thresholds. What are you using to weight a trace, is it confidence, recency, or how often it gets reused downstream?