From 98e6cb65003c62f04dfbe082087845702054d047 Mon Sep 17 00:00:00 2001 From: ocrampal Date: Thu, 18 Jun 2026 12:29:56 +0200 Subject: [PATCH] v9 --- .../2026-06-15-tripartite_synapse_v9.md | 388 ++++++++++++++++++ 1 file changed, 388 insertions(+) create mode 100644 elements/neuron/appunti/2026-06-15-tripartite_synapse_v9.md diff --git a/elements/neuron/appunti/2026-06-15-tripartite_synapse_v9.md b/elements/neuron/appunti/2026-06-15-tripartite_synapse_v9.md new file mode 100644 index 0000000..41fc5b4 --- /dev/null +++ b/elements/neuron/appunti/2026-06-15-tripartite_synapse_v9.md @@ -0,0 +1,388 @@ +# Commenti + +Endurance need is deposited only on interrupted success, not on bare depletion. Each component's DAY block now has a two-condition test: budget gated a behavior AND that behavior was on a successful trajectory (the local definition you specified — rising postsynaptic engagement for pre, climbing calcium for post, active distal spines for dend, and so on). Depletion during useless activity deposits nothing. + +Endurance bypasses dopamine. The endurance_need trace gates the NIGHT budget-ceiling adaptation directly, with no neuromodulatory coincidence. This is the homeostatic-versus-associative distinction: strength requires significance, endurance only requires that fuel was the binding constraint on a forming success. +Budget capacity is now fully parallel to structure. Fast budget (occupancy, filled in DAY) versus slow budget_ceiling (capacity, built in NIGHT) mirrors exactly the occupancy-versus-structure distinction. The budget is clamped by its ceiling during DAY. + +The two drives compete for one pool. Step 2b draws from the same material and energy as the structural commits in step 2, so building endurance somewhere prevents building strength elsewhere. A connection that is both significant and fuel-limited is the strongest competitor, drawing on both — which can force depotentiation of others. + +Decay is by neglect, consistently. Budget ceilings decay when endurance need is not renewed (mitophagy removing idle mitochondria), exactly as structures decay when not maintained. + +One thing worth your scrutiny: I kept the endurance need decaying over minutes (intermediate timescale) and cleared at NIGHT, while the budget_ceiling persists like structure. Check whether that split feels right, or whether endurance need should itself persist partially across nights for multi-night metabolic conditioning, the way tags can carry forward. + +# Tripartite Synapse — Pseudocode v9 +New in v9: BUDGET CAPACITY as an adaptive quantity (endurance), parallel to STRUCTURE (strength) + - budget_ceiling: slow capacity on the fast budget (like structure is on occupancy) + - endurance_need trace: deposited when depletion INTERRUPTS A SUCCESSFUL TRAJECTORY + (not mere depletion — depletion that cut short something on its way to success) + - NIGHT builds budget_ceiling where fuel was the binding constraint on a valuable outcome + - structure (strength) ← validated coincidence ; budget_ceiling (endurance) ← interrupted success + +--- + +## Two NIGHT-built capacities, two different drives + +``` +STRENGTH = structure ceiling + driven by: coincidence (2 or 3, per component) + dopamine validation + answers: "did a valuable coincidence COMPLETE and get validated?" + builds: bigger containers (more slots) → stronger per-event behavior + +ENDURANCE = budget ceiling + driven by: depletion that INTERRUPTED a successful trajectory + answers: "did fuel run out exactly when a valuable outcome was forming?" + builds: bigger fuel capacity → longer-sustainable behavior + NO dopamine required — this is metabolic/homeostatic, not associative + +Diagnostic combinations: + high structure tag, low endurance need → significant + sustainable → strengthen + low structure tag, high endurance need → fuel-limited at verge → fund endurance + high both → significant + fuel-limited → strengthen + fund + low both → idle, or failing for non-fuel reasons → let decay +``` + +--- + +## Part 1 — Conventions (additions to v8) + +``` +NEW VARIABLE TYPES: + ENDURANCE_TRACE = deposited when budget depletion interrupts a SUCCESSFUL trajectory + decays over minutes + NO dopamine gate (metabolic, not associative) + gates NIGHT budget_ceiling adaptation + BUDGET_CEILING = slow capacity on the fast budget + READ in DAY (clamps how high budget can be / how long behavior sustains) + WRITTEN in NIGHT (raised by endurance need, decays when unused) + +KEY DISTINCTION: + budget = fast occupancy (current fuel level) — consumed/refilled in DAY + budget_ceiling = slow capacity (max fuel / endurance) — adapted in NIGHT + (exactly parallel to: occupancy filled in DAY vs structure ceiling built in NIGHT) +``` + +--- + +## Part 2 — New Trace and Capacity Variables (per component) + +``` +// Endurance traces — deposited only on INTERRUPTED SUCCESS +ENDURANCE_TRACE pre_endurance_need +ENDURANCE_TRACE post_endurance_need +ENDURANCE_TRACE dend_endurance_need +ENDURANCE_TRACE soma_endurance_need +ENDURANCE_TRACE axon_endurance_need +ENDURANCE_TRACE astro_endurance_need + +// Budget ceilings — slow endurance capacity, WRITTEN in NIGHT +BUDGET_CEILING pre_budget_ceiling +BUDGET_CEILING post_budget_ceiling +BUDGET_CEILING dend_budget_ceiling +BUDGET_CEILING soma_budget_ceiling +BUDGET_CEILING axon_budget_ceiling +BUDGET_CEILING astro_budget_ceiling + +// Each DAY budget is now clamped by its ceiling: +// {c}_budget = clamp({c}_budget, 0, {c}_budget_ceiling) + +// New fixed params +FIXED endurance_threshold // min endurance_need to trigger ceiling growth +FIXED capacity_decay_rate // budget_ceiling decay when unused +FIXED trajectory_threshold // min "success trajectory" to count an interruption as costly +``` + +--- + +## Part 3 — How Each Component Detects "Interrupted Success" + +``` +// The endurance signal requires TWO things at the moment of depletion: +// 1. budget gated a behavior (depletion occurred) +// 2. that behavior was on a SUCCESSFUL TRAJECTORY (local definition per component) +// Only their conjunction deposits endurance_need. + +PRE success trajectory = postsynaptic engagement was RISING + (release was building a coincidence) +POST success trajectory = post_fast_trace was APPROACHING Ca_TAG_threshold + (calcium was building toward a tag) +DEND success trajectory = active spines existed DISTAL to the propagation failure point + (bAP was needed downstream and got cut off) +SOMA success trajectory = nuclear Ca was APPROACHING CREB threshold, or + firing was successfully recruiting downstream +AXON success trajectory = propagation failed to ENGAGED boutons (driving active synapses) +ASTRO success trajectory = postsynapse was DEPOLARIZED and WAITING for D-serine + (gate needed exactly when synthesis ran out) +``` + +--- +--- +# SCOPE: DAY + Additions shown per component. Existing v8 behavior assumed unless noted. + Budget is now clamped by budget_ceiling. Endurance need deposited on interrupted success. + +--- + +## PRE | CONTEXT: AP (additions) +``` +scope DAY | context AP: + + // Budget now clamped by its ceiling + pre_budget = clamp(pre_budget, 0, pre_budget_ceiling) + + // Depletion gate — now also tests success trajectory + if pre_budget < AP_release_cost: + suppress(NT_flux) + // INTERRUPTED SUCCESS? was release building a coincidence downstream? + if postsynaptic_engagement_rising: // e.g. post_fast_trace was climbing + pre_endurance_need += postsynaptic_engagement // graded by how close to success + // fuel was the binding constraint on a forming coincidence + // else: depletion during ineffective firing → NO endurance need (let it fail) + exit context + + // ... rest of v8 PRE AP behavior unchanged ... + pre_fast_trace += spike_Ca_influx(input_freq); pre_fast_trace *= decay(τ=100ms) + Ca_drive = pre_fast_trace / (K_Ca_release + pre_fast_trace) + if RRP_level > 0: + NT_flux = RRP_level × Ca_drive + glutamate += NT_flux × Δt; RRP_level -= NT_flux × Δt + pre_budget -= NT_flux × fusion_cost + // ... refill, brake ... +``` + +## PRE | CONTEXT: NOT_AP (additions) +``` +scope DAY | context NOT_AP: + + // endurance trace decays like other intermediate traces + pre_endurance_need *= decay(τ=minutes) + + // ... rest of v8 PRE NOT_AP unchanged: budget replenish, refill, tagging ... + pre_budget += astro_lactate[syn] × pre_fraction + axon_shipment_to_pre + pre_budget = clamp(pre_budget, 0, pre_budget_ceiling) + // ... possible_tagging, tag ... +``` + +--- + +## POST | CONTEXT: NOT_bAP (additions) +``` +scope DAY | context NOT_bAP: + + post_budget = clamp(post_budget, 0, post_budget_ceiling) + + // Depletion during receptor trafficking or membrane reset + if post_budget < required_cost: + // INTERRUPTED SUCCESS? was calcium climbing toward a tag? + if post_fast_trace > trajectory_threshold and post_fast_trace_rising: + post_endurance_need += post_fast_trace // collapse of a building tag-trajectory + // fuel (trafficking/reset) was the limit on completing a coincidence + // truncate the behavior + // else: depletion during low-calcium activity → no endurance need + + post_endurance_need *= decay(τ=minutes) + // ... rest of v8 POST NOT_bAP: AMPA, NMDA, STP slot-fill, tagging ... +``` + +--- + +## DEND | CONTEXT: bAP (additions) +``` +scope DAY | context bAP: + + dend_budget = clamp(dend_budget, 0, dend_budget_ceiling) + + // bAP propagation may fail partway if budget insufficient + bAP_local, propagation_reached = propagate_bAP(SOMA.AP_fired, dend_structure, dend_budget) + dend_budget -= bAP_propagation_cost × propagation_reached + + // INTERRUPTED SUCCESS? were there active spines BEYOND where propagation died? + if propagation_failed_early and active_spines_distal_to(propagation_reached) > 0: + dend_endurance_need += active_spines_distal_to(propagation_reached) + // distal active spines were cut off from the retrograde signal by lack of fuel + // else: propagation failure with no distal active spines → no endurance need + + // ... rest of v8 DEND bAP: branch Ca trace, integration ... +``` + +## DEND | CONTEXT: NOT_bAP (additions) +``` +scope DAY | context NOT_bAP: + dend_endurance_need *= decay(τ=minutes) + // ... v8 replenish, ship to post, tagging, local translation ... +``` + +--- + +## SOMA | CONTEXT: AP (additions) +``` +scope DAY | context AP: + + soma_budget = clamp(soma_budget, 0, soma_budget_ceiling) + + // If budget can't sustain firing during a recruiting train + if soma_budget < AP_generation_cost: + // INTERRUPTED SUCCESS? was nuclear Ca climbing toward CREB, + // or was firing recruiting downstream activity? + if soma_fast_trace > trajectory_threshold and soma_fast_trace_rising: + soma_endurance_need += soma_fast_trace + // fuel cut a firing pattern that was achieving integration/CREB approach + // suppress firing this step + else: + // ... normal v8 SOMA AP: fire, deposit 3 traces, tagging ... + + soma_endurance_need *= decay(τ=minutes) +``` + +--- + +## AXON | CONTEXT: AP (additions) +``` +scope DAY | context AP: + + axon_budget = clamp(axon_budget, 0, axon_budget_ceiling) + + propagation_reliability = axon_structure.propagation × (1 - failure_rate(axon_fast_trace)) + // budget can further reduce reliability if depleted + if axon_budget < AP_propagation_cost: + propagation_reliability *= budget_limited_factor + // INTERRUPTED SUCCESS? did failure hit ENGAGED boutons (driving active synapses)? + if failed_boutons_engaged > 0: + axon_endurance_need += failed_boutons_engaged + // fuel cut propagation to terminals that were successfully driving synapses + // else: failure to idle boutons → no endurance need + + axon_endurance_need *= decay(τ=minutes) + // ... rest of v8 AXON AP ... +``` + +--- + +## ASTRO | CONTEXT: CONTINUOUS (additions) +``` +scope DAY | context CONTINUOUS: + + astro_central_budget = clamp(astro_central_budget, 0, astro_budget_ceiling) + + // D-serine release is budget-limited (v8). Now detect interrupted success: + if glutamate[i] > spillover_threshold: + Ds_drive = astro_fast_trace[i] / (K_Ca_Dserine + astro_fast_trace[i]) + Ds_wanted = Ds_drive × Ds_max + Ds_supplied = min(Ds_wanted, astro_central_budget × Ds_fraction) + + if Ds_supplied < Ds_wanted: + // INTERRUPTED SUCCESS? was postsynapse DEPOLARIZED and waiting for the gate? + if post_depolarized[i] and post_fast_trace[i] approaching Ca_TAG_threshold: + astro_endurance_need[i] += (Ds_wanted - Ds_supplied) + // ran out of synthesis capacity exactly when the gate was needed + // else: insufficient D-serine but no waiting coincidence → no endurance need + + astro_D_serine[i] += Ds_supplied + // ... rest of v8 astro overflow handling, tagging ... + + astro_endurance_need[i] *= decay(τ=minutes) +``` + +--- +--- +# SCOPE: NIGHT + v8 steps unchanged EXCEPT: add Step 2b (budget capacity adaptation). + Budget capacity competes for the SAME material + energy as structure. + +--- + +## Step 1 — Replenish & Distribute (unchanged from v8) +``` +// energy economy: astrocyte → astrosynapses +// material economy: soma → branches/axon → spines/boutons +// next-DAY budgets pre-loaded +``` + +## Step 2 — Structural Commits (strength) (unchanged from v8) +``` +// each commit raises a STRUCTURE ceiling, gated by tag + material + energy +// driven by COMPLETED VALIDATED COINCIDENCE +``` + +## Step 2b — Budget Capacity Adaptation (endurance) ★ NEW +``` +scope NIGHT | step 2b: + + // Driven by endurance_need (interrupted success), NOT by tags, NOT by dopamine. + // Competes for the SAME material + energy pools as structural commits (step 2). + // → endurance and strength trade off under scarcity. + + for each component c: + + if c_endurance_need > endurance_threshold: + // fuel was the binding constraint on a valuable outcome → build endurance + Δcap = min(capacity_expansion_cost, + c_material × cap_material_fraction, // mitochondria need proteins + c_energy × cap_energy_fraction) // biogenesis needs ATP + c_budget_ceiling += Δcap + c_material -= Δcap + c_energy -= Δcap × biogenesis_cost + if Δcap < capacity_expansion_cost: + queue(c_endurance_deficit → next NIGHT) + // biological basis: activity-driven mitochondrial biogenesis, + // local fuel-storage expansion + + else: + // endurance exceeded demand (or failures weren't costly) → let ceiling decay + c_budget_ceiling -= capacity_decay_rate × Δt_night + c_material += released_mitochondria(c) × recycling_fraction + // biological basis: mitophagy — unused metabolic capacity removed, + // proteins returned to pool for components that need them + + // NOTE on competition with strength (step 2): + // material/energy spent here cannot fund structural growth there. + // a component that is significant (high tag) AND fuel-limited (high endurance_need) + // demands both → highest total resource draw → strongest competitor for the pool + // → may force heterosynaptic depression / depotentiation elsewhere +``` + +## Step 3 — Passive Depotentiation (extended) +``` +scope NIGHT | step 3: + + // structures decay unless maintained (v8) ... + // ALSO: budget_ceilings decay if not reinforced by endurance_need (handled in 2b else-branch) + + // maintenance now must cover BOTH structure and budget_ceiling: + // a component maintains its endurance only while it keeps earning endurance_need + // unused endurance capacity is the first thing sacrificed under scarcity + // (mitochondria are expensive to keep — mitophagy removes idle ones) +``` + +## Step 4 — Homeostatic Scaling (unchanged from v8) +## Step 5 — Clear Traces (extended) +``` +scope NIGHT | step 5: + // v8 clears: fast_traces, possible_tagging, soma timing traces, tags + // ALSO clear endurance traces (they have served their purpose this cycle): + all endurance_need = 0 + // budget_ceilings PERSIST (they are slow capacity, like structure) +``` + +--- + +## Summary — Two Capacities, Two Drives, One Resource Pool + +``` + STRENGTH (structure) ENDURANCE (budget_ceiling) +DAY signal coincidence completed + depletion INTERRUPTED a + validated (tag set) successful trajectory (endurance_need) +gate dopamine required NO dopamine (homeostatic) +NIGHT builds bigger slots (per-event power) bigger fuel cap (sustain duration) +competes for shared material + energy SAME shared material + energy +decays when unmaintained (neglect) unused / failures not costly (mitophagy) + +JOINT LOGIC: + to be remembered AND sustainable, a connection must + - complete validated coincidences (→ strength), AND + - either not be fuel-limited, or earn endurance by failing-at-the-verge (→ endurance) + under scarcity the two drives compete: + building endurance somewhere spends material that can't strengthen elsewhere + the system invests endurance specifically where FUEL, + not structure or significance, was what stood between activity and success. +```