Per ora abbiamo in DAY il {component}_budget che raggruppa energy e material, e in NIGHT {component}_energy e {component}_material.
This maps onto a real biological distinction. The astrocyte's lactate and the soma's ATP fund the running costs of the cell — everything that needs to happen just to keep the system operating from moment to moment. CREB-driven protein synthesis funds the capital investment — the slow, expensive structural changes that modify what the running system is capable of. These are two different budgets in the biological sense: operating expenditure versus capital expenditure. Combining them within DAY is correct because DAY is entirely operating expenditure. Keeping them separate in NIGHT is correct because NIGHT mixes operating expenditure with capital expenditure, and only the capital component is recoverable.
Combining {component}_energy e {component}_material would hide the fact that dismantling a structure recovers biological building blocks but not the work that was done to assemble them — which is the thermodynamic reality of any construction and deconstruction process.
## Energy flow
```
VASCULAR SUPPLY
→ ASTROCYTE CELL BODY
glucose → lactate (glycolysis)
→ astro_budget (local ATP for clearance, D-serine, ECM, process motility)
→ lactate exported to:
→ pre_budget (ATP for VGCC, vesicle fusion, VATPase)
→ post_budget (ATP for NaK pump, AMPA trafficking, actin)
→ dend_budget (ATP for bAP propagation, local translation)
→ SOMA
soma has own mitochondria — partly self-fueled
soma_budget (ATP for AP generation, CREB, protein synthesis, shipping)
Yes, exactly. This is the essential abstract pattern. Let me state it precisely.
# The Abstract Pattern
A component operates within a structure set by the previous NIGHT. During DAY, in each context, it executes behaviors that cost budget and deposit fast traces. Fast traces are local records of recent activity that bias the next behavior and open an eligibility window for tagging. A tag forms when a local eligibility signal coincides with one or more non-local validation signals within the decay window of the trace — the number of required coincidences reflecting the spatial scale at which that component sits in the system. In contexts without triggering input, all traces decay, closing the windows they opened. At NIGHT, the tag magnitude drives a structural commit proportional to available material and energy — material being recoverable and energy not — with the structural change becoming the new ceiling within which the next DAY's behaviors will operate. What is not committed decays for lack of maintenance, and the resources freed by that decay partially fund the potentiation of what was.
## DAY — The General Form
Every DAY behavior follows this template:
```
given: STRUCTURE // the architectural ceiling left by NIGHT
in: CONTEXT // local or global triggering condition
if: BUDGET > cost // operational resources available
then: behavior executes
BUDGET -= cost // resources consumed
FAST_TRACE += f(behavior) // local record deposited
```
The fast trace then drives two parallel processes:
**Within the same context** — the trace biases the next execution of the same behavior. This is the short-term modulation loop. It is entirely local and requires no external signal.
**Across contexts** — the trace accumulates into `possible_tagging` when it exceeds the eligibility threshold. This is the bridge toward long-term change. It requires the trace to be sustained enough to survive into the NOT_AP or CONTINUOUS context.
### The Tag Formation — Where Non-Locality Enters
The abstract pattern for tag formation generalizes across all components but with different **coincidence requirements**:
**PRE, DEND, SOMA, AXON, ASTRO — one non-local coincidence:**
```
if FAST_TRACE > eligibility // local: this bouton was recently active
AND dopamine > threshold // non-local: organism-level reward signal
then: TAG += dopamine × possible_tagging
```
One spatial scale beyond the local component is required. The organism must confirm that the recent activity was worth saving.
**POST — two non-local coincidences:**
```
// First coincidence (NOT_bAP context):
if FAST_TRACE > Ca_TAG_threshold // local: spine Ca²⁺ was high
AND D-serine > threshold // non-local 1: astrosynapse co-agonist
if post_possible_tagging > threshold // local: CANDIDATE still present
AND bAP arrives // non-local 2: soma fired
then: FAST_TRACE amplified above Ca_HIGH
// Tag stabilization (any context):
if post_possible_tagging > threshold // local: confirmed coincidence
AND dopamine > threshold // non-local 3: organism validation
then: TAG += dopamine × post_possible_tagging // STABLE
```
Three spatial scales must align: astrosynapse, soma, organism. The postsynapse is the most constrained component — it requires the most non-local validation before committing.
### Trace Recession — The Temporal Behavior
In every NOT_AP or CONTINUOUS context, all traces decay:
```
FAST_TRACE *= decay(τ_fast) // ms to seconds — closes eligibility window
TAG *= decay(τ_slow) // hours — closes commitment window
```
The decay is not a separate behavior — it is the passive consequence of molecular processes. But its effect is behavioral: it enforces that coincidences must happen within specific time windows. The system does not check timing explicitly — timing is enforced by the competition between accumulation and decay.
## NIGHT — The General Form
```
given: TAG // strength of DAY evidence for this component
STRUCTURE // current architectural state
if: TAG > threshold // evidence strong enough to justify investment
then:
Δstructure = min(expansion_cost,
MATERIAL, // slow structural resources available
ENERGY × fraction) // assembly ATP available
STRUCTURE += Δstructure × coherence_bonus
MATERIAL -= Δstructure // RECOVERABLE after LTD
ENERGY -= Δstructure × ATP_cost // NOT recoverable
```
The coherence bonus appears when pre, post, and astro tags are all SET simultaneously — the three components of the synapse have all independently gathered evidence for the same structural change, which amplifies the commit beyond what any single tag would produce alone.
The abstract pattern says: a behavior deposits a trace, the trace decays, and the trace biases the next behavior. For the soma, the AP is the behavior, and **the refractory period and threshold elevation should both be consequences of a single trace deposited by the AP, decaying back toward baseline**. Neither should be a hardcoded duration — both should emerge from the return of the trace to resting conditions.
---
Yes, this is much more consistent with the rest of the architecture. The soma should not compute an explicit rhythm estimate and predict the next input — that is top-down. Instead, the **mismatch itself leaves a trace**, and that trace adjusts the refractory dynamics. Let me think through this carefully.
---
### The Bottom-Up Mechanism
The key event is: **a dendritic input arrives strong enough to fire the soma, but the soma is still refractory.** This is a missed opportunity — the input wanted to fire the cell, but the cell was not ready. This mismatch is the signal.
Each time this happens, it should leave a trace that biases the refractory dynamics toward recovering faster in that timing window — so that next time an input arrives at that phase, the soma is ready. This is potentiation of the refractory recovery, occurring within DAY, driven entirely by the local coincidence of "input wanted to fire" and "soma was not ready."
```
scope DAY | context NOT_AP (within refractory):
// Detect the mismatch: suprathreshold input during refractory
if branch_Vm > effective_threshold and soma_Na_inactivation > inactivation_threshold:
// Input arrived but soma could not fire — missed coincidence
// more alignment trace → faster recovery → soma ready sooner next time
```
---
### Why This Is Bottom-Up
There is no rhythm estimation, no prediction of the next input time, no computed inter-input interval. The soma does not model its input. It simply notices, locally and reactively, that an input arrived when it was not ready, and leaves a trace that makes it recover faster. Over many such mismatches at the same phase, the recovery speeds up at that phase specifically — and the soma ends up aligned with its input rhythm **without ever representing that rhythm**.
The alignment is an emergent statistical consequence of many local mismatch events, exactly as a potentiated synapse becomes tuned to its input without representing what it is tuned to. The phase-coupling appears, but nothing in the soma computed it.
---
### Depotentiation as Neglect — Not Explicit
Now the crucial part you raised: the depotentiation of refractory alignment must occur as a **consequence of not potentiating**, not as an explicit opposing mechanism.
The `refractory_alignment_trace` decays continuously. If mismatches keep happening at a particular phase, the trace is continuously replenished and the fast recovery is maintained. If mismatches stop happening — because the input rhythm changed, or because the alignment succeeded and inputs now arrive when the soma is ready — then the trace is no longer replenished and **decays back toward baseline on its own**.
```
// No explicit depotentiation — just decay when not reinforced
refractory_alignment_trace *= decay(τ_alignment)
// if mismatches continue → trace replenished → fast recovery maintained
// if mismatches stop → trace decays → recovery returns to baseline
```
This is exactly parallel to synaptic depotentiation by neglect. The soma does not actively slow its recovery when alignment is no longer needed. It simply stops receiving the mismatch signal that was keeping the recovery fast, and the recovery drifts back to baseline because the trace that accelerated it is no longer reinforced.
There is an elegant self-limiting property here. Once the soma is well-aligned, inputs arrive when it is ready, so there are no more mismatches, so the alignment trace stops being replenished and begins to decay. This would slowly de-align the soma — until inputs start arriving during refractory again, regenerating the mismatch and re-potentiating the alignment. The system settles into a dynamic equilibrium where just enough mismatch occurs to maintain just enough alignment. The soma hovers at the edge of alignment, continuously corrected by the residual mismatches that its imperfect alignment produces.
// ... budget replenishment, shipments, tagging as before ...
```
---
### The Conceptual Payoff
This makes the soma's temporal alignment obey exactly the same principles as everything else in the system:
A behavior leaves a trace — here the missed coincidence leaves the alignment trace.
The trace biases future behavior — here it accelerates recovery so the next input at that phase succeeds.
Potentiation is the active drive — the soma actively speeds up recovery in response to mismatch.
Depotentiation is neglect — the alignment trace decays when mismatches stop, with no explicit opposing process.
The system finds equilibrium through the residual of its own imperfection — just enough mismatch persists to maintain just enough alignment.
And critically, the soma achieves temporal prediction — firing in phase with its input rhythm — **without ever representing the rhythm**. The prediction is implicit in the structure of the recovery dynamics, built up from purely local, reactive, bottom-up trace deposits. This is the same way a potentiated synapse "predicts" that its input will be significant without representing the prediction: the prediction is the physical bias left by past experience, not a computed expectation. The soma's phase-coupling is the temporal version of the synapse's weight — both are implicit predictions encoded as physical bias, both built bottom-up from local coincidence, both maintained by reinforcement and lost by neglect.