Files
organism/elements/astrocyte/appunti/2026-06-04-modulation-of-future-behavior.md
T

401 lines
44 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
include_toc: true
---
# Intro
Description of the pseudocode.
## Global state: what each compartment tracks
The three compartments maintain distinct but coupled state variables across three time horizons.
At the fast scale:
- the presynapse tracks residual calcium and its readily-releasable vesicle pool — both of which encode the very recent history of firing.
- the postsynapse tracks membrane voltage and the amplitude and speed of its calcium rise, which together encode the instruction for future change.
- the astrocyte tracks glutamate concentration both inside and outside the cleft, its own local and global calcium state, and its fuel output.
At the intermediate scale, the shared signal layer tracks whether the mGluR overflow sensors have fired, and whether the neuromodulatory context gate has been set — specifically whether PKA has primed the AMPA insertion machinery, silenced the forgetting phosphatase, and enabled gene expression in the nucleus.
At the slow scale, all three compartments track their own physical architecture:
- the postsynapse its receptor count and spine size
- the presynapse its docking slot count and vesicle channel clustering
- the astrocyte its wall distance from the synapse, its matrix density, and its baseline co-agonist supply.
## Fast scale: what happens spike by spike
Every action potential sets off a precise sequence across all three compartments simultaneously.
The presynapse converts the electrical event into a chemical wavefront: calcium floods in, drives probabilistic vesicle release from the readily-releasable pool, and leaves a residual trace that biases the next release upward if spikes keep arriving and downward if they stop. The amount of glutamate released fills the cleft and begins diffusing outward.
The astrocyte responds in two parallel arms the moment glutamate spills beyond the cleft boundary. The first arm activates astrocytic mGluR5 receptors via a Gq cascade, triggering an internal calcium rise that is directly proportional to how much glutamate has escaped — this calcium rise drives D-serine release, widening the postsynaptic NMDA detection window. The second arm simultaneously activates presynaptic mGluR2/3 receptors via Gi, suppressing adenylyl cyclase and reducing vesicle release probability — a direct autoinhibitory brake on the very source of the overflow. These two arms run in opposite directions from the same trigger: the astrocyte brakes the presynapse while amplifying the postsynaptic learning window at the same time. The functional logic of this arrangement is also worth noting. At the moment of spillover, the synapse is already releasing at high volume — the presynapse does not need to be told to release more, it needs to be prevented from exhausting itself. Simultaneously, the postsynapse is receiving a large wavefront and is exactly the right moment to maximize its coincidence detection sensitivity. The push-pull architecture serves both needs with a single signal, without requiring any separate coordination mechanism.
The postsynapse responds to the glutamate wavefront through its AMPA receptors, depolarizing the membrane. But full calcium entry through NMDA receptors only occurs if two conditions are met simultaneously: the membrane must be sufficiently depolarized to eject the magnesium block, and D-serine released by the astrocyte must be present as a co-agonist. This is the coincidence detection step — both conditions are required, and the astrocyte's D-serine supply is what makes it a three-party coincidence rather than a two-party one.
Once the spike is complete, the astrocyte vacuums up residual glutamate via its transporter proteins, and the harder it works at this clearance the faster it runs its glycolysis engine, converting blood glucose into lactate and pumping it into the extracellular space. Both the presynapse and postsynapse absorb this lactate to power their reset pumps — refilling the vesicle pool and restoring the resting membrane potential respectively. The energy supply is therefore coupled to activity: busier synapses generate more demand on the astrocyte, which in turn fuels faster recovery.
## Intermediate scale: temporary tuning between spikes
If firing is sustained rather than isolated, the system begins temporary adjustments that do not yet commit to structural change. In the presynapse, sustained high-frequency firing keeps residual calcium elevated, progressively increasing release probability and mobilizing vesicles from deep reserve storage into the readily-releasable pool — a priming of the launchpad without permanently expanding it. If frequency is low and sparse, the reverse happens: the pool depletes faster than it refills and release probability falls.
In the postsynapse, sustained high-frequency input keeps the membrane depolarized long enough to hold the magnesium block off continuously, allowing calcium to accumulate gradually rather than in isolated pulses. This accumulation is the early signal for plasticity, but it is not yet sufficient on its own to commit a structural change.
In the astrocyte, sustained activity keeps mGluR5 activated and D-serine release elevated above its baseline pulse level, maintaining a wider NMDA detection window for as long as the high-frequency drive continues.
The neuromodulatory broadcast then sets the critical context gate. If dopamine or norepinephrine levels cross their respective thresholds — signaling that the current activity pattern is behaviorally significant — PKA activity rises and phosphorylates three targets in sequence. It lowers the threshold for AMPA receptor insertion by priming the GluA1 subunit at Ser845. It silences the LTD phosphatase PP1 by phosphorylating DARPP-32, effectively blocking the forgetting machinery from running while the save signal is present. And it translocates to the nucleus to phosphorylate CREB, enabling the gene expression needed to build new structural proteins. Acetylcholine from the basal forebrain acts in parallel, lowering the global LTP threshold — making the entire system more sensitive to incoming patterns during periods of high attention.
## Slow scale: the commit decision and structural rewriting
Once the fast and intermediate dynamics have run, the system evaluates a three-layer filter to decide whether to permanently rewrite its architecture. The first layer asks whether a genuine event occurred — specifically whether postsynaptic calcium rose above the high threshold at sufficient speed to activate the LTP kinase pathway. The second layer asks whether that event was excessive enough to saturate the cleft and trigger mGluR5 on the astrocyte. The third layer asks whether the neuromodulatory context validated the event as worth saving — whether PKA has primed the insertion machinery and silenced the forgetting machinery.
Only when all three conditions align does structural rewriting proceed, and when it does, all three compartments are rewritten simultaneously and in the same direction.
In the potentiation branch, the postsynapse anchors new AMPA receptors into the membrane via CaMKII — a process made easier because PKA has already lowered the insertion threshold — and the spine itself physically enlarges. The presynapse expands its active zone, clusters more calcium channels directly beneath the docking area to tighten the coupling between electrical events and vesicle release, and increases its baseline release probability. The astrocyte retracts its process walls inward toward the synapse, secretes structural matrix proteins to seal and stabilize the channel, upregulates its baseline D-serine synthesis for chronic NMDA priming, and reduces its glutamate clearance rate — meaning future signals will linger longer in the cleft rather than being vacuumed away immediately.
In the depression branch, the phosphatase PP1 wins instead of CaMKII, and all three changes run in reverse simultaneously. The postsynapse internalizes receptors and the spine shrinks. The presynapse removes docking slots, scatters its calcium channels away from the active zone, and pulls vesicles back into deep reserve storage. The astrocyte secretes matrix metalloproteinases to dissolve the structural scaffold, cuts its D-serine supply to starve the NMDA gate chronically, and extends its process walls outward away from the synapse, loosening the diffusion barrier so that future glutamate bleeds away faster rather than concentrating at the cleft.
If the calcium event occurred but the neuromodulatory save signal did not arrive, only transient changes happen — early receptor insertion and brief facilitation — both of which reverse within minutes without trace. If no threshold was crossed at all, nothing changes and the current structural state is simply held.
## The critical asymmetry
The astrocyte's perisynaptic wall distance is the variable that makes both outcomes self-reinforcing rather than merely additive. When it moves inward during potentiation, it concentrates glutamate at the cleft, maintains D-serine near the postsynapse, and tightens the presynaptic feedback loop — making future high-frequency events even more likely to cross the threshold. When it moves outward during depression, it dilutes the signal, starves the NMDA gate, and loosens the presynaptic feedback — making future events even less likely to reach threshold. The astrocyte therefore does not simply mirror what the neurons decide: it actively deepens the valley the synapse has already rolled into, in whichever direction that happens to be.
# Pseudocode
[pseudocode](tripartite_synapse_full_pseudocode.html)
```Gen
## global state variables
// ── Fast (mss): wave propagation ─────────────────────────────
// Presynapse
pre_Ca_residual // leftover Ca²⁺ between spikes — short-term trace
vesicle_release_prob // P(0.11.0) per docking slot
RRP_pool // readily-releasable vesicle pool
reserve_pool // chained vesicles in deep storage
// Postsynapse
membrane_potential // Vm — depolarization state
NMDA_Mg_block // bool — mechanical clamp on/off
post_Ca_amplitude // peak [Ca²⁺] rise in spine
post_Ca_rise_speed // d(Ca)/dt — fast=LTP signal, slow=LTD signal
// Astrocyte
glutamate_cleft // [glu] in synaptic cleft
glutamate_spillover // extrasynaptic [glu] — saturates mGluRs
astro_Ca_local // IP3-triggered local rise near synapse
astro_Ca_global // soma-wide wave — network overload flag
D_serine_release // gliotransmitter — NMDA co-agonist pulse
lactate_output // fuel export rate to pre and post
// ── Intermediate (smin): temporary tuning ────────────────────
mGluR2_3_activation // presynaptic Gi — autoinhibitory brake
mGluR5_activation // astrocytic Gq — IP3→Ca²⁺→D-serine cascade
cAMP_level // set by dopamine/NE via Gs → adenylyl cyclase
PKA_activity // downstream of cAMP
GluA1_Ser845_primed // bool — AMPA insertion threshold lowered by PKA
DARPP32_phospho // bool — PP1 (LTD phosphatase) silenced by PKA
CREB_active // bool — structural gene expression enabled
// ── Slow (hweeks): structural architecture ───────────────────
AMPA_count // surface receptors — postsynaptic sensitivity
spine_volume // physical size of dendritic spine
active_zone_size // docking slot count
RRP_pool_capacity // max readily-releasable pool
VGCC_clustering // Ca²⁺ channels beneath active zone
perisynaptic_distance // how close astrocyte walls are to synapse
ECM_integrity // extracellular matrix density
D_serine_tonic_level // baseline co-agonist supply (sustained)
glutamate_clearance_rate // EAAT transporter density
## fast time scale — wave propagation (ms → s)
function fire_action_potential(input_freq):
// Presynapse: launch wavefront
pre_Ca_residual += spike_influx(input_freq)
pre_Ca_residual *= decay(τ ≈ 100ms) // fades unless spikes keep arriving
vesicle_release_prob *= facilitation(pre_Ca_residual)
released_vesicles = binomial(RRP_pool, vesicle_release_prob)
glutamate_cleft = released_vesicles × quantal_content
RRP_pool -= released_vesicles
// Astrocyte: overflow sensing and co-agonist release
glutamate_spillover = extrasynaptic_diffusion(glutamate_cleft)
if glutamate_spillover > spillover_threshold:
mGluR5_activation = True // Gq arm → IP3 → Ca²⁺ → D-serine
astro_Ca_local += IP3_cascade(PLC)
D_serine_release += proportional_to(astro_Ca_local)
mGluR2_3_activation = True // Gi arm → brake presynapse
cAMP_level -= Gi_inhibition(adenylyl_cyclase)
vesicle_release_prob -= VGCC_suppression() // autoinhibitory brake
// Astrocyte: check for network overload
astro_Ca_global = soma_wave(astro_Ca_local > OVERLOAD_threshold)
if astro_Ca_global: trigger(shockwave_lockdown)
// Postsynapse: wavefront strikes resonator
AMPA_current = glutamate_cleft × AMPA_count
membrane_potential += AMPA_current
// NMDA gate: coincidence check
if membrane_potential > -40mV and D_serine_release > threshold:
NMDA_Mg_block = False // Mg²⁺ ejected
post_Ca_amplitude += NMDA_influx(glutamate_cleft)
post_Ca_rise_speed = d(post_Ca_amplitude) / dt
// Astrocyte: vacuum trailing echoes + fuel pipeline
glutamate_cleft -= glutamate_clearance_rate × Δt
lactate_output += glycolysis_rate(glutamate_clearance_rate)
membrane_potential restored by NaK_ATPase(lactate_output)
RRP_pool refilled by VATPase(lactate_output)
## intermediate time scale — temporary tuning (s → min)
function short_term_plasticity(input_freq, duration):
// Presynapse: facilitate or depress based on Ca²⁺ history
if input_freq > 20Hz:
vesicle_release_prob *= 1.3 // residual Ca²⁺ primes launchpad
mobilize(reserve_pool → RRP_pool) // break storage chains
elif input_freq < 5Hz:
vesicle_release_prob *= 0.7 // RRP depleted faster than refill
// Postsynapse: NMDA gate primed if frequency sustained
if input_freq >= 50Hz and duration > 1s:
NMDA_Mg_block = False // sustained depolarization
post_Ca_amplitude accumulates // early-LTP signal rises
// Astrocyte: sustained volume → escalate co-agonist
if astro_Ca_local > local_threshold:
D_serine_release += gliotransmitter_pulse() // widens NMDA window
// Neuromodulators: set context gate via Gs protein
if dopamine_level > D1_threshold or NE_level > β_threshold:
cAMP_level += Gs_activation(adenylyl_cyclase)
PKA_activity = proportional_to(cAMP_level)
phosphorylate(GluA1, site=Ser845)
GluA1_Ser845_primed = True // lowers CaMKII threshold
phosphorylate(DARPP32)
DARPP32_phospho = True // silences PP1 — blocks LTD
translocate(PKA → nucleus) → phosphorylate(CREB)
CREB_active = True // enables structural gene expression
// Acetylcholine: lower LTP threshold globally
LTP_threshold *= (1 / (1 + ACh_level × mAChR_gain))
## slow time scale — structural commit (h → weeks)
function commit_to_structural_change():
// Hierarchical filter: three conditions must align
event_detected = post_Ca_amplitude > Ca_HIGH // layer 1: did something happen?
overflow_sensed = mGluR5_activation == True // layer 2: was it excessive?
context_validated = DARPP32_phospho and GluA1_Ser845_primed // layer 3: worth saving?
// ── Branch 1: LTP — potentiation ──────────────────────────────
if event_detected and overflow_sensed and context_validated:
// Postsynapse: anchor receptors, enlarge spine
activate(CaMKII)
AMPA_count += receptor_insertion(CaMKII, GluA1_Ser845_primed)
spine_volume *= 1.5
// Presynapse: expand launchpad, increase output reliability
active_zone_size *= 1.4 // more docking slots
RRP_pool_capacity += pool_expansion(active_zone_size)
VGCC_clustering += cluster_beneath_AZ() // tighter Ca²⁺ coupling
vesicle_release_prob += 0.1 // driven by VGCC clustering
// Astrocyte: seal and insulate the channel
perisynaptic_distance -= process_retraction() // walls move IN → tighter wrap
ECM_integrity += secrete(Glypicans, Thrombospondins)
D_serine_tonic_level += upregulate_synthesis() // sustained NMDA priming
glutamate_clearance_rate *= 0.85 // tighter wrap → slower diffusion away
return "potentiated"
// ── Branch 2: temporary only — Ca²⁺ rose, no save signal ─────
elif event_detected and not context_validated:
AMPA_count += transient_insertion() // early-LTP only — reverses in minutes
vesicle_release_prob += transient_facilitation()
// No astrocyte structural change
return "temporary facilitation only"
// ── Branch 3: LTD — active forgetting ─────────────────────────
elif event_detected and not overflow_sensed and not context_validated:
// Postsynapse: internalize receptors, shrink spine
activate(PP1)
AMPA_count -= receptor_internalization(PP1)
spine_volume *= 0.7
// Presynapse: dismantle launchpad
active_zone_size -= docking_slot_removal()
RRP_pool_capacity -= pool_contraction()
VGCC_clustering -= scatter_VGCCs() // decouple Ca²⁺ from AZ
vesicle_release_prob *= 0.6
// Astrocyte: dissolve matrix, pull away, cut support
ECM_integrity -= secrete(MMPs) // molecular scissors
D_serine_tonic_level = 0 // co-agonist supply cut
perisynaptic_distance += process_extension() // walls move OUT → loose wrap
glutamate_clearance_rate *= 1.2 // looser wrap → faster spillover
return "depressed"
// ── Branch 4: baseline ────────────────────────────────────────
else:
// All structural variables unchanged — system holds current state
return "baseline — no change"
## special case — shockwave lockdown (>100Hz uncoordinated)
function shockwave_lockdown():
astro_Ca_global = GLOBAL_WAVE // soma-level flood
release(GABA, ATP) // gel floods postsynapse
AMPA_count -= mass_internalization()
membrane_potential = HYPERPOLARIZED
cluster(VGCC → beneath_active_zone) // ensures signal survives chaos
## energy supply chain — metabolic gating (continuous)
function metabolic_loop(Δt):
// Astrocyte: glucose → lactate pipeline
glucose_uptake = blood_capillary_supply()
lactate_output = glycolysis(glucose_uptake, glutamate_clearance_rate)
lactate_output *= load_factor(glutamate_clearance_rate)
// Pre + post absorb lactate → power their pumps
RRP_pool refill rate ∝ VATPase(lactate_output)
membrane_potential reset ∝ NaK_ATPase(lactate_output)
## key asymmetry — perisynaptic distance is bidirectional
// LTP: astrocyte moves IN → tighter diffusion barrier
// → glutamate_clearance_rate ↓ (signal contained, not diluted)
// → D_serine_tonic_level ↑ (NMDA gate chronically primed)
// LTD: astrocyte moves OUT → looser diffusion barrier
// → glutamate_clearance_rate ↑ (signal bleeds away faster)
// → D_serine_tonic_level = 0 (NMDA gate chronically starved)
// Result: astrocyte amplifies both directions simultaneously
// potentiation becomes self-reinforcing; depression becomes self-reinforcing
```
# Neuromodulators
These are produced by small, anatomically concentrated nuclei that broadcast widely across the brain:
dopamine_level // "save button" — validates LTP
norepinephrine_level // arousal / signal-to-noise gain
acetylcholine_level // attention — lowers LTP threshold
## Dopamine
Dopamine is produced primarily by neurons in the Substantia Nigra pars compacta (projecting to the striatum, relevant for motor learning and habit formation) and the Ventral Tegmental Area (VTA) (projecting to the prefrontal cortex and limbic system via the mesolimbic and mesocortical pathways, relevant for reward, motivation, and the "save button" function in your model).
## Norepinephrine
Norepinephrine is produced almost exclusively by the Locus Coeruleus, a tiny nucleus in the brainstem pons. Despite its small size it projects diffusely across virtually the entire brain — cortex, hippocampus, cerebellum, spinal cord. It's essentially the brain's arousal and signal-to-noise broadcaster, firing tonically at low rates during calm wakefulness and phasically during novel or stressful events.
## Acetylcholine
Acetylcholine has two main sources: the basal forebrain nuclei (including the nucleus basalis of Meynert) projecting to the cortex and hippocampus — relevant for attention and learning gating — and the medial septum projecting specifically to the hippocampus, where it strongly modulates theta rhythms and memory encoding.
What's striking in the context of your model is that all three systems share the same architectural logic: a tiny, localized cell population broadcasts a global contextual signal that shifts the operational threshold of millions of synapses simultaneously — none of them carrying specific content, all of them modulating how content gets written.
# Timescales
Great question, and the answer is that the three scales are not strictly sequential in clock time — they overlap and nest inside each other, and their timing depends on the specific process involved.
**The intermediate scale (seconds to minutes)** happens largely *during* and *immediately after* a burst of activity, not between spike trains. Short-term facilitation and depression are running continuously within a spike train — each spike modifies the probability of the next one within the same train. The mGluR overflow sensing and D-serine escalation happen within seconds of sustained firing. The PKA/cAMP cascade triggered by dopamine or norepinephrine also runs within minutes of the neuromodulatory broadcast. So the intermediate scale is essentially the tail of the fast scale — it starts during the event and decays over the following minutes if no structural commitment is made.
**The slow scale is more complex and splits into at least two sub-phases:**
Early LTP consolidation — the initial receptor insertion and active zone expansion — begins within minutes to an hour of the triggering event, overlapping with the late intermediate scale. This phase requires protein synthesis from existing mRNAs already present at the synapse, so it can happen locally at the dendritic spine without waiting for the nucleus.
Late LTP consolidation — the full structural rewriting involving new gene expression via CREB, synthesis of new scaffold proteins, ECM secretion by the astrocyte, and permanent architectural changes — requires hours and depends on signals reaching the nucleus and new proteins being shipped back out. This is where sleep becomes genuinely important.
**Sleep plays a specific and active role** at the slow scale for two distinct reasons. First, during slow-wave sleep, the hippocampus replays compressed versions of the day's activity patterns — spike sequences that occurred during waking are reactivated at higher speed during sleep, which is thought to re-trigger the intermediate-scale cascades in a quieter, lower-noise environment where the signal-to-noise ratio is high and competing inputs are absent. This replay is believed to drive the late consolidation phase that could not complete during waking because the system was too busy processing new inputs.
Second, slow-wave sleep is also when the opposite process — synaptic downscaling — runs most aggressively. The synaptic homeostasis hypothesis proposes that waking potentiates synapses broadly and indiscriminately due to the high volume of incoming experience, and that sleep is when the LTD branch of the commit function runs systematically across the cortex, pruning weak or unvalidated potentiations back toward baseline. The astrocyte's MMP secretion and matrix dissolution likely peak during this period. This is the biological basis for the observation that sleep deprivation impairs both memory consolidation and the ability to form new memories the following day — the slow-scale commit function simply did not run.
**Active forgetting at the slow scale** has a slightly different timing. The LTD branch requires not an acute event but a chronic condition — persistent low-frequency or mistimed activity over hours to days. A synapse that simply stops being used does not immediately dissolve; it requires sustained disuse combined with the astrocyte detecting the absence of meaningful signal over an extended period before MMP secretion begins and the structural dismantling proceeds. This is why skills and memories are not lost overnight but degrade over weeks to months of disuse.
So to summarize the timing picture: the intermediate scale runs during and immediately after activity. Early structural changes begin within the hour following a validated event. The full slow-scale commit — both potentiation and pruning — runs primarily during sleep, using replay to complete the potentiation side and homeostatic downscaling to clean up the depression side. The organism's rest period is therefore not passive recovery but the primary execution window for the slow-scale branch of the commit function.Great question, and the answer is that the three scales are not strictly sequential in clock time — they overlap and nest inside each other, and their timing depends on the specific process involved.
**The intermediate scale (seconds to minutes)** happens largely *during* and *immediately after* a burst of activity, not between spike trains. Short-term facilitation and depression are running continuously within a spike train — each spike modifies the probability of the next one within the same train. The mGluR overflow sensing and D-serine escalation happen within seconds of sustained firing. The PKA/cAMP cascade triggered by dopamine or norepinephrine also runs within minutes of the neuromodulatory broadcast. So the intermediate scale is essentially the tail of the fast scale — it starts during the event and decays over the following minutes if no structural commitment is made.
**The slow scale is more complex and splits into at least two sub-phases:**
Early LTP consolidation — the initial receptor insertion and active zone expansion — begins within minutes to an hour of the triggering event, overlapping with the late intermediate scale. This phase requires protein synthesis from existing mRNAs already present at the synapse, so it can happen locally at the dendritic spine without waiting for the nucleus.
Late LTP consolidation — the full structural rewriting involving new gene expression via CREB, synthesis of new scaffold proteins, ECM secretion by the astrocyte, and permanent architectural changes — requires hours and depends on signals reaching the nucleus and new proteins being shipped back out. This is where sleep becomes genuinely important.
**Sleep plays a specific and active role** at the slow scale for two distinct reasons. First, during slow-wave sleep, the hippocampus replays compressed versions of the day's activity patterns — spike sequences that occurred during waking are reactivated at higher speed during sleep, which is thought to re-trigger the intermediate-scale cascades in a quieter, lower-noise environment where the signal-to-noise ratio is high and competing inputs are absent. This replay is believed to drive the late consolidation phase that could not complete during waking because the system was too busy processing new inputs.
Second, slow-wave sleep is also when the opposite process — synaptic downscaling — runs most aggressively. The synaptic homeostasis hypothesis proposes that waking potentiates synapses broadly and indiscriminately due to the high volume of incoming experience, and that sleep is when the LTD branch of the commit function runs systematically across the cortex, pruning weak or unvalidated potentiations back toward baseline. The astrocyte's MMP secretion and matrix dissolution likely peak during this period. This is the biological basis for the observation that sleep deprivation impairs both memory consolidation and the ability to form new memories the following day — the slow-scale commit function simply did not run.
**Active forgetting at the slow scale** has a slightly different timing. The LTD branch requires not an acute event but a chronic condition — persistent low-frequency or mistimed activity over hours to days. A synapse that simply stops being used does not immediately dissolve; it requires sustained disuse combined with the astrocyte detecting the absence of meaningful signal over an extended period before MMP secretion begins and the structural dismantling proceeds. This is why skills and memories are not lost overnight but degrade over weeks to months of disuse.
So to summarize the timing picture: the intermediate scale runs during and immediately after activity. Early structural changes begin within the hour following a validated event. The full slow-scale commit — both potentiation and pruning — runs primarily during sleep, using replay to complete the potentiation side and homeostatic downscaling to clean up the depression side. The organism's rest period is therefore not passive recovery but the primary execution window for the slow-scale branch of the commit function.
# Simple organisms
Excellent point. The hippocampal replay model is a vertebrate solution to a specific problem — how to consolidate many parallel experiences quickly without catastrophic interference. But the underlying molecular logic of the commit function is far more ancient and appears in organisms that have no hippocampus, no sleep architecture in the vertebrate sense, and sometimes no centralized nervous system at all.
**In invertebrates with simple ganglia***Aplysia*, *C. elegans*, *Drosophila* — the slow-scale consolidation still requires protein synthesis and still uses CREB as the nuclear transcription factor. The same PKA→CREB axis that validates LTP in the mammalian hippocampus was actually first characterized in *Aplysia* gill-withdrawal reflex studies by Kandel. What differs is the trigger and the timing. Without a hippocampus to compress and replay experiences during a rest phase, consolidation in these organisms appears to depend simply on **repetition and spacing of the stimulus itself**. A single strong shock to the siphon produces short-term sensitization lasting minutes — the intermediate scale running without commitment. Four or five spaced shocks over hours produce long-term sensitization lasting days — the slow-scale commit running because repeated PKA activation eventually crosses the threshold needed to drive CREB-dependent gene expression. The spacing matters because cAMP degrades between stimuli, and spaced repetition keeps re-elevating it above the threshold for nuclear translocation, whereas massed repetition saturates and desensitizes the cascade.
**In *C. elegans***, which has exactly 302 neurons and no sleep in any recognizable sense, consolidation-like phenomena still occur through the same molecular logic. What substitutes for the validation signal is less clear, but there is evidence that **neuromodulatory interneurons releasing serotonin and dopamine** gate whether a repeated experience gets written into long-term behavioral change — functionally identical to the save button role, just implemented in a three-neuron circuit rather than a diffuse broadcast system.
**In organisms without a nervous system at all***Physarum polycephalum*, the slime mould — something that looks functionally like consolidation occurs through purely biochemical means. Repeated exposure to a stimulus that causes contraction leaves a persistent change in the cytoskeletal and biochemical state of the organism that biases future responses. There is no synapse, no calcium influx through NMDA receptors, no PKA — but the logic of the three-layer filter is still present in a stripped-down form: the organism detects that something happened, detects that it was significant enough to exceed a threshold, and commits a physical change to its internal architecture that persists. The molecular substrate is different but the computational structure is the same.
**What this suggests about consolidation in general** is that the slow-scale commit function does not require sleep or replay — those are vertebrate optimizations on top of a more primitive mechanism. The core requirements appear to be just three things that evolution has solved repeatedly with different molecular tools:
The first is a **threshold mechanism** that prevents every transient event from being written permanently — in neurons this is the calcium amplitude and rise-speed filter, in slime moulds it is a chemical concentration threshold, but the logic is the same.
The second is a **context validation signal** that asks whether the event was behaviorally meaningful — in vertebrates this is the neuromodulatory broadcast from VTA and locus coeruleus, in *Aplysia* it is facilitatory interneurons releasing serotonin, in slime moulds it may simply be the magnitude of the perturbation itself serving as its own validation.
The third is a **protein synthesis requirement** that enforces a time cost on permanent storage — in all organisms where long-term behavioral change has been studied, blocking protein synthesis blocks consolidation, suggesting that the metabolic cost of building new structural proteins is a universal gate that prevents trivial events from consuming permanent resources.
Sleep and hippocampal replay are therefore best understood not as the mechanism of consolidation but as a **vertebrate solution to the scaling problem** — how to consolidate thousands of experiences per day across billions of synapses without running the protein synthesis machinery continuously at full cost during waking. Simpler organisms consolidate fewer experiences, face less interference, and can afford to let repetition and spacing do the work that sleep does in more complex nervous systems.
# Calcium in pre, post, astro
**In the postsynapse**, the calcium amplitude and rise-speed filter works because CaMKII and the phosphatases PP1/PP2B have different sensitivities to calcium-bound calmodulin, and calmodulin itself has different binding kinetics depending on how fast calcium rises.
Calmodulin has four calcium binding sites and its activation is highly cooperative — it does not activate linearly with calcium concentration but switches sharply above a threshold. When calcium rises fast and high, as during a strong high-frequency burst, calmodulin saturates quickly and activates CaMKII. CaMKII then autophosphorylates at Thr286, which is the critical step — once autophosphorylated it remains active even after calcium falls back to baseline, effectively converting a transient calcium event into a sustained kinase signal that outlasts the trigger. This persistence is what gives CaMKII its memory-like property and is what drives AMPA receptor insertion.
When calcium rises slowly and to a lower amplitude, as during weak low-frequency input, calmodulin activates preferentially the phosphatases PP2B (calcineurin) and downstream PP1 instead, because these enzymes have higher affinity for calcium-calmodulin complexes at lower occupancy. PP1 then dephosphorylates AMPA receptors, triggering their internalization and driving LTD.
So the filter is not a simple threshold — it is a **kinetic competition** between two enzyme systems with different calcium-calmodulin affinities. Fast large rise activates the low-affinity high-gain system (CaMKII). Slow small rise activates the high-affinity low-gain system (PP2B/PP1). The same calcium messenger routes to opposite outcomes depending purely on its dynamics.
**In the presynapse**, the calcium filter is structurally simpler but operates on a different principle — **proximity and timing** rather than kinetic competition. Calcium enters through VGCCs clustered directly beneath the active zone, and the vesicles docked at that zone sit within nanometers of the channel mouth. The local calcium concentration at the release site reaches extremely high values — estimated at hundreds of micromolar — for a very brief window of microseconds before diffusing away. Synaptotagmin, the calcium sensor on the vesicle membrane, has a low affinity but fast on-rate, meaning it only fires in response to this extremely high local transient, not to the diffuse residual calcium that lingers afterward.
The residual calcium that accumulates with repeated spikes — the pre_Ca_residual in the pseudocode — acts on a completely different target: Munc13 and RIM proteins at the active zone, which have higher affinity for calcium but slower kinetics. These proteins respond to the sustained low-level residual and increase the size of the readily-releasable pool and the probability of release — this is facilitation. So the presynaptic filter distinguishes between the sharp local transient (triggers release via synaptotagmin) and the slow diffuse residual (modulates future release probability via Munc13/RIM). Two calcium signals, two sensors, two time scales, within the same compartment.
**In the astrocyte**, the calcium filter is the least understood of the three but operates through IP3 receptor gating. IP3 receptors on the endoplasmic reticulum have a bell-shaped calcium dependence — they open in response to rising calcium but are inhibited at very high calcium concentrations. This means the astrocyte's internal calcium release is self-limiting: a moderate IP3 signal produces a local calcium rise that drives D-serine release, but an excessive signal triggers the global soma wave that activates the circuit-breaker response instead.
The key filter here is therefore the **spatial containment of the IP3 signal**. Under normal high-frequency activity, IP3 production is local to the perisynaptic process and the calcium rise stays local — driving D-serine release proportionally. Only when multiple neighboring synapses fire simultaneously does IP3 accumulate enough to propagate as a regenerative wave across the entire astrocyte via gap junctions to adjacent astrocytes, triggering the global alarm. The astrocyte is therefore filtering not just amplitude but **spatial coherence** — a single strong synapse produces a local response, but coordinated overactivity across a territory produces a qualitatively different global response.
The common thread across all three compartments is that none of them use a simple concentration threshold. Each uses a molecular mechanism that is sensitive to the **dynamics** of the calcium signal — its speed, its spatial spread, its duration, or its subcellular location — rather than just its peak value. This is what allows the same ion to encode fundamentally different instructions depending on the context in which it arrives.
# Resource budget
Exactly right. This is a resource allocation problem, and it is one of the most important constraints the system operates under. Each compartment has a finite physical budget, and potentiation at one synapse necessarily draws from a shared pool that serves many others.
**In the presynapse**, the axon has many en passant boutons — synaptic release sites distributed along its length, sometimes hundreds of them. The total vesicle pool, the mitochondrial capacity to run the VATPase pumps that refill vesicles, and the cytoskeletal machinery that mobilizes reserve pools are all shared across the entire axonal arbor. When one bouton undergoes LTP and expands its active zone and increases its RRP capacity, it is drawing on the same pool of synaptic proteins — RIM, Munc13, VGCC subunits — that all other boutons on that axon compete for. There is evidence for a **synaptic tagging and capture** mechanism here: a potentiated bouton plants a molecular tag that allows it to capture plasticity-related proteins drifting along the axon, effectively pulling resources away from untagged boutons. This means strong potentiation at one site can passively deplete neighboring sites — a form of competitive resource allocation baked into the axonal architecture.
**In the postsynapse**, the dendrite hosts thousands of spines, and the situation is even more constrained. The soma produces plasticity-related proteins — new AMPA receptor subunits, CaMKII, scaffolding proteins like PSD-95 — at a rate determined by CREB-driven gene expression, and these proteins must be shipped out along the dendritic arbor to wherever they are needed. The same synaptic tagging logic applies on the postsynaptic side: a spine that has been tagged by early LTP can capture these drifting proteins when they pass, but the total production rate is finite. There is also a **spine morphology budget** — actin polymerization drives spine head enlargement, but the actin machinery and the small GTPases (Rac1, RhoA) that regulate it are shared across the dendritic segment. Potentiating many spines simultaneously on the same dendritic branch would require more actin remodeling machinery than is locally available, meaning strong potentiation at a cluster of nearby spines may physically constrain how much each individual spine can grow.
Additionally, the postsynapse has a **receptor recycling pool** — a finite intracellular reserve of AMPA receptors held in endosomes near the spine that can be rapidly inserted during early LTP. This pool is local to a dendritic segment and is not immediately replenished. If multiple nearby spines are potentiated in rapid succession, they compete for the same local receptor reserve before new receptors synthesized in the soma can arrive.
**In the astrocyte**, the budget constraint is the most spatially explicit of the three because a single astrocyte wraps somewhere between 100,000 and 2,000,000 synapses in humans — an enormous territory. Its finite resources include the total EAAT transporter protein available for glutamate clearance, the D-serine synthesis capacity which depends on serine racemase enzyme levels, the ECM protein production capacity for Glypicans and Thrombospondins, and critically the ATP budget for running all of these simultaneously. When many synapses in its territory are active simultaneously, the astrocyte faces a genuine allocation problem: it cannot maximally support all of them at once. There is evidence that the perisynaptic process — the fine astrocytic extension that wraps individual synapses — is itself a dynamic structure that the astrocyte extends and retracts selectively, suggesting it physically prioritizes which synapses receive close wrapping and therefore which ones benefit from tighter D-serine delivery and glutamate containment.
**The deeper implication** is that potentiation is not just a local bilateral negotiation between one presynapse and one postsynapse. It is a **network-level resource competition** in which:
A strongly potentiated synapse draws proteins and structural resources away from its neighbors on the same axon and dendrite. The astrocyte must allocate its clearance, co-agonist, and structural support capacity across its entire territory. The metabolic pipeline — glucose from blood vessels, lactate to neurons — has a ceiling determined by capillary supply, meaning a highly active region of the astrocyte territory can become fuel-limited if demand outpaces vascular supply.
This is probably why **heterosynaptic LTD** exists — the observation that strong LTP at one synapse is often accompanied by spontaneous depression at neighboring synapses on the same dendrite even without those synapses being directly stimulated. It may be less a deliberate regulatory mechanism and more a direct consequence of resource depletion: the potentiated synapse captured the available receptors, actin machinery, and astrocytic support, leaving neighboring synapses passively impoverished.
The pseudocode should therefore include a budget layer that sits above the individual synapse functions — something like a shared resource pool per axonal arbor, per dendritic segment, and per astrocyte territory, from which each commit function draws and against which each structural expansion is checked. Potentiation that would exceed the available budget either fails to consolidate fully, triggers compensatory depression at neighboring synapses, or waits for new protein synthesis to replenish the pool before completing.